stephen sefick
2009-Jul-01 17:06 UTC
[R] Map projections - converting latitude/longitude to eastings and northings
I am trying to set up a Grass project and need to set up the region so that I can view the map. I can look at a map and find the lat/lon, but the map projection is in UTM NAD38 WGS84 and I need to set the eastings and northings. Is there a package that will help me calculate this in R. thanks -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
Roger Bivand
2009-Jul-02 10:48 UTC
[R] Map projections - converting latitude/longitude to eastings and northings
Wouldn't grass-users, or maybe R-sig-geo be a more appropriate list? Given points in geographical coordinates, use project() or spTransform() in rgdal. The former will not do datum transformation, the latter will. NAD83 is a US datum specification based on WGS84, UTM is a projection but is useless without the zone number. If you can find the datum of your input data: in_crs <- CRS("+proj=longlat +datum=<whatever>") out_crs <- CRS("+proj=utm +zone=<#> +datum=NAD83 +ellps=WGS84") utm_bbox <- bbox(spTransform(SpatialPoints(ll_crds, proj4string=in_crs), out_crs) will get from one matrix of coordinates to the other. Note that for obvious reasons a rectangle on one side will only rarely be a rectangle on the other, so I've just taken a bounding box. Roger Bivand stephen sefick wrote:> > I am trying to set up a Grass project and need to set up the region so > that I can view the map. I can look at a map and find the lat/lon, > but the map projection is in UTM NAD38 WGS84 and I need to set the > eastings and northings. Is there a package that will help me > calculate this in R. > thanks > > -- > Stephen Sefick > > > >-- View this message in context: http://www.nabble.com/Map-projections---converting-latitude-longitude-to-eastings-and-northings-tp24293706p24304700.html Sent from the R help mailing list archive at Nabble.com.