PostGIS  3.2.2dev-r@@SVN_REVISION@@

◆ pointonsurface()

Datum pointonsurface ( PG_FUNCTION_ARGS  )

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

1438 {
1439  GSERIALIZED *geom, *result;
1440  LWGEOM *lwgeom, *lwresult;
1441 
1442  geom = PG_GETARG_GSERIALIZED_P(0);
1443 
1444  lwgeom = lwgeom_from_gserialized(geom);
1445  lwresult = lwgeom_pointonsurface(lwgeom);
1446  lwgeom_free(lwgeom);
1447  PG_FREE_IF_COPY(geom, 0);
1448 
1449  if (!lwresult) PG_RETURN_NULL();
1450 
1451  result = geometry_serialize(lwresult);
1452  lwgeom_free(lwresult);
1453  PG_RETURN_POINTER(result);
1454 }
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: