Rgdal package lat / long & # 8594; UTM

Can someone see what is wrong with this:

library(rgdal) # Make a two-column matrix, col1 = long, col2 = lat xy <- cbind(c(-107), c(26)) # Convert it to UTM coordinates (in units of meters) project(xy, "+proj=utm +zone=51 ellps=WGS84") 

I understand that Latitude greater than 84 and less than 80 is not valid, but why am I getting:

 In project(xy, "+proj=utm +zone=51 ellps=WGS84") : 1 projected point(s) not finite 

Thanks!

+7
source share
1 answer

use a positive number for longitude (107, instead of -107). negative for the western hemisphere

+11
source

All Articles