georust / geotiff

Reading GeoTIFFs in Rust, nothing else!
MIT License
69 stars 21 forks source link

This GeoTIFF Rust library seems 5-10 times slower than a GeoTIFF Javascript library #5

Open OTheNonE opened 1 year ago

OTheNonE commented 1 year ago

I have tried this library for reading elevation data of TIFF-files with size of 1,6GB. My experience with this library is that it is around 5-10 times slower than the Javascript library https://github.com/geotiffjs/geotiff.js/. Do you have any comments on this? Is this believable or is there rather an error on how i use this Rust library? I have not made any concrete benchmarks yet, but if you like, i could try to do a benchmark on the two and share the code:)

dominikbucher commented 1 year ago

It probably depends on the use case, but it might well be for large TIFFs, as this library was not optimized towards that use case. Would be happy to see the benchmarks if you do it, but please also note that this library is "stuck" at version 0.0.1, meaning that whatever is contained in the repository is likely unfinished and unoptimized. If you want to help improving it, feel free to make a PR! 😊

OTheNonE commented 1 year ago

Okay, that explains alot, then i can start scratching my head a little less around this topic:). And off topic, now when you're here, do you know any other Rust library that can read large TIFFs with the "true speed" of a low-level language? The Javascript library is just little too slow, and therefore i was hoping that Rust together with a library could do this task fast enough for my likings. I tried GDAL, but could not make it work because of errors with the gdal-sys library... But do you know if it would be faster than GeoTIFF and maybe also the Javascript library?

dominikbucher commented 1 year ago

You might look at:

I don't know how "fast" they are, though. On the note of GDAL, that's likely the most performant and complete currently, but setting it up is a mess... If you have no restrictions to use Rust or JS, you might install it via Python / Anaconda, or use https://trac.osgeo.org/osgeo4w/wiki to install it alongside QGIS or such.