RE [gdal-dev] Translating between UTM and Geographic
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Wed Sep 23 13:21:50 EDT 2009
The problem might not be in your code but in the WKT projection
information (sSpRefParams).
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>@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/7e628c49/attachment-0001.html
More information about the gdal-dev
mailing list