[gdal-dev] Translating between UTM and Geographic

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Wed Sep 23 13:40:59 EDT 2009


What is the wkt you are using for zone 12 nad83?
 




"Henneke, Amanda M" <amanda.m.henneke at boeing.com>@lists.osgeo.org 
Envoyé par : gdal-dev-bounces at lists.osgeo.org
23/09/2009 01:39 PM

A
"gdal-dev at lists.osgeo.org" <gdal-dev at lists.osgeo.org>
cc

Objet
RE: [gdal-dev] Translating between UTM and Geographic








Here is some more information:

So, here is the WKT I'm getting from my code for the "problem" source 
file: 
 

PROJCS["NAD_1927_UTM_Zone_11N", 

GEOGCS["GCS_North_American_1927", 

DATUM["North_American_Datum_1927", 

SPHEROID["Clarke_1866",6378206.4,294.9786982]], 

PRIMEM["Greenwich",0], 

UNIT["Degree",0.017453292519943295]], 

PROJECTION["Transverse_Mercator"], 

PARAMETER["latitude_of_origin",0], 

PARAMETER["central_meridian",-117], 

PARAMETER["scale_factor",0.9996], 

PARAMETER["false_easting",500000], 

PARAMETER["false_northing",0], 

UNIT["Meter",1]] 

 

Here's the WKT I'm creating for the destination file: 

GEOGCS["Geographic Coordinate System", 

DATUM["WGS_1984", 

SPHEROID["WGS_1984",6378137,298.257223563]], 

PRIMEM["Greenwich",0], 

UNIT["degree",0.0174532925199433]] 

 

Do you see any issues with that?  It looks like the source file is picking 
up that it's NAD27... 
 


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: 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 11:58 AM
To: Craig Miller
Cc: gdal-dev at lists.osgeo.org
Subject: RE: [gdal-dev] Translating between UTM and Geographic

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


_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090923/de651a27/attachment-0001.html


More information about the gdal-dev mailing list