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 #12

Closed dabreegster closed 2 years ago

dabreegster commented 2 years ago

Hi,

crates.io is at 0.3.8, which is ancient! I'm pinning to the github repo in the meantime, but a release would be appreciated.

Thanks!

urschrei commented 2 years ago

I've unfortunately shot myself in the foot here: lonlat_bng has a hard dependency on https://github.com/urschrei/ostn15_phf, which is too big to publish to crates.io. AFAIK there's no easy way to solve this, because even vendored dependencies have to be published in order for the depending crate to publishable.

dabreegster commented 2 years ago

Ah, no worries then!

(FWIW, I wound up switching to proj, since I already have a dependency on it anyway for another transformation)

urschrei commented 2 years ago

proj is the way to go for sure. IIRC you'll need to use it with the network feature enabled (if you can) in order to access the higher-quality OSTN15 conversion, since it can't be included in the proj db by default (again because the dataset is too big). That having been said, you may not need the high-quality transform; the standard version will be accurate within ~10 m, and you don't need to worry about compounding errors if you're only converting once (presumably from BNG to EPSG 4326).

dabreegster commented 2 years ago

The proj accuracy is definitely fine; my particular use case is just for visualization. I found this library because the code I'm porting actually uses the Python wrapper: https://github.com/Urban-Analytics/RAMP-UA/blob/3cf45d225501ef64ad6439c9e4c330f052708853/coding/model/opencl/ramp/snapshot_convertor.py#L6 I was amused to find your name crop up as a dependency here. :)

urschrei commented 2 years ago

The proj accuracy is definitely fine; my particular use case is just for visualization. I found this library because the code I'm porting actually uses the Python wrapper: https://github.com/Urban-Analytics/RAMP-UA/blob/3cf45d225501ef64ad6439c9e4c330f052708853/coding/model/opencl/ramp/snapshot_convertor.py#L6 I was amused to find your name crop up as a dependency here. :)

Oh that's amazing 🤦‍♂️. The author of that file was even doing his PhD in the same department as me, sitting about 10 yards away.