[gdal-dev] Translating between UTM and Geographic
Henneke, Amanda M
amanda.m.henneke at boeing.com
Wed Sep 23 11:16:48 EDT 2009
I'm trying to figure out how to reproject some points from a UTM projection to Geographic (WGS84) projection. This works fine when I'm working in UTM Zone 12 with NAD83. When I try the same code for Zone 11 NAD27, I get a slight shift in the points (to the east) and an extremely slight shift up (to the north).
I've included the following code as it stands now, I've tried all sorts of things thinking that I need to somehow include more information for the new spatial reference (the destination SR), and so far I'm coming up empty...
Anyone have any ideas what I'm missing?
Where sSpRefParams is a string that contains the WKT projection information from a valid layer...
srOld = new OSGeo.OSR.SpatialReference(sSpRefParams);
srNew.SetGeogCS("Geographic Coordinate System", OSGeo.OSR.Osr.SRS_DN_WGS84, OSGeo.OSR.Osr.SRS_DN_WGS84, OSGeo.OSR.Osr.SRS_WGS84_SEMIMAJOR, OSGeo.OSR.Osr.SRS_WGS84_INVFLATTENING, "Greenwich", 0.0, "degree", 0.0174532925199433);
ctTransform = new OSGeo.OSR.CoordinateTransformation(srOld, srNew);
Amanda M. Henneke
IG/DB Tools - TSS Capability Center
Boeing - St. Louis
When One tugs at a single thing in Nature, he finds it attached to the rest of the world. -John Muir
Please consider the environment before printing this e-mail.
More information about the gdal-dev