diff --git a/.vscode/launch.json b/.vscode/launch.json index fb3c504..28862f7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -32,7 +32,6 @@ "name": "Python: Debug Tests", "type": "debugpy", "request": "launch", - "module": "pytest", "args": ["${file}"], "purpose": ["debug-test"], "console": "integratedTerminal", diff --git a/README.md b/README.md index 38a7e0a..368ebbf 100644 --- a/README.md +++ b/README.md @@ -87,17 +87,27 @@ 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 +Execute the following shell commands to install the NSGI `proj.time.dependent.transformations.db` as `proj.db` from the [GeodetischeInfrastructuur/transformations](https://github.com/GeodetischeInfrastructuur/transformations/releases) repo: ```sh +NSGI_PROJ_DB_VERSION=$(sed -rn 's/ARG NSGI_PROJ_DB_VERSION="(.*)"/\1/p' < Dockerfile) 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.time.dependent.transformations.db").url') -o "${proj_data_dir}/proj.db" + +# ( cmd ) -> subshell to execute commands in $proj_data_dir without changing workdir of current shell +( + cd "$proj_data_dir" + echo $NSGI_PROJ_DB_VERSION + 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.time.dependent.transformations.db").url') -o proj.db +) + ``` > :warning: For 'default' usage, like QGIS, use the proj.db. The coordinate diff --git a/src/coordinate_transformation_api/crs_transform.py b/src/coordinate_transformation_api/crs_transform.py index 501ec40..48d3820 100644 --- a/src/coordinate_transformation_api/crs_transform.py +++ b/src/coordinate_transformation_api/crs_transform.py @@ -289,7 +289,6 @@ def check_axis(s_crs: CRS, t_crs: CRS) -> None: def get_transformer( source_crs: CRS, target_crs: CRS, epoch: float | None ) -> Transformer: # quit - check_axis(source_crs, target_crs) if exclude_transformation( @@ -299,6 +298,7 @@ def get_transformer( raise TransformationNotPossibleError( "{}:{}".format(*source_crs.to_authority()), "{}:{}".format(*target_crs.to_authority()), + "Transformation Excluded", ) # Get available transformer through TransformerGroup @@ -351,7 +351,6 @@ def get_individual_crs_from_compound(compound_crs: CRS) -> tuple[CRS, CRS]: def build_input_coord(coord: CoordinatesType, epoch: float | None) -> CoordinatesType: - # When 2D input is given with an epoch we need to add a height. So pyproj knows to # that the epoch is an epoch and not the height, without this intervention the epoch # would be place in the firth position of the tuple. @@ -404,7 +403,6 @@ def my_round(val: float, precision: int | None) -> float | int: and target_crs.is_compound and not source_crs.is_geocentric ): - check_axis(source_crs, target_crs) target_crs_horizontal, target_crs_vertical = get_individual_crs_from_compound( @@ -412,9 +410,10 @@ def my_round(val: float, precision: int | None) -> float | int: ) if source_crs is not None and source_crs.is_compound: - source_crs_horizontal, source_crs_vertical = ( - get_individual_crs_from_compound(source_crs) - ) + ( + source_crs_horizontal, + source_crs_vertical, + ) = get_individual_crs_from_compound(source_crs) else: source_crs_horizontal = source_crs source_crs_vertical = source_crs @@ -441,7 +440,6 @@ def my_round(val: float, precision: int | None) -> float | int: v_transformer = get_transformer(source_crs, target_crs, epoch) def transform_compound_crs(val: CoordinatesType) -> tuple[float, ...]: - input = tuple([*val, float(epoch)]) if epoch is not None else tuple([*val]) h = tuple( diff --git a/src/coordinate_transformation_api/util.py b/src/coordinate_transformation_api/util.py index 5cdf10e..25435d3 100644 --- a/src/coordinate_transformation_api/util.py +++ b/src/coordinate_transformation_api/util.py @@ -385,7 +385,6 @@ def check_crs_is_known(crs_str: str, crs_list: list[AvailableCrs]) -> None: def transform_coordinates( coordinates: Any, source_crs: CRS, target_crs: CRS, epoch ) -> Any: - precision = get_precision(target_crs) coordinate_list: CoordinatesType = list( float(x) for x in coordinates.split(",") diff --git a/tests/data/bonaire_validation_data.csv b/tests/data/bonaire_validation_data.csv index e209a41..0ab96dd 100644 --- a/tests/data/bonaire_validation_data.csv +++ b/tests/data/bonaire_validation_data.csv @@ -4,7 +4,8 @@ NSGI:Bonaire_DPnet_KADpeil,NSGI:Bonaire2004_GEOCENTRIC,(23000.0 18000.0 10.0 200 NSGI:Bonaire_DPnet_KADpeil,NSGI:Bonaire2004_GEOGRAPHIC_2D,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet_KADpeil,NSGI:Bonaire2004_GEOGRAPHIC_3D,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet_KADpeil,EPSG:32619,(23000.0 18000.0 10.0 2000) -NSGI:Bonaire_DPnet_KADpeil,EPSG:7789EPSG:7912,(23000.0 18000.0 10.0 2000) +NSGI:Bonaire_DPnet_KADpeil,EPSG:7789,(23000.0 18000.0 10.0 2000) +NSGI:Bonaire_DPnet_KADpeil,EPSG:7912,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet_KADpeil,EPSG:4979,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet_KADpeil,OGC:CRS84h,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet,NSGI:Bonaire_DPnet_KADpeil,(23000.0 18000.0 10.0 2000) @@ -13,7 +14,8 @@ NSGI:Bonaire_DPnet,NSGI:Bonaire2004_GEOCENTRIC,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet,NSGI:Bonaire2004_GEOGRAPHIC_2D,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet,NSGI:Bonaire2004_GEOGRAPHIC_3D,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet,EPSG:32619,(23000.0 18000.0 10.0 2000) -NSGI:Bonaire_DPnet,EPSG:7789EPSG:7912,(23000.0 18000.0 10.0 2000) +NSGI:Bonaire_DPnet,EPSG:7789,(23000.0 18000.0 10.0 2000) +NSGI:Bonaire_DPnet,EPSG:7912,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet,EPSG:4979,(23000.0 18000.0 10.0 2000) NSGI:Bonaire_DPnet,OGC:CRS84h,(23000.0 18000.0 10.0 2000) NSGI:Bonaire2004_GEOCENTRIC,NSGI:Bonaire_DPnet_KADpeil,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) @@ -22,7 +24,8 @@ NSGI:Bonaire2004_GEOCENTRIC,NSGI:Bonaire2004_GEOCENTRIC,(2310487.4256387297 -579 NSGI:Bonaire2004_GEOCENTRIC,NSGI:Bonaire2004_GEOGRAPHIC_2D,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) NSGI:Bonaire2004_GEOCENTRIC,NSGI:Bonaire2004_GEOGRAPHIC_3D,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) NSGI:Bonaire2004_GEOCENTRIC,EPSG:32619,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) -NSGI:Bonaire2004_GEOCENTRIC,EPSG:7789EPSG:7912,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) +NSGI:Bonaire2004_GEOCENTRIC,EPSG:7789,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) +NSGI:Bonaire2004_GEOCENTRIC,EPSG:7912,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) NSGI:Bonaire2004_GEOCENTRIC,EPSG:4979,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) NSGI:Bonaire2004_GEOCENTRIC,OGC:CRS84h,(2310487.4256387297 -5792376.868331335 1333594.0149470181 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_2D,NSGI:Bonaire_DPnet_KADpeil,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) @@ -31,7 +34,8 @@ NSGI:Bonaire2004_GEOGRAPHIC_2D,NSGI:Bonaire2004_GEOCENTRIC,(-68.25372592339036 1 NSGI:Bonaire2004_GEOGRAPHIC_2D,NSGI:Bonaire2004_GEOGRAPHIC_2D,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_2D,NSGI:Bonaire2004_GEOGRAPHIC_3D,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_2D,EPSG:32619,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) -NSGI:Bonaire2004_GEOGRAPHIC_2D,EPSG:7789EPSG:7912,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) +NSGI:Bonaire2004_GEOGRAPHIC_2D,EPSG:7789,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) +NSGI:Bonaire2004_GEOGRAPHIC_2D,EPSG:7912,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_2D,EPSG:4979,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_2D,OGC:CRS84h,(-68.25372592339036 12.149707219957842 -15.309041996486485 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_3D,NSGI:Bonaire_DPnet_KADpeil,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) @@ -40,7 +44,8 @@ NSGI:Bonaire2004_GEOGRAPHIC_3D,NSGI:Bonaire2004_GEOCENTRIC,(-68.25372592339036 1 NSGI:Bonaire2004_GEOGRAPHIC_3D,NSGI:Bonaire2004_GEOGRAPHIC_2D,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_3D,NSGI:Bonaire2004_GEOGRAPHIC_3D,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_3D,EPSG:32619,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) -NSGI:Bonaire2004_GEOGRAPHIC_3D,EPSG:7789EPSG:7912,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) +NSGI:Bonaire2004_GEOGRAPHIC_3D,EPSG:7789,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) +NSGI:Bonaire2004_GEOGRAPHIC_3D,EPSG:7912,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_3D,EPSG:4979,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) NSGI:Bonaire2004_GEOGRAPHIC_3D,OGC:CRS84h,(-68.25372592339036 12.149707219957842 -14.943562592521495 2000.0) EPSG:32619,NSGI:Bonaire_DPnet_KADpeil,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) @@ -49,6 +54,47 @@ EPSG:32619,NSGI:Bonaire2004_GEOCENTRIC,(581195.7179742614 1343219.3518943014 -15 EPSG:32619,NSGI:Bonaire2004_GEOGRAPHIC_2D,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) EPSG:32619,NSGI:Bonaire2004_GEOGRAPHIC_3D,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) EPSG:32619,EPSG:32619,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) -EPSG:32619,EPSG:7789EPSG:7912,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) +EPSG:32619,EPSG:7789,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) +EPSG:32619,EPSG:7912,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) EPSG:32619,EPSG:4979,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) EPSG:32619,OGC:CRS84h,(581195.7179742614 1343219.3518943014 -15.309041996486485 2000.0) +EPSG:7789,NSGI:Bonaire_DPnet_KADpeil,(inf inf inf inf) +EPSG:7789,NSGI:Bonaire_DPnet,(inf inf inf inf) +EPSG:7789,NSGI:Bonaire2004_GEOCENTRIC,(inf inf inf inf) +EPSG:7789,NSGI:Bonaire2004_GEOGRAPHIC_2D,(inf inf inf inf) +EPSG:7789,NSGI:Bonaire2004_GEOGRAPHIC_3D,(inf inf inf inf) +EPSG:7789,EPSG:32619,(inf inf inf inf) +EPSG:7789,EPSG:7789,(inf inf inf inf) +EPSG:7789,EPSG:7912,(inf inf inf inf) +EPSG:7789,EPSG:4979,(inf inf inf inf) +EPSG:7789,OGC:CRS84h,(inf inf inf inf) +EPSG:7912,NSGI:Bonaire_DPnet_KADpeil,(inf inf inf inf) +EPSG:7912,NSGI:Bonaire_DPnet,(inf inf inf inf) +EPSG:7912,NSGI:Bonaire2004_GEOCENTRIC,(inf inf inf inf) +EPSG:7912,NSGI:Bonaire2004_GEOGRAPHIC_2D,(inf inf inf inf) +EPSG:7912,NSGI:Bonaire2004_GEOGRAPHIC_3D,(inf inf inf inf) +EPSG:7912,EPSG:32619,(inf inf inf inf) +EPSG:7912,EPSG:7789,(inf inf inf inf) +EPSG:7912,EPSG:7912,(inf inf inf inf) +EPSG:7912,EPSG:4979,(inf inf inf inf) +EPSG:7912,OGC:CRS84h,(inf inf inf inf) +EPSG:4979,NSGI:Bonaire_DPnet_KADpeil,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,NSGI:Bonaire_DPnet,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,NSGI:Bonaire2004_GEOCENTRIC,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,NSGI:Bonaire2004_GEOGRAPHIC_2D,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,NSGI:Bonaire2004_GEOGRAPHIC_3D,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,EPSG:32619,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,EPSG:7789,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,EPSG:7912,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,EPSG:4979,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +EPSG:4979,OGC:CRS84h,(-68.2537259371291 12.14970719200454 -40.252278505824506 2000.0) +OGC:CRS84h,NSGI:Bonaire_DPnet_KADpeil,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,NSGI:Bonaire_DPnet,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,NSGI:Bonaire2004_GEOCENTRIC,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,NSGI:Bonaire2004_GEOGRAPHIC_2D,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,NSGI:Bonaire2004_GEOGRAPHIC_3D,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,EPSG:32619,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,EPSG:7789,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,EPSG:7912,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,EPSG:4979,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) +OGC:CRS84h,OGC:CRS84h,(-68.2537259371291 12.149707191615798 -40.2522831344977 2000.0) diff --git a/tests/data/saba_validation_data.csv b/tests/data/saba_validation_data.csv index f8cc328..586a143 100644 --- a/tests/data/saba_validation_data.csv +++ b/tests/data/saba_validation_data.csv @@ -5,7 +5,8 @@ NSGI:Saba_DPnet_Height,NSGI:Saba2020_GEOCENTRIC,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,NSGI:Saba2020_GEOGRAPHIC_2D,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,NSGI:Saba2020_GEOGRAPHIC_3D,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,EPSG:32619,(5000.0 1000.0 300.0 2000) -NSGI:Saba_DPnet_Height,EPSG:7789EPSG:7912,(5000.0 1000.0 300.0 2000) +NSGI:Saba_DPnet_Height,EPSG:7789,(5000.0 1000.0 300.0 2000) +NSGI:Saba_DPnet_Height,EPSG:7912,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,EPSG:4979,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,OGC:CRS84h,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet,NSGI:Saba_DPnet_Height,(5000.0 1000.0 300.0 2000) @@ -15,7 +16,8 @@ NSGI:Saba_DPnet,NSGI:Saba2020_GEOCENTRIC,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet,NSGI:Saba2020_GEOGRAPHIC_2D,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet,NSGI:Saba2020_GEOGRAPHIC_3D,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet,EPSG:32619,(5000.0 1000.0 300.0 2000) -NSGI:Saba_DPnet,EPSG:7789EPSG:7912,(5000.0 1000.0 300.0 2000) +NSGI:Saba_DPnet,EPSG:7789,(5000.0 1000.0 300.0 2000) +NSGI:Saba_DPnet,EPSG:7912,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet,EPSG:4979,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet,OGC:CRS84h,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,NSGI:Saba_DPnet_Height,(5000.0 1000.0 300.0 2000) @@ -25,7 +27,8 @@ NSGI:Saba_DPnet_Height,NSGI:Saba2020_GEOCENTRIC,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,NSGI:Saba2020_GEOGRAPHIC_2D,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,NSGI:Saba2020_GEOGRAPHIC_3D,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,EPSG:32619,(5000.0 1000.0 300.0 2000) -NSGI:Saba_DPnet_Height,EPSG:7789EPSG:7912,(5000.0 1000.0 300.0 2000) +NSGI:Saba_DPnet_Height,EPSG:7789,(5000.0 1000.0 300.0 2000) +NSGI:Saba_DPnet_Height,EPSG:7912,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,EPSG:4979,(5000.0 1000.0 300.0 2000) NSGI:Saba_DPnet_Height,OGC:CRS84h,(5000.0 1000.0 300.0 2000) NSGI:Saba2020_GEOCENTRIC,NSGI:Saba_DPnet_Height,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) @@ -35,7 +38,8 @@ NSGI:Saba2020_GEOCENTRIC,NSGI:Saba2020_GEOCENTRIC,(2738386.6860441198 -5429268.9 NSGI:Saba2020_GEOCENTRIC,NSGI:Saba2020_GEOGRAPHIC_2D,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) NSGI:Saba2020_GEOCENTRIC,NSGI:Saba2020_GEOGRAPHIC_3D,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) NSGI:Saba2020_GEOCENTRIC,EPSG:32619,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) -NSGI:Saba2020_GEOCENTRIC,EPSG:7789EPSG:7912,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) +NSGI:Saba2020_GEOCENTRIC,EPSG:7789,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) +NSGI:Saba2020_GEOCENTRIC,EPSG:7912,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) NSGI:Saba2020_GEOCENTRIC,EPSG:4979,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) NSGI:Saba2020_GEOCENTRIC,OGC:CRS84h,(2738386.6860441198 -5429268.990323882 1919210.970141334 2000.0) NSGI:Saba2020_GEOGRAPHIC_2D,NSGI:Saba_DPnet_Height,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) @@ -45,7 +49,8 @@ NSGI:Saba2020_GEOGRAPHIC_2D,NSGI:Saba2020_GEOCENTRIC,(-63.23477197588805 17.6274 NSGI:Saba2020_GEOGRAPHIC_2D,NSGI:Saba2020_GEOGRAPHIC_2D,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_2D,NSGI:Saba2020_GEOGRAPHIC_3D,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_2D,EPSG:32619,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) -NSGI:Saba2020_GEOGRAPHIC_2D,EPSG:7789EPSG:7912,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) +NSGI:Saba2020_GEOGRAPHIC_2D,EPSG:7789,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) +NSGI:Saba2020_GEOGRAPHIC_2D,EPSG:7912,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_2D,EPSG:4979,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_2D,OGC:CRS84h,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_3D,NSGI:Saba_DPnet_Height,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) @@ -55,7 +60,8 @@ NSGI:Saba2020_GEOGRAPHIC_3D,NSGI:Saba2020_GEOCENTRIC,(-63.23477197588805 17.6274 NSGI:Saba2020_GEOGRAPHIC_3D,NSGI:Saba2020_GEOGRAPHIC_2D,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_3D,NSGI:Saba2020_GEOGRAPHIC_3D,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_3D,EPSG:32619,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) -NSGI:Saba2020_GEOGRAPHIC_3D,EPSG:7789EPSG:7912,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) +NSGI:Saba2020_GEOGRAPHIC_3D,EPSG:7789,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) +NSGI:Saba2020_GEOGRAPHIC_3D,EPSG:7912,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_3D,EPSG:4979,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) NSGI:Saba2020_GEOGRAPHIC_3D,OGC:CRS84h,(-63.23477197588805 17.62749496310654 257.5641337847337 2000.0) EPSG:32619,NSGI:Saba_DPnet_Height,(inf inf inf inf) @@ -65,6 +71,51 @@ EPSG:32619,NSGI:Saba2020_GEOCENTRIC,(inf inf inf inf) EPSG:32619,NSGI:Saba2020_GEOGRAPHIC_2D,(inf inf inf inf) EPSG:32619,NSGI:Saba2020_GEOGRAPHIC_3D,(inf inf inf inf) EPSG:32619,EPSG:32619,(inf inf inf inf) -EPSG:32619,EPSG:7789EPSG:7912,(inf inf inf inf) +EPSG:32619,EPSG:7789,(inf inf inf inf) +EPSG:32619,EPSG:7912,(inf inf inf inf) EPSG:32619,EPSG:4979,(inf inf inf inf) EPSG:32619,OGC:CRS84h,(inf inf inf inf) +EPSG:7789,NSGI:Saba_DPnet_Height,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,NSGI:Saba_DPnet,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,NSGI:Saba_DPnet_Height,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,NSGI:Saba2020_GEOCENTRIC,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,NSGI:Saba2020_GEOGRAPHIC_2D,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,NSGI:Saba2020_GEOGRAPHIC_3D,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,EPSG:32619,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,EPSG:7789,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,EPSG:7912,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,EPSG:4979,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7789,OGC:CRS84h,(2738386.5408441196 -5429269.159923881 1919210.699541334 2000.0) +EPSG:7912,NSGI:Saba_DPnet_Height,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,NSGI:Saba_DPnet,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,NSGI:Saba_DPnet_Height,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,NSGI:Saba2020_GEOCENTRIC,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,NSGI:Saba2020_GEOGRAPHIC_2D,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,NSGI:Saba2020_GEOGRAPHIC_3D,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,EPSG:32619,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,EPSG:7789,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,EPSG:7912,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,EPSG:4979,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:7912,OGC:CRS84h,(-63.234773917104256 17.62749239762325 257.5641889395192 2000.0) +EPSG:4979,NSGI:Saba_DPnet_Height,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,NSGI:Saba_DPnet,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,NSGI:Saba_DPnet_Height,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,NSGI:Saba2020_GEOCENTRIC,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,NSGI:Saba2020_GEOGRAPHIC_2D,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,NSGI:Saba2020_GEOGRAPHIC_3D,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,EPSG:32619,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,EPSG:7789,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,EPSG:7912,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,EPSG:4979,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +EPSG:4979,OGC:CRS84h,(-63.234773917104256 17.62749239707808 257.5641793552786 2000.0) +OGC:CRS84h,NSGI:Saba_DPnet_Height,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,NSGI:Saba_DPnet,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,NSGI:Saba_DPnet_Height,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,NSGI:Saba2020_GEOCENTRIC,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,NSGI:Saba2020_GEOGRAPHIC_2D,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,NSGI:Saba2020_GEOGRAPHIC_3D,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,EPSG:32619,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,EPSG:7789,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,EPSG:7912,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,EPSG:4979,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) +OGC:CRS84h,OGC:CRS84h,(-63.23477197588805 17.627494962561368 257.56412420235574 2000.0) diff --git a/tests/data/st_eustatius_validation_data.csv b/tests/data/st_eustatius_validation_data.csv index deebc88..f0bf7fc 100644 --- a/tests/data/st_eustatius_validation_data.csv +++ b/tests/data/st_eustatius_validation_data.csv @@ -4,7 +4,8 @@ NSGI:St_Eustatius_DPnet_Height,NSGI:St_Eustatius2020_GEOCENTRIC,(502000.0 193400 NSGI:St_Eustatius_DPnet_Height,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet_Height,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet_Height,EPSG:32619,(502000.0 1934000.0 100.0 2000) -NSGI:St_Eustatius_DPnet_Height,EPSG:7789EPSG:7912,(502000.0 1934000.0 100.0 2000) +NSGI:St_Eustatius_DPnet_Height,EPSG:7789,(502000.0 1934000.0 100.0 2000) +NSGI:St_Eustatius_DPnet_Height,EPSG:7912,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet_Height,EPSG:4979,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet_Height,OGC:CRS84h,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet,NSGI:St_Eustatius_DPnet_Height,(502000.0 1934000.0 100.0 2000) @@ -13,7 +14,8 @@ NSGI:St_Eustatius_DPnet,NSGI:St_Eustatius2020_GEOCENTRIC,(502000.0 1934000.0 100 NSGI:St_Eustatius_DPnet,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet,EPSG:32619,(502000.0 1934000.0 100.0 2000) -NSGI:St_Eustatius_DPnet,EPSG:7789EPSG:7912,(502000.0 1934000.0 100.0 2000) +NSGI:St_Eustatius_DPnet,EPSG:7789,(502000.0 1934000.0 100.0 2000) +NSGI:St_Eustatius_DPnet,EPSG:7912,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet,EPSG:4979,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius_DPnet,OGC:CRS84h,(502000.0 1934000.0 100.0 2000) NSGI:St_Eustatius2020_GEOCENTRIC,NSGI:St_Eustatius_DPnet_Height,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) @@ -22,7 +24,8 @@ NSGI:St_Eustatius2020_GEOCENTRIC,NSGI:St_Eustatius2020_GEOCENTRIC,(2764408.94088 NSGI:St_Eustatius2020_GEOCENTRIC,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) NSGI:St_Eustatius2020_GEOCENTRIC,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) NSGI:St_Eustatius2020_GEOCENTRIC,EPSG:32619,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) -NSGI:St_Eustatius2020_GEOCENTRIC,EPSG:7789EPSG:7912,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) +NSGI:St_Eustatius2020_GEOCENTRIC,EPSG:7789,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) +NSGI:St_Eustatius2020_GEOCENTRIC,EPSG:7912,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) NSGI:St_Eustatius2020_GEOCENTRIC,EPSG:4979,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) NSGI:St_Eustatius2020_GEOCENTRIC,OGC:CRS84h,(2764408.9408813603 -5420906.046472443 1904924.7184807751 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_2D,NSGI:St_Eustatius_DPnet_Height,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) @@ -31,7 +34,8 @@ NSGI:St_Eustatius2020_GEOGRAPHIC_2D,NSGI:St_Eustatius2020_GEOCENTRIC,(-62.980541 NSGI:St_Eustatius2020_GEOGRAPHIC_2D,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_2D,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_2D,EPSG:32619,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) -NSGI:St_Eustatius2020_GEOGRAPHIC_2D,EPSG:7789EPSG:7912,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) +NSGI:St_Eustatius2020_GEOGRAPHIC_2D,EPSG:7789,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) +NSGI:St_Eustatius2020_GEOGRAPHIC_2D,EPSG:7912,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_2D,EPSG:4979,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_2D,OGC:CRS84h,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_3D,NSGI:St_Eustatius_DPnet_Height,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) @@ -40,7 +44,8 @@ NSGI:St_Eustatius2020_GEOGRAPHIC_3D,NSGI:St_Eustatius2020_GEOCENTRIC,(-62.980541 NSGI:St_Eustatius2020_GEOGRAPHIC_3D,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_3D,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_3D,EPSG:32619,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) -NSGI:St_Eustatius2020_GEOGRAPHIC_3D,EPSG:7789EPSG:7912,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) +NSGI:St_Eustatius2020_GEOGRAPHIC_3D,EPSG:7789,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) +NSGI:St_Eustatius2020_GEOGRAPHIC_3D,EPSG:7912,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_3D,EPSG:4979,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) NSGI:St_Eustatius2020_GEOGRAPHIC_3D,OGC:CRS84h,(-62.98054174892307 17.49267703432161 58.119714772328734 2000.0) EPSG:32619,NSGI:St_Eustatius_DPnet_Height,(inf inf inf inf) @@ -49,6 +54,47 @@ EPSG:32619,NSGI:St_Eustatius2020_GEOCENTRIC,(inf inf inf inf) EPSG:32619,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(inf inf inf inf) EPSG:32619,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(inf inf inf inf) EPSG:32619,EPSG:32619,(inf inf inf inf) -EPSG:32619,EPSG:7789EPSG:7912,(inf inf inf inf) +EPSG:32619,EPSG:7789,(inf inf inf inf) +EPSG:32619,EPSG:7912,(inf inf inf inf) EPSG:32619,EPSG:4979,(inf inf inf inf) EPSG:32619,OGC:CRS84h,(inf inf inf inf) +EPSG:7789,NSGI:St_Eustatius_DPnet_Height,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,NSGI:St_Eustatius_DPnet,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,NSGI:St_Eustatius2020_GEOCENTRIC,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,EPSG:32619,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,EPSG:7789,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,EPSG:7912,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,EPSG:4979,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7789,OGC:CRS84h,(2764408.7922813604 -5420906.221272443 1904924.438080775 2000.0) +EPSG:7912,NSGI:St_Eustatius_DPnet_Height,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,NSGI:St_Eustatius_DPnet,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,NSGI:St_Eustatius2020_GEOCENTRIC,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,EPSG:32619,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,EPSG:7789,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,EPSG:7912,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,EPSG:4979,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:7912,OGC:CRS84h,(-62.980543743101954 17.492674378377597 58.119564707390964 2000.0) +EPSG:4979,NSGI:St_Eustatius_DPnet_Height,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,NSGI:St_Eustatius_DPnet,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,NSGI:St_Eustatius2020_GEOCENTRIC,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,EPSG:32619,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,EPSG:7789,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,EPSG:7912,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,EPSG:4979,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +EPSG:4979,OGC:CRS84h,(-62.980543743101954 17.49267437783604 58.1195552656427 2000.0) +OGC:CRS84h,NSGI:St_Eustatius_DPnet_Height,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,NSGI:St_Eustatius_DPnet,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,NSGI:St_Eustatius2020_GEOCENTRIC,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,NSGI:St_Eustatius2020_GEOGRAPHIC_2D,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,NSGI:St_Eustatius2020_GEOGRAPHIC_3D,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,EPSG:32619,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,EPSG:7789,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,EPSG:7912,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,EPSG:4979,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) +OGC:CRS84h,OGC:CRS84h,(-62.98054174892307 17.492677033780048 58.11970532871783 2000.0) diff --git a/tests/test_request_body_within_valid_bbox.py b/tests/test_request_body_within_valid_bbox.py index 99678d2..a6a3add 100644 --- a/tests/test_request_body_within_valid_bbox.py +++ b/tests/test_request_body_within_valid_bbox.py @@ -50,7 +50,6 @@ ], ) def test_request_body_within_valid_bbox(geojson, source_crs, expectation): - result = request_body_within_valid_bbox(geojson, source_crs) assert result == expectation diff --git a/tests/test_transform_coordinates.py b/tests/test_transform_coordinates.py index 0119bcd..1333a9c 100644 --- a/tests/test_transform_coordinates.py +++ b/tests/test_transform_coordinates.py @@ -21,7 +21,6 @@ ], ) def test_transformed_coordinates(coordinates, s_crs, t_crs, expectation): - source_crs = CRS.from_authority(*s_crs) target_crs = CRS.from_authority(*t_crs) diff --git a/tests/test_validation_bonaire_crs.py b/tests/test_validation_bonaire_crs.py index 879ef68..0a393f0 100644 --- a/tests/test_validation_bonaire_crs.py +++ b/tests/test_validation_bonaire_crs.py @@ -2,6 +2,7 @@ from coordinate_transformation_api.crs_transform import get_transform_crs_fun from coordinate_transformation_api.models import Crs as MyCrs from coordinate_transformation_api.models import TransformationNotPossibleError +from coordinate_transformation_api.util import str_to_crs from tests.util import do_pyproj_transformation, nl_bonaire_validation_data @@ -12,28 +13,27 @@ ("source_crs", "target_crs", "source_coord"), nl_bonaire_validation_data() ) def test_transformation(source_crs, target_crs, source_coord): - source_crs_info = MyCrs.from_crs_str(source_crs) target_crs_info = MyCrs.from_crs_str(target_crs) unit = target_crs_info.get_x_unit_crs() + source_crs_crs = str_to_crs(source_crs) + target_crs_crs = str_to_crs(target_crs) + if source_crs_info.nr_of_dimensions < target_crs_info.nr_of_dimensions: with pytest.raises( TransformationNotPossibleError, match="number of dimensions source-crs: 2, number of dimensions target-crs: 3", ) as e: - get_transform_crs_fun(source_crs, target_crs)(source_coord) + get_transform_crs_fun(source_crs_crs, target_crs_crs)(source_coord) assert type(e.value) is TransformationNotPossibleError - # elif source_crs == "EPSG:9289" or target_crs == "EPSG:9289": - # # skip ETRS89 + LAT NL depth - # assert True else: pyproj_transformed_coord = do_pyproj_transformation( source_crs, target_crs, source_coord ) api_transformed_coord = get_transform_crs_fun( - source_crs, - target_crs, + source_crs_crs, + target_crs_crs, precision=(4 if unit == "metre" else 9), epoch=source_coord[3], )(source_coord[0:3]) diff --git a/tests/test_validation_nl_crs.py b/tests/test_validation_nl_crs.py index ed1c85e..b2385a6 100644 --- a/tests/test_validation_nl_crs.py +++ b/tests/test_validation_nl_crs.py @@ -12,7 +12,6 @@ ("source_crs", "target_crs", "source_coord"), nl_eu_validation_data() ) def test_transformation(source_crs, target_crs, source_coord): - s_crs = str_to_crs(source_crs) t_crs = str_to_crs(target_crs) diff --git a/tests/test_validation_saba_crs.py b/tests/test_validation_saba_crs.py index e96014e..7e1c0d5 100644 --- a/tests/test_validation_saba_crs.py +++ b/tests/test_validation_saba_crs.py @@ -2,6 +2,7 @@ from coordinate_transformation_api.crs_transform import get_transform_crs_fun from coordinate_transformation_api.models import Crs as MyCrs from coordinate_transformation_api.models import TransformationNotPossibleError +from coordinate_transformation_api.util import str_to_crs from tests.util import do_pyproj_transformation, nl_saba_validation_data @@ -12,28 +13,27 @@ ("source_crs", "target_crs", "source_coord"), nl_saba_validation_data() ) def test_transformation(source_crs, target_crs, source_coord): - source_crs_info = MyCrs.from_crs_str(source_crs) target_crs_info = MyCrs.from_crs_str(target_crs) unit = target_crs_info.get_x_unit_crs() + source_crs_crs = str_to_crs(source_crs) + target_crs_crs = str_to_crs(target_crs) + if source_crs_info.nr_of_dimensions < target_crs_info.nr_of_dimensions: with pytest.raises( TransformationNotPossibleError, match="number of dimensions source-crs: 2, number of dimensions target-crs: 3", ) as e: - get_transform_crs_fun(source_crs, target_crs)(source_coord) + get_transform_crs_fun(source_crs_crs, target_crs_crs)(source_coord) assert type(e.value) is TransformationNotPossibleError - # elif source_crs == "EPSG:9289" or target_crs == "EPSG:9289": - # # skip ETRS89 + LAT NL depth - # assert True else: pyproj_transformed_coord = do_pyproj_transformation( source_crs, target_crs, source_coord ) api_transformed_coord = get_transform_crs_fun( - source_crs, - target_crs, + source_crs_crs, + target_crs_crs, precision=(4 if unit == "metre" else 9), epoch=source_coord[3], )(source_coord[0:3]) diff --git a/tests/test_validation_st_eustatius_crs.py b/tests/test_validation_st_eustatius_crs.py index 8b8a4ee..df9150b 100644 --- a/tests/test_validation_st_eustatius_crs.py +++ b/tests/test_validation_st_eustatius_crs.py @@ -2,6 +2,7 @@ from coordinate_transformation_api.crs_transform import get_transform_crs_fun from coordinate_transformation_api.models import Crs as MyCrs from coordinate_transformation_api.models import TransformationNotPossibleError +from coordinate_transformation_api.util import str_to_crs from tests.util import do_pyproj_transformation, nl_st_eustatius_validation_data @@ -12,28 +13,27 @@ ("source_crs", "target_crs", "source_coord"), nl_st_eustatius_validation_data() ) def test_transformation(source_crs, target_crs, source_coord): - source_crs_info = MyCrs.from_crs_str(source_crs) target_crs_info = MyCrs.from_crs_str(target_crs) unit = target_crs_info.get_x_unit_crs() + source_crs_crs = str_to_crs(source_crs) + target_crs_crs = str_to_crs(target_crs) + if source_crs_info.nr_of_dimensions < target_crs_info.nr_of_dimensions: with pytest.raises( TransformationNotPossibleError, match="number of dimensions source-crs: 2, number of dimensions target-crs: 3", ) as e: - get_transform_crs_fun(source_crs, target_crs)(source_coord) + get_transform_crs_fun(source_crs_crs, target_crs_crs)(source_coord) assert type(e.value) is TransformationNotPossibleError - # elif source_crs == "EPSG:9289" or target_crs == "EPSG:9289": - # # skip ETRS89 + LAT NL depth - # assert True else: pyproj_transformed_coord = do_pyproj_transformation( source_crs, target_crs, source_coord ) api_transformed_coord = get_transform_crs_fun( - source_crs, - target_crs, + source_crs_crs, + target_crs_crs, precision=(4 if unit == "metre" else 9), epoch=source_coord[3], )(source_coord[0:3]) diff --git a/tests/util.py b/tests/util.py index 8ee04ea..7a377fc 100644 --- a/tests/util.py +++ b/tests/util.py @@ -41,7 +41,6 @@ def make_entry(line): def nl_eu_validation_data(): - seed_crs_list = [ "EPSG:7415", "EPSG:28992", @@ -98,7 +97,6 @@ def nl_eu_validation_data(): def nl_bonaire_validation_data(): - seed_crs_list = [ "NSGI:Bonaire_DPnet_KADpeil", "NSGI:Bonaire_DPnet", @@ -139,7 +137,6 @@ def nl_bonaire_validation_data(): def nl_st_eustatius_validation_data(): - seed_crs_list = [ "NSGI:St_Eustatius_DPnet_Height", "NSGI:St_Eustatius_DPnet", @@ -180,7 +177,6 @@ def nl_st_eustatius_validation_data(): def nl_saba_validation_data(): - seed_crs_list = [ "NSGI:Saba_DPnet_Height", "NSGI:Saba_DPnet",