755 GEOSGeometry *g1, *g3;
759 geom1 = PG_GETARG_GSERIALIZED_P(0);
760 tolerance = PG_GETARG_FLOAT8(1);
765 PG_RETURN_POINTER(geom1);
773 g3 = GEOSTopologyPreserveSimplify(g1,tolerance);
774 GEOSGeom_destroy(g1);
778 POSTGIS_DEBUGF(3,
"result: %s", GEOSGeomToWKT(g3));
783 GEOSGeom_destroy(g3);
787 elog(ERROR,
"GEOS topologypreservesimplify() threw an error (result postgis geometry formation)!");
791 PG_FREE_IF_COPY(geom1, 0);
792 PG_RETURN_POINTER(result);
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)...
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.
uint32_t gserialized_get_type(const GSERIALIZED *s)
Extract the geometry type from the serialized form (it hides in the anonymous data area,...
void lwgeom_geos_error(const char *fmt,...)
#define HANDLE_GEOS_ERROR(label)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)