Closed gmmorris closed 1 year ago
I suspect it's a rounding issue or something related to the installed libproj versions if you aren't using the bundled proj option, since database updates can affect transforms. Is the inconsistency still present if you build with the bundled-proj feature?
Thanks for the quick response. I got a quick reply from Proj too - https://github.com/OSGeo/PROJ/issues/3773
Seems it's about having the network off. Would using the bundles proj work by including these resources? Or should I switch network on (about to try that on CI... I'll update here on whether it work 😅 )
I'd try the network feature first!
Waiting on CI :) I'll confirm if it sorts it out for posterity's sake
Sadly, this doesn't seem to solved the issue, but I tried toggling the enable_network
to both the on
and off
states locally.
In both cases, I got the same transformed coordinates - which I wouldn't have expected to happen.
I also set grid_cache_enable(false)
to make sure it wasn't just the cache playing tricks on me.
Is there a way for me to check if the network is being used or not?
Ah. The transform won't automatically use the network if you've only activated the feature — as you say, you have to use the enable_network method on ProjBuilder to use it (if it's available for a given transform). You can check whether it's enabled by using https://docs.rs/proj/0.27.0/proj/struct.ProjBuilder.html#method.network_enabled to check.
If you don't use enable_network, the network will never be used. Activating the feature only allows you to call that method, it won't do anything on its own.
No sure I follow. If I have done the following:
enable_network(true)
and it returned OK
You'd expect it to use the network, right?
Does calling netwrok_enabled()
just verify that it's switched on?
Is there a way to actually check whether a transformation was made using the resource or not? 🤔
Ah, it's an issue with my CI server - it fails with: Network error when accessing a remote resource
.
I'll update if sorting out the connectivity fixes it 👍
Sorting out the network issues solved the issue.
For posterity, make sure:
https://cdn.proj.org/
PROJ_NETWORK=ON
enable_network(true)
API on the Proj instanceSimples ;)
I'm transforming geometries received in
EPSG::27700
toOGC:1.3:CRS84
.I'm encountering some inconsistencies between my local environment (OSX) and my CI (
ubuntu-latest
on Github Actions).Given this geometry:
Locally on OSX and transform these coords are transformed into:
But then on CI they are transformed into:
Any thoughts on why this inconsistency might be happening and how I can avoid it?
I'm happy to compromise on resolution (
cm
would be ideal, butmeter
could work if that helps), but mostly I want to understand if this is a rounding or configuration issue.Cheers