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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Vincent BERNAT

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


Here are my image gdalinfo


Size is 1536, 1536
Coordinate System is:
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]]
Origin = (9713.964988580557474,556512.681478320620954)
Pixel Size = (5.004572695909427,-5.004572695909427)
Metadata:
  SRP_CREATIONDATE=20070417
  SRP_EDN=0
  SRP_NAM=APOLES01
  SRP_PRODUCT=ASRP
  SRP_REVISIONDATE=20070417
  SRP_SCA=50000
  SRP_ZNA=18
Corner Coordinates:
Upper Left  (    9713.965,  556512.681) (  1d 0' 0.00"E, 85d 0' 0.00"S)
Lower Left  (    9713.965,  548825.658) (  1d 0'50.41"E, 85d 4' 8.55"S)
Upper Right (   17400.989,  556512.681) (  1d47'27.37"E, 84d59'53.95"S)
Lower Right (   17400.989,  548825.658) (  1d48'57.61"E, 85d 4' 2.42"S)
Center      (   13557.477,  552669.170) (  1d24'18.85"E, 85d 2' 1.66"S)
Band 1 Block=128x128 Type=Byte, ColorInterp=Palette
  NoData Value=0
  Color Table (RGB with 256 entries)
    0: 0,0,0,255


Thanks a lot.

Regards,

Vincent


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: [gdal 2.2.2] different result with gdal 2.1.0

Even Rouault-2

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


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: [gdal 2.2.2] different result with gdal 2.1.0

Vincent BERNAT

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 <[hidden email]>
Envoyé : mardi 31 octobre 2017 12:49
À : [hidden email]
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


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: [gdal 2.2.2] different result with gdal 2.1.0

Even Rouault-2

Vincent,

 

digging into the GDAL 2.2.0 NEWS file, I see:

"""

ASRP driver:

* fix georeferencing of polar arc zone images (#6560)

""""

 

So if there's an issue it is mostly related to that change, rather than on the gdalwarp / GDALSuggestedWarpOutput side of things

 

And that fix was backported to GDAL 2.1.1, which explains I saw same results in the latest state of GDAL 2.1, 2.2 and trunk branchs, if you are on GDAL 2.1.0 which has not this fix

 

You should already see the difference of georeferencing between GDAL 2.1.0 and later version by doing a gdalinfo on the source ASRP file.

 

Do you have strong reasons to believe that GDAL 2.1.0 was really georeferencing correctly your dataset ?

The change done in https://trac.osgeo.org/gdal/ticket/6560 seems at first sight to be an improvement regarding the previous behaviour

 

Even

 

--

Spatialys - Geospatial professional services

http://www.spatialys.com


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev