[gdal-dev] Transform produces different results from 2.2.4 and 3.0.2 or 3.0.3

mike Null gdisk.mike at gmail.com
Tue Jan 28 07:54:30 PST 2020


So, I'm finding a difference between results....


def epsg_test():

    import ogr

    import osr

    wgs84_osr = osr.SpatialReference()

    wgs84_osr.ImportFromEPSG(4326)

    utm17_osr = osr.SpatialReference()

    utm17_osr.ImportFromEPSG(32617)

    transform = osr.CoordinateTransformation(wgs84_osr, utm17_osr)

    inputwkt = 'Point (-81.5 30.5)'

    ingeom = ogr.CreateGeometryFromWkt(inputwkt,wgs84_osr)

    print(ingeom.ExportToWkt())

    ingeom.Transform(transform)

    print(ingeom.ExportToWkt())



gdal 3.0.3, proj 6.3.0, with python 3.7 (also seen on 3.0.2, proj 6.2.1)

POINT (-81.5 30.5)

POINT (1385293.10269892 -10347979.9101242)



gdal 2.2.4, proj 4.9.3, with python 2.7

POINT (-81.5 30.5)

POINT (452019.438629914 3374297.77348828)


Gdal/proj was installed via qgis standalone installer.

I do believe the python2/gdal2 result is correct, or at least it agreed
with the project tool on esri and epsg.io.

epsg.io/transform#s_srs=4326&t_srs=32617&x=-81.5&y=30.5

Anyways I desire to use python 3 and gdal 3.

What might I need to do to get it working correctly? I know there was a lot
of changes with gdalbarn/proj.

-Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200128/c00a0c34/attachment.html>


More information about the gdal-dev mailing list