Thanks you guys.

The SQL statement did the trick.

2010/2/9 Frank Warmerdam <[email protected]>

> Peter Rankor wrote:
>
>> List,
>>
>> I need to rasterize a polygon layer coming from a SHP file. However, the
>> values in the outputraster need to be the FID of the corresponding polygon.
>>
>> My command:
>> gdal_rasterize -a FID -l FECS FECS.shp flattenedRaster.tif
>>
>
> Peter,
>
> Could you try:
>
> gdal_rasterize -a FID \
>    -sql "select FID, * from FECS" FEC.shp flattenedRaster.tif
>
> The ExecuteSQL() method invoked for -sql should be able to treat FID
> as a pseudo-attribute.  It's a bit unfortunate this sort of thing doesn't
> work directly without the SQL route.
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> [email protected]
> light and sound - activate the windows | 
> http://pobox.com/~warmerdam<http://pobox.com/%7Ewarmerdam>
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
>
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to