[gdal-dev] [gdal 2.2.2] different result with gdal 2.1.0

Vincent BERNAT vincent.bernat at magellium.fr
Mon Nov 6 23:55:04 PST 2017


Thanks for your reply.


I have these differents only with images using driver SRP/Standard Raster Product (ASRP/USRP)


i did it with gdalwrap with 2.1.0 and 2.2.2 :

>>gdalwrap input.IMG output.IMG -overwrite -t_srs EPSG:4326


and here are the 2 gdalinfo i got in outputs :


Driver: GTiff/GeoTIFF
Files: OUT_2.2.2.IMG
Size is 2165, 188
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (1.000000000000000,-84.998318287963713)
Pixel Size = (0.000376928984429,-0.000376928984429)
Metadata:
  AREA_OR_POINT=Area
  SRP_CREATIONDATE=20070417
  SRP_EDN=0
  SRP_NAM=APOLES01
  SRP_PRODUCT=ASRP
  SRP_REVISIONDATE=20070417
  SRP_SCA=50000
  SRP_ZNA=18
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (   1.0000000, -84.9983183) (  1d 0' 0.00"E, 84d59'53.95"S)
Lower Left  (   1.0000000, -85.0691809) (  1d 0' 0.00"E, 85d 4' 9.05"S)
Upper Right (   1.8160513, -84.9983183) (  1d48'57.78"E, 84d59'53.95"S)
Lower Right (   1.8160513, -85.0691809) (  1d48'57.78"E, 85d 4' 9.05"S)
Center      (   1.4080256, -85.0337496) (  1d24'28.89"E, 85d 2' 1.50"S)
Band 1 Block=2165x3 Type=Byte, ColorInterp=Palette
  NoData Value=0
  Color Table (RGB with 256 entries)
    0: 0,0,0,0
    1: 0,0,17,255

-------------------------------------------------------------------------------------------------


gdalinfo OUT_2.1.0.IMG
Driver: GTiff/GeoTIFF
Size is 11865, 2172
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-71.565051177077976,-75.410804142370040)
Pixel Size = (0.004477910774178,-0.004477910774178)
Metadata:
  AREA_OR_POINT=Area
  SRP_CREATIONDATE=20070417
  SRP_EDN=0
  SRP_NAM=APOLES01
  SRP_PRODUCT=ASRP
  SRP_REVISIONDATE=20070417
  SRP_SCA=50000
  SRP_ZNA=18
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  ( -71.5650512, -75.4108041) ( 71d33'54.18"W, 75d24'38.89"S)
Lower Left  ( -71.5650512, -85.1368263) ( 71d33'54.18"W, 85d 8'12.57"S)
Upper Right ( -18.4346398, -75.4108041) ( 18d26' 4.70"W, 75d24'38.89"S)
Lower Right ( -18.4346398, -85.1368263) ( 18d26' 4.70"W, 85d 8'12.57"S)
Center      ( -44.9998455, -80.2738152) ( 44d59'59.44"W, 80d16'25.73"S)
Band 1 Block=11865x1 Type=Byte, ColorInterp=Palette
  NoData Value=0
  Color Table (RGB with 256 entries)
    0: 0,0,0,255

-------------------------------------------------------------------------------------------------



________________________________
De : Even Rouault <even.rouault at spatialys.com>
Envoyé : mardi 31 octobre 2017 12:49
À : gdal-dev at lists.osgeo.org
Cc : Vincent BERNAT
Objet : Re: [gdal-dev] [gdal 2.2.2] different result with gdal 2.1.0


On mardi 31 octobre 2017 07:47:50 CET Vincent BERNAT wrote:

> Hello all,

>

>

> I was working with gdal 2.1.0 and i decide to update to 2.2.2

>

> I work on Centos.

>

>

> Everything is ok but on one image, i don't get the same result (and the

> result with 2.2.2 seems incorrect).

>

>

> One of the most important difference is the result of the call of this

> function :

>

> GDALSuggestedWarpOutput



You don't give enough information for other people to be able to reproduce. Which arguments do you pass to GDALSuggestedWarpOutput ?



Can you reproduce with gdalwarp ?



Here's what I've tried:



* generate an image with equivalent size and georeferencing as yours



gdal_translate byte.tif test.tif -a_srs 'PROJCS["ARC_System_Zone_18",

GEOGCS["GCS_Sphere",

DATUM["D_Sphere",

SPHEROID["Sphere",6378137.0,0.0]],

PRIMEM["Greenwich",0],

UNIT["degree",0.0174532925199433]],

PROJECTION["Azimuthal_Equidistant"],

PARAMETER["latitude_of_center",-90],

PARAMETER["longitude_of_center",0],

PARAMETER["false_easting",0],

PARAMETER["false_northing",0]]' \

-outsize 1536 1536 -a_ullr 9713.965 556512.681 17400.989 548825.658



* wrap it to WGS84



gdalwarp test.tif out.tif -overwrite -t_srs EPSG:4326





With GDAL trunk or 2.1, I get the exact same result:



$ gdalinfo -checksum out.tif

Driver: GTiff/GeoTIFF

Files: out.tif

Size is 2165, 188

Coordinate System is:

GEOGCS["WGS 84",

DATUM["WGS_1984",

SPHEROID["WGS 84",6378137,298.257223563,

AUTHORITY["EPSG","7030"]],

AUTHORITY["EPSG","6326"]],

PRIMEM["Greenwich",0],

UNIT["degree",0.0174532925199433],

AUTHORITY["EPSG","4326"]]

Origin = (1.000000002034652,-84.998318292160022)

Pixel Size = (0.000376928999761,-0.000376928999761)

Metadata:

AREA_OR_POINT=Area

Image Structure Metadata:

INTERLEAVE=BAND

Corner Coordinates:

Upper Left ( 1.0000000, -84.9983183) ( 1d 0' 0.00"E, 84d59'53.95"S)

Lower Left ( 1.0000000, -85.0691809) ( 1d 0' 0.00"E, 85d 4' 9.05"S)

Upper Right ( 1.8160513, -84.9983183) ( 1d48'57.78"E, 84d59'53.95"S)

Lower Right ( 1.8160513, -85.0691809) ( 1d48'57.78"E, 85d 4' 9.05"S)

Center ( 1.4080256, -85.0337496) ( 1d24'28.89"E, 85d 2' 1.50"S)

Band 1 Block=2165x3 Type=Byte, ColorInterp=Gray

Checksum=51779



Even



--

Spatialys - Geospatial professional services

http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171107/7e836d28/attachment-0001.html>


More information about the gdal-dev mailing list