ewestern / geos

This is a Haskell binding to Geos, the open-source geometry library
MIT License
13 stars 9 forks source link

Example of distance calcs always returning 1.0 #16

Closed jamiecook closed 7 years ago

jamiecook commented 7 years ago

For some reason, distance and hausdorffDistance always return 1.0... I've followed this through the geos library until it hits the ffi boundary with the call to GEOSDistance_r which according to the doco should do what it says... but for my usage it is always 1.0....

I will try to dig more later but maybe this is just me using the library wrong?

ewestern commented 7 years ago

Heh, That's because I was using the exit value as the calculated distance rather than the double pointer.

Here ya go. https://github.com/ewestern/geos/pull/17

jamiecook commented 7 years ago

This should be good to merge now... I've also given you access to my branch in case you need to clean up my work again (instead of creating another branch and PR on your repo to do so)