[R-sig-Geo] LatLong to UTM
rscardamaglia at ege.fcen.uba.ar
rscardamaglia at ege.fcen.uba.ar
Wed Jun 6 17:57:32 CEST 2012
Hello,
I need some help transforming Latitude Longitude coordinates (in decimal
degrees) to UTM (zone 21 H, since Im in Buenos Aires, Argentina).
This is the script I used. The transformation for the easting coordinates
is correct but not for the Northing.
> LatLong <- data.frame(X = coordenadas2[,1], Y = coordenadas2[,2])
> LatLong
X Y
1 -35.14189 -57.39206
2 -35.14072 -57.39421
3 -35.14507 -57.38274
4 -35.14390 -57.39083
5 -35.14496 -57.39312
6 -35.14069 -57.39280
7 -35.14241 -57.39119
> coordinates(LatLong) <- ~ Y + X
> proj4string(LatLong) <- CRS("+proj=longlat +ellps=WGS84 +datum=WGS84")
> Utm <- spTransform(LatLong, CRS("+proj=utm +zone=21 ellps=WGS84"))
> Utm
SpatialPoints:
Y X
[1,] 464285.6 -3888849
[2,] 464089.3 -3888720
[3,] 465136.0 -3889198
[4,] 464398.6 -3889071
[5,] 464190.4 -3889189
[6,] 464217.7 -3888716
[7,] 464365.1 -3888906
Coordinate Reference System (CRS) arguments: +proj=utm +zone=21
+ellps=WGS84
It seems the Easting coordinates are well transformed, but the Northing
should be around 6111151.35 m S (for the first one for example).
I would really appreciate some help.
Best wishes,
Romina.
More information about the R-sig-Geo
mailing list