Closed kb173 closed 1 year ago
Maybe this is relevant for getting the desired result? https://gdal.org/api/raster_c_api.html#_CPPv415GDALColorInterp
Setting the ColorInterp doesn't seem to change anything...
I opened a question for this issue here: https://gis.stackexchange.com/questions/354086/how-to-smooth-discrete-raster-data-with-gdal-in-c
Closing since going beyond GDAL's upsampling is out of scope (would require a lot of additional custom implementations) and there have been no updates in the linked threads (other than a comment saying it's not possible to do with GDAL directly).
Currently, all default GDAL resampling methods are exposed. This is good for most data, but we'd want to smooth out edges in discrete raster data such as land-use. This is currently not possible.
I believe the modal methods could work, or cubic spline with a limited color set (exactly like the image posted in the edit here: https://gis.stackexchange.com/questions/30627/smoothing-reinterpolating-raster-with-gdal/), but we need finer control over the kernel size and color sets to do this.