I am new to GDAL and geom shapefiles.
I have a 3-band .img file (with other associated files) as raster images.
And also a shapefile which includes 10000+ features (multi-polygons), the properties of each includes 'shape_leng', and 'BM' (corresponding to the geographic class of this area, e.g. water/forest).
I want to rasterize the shapefile with property 'BM' as labeled pixel value (single/three channels) to put it together with my raster image so that I can visualize the segmentation or further train an image segmentation network using this as a training dataset.
How to implement it using Python? Or is there any tutorial/notebook that I can learn from?