georust / proj

Rust bindings for the latest stable release of PROJ
https://docs.rs/proj
Apache License 2.0
137 stars 45 forks source link

Fix array conversion #56

Closed urschrei closed 3 years ago

urschrei commented 3 years ago

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.

urschrei commented 3 years ago

Bors try

bors[bot] commented 3 years ago

try

Build succeeded:

michaelkirk commented 3 years ago

bors try

Interesting! Let's gather some stats here.

urschrei commented 3 years ago

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.

bors[bot] commented 3 years ago

try

Build succeeded:

urschrei commented 3 years ago

bors try

bors[bot] commented 3 years ago

try

Build succeeded:

urschrei commented 3 years ago

These are CRS and coordinate values from https://geodesy.noaa.gov/NCAT/.

WDYT?

urschrei commented 3 years ago

bors r=michaelkirk

bors[bot] commented 3 years ago

Build succeeded: