[gdal-dev] Translating between UTM and Geographic

Henneke, Amanda M amanda.m.henneke at boeing.com
Wed Sep 23 12:57:48 EDT 2009


Craig-

I'm trying to have it in Geograhphic/WGS84, at least that's what I'm specifying in the code...I agree I think it is a datum error, but I don't know what to do to make it translate the datum from NAD27 to WGS84 correctly. 

I don't know if I can send the raster, but I can send the two shapefiles...

Amanda M. Henneke
IG/DB Tools - TSS Capability Center


 
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.

-----Original Message-----
From: Craig Miller [mailto:craig.miller at spatialminds.com] 
Sent: Wednesday, September 23, 2009 11:51 AM
To: Henneke, Amanda M
Subject: RE: [gdal-dev] Translating between UTM and Geographic

Geographic is a projection, not a datum.  What Datum is the data in the "Geographic Projection" in?  E.g. you can have a map in either
Geographic/NAD27 or Geographic/NAD83 (or another datum for that matter..
such as WGS84).

What software are you using to display the data?

If you want me to take a look, zip up the raster, and the good shapefile, and the bad shapefile and send them over.  I don't have a lot of time as I'm getting ready to leave on a trip, but I'll try and squeeze it in before I leave.

Craig


> -----Original Message-----
> From: Henneke, Amanda M [mailto:amanda.m.henneke at boeing.com]
> Sent: Wednesday, September 23, 2009 9:28 AM
> To: Craig Miller
> Subject: RE: [gdal-dev] Translating between UTM and Geographic
> 
> Hi Craig-
> 
> I'm translating a shapefile (from UTM to Geographic) and then 
> comparing it
to
> 
> #1 A shapefile that was translated from UTM to Geographic using the
software,
> GlobalMapper.
> #2 A raster file that was originally projected in Geographic, so that 
> for example I can see the points don't match up with the features they 
> should represent on the image.
> 
> The shapefile that GlobalMapper translates matches up perfectly with 
> my
raster
> file.
> 
> So my thought process is, that if Global Mapper has some way to 
> convert
the
> different projections without the shifting, how come GDAL can't do that.
I'm
> thinking it can, but maybe I need to give it some additional data maybe?
Or
> am I off?
> 
> Thanks for your help!
> 
> Amanda M. Henneke
> IG/DB Tools - TSS Capability Center
> 
> 
> 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.
> 
> -----Original Message-----
> From: Craig Miller [mailto:craig.miller at spatialminds.com]
> Sent: Wednesday, September 23, 2009 11:21 AM
> To: Henneke, Amanda M
> Subject: RE: [gdal-dev] Translating between UTM and Geographic
> 
> If you are transforming the datum from NAD27 to WGS84 then it is 
> expected
that
> your points would be shifted exactly as you describe.  How are you
determining
> that they are shifted?
> 
> a.  Compared to a map?  Is the map reprojected?  Are you comparing 
> them to landform features or to the lat/lon grid on the map?  For 
> example, if you
have
> a USGS Quad map with lat/lon lines on it based on the NAD27 datum then
those
> lat/lon lines ONLY show the lat/lon using that datum.  If you plot 
> points
that
> have been shifted to the new datum, they will not agree with those 
> NAD27
lines
> since the new points are based on lat/lon NAD83.
> 
> b.  Comparing lat/lon directly?  The points have been transformed.
Lat/lon
> are relative to a datum and lan/lon NAD27 coords and lat/lon NAD83 
> coords
will
> have different values.
> 
> Craig
> 
> 
> > -----Original Message-----
> > From: gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev- 
> > bounces at lists.osgeo.org] On Behalf Of Henneke, Amanda M
> > Sent: Wednesday, September 23, 2009 8:17 AM
> > To: gdal-dev at lists.osgeo.org
> > Subject: [gdal-dev] Translating between UTM and Geographic
> >
> > Hello all-
> >
> > 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
> 
> >
> >
> > 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.
> >
> >
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev




More information about the gdal-dev mailing list