-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to bindings and docs #5
Conversation
- specify proj.4, now that proj.5 has been released - Update dependencies - Replace use of tuples (not layout-safe for FFI) with `c_void` - Add rudimentary inline docs - Add example from tests to README
(preliminary steps toward addressing some issues in georust/geo#32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎊 🎉
README.md
Outdated
Rust bindings for [proj](https://github.com/OSGeo/proj.4) | ||
Rust bindings for [proj.4](https://github.com/OSGeo/proj.4) | ||
|
||
# Example |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
README.md
Outdated
"+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs" | ||
).unwrap(); | ||
let rp = stereo70.project(&wgs84, Point::new(500000., 500000.)); | ||
# New Point coords are (0.436332, 0.802851) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alternatively, you could do an assert_eq!
README.md
Outdated
extern crate geo; | ||
use geo::types::Point; | ||
|
||
# reproject coordinates from Stereo70 with custom params into WGS84 lon and lat coordinates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
comments in rust start with //
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤭
looks like i need to give publish permissions, one sec |
done |
<3 I think I've set them up correctly for georust core for proj-sys |
yep, looks good! also gonna close #1 |
6: Move to proj-sys and proj.4 v5 r=frewsxcv a=urschrei With the surprising release (after about 23 years) of proj.4 v5, and my blowing-the-cobwebs-off PR from yesterday (#5), I thought I'd publish a [`proj-sys`](https://crates.io/crates/proj-sys) crate (generated using `bindgen`), and use it as the basis for this. Currently, the API contains a very breaking change, because proj.4 performs operations differently now: it distinguishes between _projection_ (conversions from geodetic to projected coordinates) and _conversion_ (conversions between projected coordinate systems, usually within the same datum / reference frame). The latter uses a concept proj.4 calls the [`pipeline`](http://proj4.org/operations/pipeline.html), which allows for multi-step operations to achieve almost any kind of conversion, as opposed to the old system, which only allowed the specification of `from` and `to` projections. This change is mirrored in the rust-proj API: for simple (inverse) projection from/to geodetic coordinates, there's `project`, and for conversions and transformations there's `convert`. I'm not 100% sold on the API, because it feels a bit less flexible than the old one: you could specify different destination projections, and re-use the `Proj` struct. Using the new API, you have to specify everything up front, but you have a great deal more flexibility in terms of what you can do with it (see the `conversion` example). The conversion function also returns a `Result` now, and errors are implemented using `Failure`. <s>Anyway, this is currently WIP until I figure out how to detect errors using the new API.</s>
Bump PROJ.4 to v5.1.0
proj.4
API version, now thatproj.4
v5.0.0 has been releasedc_void