[gdal-dev] Re: RasterizeLayer using attribute
Chaitanya kumar CH
chaitanya.ch at gmail.com
Wed Apr 20 08:13:44 EDT 2011
Jonathan,
I didn't quite get what your problem is. Do you get all the pixels set to
255?
Also, you should probably check if you really want to burn the id value into
the raster.
On Wed, Apr 20, 2011 at 4:58 PM, <dr_jonathan_ball at hotmail.co.uk> wrote:
> Hi,
>
> I read your thread on using gdal.RasterizeLayer() in Python to rasterize
> vector polygons by attribute. I have the same problem as you did. Can you
> tell me how you resolved it please?
>
> My code is almost identical to yours and my key line is:
> err = gdal.RasterizeLayer( target_ds, [1], vector_lyr,
> options = ["ATTRIBUTE=id",
> "ALL_TOUCHED=TRUE"] )
>
> The rasterize process seems to ignore my options. Like you, I get an output
> raster with all no-data values set to 255. I get a zero error value.
>
> Your insights would be very welcome. Many thanks in advance.
>
> Regards
>
> Jonathan
>
>
>
--
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20110420/a6a464dc/attachment.html
More information about the gdal-dev
mailing list