I have a differential surface model dataset. That was made: DSM subtracted from DTM, so for example trees have negative height. It is a raster (TIFF) dataset, Type=Float32.
I want to create a shapefile that will have three different values:
- 0: error (all the pixels in the original dataset with values > 0)
- 1: OK (all the pixels in the original dataset with values < 0)
- 2: nodata (all the pixels in the original dataset with values = -10000000000)
I assume first thing to create a raster with pixel values 0, 1, 2 only and than vectorize it. Probably the vectorization will not be a problem, using gdal_polygonize.py
but creating the raster is quite a challenge for me, although I was able to achieved some minor success using gdal_calc
.
I'd like to do this using GDAL, do you have an idea?