[R] Map projections - converting latitude/longitude to eastings and northings
Roger Bivand
Roger.Bivand at nhh.no
Thu Jul 2 12:48:42 CEST 2009
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.
More information about the R-help
mailing list