Skip to content

Commit

Permalink
Merge lhuisman (#16)
Browse files Browse the repository at this point in the history
* Do not allow ESRI transformations (by removing ESRI from authority_to_authority list)

* Add null transformation for NAP to AGRS2010 height outisde nlgeo2018 grid

* apply lhuisman/remove_ersi @nl_nsgi_00_authorities.sql

Co-authored-by: lhuisman <[email protected]>

* apply lhuisman/NAP-to-ETRS89-null @nl_nsgi_30_nl_transformation.sql

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

* rm old sql

* update Dockerfile + README.md + actions for proj.db & proj.global.time.dependent.transformations.db

---------

Co-authored-by: lhuisman <[email protected]>
Co-authored-by: Jochem-L <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2024
1 parent ff99cde commit f2a0e1f
Show file tree
Hide file tree
Showing 7 changed files with 270 additions and 1,380 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,20 @@ jobs:
docker cp "${cont_id}:/usr/share/proj/proj.db" proj.db
docker rm "$cont_id"
- name: 'Export proj.global.time.dependent.transformations.db as package from Docker image'
run: |
cont_id=$(docker create ghcr.io/${{ steps.lowercaserepo.outputs.REPO_LC }}:${{ github.event.release.tag_name }})
docker cp "${cont_id}:/usr/share/proj/proj.global.time.dependent.transformations.db" proj.global.time.dependent.transformations.db
docker rm "$cont_id"
- name: 'Upload proj.db'
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
gh release upload ${{ github.event.release.tag_name }} proj.db
- name: 'Upload proj.global.time.dependent.transformations.db'
env:
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
gh release upload ${{ github.event.release.tag_name }} proj.global.time.dependent.transformations.db
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,14 @@ RUN apt update \
&& apt install -y \
sqlite3

ADD sql /usr/share/proj/nl_nsgi_sql
ADD sql /usr/share/proj/nl_nsgi_sql

# Adds the NSGI transformations to the proj.db
# TODO: The nl_ngsi.sql is also added in the /user/share/proj dir
# for completion, but we need to find a 'better' place for it.
RUN for f in /usr/share/proj/nl_nsgi_sql/nl_nsgi_*.sql; do echo $f;cat $f | sqlite3 /usr/share/proj/proj.db;done
RUN cat /usr/share/proj/nl_nsgi_sql/nl_nsgi_00_authorities.sql | sqlite3 /usr/share/proj/proj.db
RUN cat /usr/share/proj/nl_nsgi_sql/nl_nsgi_10_copy_transformations_from_projdb.sql | sqlite3 /usr/share/proj/proj.db
RUN cat /usr/share/proj/nl_nsgi_sql/nl_nsgi_20_datum_and_crs.sql | sqlite3 /usr/share/proj/proj.db
RUN cat /usr/share/proj/nl_nsgi_sql/nl_nsgi_30_nl_transformations.sql | sqlite3 /usr/share/proj/proj.db
RUN cat /usr/share/proj/nl_nsgi_sql/nl_nsgi_40_europe_transformations.sql | sqlite3 /usr/share/proj/proj.db
RUN cat /usr/share/proj/nl_nsgi_sql/nl_nsgi_50_wgs84_null_transformations.sql | sqlite3 /usr/share/proj/proj.db

RUN cp /usr/share/proj/proj.db /usr/share/proj/proj.global.time.dependent.transformations.db
RUN cat /usr/share/proj/nl_nsgi_sql/nl_nsgi_60_global_time_dependent_transformations.sql | sqlite3 /usr/share/proj/proj.global.time.dependent.transformations.db
44 changes: 30 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,49 @@
[![GitHub
license](https://img.shields.io/github/license/GeodetischeInfrastructuur/Transformations)](https://github.com/GeodetischeInfrastructuur/Transformations/blob/master/LICENSE)

This repository contains:
This repository contains a modified proj.db that implements the following
transformations according to the recommendations of the NSGI (see image below).

![transformations](supported-transformations-nsgi.drawio.svg)

1. SQL which adds to the [PROJ](https://proj.org/en/9.3/) proj.db:
* added NSGI to authority references
* added extents of NSGI transformations
* added additional NL datum (AGRS.NL)
* added additional NL crss
* added transformation:
* ETRF2000 --> AGRS2010
* AGRS2010 -> NAP height
* RD Bessel -> pseudo RD Bessel
* AGRS2010 -> pseudo RD Bessel
* RD Bessel --> 2D ETRF2000
* ITRF2014 -> WGS 84
* ETRF2000 -> WGS 84
* RD Bessel --> 2D ITRF2014
* AGRS2010 --> 2D ITRF2014
* ETRS89 --> ETRF2000

1. A Dockerfile with [PROJ](https://proj.org/en/9.3/) configured to use this
* added additional NSGI transformations

2. A Dockerfile with [PROJ](https://proj.org/en/9.3/) configured to use this
NSGI authority as a base

These will for the base for the transformations that are defined by
[NSGI](https://www.nsgi.nl/) (Nederlandse Samenwerkingsverband Geodetische
Infrastructuur). In the future additional transformations will be added to this
repository.

> :warning: this repository contains 2 proj.db. The first (the default)
> `proj.db` has the sql scripts nl_nsgi_00.. till ns_nsgi_50.. applied. The
> second `proj.global.time.dependent.transformations.db` has the sql applied in
> the script 'nl_nsgi_60_global_time_dependent_transformations.sql' adding time
> dependent transformations. For this second one there are additional rules that
> need to be taken into account, regarding the usage of a epoch. And that is to
> provide a input epoch and not use a transformations default epoch when
> applicable. When one wants to use this second proj.db this can be done in
> multiple ways.
>
> Through a move command
>
> ```bash
> mv proj.db proj.db.bak
> mv proj.global.time.dependent.transformations.db proj.db
> ```
>
> Or through the creating of a symbolic link
>
> ```bash
> ln -s proj.global.time.dependent.transformations.db proj.db
> ```
## Docker
The Docker image is intended to be used as a base image, for applications that
Expand Down
Loading

0 comments on commit f2a0e1f

Please sign in to comment.