169 char *input_pipeline;
175 gser = PG_GETARG_GSERIALIZED_P_COPY(0);
178 input_pipeline = text_to_cstring(PG_GETARG_TEXT_P(1));
179 is_forward = PG_GETARG_BOOL(2);
180 result_srid = PG_GETARG_INT32(3);
184 pfree(input_pipeline);
188 elog(ERROR,
"coordinate transformation failed");
193 geom->
srid = result_srid;
197 gser_result = geometry_serialize(geom);
199 PG_FREE_IF_COPY(gser, 0);
201 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.