Ticket #4432 (closed defect: fixed)
gdal_rasterize produces error when burning vector dataset into netCDF dataset directly with -a_nodata nan
| Reported by: | hsumanto | Owned by: | etourigny |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | default | Version: | unspecified |
| Severity: | normal | Keywords: | netcdf, create, gdal_rasterize |
| Cc: | etourigny |
Description
I am trying to perform the below with the latest gdal in trunk:
gdal_rasterize -of netCDF -tr 500.0 500.0 -te 519223.62281715404 -4538725.344003787 1452723.622817154 -3983225.3440037873 -a_srs EPSG:3112 -a_nodata nan -ot float32 -a value -l SHAPE_TEST SHAPE_TEST.shp Output_Invalid.nc
and I am getting these errors:
ERROR 1: netCDF scanline fetch failed: NetCDF: Operation not allowed in define mode ERROR 1: Output.nc, band 1: IReadBlock failed at X offset 0, Y offset 0 ERROR 1: GetBlockRef? failed at X block offset 0, Y block offset 0
It seems that it doesn't like -a_nodata nan because I could burn vector dataset into netCDF without error if I remove -a_nodata nan. Still wondering the reason why -a_nodata nan is causing the error.
Burn vector dataset into netCDF (OK without -a_nodata nan)
gdal_rasterize -of netCDF -tr 500.0 500.0 -te 519223.62281715404 -4538725.344003787 1452723.622817154 -3983225.3440037873 -a_srs EPSG:3112 -ot float32 -a value -l SHAPE_TEST SHAPE_TEST.shp Output_OK.nc
Burn vector dataset into Geotiff Raster (OK even with -a_nodata nan)
gdal_rasterize -tr 500.0 500.0 -te 519223.62281715404 -4538725.344003787 1452723.622817154 -3983225.3440037873 -a_srs EPSG:3112 -a_nodata nan -ot float32 -a value -l SHAPE_TEST SHAPE_TEST.shp Output_Invalid.tif
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

