[postgis-tickets] [PostGIS] #5006: ST_Transform: Support PROJ pipelines

PostGIS trac at osgeo.org
Tue Oct 5 03:47:06 PDT 2021


#5006: ST_Transform: Support PROJ pipelines
--------------------------+-----------------------------
  Reporter:  cdestigter   |      Owner:  strk
      Type:  enhancement  |     Status:  assigned
  Priority:  medium       |  Milestone:  PostGIS Fund Me
 Component:  liblwgeom    |    Version:  master
Resolution:               |   Keywords:  proj
--------------------------+-----------------------------

Comment (by rcoup):

 ok, so revising a little further after the above discussions, how about
 this as a first cut to make it possible to use:

 {{{
 geometry ST_TransformPipeline(geometry geom, text pipeline)
 geometry ST_TransformPipeline(geometry geom, text pipeline, integer
 to_srid)
 }}}

 Where pipeline is documented as:
 * `urn:ogc:def:coordinateOperation:AUTHORITY::CODE`
 * a Proj pipeline (`+proj=pipeline ...`). Document that automatic axis
 normalisation doesn't happen, the caller would need to do it manually.
 * concatenated operations:
 `urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618`
 * though anything `proj_create()` accepts would be passed through.

 Which would roughly:

 1. `proj_create(pipeline)`
 2. check the result is a coordinate transform and not a CRS
 (`!proj_is_crs()`)
 3. if the source & target CRS of the operation are known
 (`proj_get_id_auth_name()`/`proj_get_id_auth_code()`) then call
 `normalize_for_visualization()`
 4. use it via `proj_trans*()`
 5. set the Postgis srid on the resulting geometry if we have a `to_srid`
 parameter

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5006#comment:8>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list