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

◆ pointonsurface()

Datum pointonsurface ( PG_FUNCTION_ARGS  )

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

1358{
1359 GSERIALIZED *geom, *result;
1360 LWGEOM *lwgeom, *lwresult;
1361
1362 geom = PG_GETARG_GSERIALIZED_P(0);
1363
1364 lwgeom = lwgeom_from_gserialized(geom);
1365 lwresult = lwgeom_pointonsurface(lwgeom);
1366 lwgeom_free(lwgeom);
1367 PG_FREE_IF_COPY(geom, 0);
1368
1369 if (!lwresult) PG_RETURN_NULL();
1370
1371 result = geometry_serialize(lwresult);
1372 lwgeom_free(lwresult);
1373 PG_RETURN_POINTER(result);
1374}
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:1138
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

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

Here is the call graph for this function: