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_b...@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
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to