[PROJ] How to add custom grid shift to proj.db?
Peter Gagliardi
peter at cesium.com
Thu Feb 27 08:00:13 PST 2020
Hi everyone,
Suppose I wanted to create a compound CRS using a 2D projection + custom
geoid file (let's call it foo.gtx), not included in proj-datumgrid. What
table(s) in proj.db would I have to update so PROJ would know to open the
right geoid file? I'm guessing `grid_transformation` is relevant here, but
I'm not sure what else (maybe vertical_crs?). Also, if it is possible to
update the database like this, how would I select this custom CRS on the
command line, whether as a WKT or something else?
A few months ago, I asked about how to do this in a WKT, and it helped me
create a WKT like the one in the postscript. In the example, all I'm
trying to specify is EPSG:31370 + a hBG18.gtx geoid heights (file provided
by a client, but not in the list of geoids in proj-datumgrid-europe). This
does seem to work correctly.
However, we're using this as part of a REST API, so my team's a little
concerned about the security implications of specifying the grid shift
filename in the WKT. We want to know if updating the database is a better
approach.
Note that I am using PROJ 6.3.1 right now.
Thank you,
Peter Gagliardi
PS: Here's what I'm using currently to make my custom compound CRS:
COMPOUNDCRS["User-Defined Projection", PROJCRS["Belge 1972 / Belgian
Lambert 72",
BASEGEOGCRS["Belge 1972",
DATUM["Reseau National Belge 1972",
ELLIPSOID["International 1924",6378388,297,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4313]],
CONVERSION["Belgian Lambert 72",
METHOD["Lambert Conic Conformal (2SP)",
ID["EPSG",9802]],
PARAMETER["Latitude of false origin",90,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8821]],
PARAMETER["Longitude of false origin",4.36748666666667,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8822]],
PARAMETER["Latitude of 1st standard parallel",51.1666672333333,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8823]],
PARAMETER["Latitude of 2nd standard parallel",49.8333339,
ANGLEUNIT["degree",0.0174532925199433],
ID["EPSG",8824]],
PARAMETER["Easting at false origin",150000.013,
LENGTHUNIT["metre",1],
ID["EPSG",8826]],
PARAMETER["Northing at false origin",5400088.438,
LENGTHUNIT["metre",1],
ID["EPSG",8827]]],
CS[Cartesian,2],
AXIS["easting (X)",east,
ORDER[1],
LENGTHUNIT["metre",1]],
AXIS["northing (Y)",north,
ORDER[2],
LENGTHUNIT["metre",1]],
USAGE[
SCOPE["unknown"],
AREA["Belgium - onshore"],
BBOX[49.5,2.5,51.51,6.4]],
ID["EPSG",31370]], BOUNDCRS[
SOURCECRS[
VERTCRS["unknown",
VDATUM["unknown"],
CS[vertical,1],
AXIS["gravity-related height (H)",up,
LENGTHUNIT["metre",1,
ID["EPSG",9001]]]]],
TARGETCRS[
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,3],
AXIS["latitude",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["longitude",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["ellipsoidal height",up,
ORDER[3],
LENGTHUNIT["metre",1]],
ID["EPSG",4979]]],
ABRIDGEDTRANSFORMATION["unknown to WGS84 ellipsoidal height",
METHOD["GravityRelatedHeight to Geographic3D"],
PARAMETERFILE["Geoid (height correction) model
file","hBG18.gtx",
ID["EPSG",8666]]]]]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200227/a6be2ac5/attachment.html>
More information about the PROJ
mailing list