Description
Discussed in #1454
Originally posted by j-carson October 25, 2024
The following code used to work with pyproj==3.6.1
WGS84 = "EPSG:4979" # https://epsg.io/4979
EGM96 = "EPSG:9707" # https://epsg.io/9707
tg = TransformerGroup(WGS84, EGM96)
if tg.unavailable_operations:
tg.download_grids(verbose=True)
transformer = Transformer.from_crs(CRS(EGM96), CRS(WGS84), always_xy=True)
But with pyproj==3.7 I'm getting a no-op transform - the grid I tried to download isn't actually being used.
This bug only manifested itself in my CI system, which starts with a completely clean environment. If I look in the .local/share/proj directory in the build system, I see that the grid is there us_nga_egm96_15.tif
, but if I look in my "messy" system where it wasn't failing, I have files.geojson
in there as well.
I found the call to get_transform_grid_list()
which puts the missing files.geojson
there.
With that call added, the test still fails the first time I run it, but once both files are in place, the second time you run the program, the tests succeed.
How can I reliably download grids on the fly?