[gdal-dev] Re: Ogr2ogr projection problem- features are shifted 12 miles to the north??? How do I fix it?

Hermann Peifer peifer at gmx.eu
Sun Sep 11 04:10:14 EDT 2011


On 11/09/2011 00:27, Stacy Supak wrote:
> Hi Community,
>
> I have discovered a problem relate to the output of an ogr2ogr command
> line call. My resulting polygon features are 12 miles (.18 degrees) due
> north of where they should be, but the longitude is correct. The polygon
> dimensions are also preserved.
>
> The desired output is a shape file that has been projected using EPSG
> 4326.The input comes from a postgres database with postgis where the
> polygon were digitized in EPSG 900913 (the google mercator prj).
>

A latitude-only shift of several miles/kilometres usually occurs when 
projecting from a sphere to an ellpsoid or vice-versa. See Melita 
Kennedy's explanation at [1] and the FAQ at [2].

What does proj --version say ?

I am asking as proj.4's more recent behaviour is to avoid this shift, as 
stated in the 4.6.0 Release Notes, from December 2007:

--- snip ---
  o Avoid applying "change of ellipsoid" during datum shifting based on
    ellipsoids getting changed to spheres for spherical projections.

    ... from the NEWS file at [3]
--- snip ---

Hope this helps, Hermann


[1] 
http://osgeo-org.1803224.n2.nabble.com/Re-mercator-projection-to-spherical-ellipsoid-from-WGS84-td2063385.html

[2] 
http://trac.osgeo.org/proj/wiki/FAQ#ChangingEllipsoidWhycantIconvertfromWGS84toGoogleEarthVirtualGlobeMercator

[3] http://trac.osgeo.org/proj/browser/trunk/proj/NEWS


More information about the gdal-dev mailing list