boku-ilen / geodot-plugin

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

Investigate possibility of only using GDALRasterIO without warping in some cases #4

Closed kb173 closed 4 years ago

kb173 commented 4 years ago

GDALRasterIO takes image size and offset. It doesn't offer things like different types of interpolation, but in situations where this isn't required, we may be able to translate geocoordinates into pixel coordinates and use those in GDALRasterIO, skipping all the GDALWarp.

This is especially relevant for very large (e.g. 10x10 km) tiles which don't require any interpolation, but should be as fast as possible.

kb173 commented 4 years ago

This is largely done with https://github.com/boku-ilen/geodot-plugin/commit/bb065dbd609e91226bf540c022f9fdef76bd8878. However, different types of interpolation aren't yet reimplemented without GDALWarp, and there are some hacky things annotated with TODO/FIXME. Once this is done, the no-warp branch will be merged back.

kb173 commented 4 years ago

The no-warp branch is now merged, so this is done!

Of course, this also means that all incoming data has to be in the same projection now. The reproject_to_webmercator function will be exposed to Godot to make this easier. (see #18)