PostGIS  3.1.6dev-r@@SVN_REVISION@@

◆ pointonsurface()

Datum pointonsurface ( PG_FUNCTION_ARGS  )

Definition at line 1502 of file postgis/lwgeom_geos.c.

1503 {
1504  GSERIALIZED *geom, *result;
1505  LWGEOM *lwgeom, *lwresult;
1506 
1507  geom = PG_GETARG_GSERIALIZED_P(0);
1508 
1509  lwgeom = lwgeom_from_gserialized(geom);
1510  lwresult = lwgeom_pointonsurface(lwgeom);
1511  lwgeom_free(lwgeom);
1512  PG_FREE_IF_COPY(geom, 0);
1513 
1514  if (!lwresult) PG_RETURN_NULL();
1515 
1516  result = geometry_serialize(lwresult);
1517  lwgeom_free(lwresult);
1518  PG_RETURN_POINTER(result);
1519 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:267
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
Definition: gserialized.c:239
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1138
LWGEOM * lwgeom_pointonsurface(const LWGEOM *geom)

References lwgeom_free(), lwgeom_from_gserialized(), lwgeom_pointonsurface(), and result.

Here is the call graph for this function: