Opened 10 months ago

Closed 9 months ago

#7243 closed defect (fixed)

can not gdalwarp on tif file

Reported by: jachym Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: 2.2.3
Severity: normal Keywords:
Cc:

Description

Using GeoTIFF file from the Arcticdem resource

http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/61_20/61_20_2_2_5m_v2.0.tar.gz

gdalwarp -co COMPRESS=DEFLATE -co "BIGTIFF=YES" -s_srs +init=epsg:3411 -t_srs +init="epsg:4326" 61_20_2_2_5m_v2.0_reg_dem.tif 61_20_2_2_5m_v2.0_reg_dem-4326.tif

does not even pass first 10% of the data, than it freezes. QGIS does open and display the file.

$ gdalinfo

Driver: GTiff/GeoTIFF
Files: 61_20_2_2_5m_v2.0_reg_dem.tif
Size is 10000, 10000
Coordinate System is:
PROJCS["unnamed",
    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"]],
    PROJECTION["Polar_Stereographic"],
    PARAMETER["latitude_of_origin",70],
    PARAMETER["central_meridian",-45],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-2050000.000000000000000,2100000.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-2050000.000, 2100000.000) (179d18'35.00"E, 63d22'44.48"N)
Lower Left  (-2050000.000, 2050000.000) (180d 0' 0.00"W, 63d41'26.86"N)
Upper Right (-2000000.000, 2100000.000) (178d36'10.15"E, 63d40'59.64"N)
Lower Right (-2000000.000, 2050000.000) (179d17'33.65"E, 63d59'56.99"N)
Center      (-2025000.000, 2075000.000) (179d18' 4.70"E, 63d41'20.06"N)
Band 1 Block=256x256 Type=Float32, ColorInterp=Gray
  Min=-90.208 Max=387.483 
  Minimum=-90.208, Maximum=387.483, Mean=0.798, StdDev=16.179
  NoData Value=-9999
  Metadata:
    STATISTICS_MAXIMUM=387.48263549805
    STATISTICS_MEAN=0.79845368439739
    STATISTICS_MINIMUM=-90.2080078125
    STATISTICS_STDDEV=16.178946913791

Using GDAL 2.2.1 as well as 2.2.3

Change History (9)

comment:1 Changed 10 months ago by jachym

It looks, it is the dateline issue. But not sure, how to approach...

comment:2 Changed 10 months ago by Jukka Rahkonen

GDAL is trying to write quite a crazy image.

Size is 8206732, 14137
Origin = (-179.999999999999943,63.999696398638349)
Pixel Size = (0.000043866425336,-0.000043866425336)
...
Lower Left  (-180.0000000,  63.3795567) (
Upper Right ( 179.9999965,  63.9996964) (

Perhaps it is the dateline that makes GDAL to try to wrap the whole world with the transformed image. Could you have a try be giving reasonable output extents for gdalwarp with the -te parameter?

Last edited 10 months ago by Jukka Rahkonen (previous) (diff)

comment:3 Changed 10 months ago by jachym

Yes, I've seen it too (-180.000), but would you have any hint, what to do?

comment:4 Changed 10 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 41570:

warper: add very special case to handle situation where input raster edge touches dateline, but proj.4 transformation involves a discontinuity (fixes #7243)

comment:5 Changed 10 months ago by Even Rouault

In 41571:

fix warning in previous commit (refs #7243)

comment:6 Changed 10 months ago by jachym

Thanks @Even Rouault

But after trying out up-to-date version of GDAL, I get:

$ gdalwarp -wo SOURCE_EXTRA=1000 -wo SAMPLE_STEPS=100 -wo SAMPLE_GRID=YES -co COMPRESS=DEFLATE -co BIGTIFF=YES -s_srs +init=epsg:3411 -t_srs +proj=longlat +datum=WGS84 +over +no_defs 56_26_1_1_5m_v2.0_reg_dem.tif arcticdem-l7uqtyqj/56_26_1_1_5m_v2.0_reg_dem-warped.tif

*** Error in `gdalwarp': double free or corruption (out): 0x0000000002557d20 ***

input data sample: http://data.pgc.umn.edu/elev/dem/setsm/ArcticDEM/mosaic/v2.0/56_26/56_26_1_1_5m_v2.0.tar.gz

comment:7 Changed 10 months ago by jachym

Resolution: fixed
Status: closedreopened

comment:8 Changed 10 months ago by Even Rouault

I don't reproduce the crash. If you svn updated from a previous gdal trunk checkout, make sure to "make clean" before rebuilding.

comment:9 Changed 9 months ago by Even Rouault

Resolution: fixed
Status: reopenedclosed

Closin due to lack of feedback from reporter (regarding the crash)

Note: See TracTickets for help on using tickets.