Opened 12 years ago

Closed 5 years ago

#4538 closed defect (wontfix)

GDALSuggestedWarpOutput() does not support grid sampling

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: Algorithms Version: unspecified
Severity: normal Keywords:
Cc:

Description

The GDALSuggestedWarpOutput() and related functions only collect locations around the edge of the source when trying to compute extents in the target coordinate system. This is not appropriate in some cases - for instance going from a polar view like the one represented below to WGS84 will results a WGS84 image that goes no further than 46degrees north.

Driver: GTiff/GeoTIFF
Files: small.tif
Size is 1236, 1236
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unknown",
        DATUM["unknown",
            SPHEROID["unnamed",6371228,0]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Lambert_Azimuthal_Equal_Area"],
    PARAMETER["latitude_of_center",90],
    PARAMETER["longitude_of_center",0],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-6198196.231499999761581,6198196.231499999761581)
Pixel Size = (10029.443740291259019,-10029.443740291262657)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-6198196.231, 6198196.231) (135d 0' 0.00"W,  3d 4'16.76"N)
Lower Left  (-6198196.231,-6198196.232) ( 45d 0' 0.00"W,  3d 4'16.76"N)
Upper Right ( 6198196.231, 6198196.231) (135d 0' 0.00"E,  3d 4'16.76"N)
Lower Right ( 6198196.231,-6198196.232) ( 45d 0' 0.00"E,  3d 4'16.76"N)
Center      (  -0.0000000,  -0.0000000) ( 63d26' 5.82"W, 90d 0' 0.00"N)
Band 1 Block=1236x6 Type=Byte, ColorInterp=Gray

I believe the solution is for GDALSuggestedWarpOutput() to include internal grid sampling similar to what is done in gdalwarpoperation when SAMPLE_GRID=YES is specified. It probably ought to be done all the time.

Change History (1)

comment:1 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.