diff --git a/Dockerfile b/Dockerfile index 9108fc0..a1203a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM python:3.11.4-bullseye as builder -ARG NSGI_PROJ_DB_VERSION="1.0.2" +ARG NSGI_PROJ_DB_VERSION="1.0.3" LABEL maintainer="NSGI " @@ -25,6 +25,8 @@ WORKDIR /assets RUN curl -sL -o nl_nsgi_nlgeo2018.tif https://cdn.proj.org/nl_nsgi_nlgeo2018.tif && \ curl -sL -o nl_nsgi_rdcorr2018.tif https://cdn.proj.org/nl_nsgi_rdcorr2018.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 RUN ls -lah /src/dist/ >&2 @@ -38,6 +40,7 @@ COPY --from=builder /src/dist/coordinate_transformation_api-2*.whl . RUN pip install coordinate_transformation_api-2*.whl COPY --from=builder /assets/*.tif /usr/local/lib/python3.11/site-packages/pyproj/proj_dir/share/proj +COPY --from=builder /assets/*.gtx /usr/local/lib/python3.11/site-packages/pyproj/proj_dir/share/proj COPY --from=builder /assets/proj.db /usr/local/lib/python3.11/site-packages/pyproj/proj_dir/share/proj/proj.db # PORT for serving out API diff --git a/src/coordinate_transformation_api/assets/config.yaml b/src/coordinate_transformation_api/assets/config.yaml index 1224444..59cb1b5 100644 --- a/src/coordinate_transformation_api/assets/config.yaml +++ b/src/coordinate_transformation_api/assets/config.yaml @@ -246,3 +246,123 @@ "OGC:CRS84h": exclude-transformations: [] uri: http://www.opengis.net/def/crs/OGC/0/CRS84h +"NSGI:Bonaire_DPnet_KADpeil": + exclude-transformations: + - "EPSG:7415" + - "EPSG:28992" + - "EPSG:4258" + - "EPSG:4937" + - "EPSG:4936" + - "EPSG:3035" + - "EPSG:3034" + - "EPSG:3043" + - "EPSG:3044" + - "EPSG:7931" + - "EPSG:9067" + - "EPSG:7930" + - "EPSG:7432" + - "EPSG:7423" + - "EPSG:9423" + - "EPSG:9289" + - "EPSG:9000" + - "EPSG:7912" + - "EPSG:7789" + uri: http://www.nsgi.nl/def/crs/NSGI/0/Bonaire_DPnet_KADpeil +"NSGI:Bonaire_DPnet": + exclude-transformations: + - "EPSG:7415" + - "EPSG:28992" + - "EPSG:4258" + - "EPSG:4937" + - "EPSG:4936" + - "EPSG:3035" + - "EPSG:3034" + - "EPSG:3043" + - "EPSG:3044" + - "EPSG:7931" + - "EPSG:9067" + - "EPSG:7930" + - "EPSG:7432" + - "EPSG:7423" + - "EPSG:9423" + - "EPSG:9289" + - "EPSG:9000" + - "EPSG:7912" + - "EPSG:7789" + uri: http://www.nsgi.nl/def/crs/NSGI/0/Bonaire_DPnet +"NSGI:Saba_DPnet": + exclude-transformations: + - "EPSG:7415" + - "EPSG:28992" + - "EPSG:4258" + - "EPSG:4937" + - "EPSG:4936" + - "EPSG:3035" + - "EPSG:3034" + - "EPSG:3043" + - "EPSG:3044" + - "EPSG:7931" + - "EPSG:9067" + - "EPSG:7930" + - "EPSG:7432" + - "EPSG:7423" + - "EPSG:9423" + - "EPSG:9289" + uri: http://www.nsgi.nl/def/crs/NSGI/0/Saba_DPnet +"NSGI:Saba_DPnet_Height": + exclude-transformations: + - "EPSG:7415" + - "EPSG:28992" + - "EPSG:4258" + - "EPSG:4937" + - "EPSG:4936" + - "EPSG:3035" + - "EPSG:3034" + - "EPSG:3043" + - "EPSG:3044" + - "EPSG:7931" + - "EPSG:9067" + - "EPSG:7930" + - "EPSG:7432" + - "EPSG:7423" + - "EPSG:9423" + - "EPSG:9289" + uri: http://www.nsgi.nl/def/crs/NSGI/0/Saba_DPnet_Height +"NSGI:St_Eustatius_DPnet": + exclude-transformations: + - "EPSG:7415" + - "EPSG:28992" + - "EPSG:4258" + - "EPSG:4937" + - "EPSG:4936" + - "EPSG:3035" + - "EPSG:3034" + - "EPSG:3043" + - "EPSG:3044" + - "EPSG:7931" + - "EPSG:9067" + - "EPSG:7930" + - "EPSG:7432" + - "EPSG:7423" + - "EPSG:9423" + - "EPSG:9289" + uri: http://www.nsgi.nl/def/crs/NSGI/0/St_Eustatius_DPnet +"NSGI:St_Eustatius_DPnet_Height": + exclude-transformations: + - "EPSG:7415" + - "EPSG:28992" + - "EPSG:4258" + - "EPSG:4937" + - "EPSG:4936" + - "EPSG:3035" + - "EPSG:3034" + - "EPSG:3043" + - "EPSG:3044" + - "EPSG:7931" + - "EPSG:9067" + - "EPSG:7930" + - "EPSG:7432" + - "EPSG:7423" + - "EPSG:9423" + - "EPSG:9289" + uri: http://www.nsgi.nl/def/crs/NSGI/0/St_Eustatius_DPnet_Height diff --git a/src/coordinate_transformation_api/crs_transform.py b/src/coordinate_transformation_api/crs_transform.py index 70b0abd..029208c 100644 --- a/src/coordinate_transformation_api/crs_transform.py +++ b/src/coordinate_transformation_api/crs_transform.py @@ -291,15 +291,9 @@ def get_transformer( if exclude_transformation(source_crs, target_crs): raise TransformationNotPossibleError(source_crs, target_crs) - # Area of interest spanning NL - # coord from EPSG.org Netherlands - onshore - aoi = transformer.AreaOfInterest(3.2, 50.75, 7.22, 53.7) - # Get available transformer through TransformerGroup # TODO check/validate if always_xy=True is correct - tfg = transformer.TransformerGroup( - s_crs, t_crs, allow_ballpark=False, area_of_interest=aoi - ) + tfg = transformer.TransformerGroup(s_crs, t_crs, allow_ballpark=False) # If everything is 'right' we should always have a transformer # based on our configured proj.db. Therefor this error. diff --git a/src/coordinate_transformation_api/util.py b/src/coordinate_transformation_api/util.py index 785408b..a7654ec 100644 --- a/src/coordinate_transformation_api/util.py +++ b/src/coordinate_transformation_api/util.py @@ -270,7 +270,7 @@ def init_oas(crs_config) -> tuple[dict, str, str]: } security: dict = {"security": [{"APIKeyHeader": []}]} if app_settings.example_api_key is not None: - api_key_description = f"\n\nDemo API key is `{app_settings.example_api_key}` en is bedoeld voor exploratief gebruik van de API. " + api_key_description = f"\n\nThe Demo API key is `{app_settings.example_api_key}` and is intended for exploratory use of the API only. " oas["info"]["description"] = ( oas["info"]["description"] + api_key_description )