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

Definition at line 1032 of file lwgeom_functions_basic.c.

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

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

Here is the call graph for this function: