PostGIS  3.3.9dev-r@@SVN_REVISION@@

◆ pointonsurface()

Datum pointonsurface ( PG_FUNCTION_ARGS  )

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

1411 {
1412  GSERIALIZED *geom, *result;
1413  LWGEOM *lwgeom, *lwresult;
1414 
1415  geom = PG_GETARG_GSERIALIZED_P(0);
1416 
1417  lwgeom = lwgeom_from_gserialized(geom);
1418  lwresult = lwgeom_pointonsurface(lwgeom);
1419  lwgeom_free(lwgeom);
1420  PG_FREE_IF_COPY(geom, 0);
1421 
1422  if (!lwresult) PG_RETURN_NULL();
1423 
1424  result = geometry_serialize(lwresult);
1425  lwgeom_free(lwresult);
1426  PG_RETURN_POINTER(result);
1427 }
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: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: