RE [gdal-dev] Translating between UTM and Geographic

Steve.Toutant at inspq.qc.ca Steve.Toutant at inspq.qc.ca
Wed Sep 23 13:17:08 EDT 2009


I don't know about the code I'm not a programmer.
You said 
UTM Zone 12 with NAD83 works but this Zone 11 NAD27 doesn't.
My guess is you are using Zone 11 NAD83 instead NAD27.

I might be wrong though.
Steve



Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction des risques biologiques, environnementaux et occupationnels
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 
Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
steve.toutant at inspq.qc.ca
http://www.inspq.qc.ca
 




"Henneke, Amanda M" <amanda.m.henneke at boeing.com> 
23/09/2009 01:04 PM

A
"Steve.Toutant at inspq.qc.ca" <Steve.Toutant at inspq.qc.ca>
cc

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








What do you mean by "good parameters" is there something I need to add to 
the code I included?
 
Amanda M. Henneke 
IG/DB Tools - TSS Capability Center 
Boeing - St. Louis 
314-777-6856 
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.
 

From: Steve.Toutant at inspq.qc.ca [mailto:Steve.Toutant at inspq.qc.ca] 
Sent: Wednesday, September 23, 2009 11:53 AM
To: Henneke, Amanda M
Cc: gdal-dev at lists.osgeo.org; gdal-dev-bounces at lists.osgeo.org
Subject: RE [gdal-dev] Translating between UTM and Geographic


hi, 
slight shift in the points (to the east) and an extremely slight shift up 
(to the north). 

That seems to be a datum error. Make sure you set the good parameters for 
datum when using nad83 or nad27. 
Steve 
 



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


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

Objet
[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
Boeing - St. Louis
314-777-6856



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





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


More information about the gdal-dev mailing list