Allocate a new LWPROJ containing the reference to the PROJ's PJ using a PROJ pipeline definition:
- Parameters
-
| str_pipeline | the coordinate operation pipeline string. Either:
urn:ogc:def:coordinateOperation:AUTHORITY::CODE
- a PROJ pipeline:
+proj=pipeline ...
- concatenated operations:
urn:ogc:def:coordinateOperation,coordinateOperation:EPSG::3895,coordinateOperation:EPSG::1618
- any other coordinate operation accepted via
proj_create()
|
| is_foward | whether to execute the the pipeline in a forward or inverse direction. |
Definition at line 122 of file liblwgeom/lwgeom_transform.c.
123{
124
125 if (!str_pipeline)
126 return NULL;
127
128 PJ* pj = proj_create(PJ_DEFAULT_CTX, str_pipeline);
129 if (!pj)
130 return NULL;
131
132
133 if (proj_is_crs(pj))
134 return NULL;
135
136
137 PJ* pj_norm = proj_normalize_for_visualization(PJ_DEFAULT_CTX, pj);
138 if (!pj_norm)
139 pj_norm = pj;
140
141 else if (pj != pj_norm)
142 proj_destroy(pj);
143
144
148
149
153 return lp;
154}
void * lwalloc(size_t size)
uint8_t source_is_latlong
double source_semi_major_metre
double source_semi_minor_metre
References LW_FALSE, lwalloc(), LWPROJ::pipeline_is_forward, LWPROJ::pj, LWPROJ::source_is_latlong, LWPROJ::source_semi_major_metre, and LWPROJ::source_semi_minor_metre.
Referenced by lwgeom_transform_pipeline().