[R-sig-Geo] Conversion geographical coodinate in UTM

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Mon Jun 30 17:12:05 CEST 2014


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