[R-sig-Geo] map to shapefile with projection info
Sebastian P. Luque
spluque at gmail.com
Wed Dec 6 21:35:48 CET 2006
On Wed, 06 Dec 2006 14:00:38 -0600,
"Sebastian P. Luque" <spluque at gmail.com> wrote:
> On Wed, 6 Dec 2006 20:28:42 +0100 (CET),
> Roger Bivand <Roger.Bivand at nhh.no> wrote:
[...]
>> names <- sapply(slot(canada_sp, "polygons"), function(i) slot(i, "ID"))
>> canada_spdf <- SpatialPolygonsDataFrame(canada_sp,
>> data=data.frame(names=names, row.names=names))
>> writeOGR(canada_spdf, dsn=".", layer="canada", driver="ESRI Shapefile")
>> list.files(pattern="canada")
I searched on the maps and mapdata packages for the missing datum, but
only found this:
,-----[ *help[R](map)* (lines: 54 - 59) ]
| projection: character string that names a map projection to use. See
| 'mapproject' (in the 'mapproj' library). The default is to
| use a rectangular projection with the aspect ratio chosen so
| that longitude and latitude scales are equivalent at the
| center of the picture.
`-----
where I think mapproj code has been transferred to rgdal. How can we
create a datum from this information? Thanks once again.
--
Seb
More information about the R-sig-Geo
mailing list