<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-text-flowed" style="font-family: -moz-fixed;
font-size: 12px;" lang="x-western">Hi,
<br>
<br>
First time gdal user here.
<br>
<br>
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.
<br>
<br>
The data comes from <a class="moz-txt-link-freetext"
href="https://secure.antarctica.ac.uk/data/bedmap2/bedmap2_tiff.zip">https://secure.antarctica.ac.uk/data/bedmap2/bedmap2_tiff.zip</a>
<br>
<br>
The raster file is bedmap2_icemask_grounded_and_shelves.tif from
that zip file.
<br>
<br>
gdalinfo --version
<br>
GDAL 1.10.0, released 2013/04/24
<br>
<br>
I am using the command line below
<br>
<br>
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
<br>
<br>
Some information for the original raster:
<br>
gdalinfo -stats bedmap2_icemask_grounded_and_shelves.tif
<br>
Driver: GTiff/GeoTIFF
<br>
Files: bedmap2_icemask_grounded_and_shelves.tif
<br>
bedmap2_icemask_grounded_and_shelves.tif.ovr
<br>
bedmap2_icemask_grounded_and_shelves.tfw
<br>
bedmap2_icemask_grounded_and_shelves.tif.aux.xml
<br>
Size is 6667, 6667
<br>
Coordinate System is:
<br>
PROJCS["WGS_1984_Stereographic_South_Pole",
<br>
GEOGCS["WGS 84",
<br>
DATUM["WGS_1984",
<br>
SPHEROID["WGS 84",6378137,298.257223563,
<br>
AUTHORITY["EPSG","7030"]],
<br>
AUTHORITY["EPSG","6326"]],
<br>
PRIMEM["Greenwich",0],
<br>
UNIT["degree",0.0174532925199433],
<br>
AUTHORITY["EPSG","4326"]],
<br>
PROJECTION["Polar_Stereographic"],
<br>
PARAMETER["latitude_of_origin",-71],
<br>
PARAMETER["central_meridian",0],
<br>
PARAMETER["scale_factor",1],
<br>
PARAMETER["false_easting",0],
<br>
PARAMETER["false_northing",0],
<br>
UNIT["metre",1,
<br>
AUTHORITY["EPSG","9001"]]]
<br>
Origin = (-3333500.000000000000000,3333500.000000000000000)
<br>
Pixel Size = (1000.000000000000000,-1000.000000000000000)
<br>
Metadata:
<br>
AREA_OR_POINT=Area
<br>
Image Structure Metadata:
<br>
INTERLEAVE=BAND
<br>
Corner Coordinates:
<br>
Upper Left (-3333500.000, 3333500.000) ( 45d 0' 0.00"W,
48d27'31.20"S)
<br>
Lower Left (-3333500.000,-3333500.000) (135d 0' 0.00"W,
48d27'31.20"S)
<br>
Upper Right ( 3333500.000, 3333500.000) ( 45d 0' 0.00"E,
48d27'31.20"S)
<br>
Lower Right ( 3333500.000,-3333500.000) (135d 0' 0.00"E,
48d27'31.20"S)
<br>
Center ( 0.0000000, 0.0000000) ( 0d 0' 0.01"E, 90d 0'
0.00"S)
<br>
Band 1 Block=128x128 Type=Byte, ColorInterp=Gray
<br>
Min=0.000 Max=1.000
<br>
Minimum=0.000, Maximum=1.000, Mean=0.112, StdDev=0.315
<br>
NoData Value=127
<br>
Overviews: 3334x3334, 1667x1667, 834x834, 417x417, 209x209
<br>
Metadata:
<br>
STATISTICS_MAXIMUM=1
<br>
STATISTICS_MEAN=0.11176160412634
<br>
STATISTICS_MINIMUM=0
<br>
STATISTICS_STDDEV=0.31507293640332
<br>
Image Structure Metadata:
<br>
PIXELTYPE=SIGNEDBYTE
<br>
<GDALRasterAttributeTable>
<br>
<FieldDefn index="0">
<br>
<Name>OBJECTID</Name>
<br>
<Type>0</Type>
<br>
<Usage>0</Usage>
<br>
</FieldDefn>
<br>
<FieldDefn index="1">
<br>
<Name>Value</Name>
<br>
<Type>0</Type>
<br>
<Usage>0</Usage>
<br>
</FieldDefn>
<br>
<FieldDefn index="2">
<br>
<Name>Count</Name>
<br>
<Type>1</Type>
<br>
<Usage>0</Usage>
<br>
</FieldDefn>
<br>
<Row index="0">
<br>
<F>1</F>
<br>
<F>0</F>
<br>
<F>12104872</F>
<br>
</Row>
<br>
<Row index="1">
<br>
<F>2</F>
<br>
<F>1</F>
<br>
<F>1523082</F>
<br>
</Row>
<br>
</GDALRasterAttributeTable>
<br>
<br>
<br>
Thanks,
<br>
<br>
Bin Zhao
<br>
<br>
<br>
</div>
</body>
</html>