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

Sarah Goslee sarah.goslee at gmail.com
Mon Jun 30 16:18:15 CEST 2014


Hi,

At a guess, your Front dataset doesn't have a CRS set, so
spTransform() doesn't know what to transform *from*.

See the examples in ?spTransform for the whole process, including
setting the CRS for your data.

Sarah

On Mon, Jun 30, 2014 at 10:10 AM, Gilles Benjamin Leduc <gbl1 at hi.is> wrote:
> Hi,
>
> I need to convert some geographical coordinate it UTM.
> First I have a shapefile:
> Front<-readShapeSpatial("ISL_adm0.shp")
> class(Front)
> [1] "SpatialPolygonsDataFrame"
>
> then… I tried this after googling:
> DataUTM <- spTransform(Front, CRS("+proj=utm +zone=27 +north +datum=WGS84"))
> Erreur dans spTransform(xSP, CRSobj, ...) :
>   No transformation possible from NA reference system
>
> My UTM area is 27 W (If I understood the system)
>
> What is wrong?
>
> Thanks in advance
>
> Benjamin
>
-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-sig-Geo mailing list