1287 GEOSGeometry *g1, *g3;
1290 geom = PG_GETARG_GSERIALIZED_P(0);
1301 PG_RETURN_POINTER(result);
1316 g3 = GEOSPointOnSurface(g1);
1320 GEOSGeom_destroy(g1);
1325 POSTGIS_DEBUGF(3,
"result: %s", GEOSGeomToWKT(g3) ) ;
1333 GEOSGeom_destroy(g1);
1334 GEOSGeom_destroy(g3);
1335 elog(ERROR,
"GEOS pointonsurface() threw an error (result postgis geometry formation)!");
1339 GEOSGeom_destroy(g1);
1340 GEOSGeom_destroy(g3);
1342 PG_FREE_IF_COPY(geom, 0);
1344 PG_RETURN_POINTER(result);
int gserialized_has_m(const GSERIALIZED *gser)
Check if a GSERIALIZED has an M ordinate.
void lwpoint_free(LWPOINT *pt)
char lwgeom_geos_errmsg[LWGEOM_GEOS_ERRMSG_MAXSIZE]
LWPOINT * lwpoint_construct_empty(int srid, char hasz, char hasm)
int gserialized_has_z(const GSERIALIZED *gser)
Check if a GSERIALIZED has a Z ordinate.
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
void lwgeom_geos_error(const char *fmt,...)
GSERIALIZED * geometry_serialize(LWGEOM *lwgeom)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)
LWGEOM * lwpoint_as_lwgeom(const LWPOINT *obj)
#define HANDLE_GEOS_ERROR(label)
int32_t gserialized_get_srid(const GSERIALIZED *s)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...