[gdal-dev] gdalwarp sets nodata value for real data points
Jerl Simpson
jsimpson at wxtrends.com
Wed Sep 24 12:38:05 PDT 2014
I've noticed a problem when using gdalwarp to warp netCDF data sets to
different resolutions.
$ gdalwarp --version
GDAL 1.11.0, released 2014/04/16
It also happens with:
$ gdalwarp --version
GDAL 1.9.2, released 2012/10/08
It makes no difference if I'm warping to a higher, lower or same
resolution, all the data points from -180 to 90 longitude are set to the
noData value.
The only points that remain unaffected are those that equal 0. If I set
all points that are 0 to 1, then every point <90deg longitude is set to
the nodata value.
I have seen this before, but specifying the -srcnodata and -dstnodata
values fixed it in those cases, it seems to have no affect on the
dataset I'm using now.
One of the versions of the commands I've used, doesn't seem to matter
which resampling method I use.
$ gdalwarp -r cubicspline -tr 0.1 -0.1 -dstnodata -9999 -srcnodata -9999
-of netCDF in.nc out.nc
Does anyone have any idea what's going on here?
Input file info (output file info is the same, except (pixel) size changes)
Driver: netCDF/Network Common Data Format
Files: in.nc
Size is 8640, 3432
Coordinate System is:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9108"]],
AUTHORITY["EPSG","4326"]]
Origin = (-180.000000000000000,85.000000000114412
Pixel Size = (0.041666666666700,-0.041666666666700)
Corner Coordinates:
Upper Left (-180.0000000, 85.0000000) (180d 0' 0.00"W, 85d 0' 0.00"N)
Lower Left (-180.0000000, -58.0000000) (180d 0' 0.00"W, 58d 0' 0.00"S)
Upper Right ( 180.0000000, 85.0000000) (180d 0' 0.00"E, 85d 0' 0.00"N)
Lower Right ( 180.0000000, -58.0000000) (180d 0' 0.00"E, 58d 0' 0.00"S)
Center ( 0.0000000, 13.5000000) ( 0d 0' 0.00"E, 13d30' 0.00"N)
Band 1 Block=8640x1 Type=Float32, ColorInterp=Undefined
NoData Value=-9999
Thanks,
Jerl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20140924/0246560f/attachment.html>
More information about the gdal-dev
mailing list