boku-ilen / geodot-plugin

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

Support other raster band types than Float32 #6

Closed kb173 closed 4 years ago

kb173 commented 4 years ago

The Float32 type for Geotiffs is currently hardcoded in the RasterTileExtractor, and Geodot::clip always encodes floats into a PoolByteArray.

We want to support other data types as well; at least RGBA (as a general purpose type) and single-band byte (for things like land-use images).

kb173 commented 4 years ago

Work towards this has been done in the last few commits. What remains is mostly handling it in the PoolByteArray conversion, and more testing.

kb173 commented 4 years ago

Largely done with https://github.com/boku-ilen/geodot-plugin/commit/8ae4d5118e65c5743a2b2a32b65851950ce2e046. The only thing that remains is clipping data with multiple bands. This is probably pretty straightforward (the relevant code has been marked with TODOs in RasterTileExtractor::clip), but I currently don't have test data for it.

kb173 commented 4 years ago

Implemented in https://github.com/boku-ilen/geodot-plugin/commit/f9cd51e8e481187e1de672f8069d6957bc88902c but untested - #11 was created for this so we have something more specific. The general feature described here is done.