urschrei / lonlat_bng

A multithreaded Rust library with FFI for converting WGS84 longitude and latitude coordinates into BNG (OSGB36) Eastings and Northings and vice versa (using OSTN15)
https://docs.rs/lonlat_bng
MIT License
25 stars 3 forks source link

New crates.io release #20

Open dabreegster opened 7 months ago

dabreegster commented 7 months ago

https://docs.rs/lonlat_bng/latest/lonlat_bng/ and crates.io point to 0.3.8, which is ancient! I actually thought this crate was broken (valid inputs to convert_osgb36_to_ll all failed), but it's working wonderfully when pinning to git. For anyone just doing cargo add lonlat_bng, a new release would be helpful! Thanks for this crate and saving me a GDAL dependency, by the way :)

urschrei commented 7 months ago

I can't! The crate relies on https://github.com/urschrei/ostn15_phf, which uses a 43 MB grid shift file, which is too big for crates.io, so it can't be published and has to be used as a git dependency.

Any ideas gratefully received of course.

dabreegster commented 7 months ago

Ooh, that explains it. I don't have ideas that would keep the crate hermetic. (Hosting the data elsewhere and lazily pulling it in would suddenly introduce a dependency on the network at runtime, and require stable hosting somewhere.)

Worth keeping the issue open for the next person who gets confused and winds up here?

urschrei commented 7 months ago

An alternative is using proj and enabling its network feature, which enables the use of downloaded grid shift files: the OSTN15 NTv2 grid shift is definitely available. That may not be an option for you if you need to build your crate as WASM. In that case you should talk to Thomas about using the OSTN15 NTv2 grid shift file in the geodesy crate: it has NTv2 support and can be compiled to wasm.

But yes, I'll keep this open.