[PROJ] Knowing if geoid undulation is applied in C++
Even Rouault
even.rouault at spatialys.com
Thu Dec 3 07:19:19 PST 2020
Javier,
> Let me ask this in 3 levels (all in C++):
> - Given two CRS via WKT, is there any way to know if the transformation
> from one to the other is applying a geoid undulation?
> - ... if the transformation is applying any grid file transformation?
If you don't use the black-box API of proj_create_crs_to_crs() but use instead
CoordinateOperationFactory::createOperations() and then on each result call
CoordinateOperation::gridsNeeded(), you can get the grids that will be used.
To know if a grid is for vertical correction, you'll have to analyze the PROJ
pipeline string and look for +proj=vgridshift +grids=...
You can do that with the corresponding PROJ C API as well
> - ... when I run it from GDAL?
No, if you use OGRCoordinateTransformation without specifying an explicit
pipeline, it is a black-box.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the PROJ
mailing list