Ticket #1936 (closed defect: fixed)
Segmentation fault in gdal_rasterize
| Reported by: | jcrepetto | Owned by: | mloskot |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.3 |
| Component: | Utilities | Version: | 1.4.2 |
| Severity: | normal | Keywords: | gdal_rasterize |
| Cc: | warmerdam |
Description
When gdal_rasterize is used with a raster data file which is not georeferenced, a segmentation fault occurs.
Steps to reproduce :
Download a bitmap file of the world ( http://veimages.gsfc.nasa.gov//2433/land_shallow_topo_2048.tif) and a shape file of the administrative limits ( http://www.pagcgeo.org/world_factbk.zip).
gdal_rasterize -b 1 -b 2 -b 3 -burn 255 -burn 0 -burn 0 -l world_factbk world_factbk.shp land_shallow_topo_2048.tif
GDAL: Auto register /usr/lib/gdalplugins/gdal_GRASS.so using GDALRegister_GRASS. OGR: Auto register /usr/lib/gdalplugins/ogr_GRASS.so using RegisterOGRGRASS. GRASS: OGRGRASSDataSource::Open GRASS: OGRGRASSDataSource::~OGRGRASSDataSource() OGR: OGROpen(world_factbk.shp/0x616720) succeeded as ESRI Shapefile. GDAL: GDALOpen(land_shallow_topo_2048.tif) succeeds as GTiff. 0100 - done. Shape: 27459 features read on layer 'world_factbk'. Segmentation fault
Expected result
gdal_rasterize should exit with an error message such as "raster data not georeferenced".
I have not tested with a non-referenced vector data file, but it should also be checked.
