I am trying to Polygonize one raster image that previously I convert to 1s and 0s.
If I do it from QGIS, there is the option to select the output field name, which stores as attributes the value of the pixel, and let me iterate over all the features afterwards and store only the ones with value 1. (Since apparently it's impossible to polygonize only pixels with a specific value)
The problem is, that I can't see in the documentation of gdal.Polygonize() (http://www.gdal.org/gdal__alg_8h.html#a3f522a9035d3512b5d414fb4752671b1) any option to select the output file, so I get a bunch of polygons numerated from 0 to end.
Is there any way of keep the values of the pixels as attributes?
gdal.Polygonize()
from the command line usingsubprocess
in python an option?