How do you rasterize a polygon layer into a raster so all cells covered by polygons (i.e. not NoData) will be set to a constant value?
I do this to set cell according to attribute values:
gdal.RasterizeLayer(rasterHdl, , featureLayer, options=["ATTRIBUTE=%s" % attributeName])
... but how about burning in a constant?