Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#6863 closed defect (fixed)

gdalwarp gives incorrect result going from utm to epsg:3857

Reported by: jessecrocker Owned by: warmerdam
Priority: normal Milestone: 2.1.4
Component: default Version: 2.1.3
Severity: normal Keywords:
Cc:

Description

gdalwarp output when going from +proj=utm +zone=12 +ellps=clrk66 +units=m +no_defs to epsg:3857 is incorrect, it appears to be off by the offset between nad27 and wgs84.

Going from +proj=utm +zone=12 +ellps=clrk66 +units=m +no_defs to epsg:4267, then from epsg:4267 to epsg:3857 does give correct results.

gdalsrsinfo output for the file i am working with

PROJ.4 : '+proj=utm +zone=12 +ellps=clrk66 +units=m +no_defs '

OGC WKT :
PROJCS["NAD_1927_UTM_Zone_12N",
    GEOGCS["GCS_North_American_1927",
        DATUM["D_North_American_1927",
            SPHEROID["Clarke_1866",6378206.4,294.9786982138982]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-111],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]

Command that gives incorrect output: gdalwarp -t_srs epsg:3857 source.tiff source-3857.tiff

But this does work correctly: gdalwarp -t_srs epsg:4267 source.tiff source-4267.tiff; gdalwarp -t_srs epsg:3857 source-4267.tiff source-3857-from-4267.tiff

I have attached 2 files, one is the source.tiff file from my test case, the other is the incorrect result layered over the source file with 50% opacity in qgis to show the shift.

Attachments (2)

Screen Shot 2017-04-17 at 6.21.02 AM.png (863.8 KB) - added by jessecrocker 7 months ago.
Example of incorrect output
source.tiff (790.8 KB) - added by jessecrocker 7 months ago.
source.tiff

Download all attachments as: .zip

Change History (6)

Changed 7 months ago by jessecrocker

Example of incorrect output

Changed 7 months ago by jessecrocker

Attachment: source.tiff added

source.tiff

comment:1 Changed 7 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 38044:

GTiff: map D_North_American_1927 datum citation name to OGC North_American_Datum_1927 so that datum is properly recognized (fixes #6863)

comment:2 Changed 7 months ago by Even Rouault

In 38045:

GTiff: map D_North_American_1927 datum citation name to OGC North_American_Datum_1927 so that datum is properly recognized (fixes #6863)

comment:3 Changed 7 months ago by Even Rouault

In 38046:

GTiff: map D_North_American_1927 datum citation name to OGC North_American_Datum_1927 so that datum is properly recognized (fixes #6863)

comment:4 Changed 7 months ago by Even Rouault

Milestone: 2.1.4
Note: See TracTickets for help on using tickets.