[gdal-dev] gdalbuilvrt segmentation fault
Even Rouault
even.rouault at mines-paris.org
Mon Jul 25 07:03:20 EDT 2011
Selon Marco Nicoletti <nicoletti at consorzio-innova.it>:
> Dear all,
>
> I have got a problem using the GDAL tool gdalbuildvrt.
>
> I would like to join two DEMs sampled on the same grid which insist on the
> same
> geografical zone.
> The first DEM has got some NoDataValue holes and I would like to feel them
> with the values in
> the second DEM.
> I ave used also the flag to ignore the projection
> (-allow_projection_difference).
>
> DEMs have the same raster size (xSize="10801" ySize="7201"), the same data
> type ("Float32")
> and the same NoData Value (-3.27670000000000E+04).
>
> The GDAL tool goes in segmentation fault: any ideas?
I'm not aware of remaining issues that could cause segmentation fault in the
current version. Do you use GDAL 1.8.x or an older version ? If older, please
upgrade and test again. If it is GDAL 1.8.0 or later, then I would need the
datasets to reproduce.
You could also run under a debugger or under Valgrind to see where it crashes.
>
> $ gdalbuildvrt -allow_projection_difference output.vrt ned/safod+egm96.dem
> srtm/srtm_90m_egm96_grid.tif
> 0...10...20...30...40...50...60...70...80...90...100 - done.
> Warning 6: gdalbuildvrt does not support heterogenous band characteristics.
> Skipping srtm/srtm_90m_egm96_grid.tif
Hum, looking at the code, this message can happen if the datasets have a
different color interpreation or data type. If your both datasets have same data
type, it must be due to the different color interpretation. Can you paste the
output of gdalinfo on both datasets ? I'm wondering if that test shouldn't be
relaxed : it could certainly be relaxed on color interpretation, which is just
an information, and as far as different data type it could be improved to select
the most appropriate datatype one or let the user define it...
If you can build from source, you can just remove the following code in
apps/gdalbuildvrt.cpp :
if (pasBandProperties[j].colorInterpretation !=
GDALGetRasterColorInterpretation(hRasterBand) ||
pasBandProperties[j].dataType !=
GDALGetRasterDataType(hRasterBand))
{
CPLError(CE_Warning, CPLE_NotSupported,
"gdalbuildvrt does not support heterogenous band
characteristics. Skipping %s",
dsFileName);
return FALSE;
}
Best regards,
Even
More information about the gdal-dev
mailing list