PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ pointonsurface()

Datum pointonsurface ( PG_FUNCTION_ARGS  )

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

1466{
1467 GSERIALIZED *geom, *result;
1468 LWGEOM *lwgeom, *lwresult;
1469
1470 geom = PG_GETARG_GSERIALIZED_P(0);
1471
1472 lwgeom = lwgeom_from_gserialized(geom);
1473 lwresult = lwgeom_pointonsurface(lwgeom);
1474 lwgeom_free(lwgeom);
1475 PG_FREE_IF_COPY(geom, 0);
1476
1477 if (!lwresult) PG_RETURN_NULL();
1478
1479 result = geometry_serialize(lwresult);
1480 lwgeom_free(lwresult);
1481 PG_RETURN_POINTER(result);
1482}
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.
LWGEOM * lwgeom_pointonsurface(const LWGEOM *geom)
void lwgeom_free(LWGEOM *geom)
Definition lwgeom.c:1246

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

Here is the call graph for this function: