gdal.polygonize python code example Example: gdal_polygonize example gdal_polygonize.py myraster.tif -f "ESRI Shapefile" mylayer.shp