Skip to content

Commit

Permalink
Rename global time dependent transformations (#126)
Browse files Browse the repository at this point in the history
* rename proj.global.time.dependent-transformations.db

Co-authored-by: Jochem-L <[email protected]>

* update NSGI_PROJ_DB_VERSION 1.0.3 -> 1.1.0

* fix typo

---------

Co-authored-by: Jochem-L <[email protected]>
  • Loading branch information
WouterVisscher and Jochem-L authored Feb 8, 2024
1 parent 46b9dc0 commit 1552ea6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:3.11.4-bullseye as builder

ARG NSGI_PROJ_DB_VERSION="1.0.3"
ARG NSGI_PROJ_DB_VERSION="1.1.0"

LABEL maintainer="NSGI <[email protected]>"

Expand All @@ -27,7 +27,7 @@ RUN curl -sL -o nl_nsgi_nlgeo2018.tif https://cdn.proj.org/nl_nsgi_nlgeo2018.tif
curl -sL -o nl_nsgi_rdtrans2018.tif https://cdn.proj.org/nl_nsgi_rdtrans2018.tif && \
curl -sL -H "Accept: application/octet-stream" $(curl -s "https://api.github.com/repos/GeodetischeInfrastructuur/transformations/releases/tags/${NSGI_PROJ_DB_VERSION}" | jq -r '.assets[] | select(.name=="bq_nsgi_bongeo2004.tif").url') -o bq_nsgi_bongeo2004.tif && \
curl -sL -H "Accept: application/octet-stream" $(curl -s "https://api.github.com/repos/GeodetischeInfrastructuur/transformations/releases/tags/${NSGI_PROJ_DB_VERSION}" | jq -r '.assets[] | select(.name=="nllat2018.gtx").url') -o nllat2018.gtx && \
curl -sL -H "Accept: application/octet-stream" $(curl -s "https://api.github.com/repos/GeodetischeInfrastructuur/transformations/releases/tags/${NSGI_PROJ_DB_VERSION}" | jq -r '.assets[] | select(.name=="proj.global.time.dependent.transformations.db").url') -o proj.db
curl -sL -H "Accept: application/octet-stream" $(curl -s "https://api.github.com/repos/GeodetischeInfrastructuur/transformations/releases/tags/${NSGI_PROJ_DB_VERSION}" | jq -r '.assets[] | select(.name=="proj.time.dependent.transformations.db").url') -o proj.db

RUN ls -lah /src/dist/ >&2

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ echo 'extends: "spectral:oas"\n'> ruleset.yaml && spectral lint http://127.0.0.
### Install NSGI proj.db

Execute the following shell one-liner to install the NSGI
`proj.global.time.dependent.transformations.db` as `proj.db` from the
`proj.time.dependent.transformations.db` as `proj.db` from the
[GeodetischeInfrastructuur/transformations](https://github.com/GeodetischeInfrastructuur/transformations/releases)
repo:

Expand All @@ -97,13 +97,12 @@ proj_data_dir=$(python3 -c 'import pyproj;print(pyproj.datadir.get_data_dir());'
curl -sL -o "${proj_data_dir}/nl_nsgi_nlgeo2018.tif" https://cdn.proj.org/nl_nsgi_nlgeo2018.tif && \
curl -sL -o "${proj_data_dir}/nl_nsgi_rdcorr2018.tif" https://cdn.proj.org/nl_nsgi_rdcorr2018.tif && \
curl -sL -o "${proj_data_dir}/nl_nsgi_rdtrans2018.tif" https://cdn.proj.org/nl_nsgi_rdtrans2018.tif && \
curl -sL -H "Accept: application/octet-stream" $(curl -s "https://api.github.com/repos/GeodetischeInfrastructuur/transformations/releases/latest" | jq -r '.assets[] | select(.name=="proj.global.time.dependent.transformations.db").url') -o "${proj_data_dir}/proj.db"
curl -sL -H "Accept: application/octet-stream" $(curl -s "https://api.github.com/repos/GeodetischeInfrastructuur/transformations/releases/latest" | jq -r '.assets[] | select(.name=="proj.time.dependent.transformations.db").url') -o "${proj_data_dir}/proj.db"
```

> :warning: For 'default' usage, like QGIS, use the proj.db. The coordinate
> transformation API it self uses the
> proj.global.time.dependent.transformations.db for specific time dependent
> transformations.
> transformation API it self uses the proj.time.dependent.transformations.db for
> specific time dependent transformations.
## Install

Expand Down
2 changes: 1 addition & 1 deletion tests/test_transformer_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from coordinate_transformation_api.crs_transform import get_transformer, needs_epoch


# This test needs the modified proj.global.time.dependent.transformations.db from
# This test needs the modified proj.time.dependent.transformations.db from
# https://github.com/GeodetischeInfrastructuur/transformations/releases to be configured
# for pyproj to run correctly.
# Assumption is that the behaviour of the modified proj.db return multiple transformations
Expand Down

0 comments on commit 1552ea6

Please sign in to comment.