PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ pointonsurface()

Datum pointonsurface ( PG_FUNCTION_ARGS  )

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

1528 {
1529  GSERIALIZED *geom, *result;
1530  LWGEOM *lwgeom, *lwresult;
1531 
1532  geom = PG_GETARG_GSERIALIZED_P(0);
1533 
1534  lwgeom = lwgeom_from_gserialized(geom);
1535  lwresult = lwgeom_pointonsurface(lwgeom);
1536  lwgeom_free(lwgeom);
1537  PG_FREE_IF_COPY(geom, 0);
1538 
1539  if (!lwresult) PG_RETURN_NULL();
1540 
1541  result = geometry_serialize(lwresult);
1542  lwgeom_free(lwresult);
1543  PG_RETURN_POINTER(result);
1544 }
char result[OUT_DOUBLE_BUFFER_SIZE]
Definition: cu_print.c:262
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:1155
LWGEOM * lwgeom_pointonsurface(const LWGEOM *geom)

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

Here is the call graph for this function: