[gdal-dev] gdal_rasterize update access mode for EHdr/Bil file
Even Rouault
even.rouault at mines-paris.org
Fri Jan 27 19:03:40 EST 2012
Le samedi 28 janvier 2012 00:55:32, lucvanlinden a écrit :
> Hi
>
> I successfully created an EHdr / Bil file using gdal_grid 400 by 400 pixels
> with 1 band from a series of preprocessed 3D vertices/points read from
> Postgis.
>
> In a second stage I would like to add 3D polygons to that same bil file
> using gdal_rasterize.
> These source polygons are in the same SRS and in the same postgis database.
>
> >From reading the documentation this should be feasible using
> >gdal_rasterize.
>
> However it seems not be able to update this bil file, as the gdal_rasterize
> returns:
>
> '-tr xres yes' or '-ts xsize ysize' is required
>
> Here is the gdal_rasterize command:
>
> gdal_rasterize -3d -l test_3d -a_srs EPSG:31370 -ot Int32 -of EHdr
> PG:"dbname='postgis' host='localhost' port='5432' user='postgres'
> password='postgis' tables=test_3d" target.bil
Try removing the -a_srs, -ot and -of options : when gdal_rasterize sees one of
those, it assumes you want to create a new file.
EHdr supports updating. If you issue a "gdalinfo --format ehdr" , you will see
"Supports: Create() - Create writeable dataset.". This also imply update
support.
More information about the gdal-dev
mailing list