-
Notifications
You must be signed in to change notification settings - Fork 12
Preprocessing and Smoothing Land Use
Karl edited this page Aug 14, 2019
·
2 revisions
Because of the low resolution (10m per pixel), the original land-use data has very visible jagged edges. We want to smooth it so that things like the edges of fields look more natural.
Given: The land-use data sentinel-invekos-combined.tif
- Turn the spread out float32 values into more compact bytes:
gdal_calc.py -A sentinel-invekos-combined.tif --outfile=only_low.tif --calc="A*(A<131)+(A-1850)*(A>2000)" --NoDataValue=0 --debug --type=Byte
(the result is consistent with our updated ID table) - Load the resulting
only_low.tif
into QGIS - Polygonize the image
- Run
v.clean
on the resulting polygons (they're not valid otherwise) - Run
v.generalize
with the Snakes algorithm to smooth the polygons - the default parameters seem fine - Rasterize the polygons back (again into bytes) with the desired resolution
The result can be used for adding additional polygon data and tiled afterwards.