gisgeospatialspatialproj

Proj: Solving "Grid *.gsb needed but not found on the system."


I would like to transform some coordinates from EPSG 21781 to EPSG 2056. If I run projinfo on these to projections, i get the information that a certain grid is needed but not found on the system (see below).

$ projinfo -o PROJ -s EPSG:21781 -t EPSG:2056
Candidate operations found: 1
-------------------------------------
Operation No. 1:

unknown id, Inverse of Swiss Oblique Mercator 1903M + CH1903 to CH1903+ (1) + Swiss Oblique Mercator 1995, 0.2 m, Europe - Liechtenstein and Switzerland, at least one grid missing

PROJ string:
+proj=pipeline +step +inv +proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +step +proj=hgridshift +grids=CHENyx06a.gsb +step +proj=somerc +lat_0=46.9524055555556 +lon_0=7.43958333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel

Grid CHENyx06a.gsb needed but not found on the system. Can be obtained from the proj-datumgrid-europe package at https://download.osgeo.org/proj/proj-datumgrid-europe-1.5.zip

After I have downloaded the specified file (proj-datumgrid-europe-1.5.zip), what do I need to do with it? This does not seem to be described in the docs. I'm working on Ubuntu 20.04 and proj 6.3.1

$ pkg-config --modversion proj
6.3.1

Solution

  • For the PROJ version you are using (6.3.1), the proj-datumgrid docs say that you just need to unzip the file into the PROJ data directory, which is either /usr/local/share/proj or /usr/share/proj