ST_TransformPipeline
What is ST_TransformPipeline?
ST_TransformPipeline applies a PROJ pipeline string to a geometry, giving explicit control over the transformation chain rather than letting PROJ choose. Available from PostGIS 3.4.
ST_TransformPipeline(geometry geom, text pipeline, integer to_srid = 0) → geometryThe pipeline is specified using PROJ's +proj=pipeline +step ... syntax or an OGC WKT2 coordinate operation. to_srid sets the SRID tag on the output.
When would you use ST_TransformPipeline?
Use ST_TransformPipeline when reproducibility across PROJ versions is critical — surveying, legal cadastre, or archival data pipelines where a shift in the default operation chooser could change coordinates by several metres. Pinning the pipeline guarantees the same transformation chain each time.
It is also the right choice when you need a specific datum-shift grid (NADCON, NTv2) to be applied, which the default ST_Transform may or may not select automatically depending on PROJ installation.
FAQs
How do I know which pipeline to use?
Use projinfo on the command line or consult EPSG.org for the operation code. PROJ's projinfo -s EPSG:4267 -t EPSG:4326 lists candidate pipelines with accuracy estimates.
What if the pipeline refers to a grid I do not have installed?
PROJ will fall back to a less accurate method or fail outright. Install the grid via projsync or package managers for maximum fidelity.
How is it different from ST_Transform?
ST_Transform lets PROJ auto-select a pipeline from source/target SRIDs. ST_TransformPipeline forces an explicit chain, bypassing auto-selection.
When was ST_TransformPipeline introduced?
PostGIS 3.4.