-
Notifications
You must be signed in to change notification settings - Fork 46
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
Fix array conversion #56
Conversation
Bors try |
tryBuild succeeded: |
bors try Interesting! Let's gather some stats here. |
If your run passes, I'm gonna contrive a doctest with different CRS and coordinates. I have my doubts about the validity of the old Stereo70 conversion values, but there's less value in a doctest that just reproduces an existing known-good test. |
tryBuild succeeded: |
bors try |
tryBuild succeeded: |
These are CRS and coordinate values from https://geodesy.noaa.gov/NCAT/. WDYT? |
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.
Works every time, three of the times!
Thank you for (I think) tracking this down.
/// assert_approx_eq!(v[0].y(), 500027.77901023754f64); | ||
/// let from = "EPSG:2230"; | ||
/// let to = "EPSG:26946"; | ||
/// let ft_to_m = Proj::new_known_crs(&from, &to, None).unwrap(); |
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.
Nice to have a more focused example in the docs. I tremble when faced with raw "proj script".
- better variable name - remove test loop that appeared without explanation
bors r=michaelkirk |
Build succeeded: |
My suspicion is that creating the raw pointer in the function call was causing it to be dropped prematurely, resulting in garbage data. See here for an analogous issue when getting a
CString
pointer. We avoid this by explicitly creating the pointer before the call. In addition, the doctest has been updated with a less complex example that doesn't use a proj string.