[R-sig-Debian] spTransform

Abed W. Ayyad abdulhadi.ayyad at uclmail.net
Fri May 12 17:51:17 CEST 2017


Salutations,

Long story short: I need to create an SPDF to superimpose on a Google map.

I have .shp file which has a long list of locations listed in (what I guess
must be) UTM. I need to transform these into lon, lat. My use of
spTransform, however, keeps giving me the wrong results. For what it's
worth, it only seems to be messing up the latitude.

My final line of code looks like this:

pointsTransformed <- spTransform(pointsutm, CRS("+proj=longlat +datum=WGS84
+zone=36S"))

The line before looks like:
pointsutm <- SpatialPoints(cbind(pointsmapspatial$Point_Y,
pointsmapspatial$Point_X), proj4string = CRS("+proj=utm +zone=36S
+ellps=GRS80")

Can you see what I did wrong?

	[[alternative HTML version deleted]]



More information about the R-SIG-Debian mailing list