165 char *input_pipeline;
171 gser = PG_GETARG_GSERIALIZED_P_COPY(0);
174 input_pipeline = text_to_cstring(PG_GETARG_TEXT_P(1));
175 is_forward = PG_GETARG_BOOL(2);
176 result_srid = PG_GETARG_INT32(3);
180 pfree(input_pipeline);
184 elog(ERROR,
"coordinate transformation failed");
189 geom->
srid = result_srid;
193 gser_result = geometry_serialize(geom);
195 PG_FREE_IF_COPY(gser, 0);
197 PG_RETURN_POINTER(gser_result);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_refresh_bbox(LWGEOM *lwgeom)
Drop current bbox and calculate a fresh one.
void lwgeom_free(LWGEOM *geom)
int lwgeom_transform_pipeline(LWGEOM *geom, const char *pipeline, bool is_forward)
Transform (reproject) a geometry in-place using a PROJ pipeline.