[PROJ] How to use the tag GEOIDMODEL
Even Rouault
even.rouault at spatialys.com
Thu Sep 22 10:09:59 PDT 2022
Javier,
>
> So to force the French vertical crs to use one or the other we should
> write something like
> GEOIDMODEL["RAF09",ID["EPSG",8371]]
> or
> GEOIDMODEL["RAF18",ID["EPSG",8885]]
>
> Is that right? Is that working in PROJ 9.1.0? I tried in cs2cs, but
> the output was identical. The log showed that both were using raf18
> tif file.
Yes, currently that will not work
The relevant code is in
src/iso19111/operation/coordinateoperationfactory.cpp at the bottom of
createOperationsGeogToVertFromGeoid() method.
const auto &models = vertDst->geoidModel();
for (const auto &model : models) {
const auto &modelName = model->nameStr();
const auto transformations =
[...]
: authFactory->getTransformationsForGeoid(
modelName,
context.context->getUsePROJAlternativeGridNames());
So it uses the AuthorityFactory::getTransformationsForGeoid() method,
which queries the geoid_model database table, to find which operations
are associated with a geoid model name.
When this returns an empty set, createOperationsGeogToVertFromGeoid()
should probably fallback to querying for a transformation by name using
modelName (assuming official names like "RGF93 v2 to NGF-IGN69 height
(2)" are used), and probably start by instantiating from the
identifier(s) (returned by model->identifiers()) (EPSG:8371) associated
with the model object when it is avaiable. Both can be done with
respectively the createObjectsFromName() and createCoordinateOperation()
methods of AuthorityFactory.
> Could it have many entries to choose one automatically? I see in the
> table geoid_model that there are several "operation_code" for the same
> "name", and PROJ chooses one.
Yes, PROJ will apply its usual logic (don't ask me to explain in detail
what it is!, or rather use
https://proj.org/operations/operations_computation.html as a first order
approximation of what it does) to select /sort when there are several
operation candidates.
Even
--
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20220922/fb6fcc2e/attachment.htm>
More information about the PROJ
mailing list