[PROJ] ct2 format and grid_transformation.sql

Even Rouault even.rouault at spatialys.com
Wed Sep 16 04:42:52 PDT 2020


Dalia,

> I want to be clear on these things:
> 
> Am I right that ct2 format can not be described in grid_alternatives.sql/
> grid_transformation.sql/ grid_transformation_custom.sql, because there is
> no EPSG code for ct2 format (NTv2 format (EPSG:9615) and GTX format
> (EPSG:9665))?
> 
> I can only transform ct2 format into GTG and use in proj piplines directly
> and also in GDAL but not in transformations where EPSG code is involved,
> correct?
> 
> As today all grids should be in GTG format, but  in grid_alternatives.sql/
> grid_transformation.sql/ grid_transformation_custom.sql  the names of the
> grid are with endings .gsb and .gtx, so that mean that where EPSG code is
> involved GTG will be transformed back into .gsb or .gtx grid formats to
> perform transformation in such an applicatios as QGIS and so on (where proj
> is in background and EPSG codes are involved in the transformation),
> correct?

No, if the grid name in EPSG is .gsb or .gtx, and grid_alternatives map it to a GTiff file in the 
proj_grid_name column, then PROJ will use the GTG file. (for backward compatibility with 
older PROJ grid packages, if the GTG file is not found, but a .gtx or .gsb filename is present in 
the old_proj_grid_name column, it will be used)

> 
> From here, I can see that I can convert ct2 format into GTG, but ct2 format
> grid can not be decribed in  grid_alternatives.sql/
> grid_transformation.sql/ grid_transformation_custom.sql and can not be used
> in transformation involving EPSG codes, correct?

if you wanted to use a .ct2 file in a custom record of "grid_transformation", you could likely 
abuse the use of the EPSG:9615 method. I don't think PROJ would mind.

In PROJ < 7.0, it was possible to register a CTable2 alternative grid name, but this has now 
been removed per the "CONSTRAINT check_grid_alternatives_grid_fromat CHECK 
(proj_grid_format IN ('GTiff', 'GTX', 'NTv2'))," because I didn't see any more use of it. You 
could probably add 'CTable2' to that list, if you really wanted, although abusing 'NTv2' should 
be just fine)


But could you explain exactly what you try to establish ? Map an existing EPSG grid 
transformation record ? Or add a new custom one ? If the later and you want to use a GTG file 
directly, you should abuse EPSG:9615 or EPSG:9665 as there's not yet any GeoTIFF method 
registered in EPSG.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200916/b20eb82c/attachment.html>


More information about the PROJ mailing list