[R-sig-Geo] maptools/kmlPolygons not outputting all Polygon objects
Phil Haines
phil.haines82 at gmail.com
Thu Aug 28 18:45:19 CEST 2014
> Tomislav Hengl <hengl <at> spatial-analyst.net> writes:
> I've tried creating a KML file using the plotKML package and I did not
> notice anything strange with Alaska:
Hi Tomislav,
Thank you for your reply, I was not previously aware of the plotKML
package but am finding it very helpful.
I did not mean to suggest a fault in the wrld_simpl data. I think my
issue lies with the maptools:::kmlPolygons function which appears to
access only the first Polygon within each Polygons object.
As far as I can tell this function
-Loops over the list of spatialPolygons
-Loops over the list of Polygons for each spatialPolygon
-Accesses only the first Polygon for each Polygons object
I believe that the final part should be a loop whereas currently it is
of the form
polygon <- spatialPolygons at polygons[[i]]@Polygons[[1]]
I hope that this is of some help. I am very new to both R and these
mailing lists but am trying to follow the rules as well as I can!
Thanks,
Phil Haines (RMS)
p.s. As an aside I have had to change the email address I subscribe with
as my work email was filtering out all messages from this list. This has
made it very hard to reply without breaking the thread so I am hoping
that posting this message via
http://news.gmane.org/gmane.comp.lang.r.geo will work.
I wondered if anyone had any advice for others in this situation? The
only relevant post I've found on google is the following:
https://stat.ethz.ch/pipermail/r-help/2006-August/111039.html
More information about the R-sig-Geo
mailing list