[gdal-dev] A strange thing with a png geospatial file and gdalwarp. Is it a bug?

aborruso aborruso at gmail.com
Wed Sep 4 01:51:25 PDT 2013


Dear all, 
I have a geospatial png file - http://ge.tt/7tmMR7r/v/0?c -and gdalinfo give
me this projection info: 

PROJCS["Popular Visualisation CRS / Mercator", 
    GEOGCS["Popular Visualisation CRS", 
        DATUM["Popular_Visualisation_Datum", 
            SPHEROID["Popular Visualisation Sphere",6378137,0, 
                AUTHORITY["EPSG","7059"]], 
            TOWGS84[0,0,0,0,0,0,0], 
            AUTHORITY["EPSG","6055"]], 
        PRIMEM["Greenwich",0, 
            AUTHORITY["EPSG","8901"]], 
        UNIT["degree",0.01745329251994328, 
            AUTHORITY["EPSG","9122"]], 
        AUTHORITY["EPSG","4055"]], 
    UNIT["metre",1, 
        AUTHORITY["EPSG","9001"]], 
    PROJECTION["Mercator_1SP"], 
    PARAMETER["central_meridian",0], 
    PARAMETER["scale_factor",1], 
    PARAMETER["false_easting",0], 
    PARAMETER["false_northing",0], 
    AUTHORITY["EPSG","3785"], 
    AXIS["X",EAST], 
    AXIS["Y",NORTH]] 

It's EPSG:3785. 

If I run this command: 

gdalwarp -s_srs EPSG:3785 -t_srs EPSG:4326 -of GTiff "input.png"
"output.tif"   

The output file has this extent: 

Upper Left  (  -0.6064394,  44.7016078) (  0d36'23.18"W, 44d42' 5.79"N) 
Lower Left  (  -0.6064394,  44.6980730) (  0d36'23.18"W, 44d41'53.06"N) 
Upper Right (  -0.5975973,  44.7016078) (  0d35'51.35"W, 44d42' 5.79"N) 
Lower Right (  -0.5975973,  44.6980730) (  0d35'51.35"W, 44d41'53.06"N) 
Center      (  -0.6020184,  44.6998404) (  0d36' 7.27"W, 44d41'59.43"N) 

If I run this command, without -s_srs parameter: 

gdalwarp  -t_srs EPSG:4326 -of GTiff "Avenue de Mont-de-Marsan.png"
"male.tif" 

This output has an extent that is different from the previous (look at
latitude): 

Upper Left  (  -0.6064394,  44.8937072) (  0d36'23.18"W, 44d53'37.35"N) 
Lower Left  (  -0.6064394,  44.8901724) (  0d36'23.18"W, 44d53'24.62"N) 
Upper Right (  -0.5975973,  44.8937072) (  0d35'51.35"W, 44d53'37.35"N) 
Lower Right (  -0.5975973,  44.8901724) (  0d35'51.35"W, 44d53'24.62"N) 
Center      (  -0.6020183,  44.8919398) (  0d36' 7.27"W, 44d53'30.98"N) 

Is it normal? 

I'm using GDAL 1.10.1, released 2013/08/26, downloaded from here
http://vbkto.dyndns.org/sdk/. 

Thank you, 

Andrea



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/A-strange-thing-with-a-png-geospatial-file-and-gdalwarp-Is-it-a-bug-tp5075948.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list