[R] converting coordinates from utm to longitude / latitude

Werner Wernersen pensterfuzzer at yahoo.de
Wed Aug 20 00:08:56 CEST 2008

It would be nicer to convert directly the entire shapefile object to long/lat coordinates but if that is not possible, I will convert the other points to UTM.
Hence, I am playing around with rgdal.

SP <- SpatialPoints(cbind(32.29252, -0.3228500), 
spTransform(SP, CRS("+proj=utm +zone=36"))

> spTransform(SP, CRS("+proj=utm +zone=36"))
     coords.x1 coords.x2
[1,]  421274.4 -35687.37
Coordinate Reference System (CRS) arguments: +proj=utm +zone=36 +ellps=WGS84 

This result corresponds with what I get when using convUL() but my map of that area in UTM coordinates does not extend to the negative.
An external program converts the point to x=420994   y=9964407 which also seems correct with respect to the map. Fore sure, I am using the function wrongly somehow. Can anyone give me a hint?

That's very much appreciated!


----- Ursprüngliche Mail ----
Von: Werner Wernersen <pensterfuzzer at yahoo.de>
An: r-help at stat.math.ethz.ch
Gesendet: Dienstag, den 19. August 2008, 20:28:29 Uhr
Betreff: converting coordinates from utm to longitude / latitude


is there a function in R to convert data read with read.shape and which is originally in UTM coordinates into longitude / latitude coordinates?
I found the convUL() function from the PBSmapping package but I have no idea how I could apply that to the read.shape object.

Many thanks,

fügt über einen herausragenden Schutz gegen Massenmails. 

ragenden Schutz gegen Massenmails. 

More information about the R-help mailing list