boku-ilen / geodot-plugin

Godot plugin for loading geospatial data
GNU General Public License v3.0
109 stars 19 forks source link

Control upsampling behavior more finely #5

Closed kb173 closed 1 year ago

kb173 commented 4 years ago

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.

kb173 commented 4 years ago

Maybe this is relevant for getting the desired result? https://gdal.org/api/raster_c_api.html#_CPPv415GDALColorInterp

kb173 commented 4 years ago

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

kb173 commented 1 year ago

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).