[postgis-tickets] [PostGIS] #5006: ST_Transform: Support PROJ pipelines
PostGIS
trac at osgeo.org
Wed Sep 29 15:36:21 PDT 2021
#5006: ST_Transform: Support PROJ pipelines
-------------------------+-----------------------------
Reporter: cdestigter | Owner: pramsey
Type: enhancement | Status: new
Priority: medium | Milestone: PostGIS Fund Me
Component: postgis | Version: master
Keywords: |
-------------------------+-----------------------------
I hoped to be able to use a [https://proj.org/operations/pipeline.html
#the-pipeline-operator PROJ pipeline string] to apply a non-default
transform between two coordinate systems.
Usage might look like this:
{{{
#!sql
select st_asewkt(
ST_TransformPipeline(
'SRID=4283;POINT(143.0 -37.0)'::GEOMETRY,
'+proj=pipeline +step +proj=axisswap +order=2,1 +step
+proj=unitconvert +xy_in=deg +xy_out=rad +step +proj=hgridshift
+grids=au_icsm_GDA94_GDA2020_conformal_and_distortion.tif +step
+proj=unitconvert +xy_in=rad +xy_out=deg +step +proj=axisswap +order=2,1'
)
);
}}}
Ideally the EPSG code for the transform would be usable too, e.g.
{{{
#!sql
select st_asewkt(
ST_TransformPipeline(
'SRID=4283;POINT(143.0 -37.0)'::GEOMETRY,
'EPSG:8447'
)
);
}}}
I'm not sure if supporting pipelines defined by other authorities is a
concern (maybe?), and if so I'd probably steer clear of supporting an
integer parameter for the EPSG code, otherwise we'll need a lookup table:
{{{
#!sql
-- this would probably need a lookup table, maybe best to avoid?
select st_asewkt(
ST_TransformPipeline(
'SRID=4283;POINT(143.0 -37.0)'::GEOMETRY,
8447
)
);
}}}
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5006>
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