PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ pointonsurface()

Datum pointonsurface ( PG_FUNCTION_ARGS  )

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

1254 {
1255  GSERIALIZED *geom, *result;
1256  LWGEOM *lwgeom, *lwresult;
1257 
1258  geom = PG_GETARG_GSERIALIZED_P(0);
1259 
1260  lwgeom = lwgeom_from_gserialized(geom);
1261  lwresult = lwgeom_pointonsurface(lwgeom);
1262  lwgeom_free(lwgeom);
1263  PG_FREE_IF_COPY(geom, 0);
1264 
1265  if (!lwresult) PG_RETURN_NULL();
1266 
1267  result = geometry_serialize(lwresult);
1268  lwgeom_free(lwresult);
1269  PG_RETURN_POINTER(result);
1270 }
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
LWGEOM * lwgeom_pointonsurface(const LWGEOM *geom)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)

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

Here is the call graph for this function: