Displaying 1 result from an estimated 1 matches for "sp1transform".
Did you mean:
sptransform
2012 Oct 18
1
spTransform longlat to utm
...le.
Let's take a point lying somewhere in Germany, zone=32U
x <- 8.968735
y <- 49.454735
After conversion I sould get something like
Easting: 426858 (km)
Northing: 5427937 (km)
sp1 <- SpatialPoints(matrix(c(x,y), ncol=2), proj4string = CRS("+proj=longlat +datum=WGS84"))
sp1Transformed <- spTransform(sp1, CRS("+proj=merc +zone=32u +datum=WGS84"))
coordinates(sp1Transformed)
coords.x1 coords.x2
[1,] 998395.0133 6319888.068
The result is an obvious nonsense.
Well, after some deliberation I swapped the original coordinate columns:
x <- 49.454735
y <...