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

PostGIS trac at osgeo.org
Thu Sep 30 02:54:54 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
--------------------------+-----------------------------
Changes (by rcoup):

 * keywords:   => proj
 * component:  postgis => liblwgeom


Comment:

 @strk — is this what you're thinking?

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

 Where `pipeline` can be anything
 [https://proj.org/development/reference/functions.html#c.proj_create
 `proj_create()`] accepts that produces a coordinate operation /
 transformation:
 * `EPSG:1671` (referencing a transformation)
 * `+proj=pipeline ...`
 * `urn:ogc:def:coordinateOperation:EPSG::1671`
 * concatenated operations
 `urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618`

 I agree with Craig, I don't think integer codes are a great idea. For a
 start, `spatial_ref_sys` only holds CRS codes, not transformations.

 Which would, underneath:
 1. `proj_create(pipeline)`
 2. check the result is a coordinate transform and not a CRS
 (`!proj_is_crs()`)
 3. use it via `proj_trans*()`
 4. `ST_SetSRID()` on the result if we have a `to_srid` parameter

 Things we might need to figure out / be careful with: PostGIS always calls
 `proj_normalize_for_visualization()` since it uses an X,Y axis order
 convention. Maybe we  document that any axis swapping happening in the
 pipeline is subject to an additional X,Y normalisation at the end?

 @rouault any comments from a Proj perspective?

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5006#comment:3>
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