[R-sig-Geo] Conversion geographical coodinate in UTM
Gilles Benjamin Leduc
gbl1 at hi.is
Mon Jun 30 17:33:58 CEST 2014
Thanks Barry,
That's it… Sorry if my question was too simple… I'm not a geograph, I'm a molecular biologist… so I'm not used to these packages … I started from the simple script I had for normal maps… (and it is monday, brain isn't fully operational!)
Benjamin
Le Lundi 30 Juin 2014 15:12 GMT, Barry Rowlingson <b.rowlingson at lancaster.ac.uk> a écrit:
> On Mon, Jun 30, 2014 at 3:18 PM, Sarah Goslee <sarah.goslee at gmail.com> wrote:
> > Hi,
> >
> > At a guess, your Front dataset doesn't have a CRS set, so
>
> Probably because you've used readShapeSpatial which ignores projection
> info from shapefiles...
>
> >> Front<-readShapeSpatial("ISL_adm0.shp")
> >> class(Front)
> >> [1] "SpatialPolygonsDataFrame"
>
> Use rgdal:
>
> require(rgdal)
> Front = readOGR(".","ISL_adm0")
>
> then check Front has a proj4string. summary(Front) should mention it.
>
> This is getting to be the R-sig-geo equivalent of R FAQ 7.31..
>
> Barry
More information about the R-sig-Geo
mailing list