Opened 9 years ago

Closed 9 years ago

#5789 closed defect (fixed)

warp: reprojecting from south polar stereographic to full world 4326 with big -wm fails

Reported by: Even Rouault Owned by: Even Rouault
Priority: normal Milestone: 1.11.2
Component: Algorithms Version: unspecified
Severity: normal Keywords: warp
Cc:

Description

Reported as http://lists.osgeo.org/pipermail/gdal-dev/2014-December/040706.html

I am trying to use gdalwarp to reproject a raster file from polar stereo 
to WGS84. The original raster has nodata value 127 and 0's and 1's as 
real data values. After warping,  the file contains only nodata values, 
i.e., all real data got lost. Could anyone help me with it.

The data comes from 
https://secure.antarctica.ac.uk/data/bedmap2/bedmap2_tiff.zip

The raster file is bedmap2_icemask_grounded_and_shelves.tif from that 
zip file.

gdalinfo --version
GDAL 1.10.0, released 2013/04/24

I am using the command line below

gdalwarp --config GDAL_CACHEMAX 500 -wm 500 -t_srs EPSG:4326 -te -180 
-90 180 90 -multi -srcnodata 127 -dstnodata 127 
bedmap2_icemask_grounded_and_shelves.tif 
bedmap2_icemask_grounded_and_shelves_reproj.tif

Some information for the original raster:
gdalinfo -stats bedmap2_icemask_grounded_and_shelves.tif
Driver: GTiff/GeoTIFF
Files: bedmap2_icemask_grounded_and_shelves.tif
        bedmap2_icemask_grounded_and_shelves.tif.ovr
        bedmap2_icemask_grounded_and_shelves.tfw
        bedmap2_icemask_grounded_and_shelves.tif.aux.xml
Size is 6667, 6667
Coordinate System is:
PROJCS["WGS_1984_Stereographic_South_Pole",
     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",-71],
     PARAMETER["central_meridian",0],
     PARAMETER["scale_factor",1],
     PARAMETER["false_easting",0],
     PARAMETER["false_northing",0],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]]]
Origin = (-3333500.000000000000000,3333500.000000000000000)
Pixel Size = (1000.000000000000000,-1000.000000000000000)
Metadata:
   AREA_OR_POINT=Area
Image Structure Metadata:
   INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-3333500.000, 3333500.000) ( 45d 0' 0.00"W, 48d27'31.20"S)
Lower Left  (-3333500.000,-3333500.000) (135d 0' 0.00"W, 48d27'31.20"S)
Upper Right ( 3333500.000, 3333500.000) ( 45d 0' 0.00"E, 48d27'31.20"S)
Lower Right ( 3333500.000,-3333500.000) (135d 0' 0.00"E, 48d27'31.20"S)
Center      (   0.0000000,   0.0000000) (  0d 0' 0.01"E, 90d 0' 0.00"S)
Band 1 Block=128x128 Type=Byte, ColorInterp=Gray
   Min=0.000 Max=1.000
   Minimum=0.000, Maximum=1.000, Mean=0.112, StdDev=0.315
   NoData Value=127
   Overviews: 3334x3334, 1667x1667, 834x834, 417x417, 209x209
   Metadata:
     STATISTICS_MAXIMUM=1
     STATISTICS_MEAN=0.11176160412634
     STATISTICS_MINIMUM=0
     STATISTICS_STDDEV=0.31507293640332
   Image Structure Metadata:
     PIXELTYPE=SIGNEDBYTE
<GDALRasterAttributeTable>
   <FieldDefn index="0">
     <Name>OBJECTID</Name>
     <Type>0</Type>
     <Usage>0</Usage>
   </FieldDefn>
   <FieldDefn index="1">
     <Name>Value</Name>
     <Type>0</Type>
     <Usage>0</Usage>
   </FieldDefn>
   <FieldDefn index="2">
     <Name>Count</Name>
     <Type>1</Type>
     <Usage>0</Usage>
   </FieldDefn>
   <Row index="0">
     <F>1</F>
     <F>0</F>
     <F>12104872</F>
   </Row>
   <Row index="1">
     <F>2</F>
     <F>1</F>
     <F>1523082</F>
   </Row>
</GDALRasterAttributeTable>

Change History (1)

comment:1 by Even Rouault, 9 years ago

Milestone: 1.11.2
Resolution: fixed
Status: newclosed

trunk r28205, branches/1.11 r28206 "warp: fix integer overflow when reprojecting into an area with (part of) bounds completely outside of the source projection (#5789)"

Note: See TracTickets for help on using tickets.