[R-sig-Geo] map2SpatialPolygons' 'proj4string' in spmaps
Sebastian P. Luque
spluque at gmail.com
Wed Oct 15 19:45:03 CEST 2008
On Wed, 15 Oct 2008 19:24:18 +0200 (CEST),
Roger Bivand <Roger.Bivand at nhh.no> wrote:
> No, not at all. The coordinates returned by map() if projection= is used
> are only for plotting, are in arbitrary units, and are only documented in
> code. map2SpatialPolygons() assumes that the data are in geographical
> coordinates, and ought perhaps to guess an ellipse and datum based on the
> age of the dataset (world possibly WGS84, US counties probably NAD27), but
> allows the user to set the CRS object directly. The projection= argument of
> map() makes the function call mapproject() with the given projection on the
> data flowing through, I believe.
> If you do str() of map(projection=) output, you will see the projection
> name used, but note that the coordinates are arbitrary.
Thanks a lot Roger, so here:
se.baffin <- map("worldHires", xlim=c(-70, -60), ylim=c(62, 69),
or in any of the world* databases, can we safely assume "+proj=longlat
+ellps=WGS84" (possibly with "+over" in some cases) in the returned
object? This would be good info to have in ?map.
One problem I also run into with map2SpatialPolygons() with the above
map object, is that the ring is not closed. Do you know of any examples
showing how one may close such rings, based on a polygon? Say we have a
rectangle over the map object and want to close the ring so we enclose
all the land (or water)?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 196 bytes
Desc: not available
More information about the R-sig-Geo