PostGIS  2.5.0dev-r@@SVN_REVISION@@
Datum LWGEOM_longitude_shift ( PG_FUNCTION_ARGS  )

Definition at line 1033 of file lwgeom_functions_basic.c.

References dumpnode::geom, geometry_serialize(), lwgeom_drop_bbox(), lwgeom_free(), lwgeom_from_gserialized(), and lwgeom_longitude_shift().

1034 {
1035  GSERIALIZED *geom;
1036  LWGEOM *lwgeom;
1037  GSERIALIZED *ret;
1038 
1039  POSTGIS_DEBUG(2, "LWGEOM_longitude_shift called.");
1040 
1041  geom = PG_GETARG_GSERIALIZED_P_COPY(0);
1042  lwgeom = lwgeom_from_gserialized(geom);
1043 
1044  /* Drop bbox, will be recomputed */
1045  lwgeom_drop_bbox(lwgeom);
1046 
1047  /* Modify geometry */
1048  lwgeom_longitude_shift(lwgeom);
1049 
1050  /* Construct GSERIALIZED */
1051  ret = geometry_serialize(lwgeom);
1052 
1053  /* Release deserialized geometry */
1054  lwgeom_free(lwgeom);
1055 
1056  /* Release detoasted geometry */
1057  pfree(geom);
1058 
1059  PG_RETURN_POINTER(ret);
1060 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1137
void lwgeom_drop_bbox(LWGEOM *lwgeom)
Call this function to drop BBOX and SRID from LWGEOM.
Definition: lwgeom.c:666
void lwgeom_longitude_shift(LWGEOM *lwgeom)
Definition: lwgeom.c:989
LWGEOM * geom
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

Here is the call graph for this function: