[gdal-dev] Having difficulties using gdalwarp

Rutger kassies at gmail.com
Thu Oct 4 00:36:33 PDT 2012


Hey Simon, 

I took a quick look out of curiosity. Regarding your second grid, and first
call: 
If you run gdalinfo on the input .asc file, you can see that the coordinate
system is not recognized properly. You say its geographic so you can first
do this additional step to manually assign it:

gdal_translate -of "VRT" -a_srs "epsg:4326" nlum.asc nlum.vrt

The output vrt can then be used in your gdalwarp statement instead of the
original .asc file. I get a map of Australia when i do so, almost all of it
is filled with nodata except for some data near Brisbane.

Regarding to the second grid, which you reproject from the Albers grid to
geographical, i cant reproduce your findings. I reprojected using a cellsize
of 0.05 (-tr 0.05 0.05) to speed thing up a little. When i run "gdalinfo
-hist" on it afterwards i get:
Band 1 Block=830x4 Type=Int16, ColorInterp=Gray
  Description = Layer_1
  Min=100.000 Max=663.000
  Minimum=100.000, Maximum=663.000, Mean=208.832, StdDev=83.824
  564 buckets from 99.5 to 663.5:
  ...
  NoData Value=-32768

Which seems ok to me based on your discription. Ocean is filled with nodata,
the 100 values are found for example around Canberra, i dont find any zeros.
In my case the (default) output is a signed 16bit integer type, maybe your
nodata values get truncated to 0's or something?

Hope this helps a little.


Regards,
Rutger



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/gdal-dev-Having-difficulties-using-gdalwarp-tp5006275p5006309.html
Sent from the GDAL - Dev mailing list archive at Nabble.com.


More information about the gdal-dev mailing list