1002 GEOSGeometry *g1, *g3;
1006 gs1 = PG_GETARG_GSERIALIZED_P(0);
1007 tolerance = PG_GETARG_FLOAT8(1);
1013 PG_RETURN_POINTER(gs1);
1017 lwpgerror(
"Geometry contains invalid coordinates");
1028 g3 = GEOSTopologyPreserveSimplify(g1,tolerance);
1029 GEOSGeom_destroy(g1);
1033 POSTGIS_DEBUGF(3,
"result: %s", GEOSGeomToWKT(g3));
1038 GEOSGeom_destroy(g3);
1042 elog(ERROR,
"GEOS topologypreservesimplify() threw an error (result postgis geometry formation)!");
1046 PG_FREE_IF_COPY(gs1, 0);
1047 PG_RETURN_POINTER(
result);
char result[OUT_DOUBLE_BUFFER_SIZE]
int32_t gserialized_get_srid(const GSERIALIZED *g)
Extract the SRID from the serialized form (it is packed into three bytes so this is a handy function)...
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_has_z(const GSERIALIZED *g)
Check if a GSERIALIZED has a Z ordinate.
GEOSGeometry * LWGEOM2GEOS(const LWGEOM *lwgeom, uint8_t autofix)
void lwgeom_geos_error(const char *fmt,...)
void lwgeom_free(LWGEOM *geom)
int lwgeom_isfinite(const LWGEOM *lwgeom)
Check if a LWGEOM has any non-finite (NaN or Inf) coordinates.
#define LW_TRUE
Return types for functions with status returns.
static uint32_t lwgeom_get_type(const LWGEOM *geom)
Return LWTYPE number.
static int lwgeom_is_empty(const LWGEOM *geom)
Return true or false depending on whether a geometry is an "empty" geometry (no vertices members)
GSERIALIZED * GEOS2POSTGIS(GEOSGeom geom, char want3d)
#define HANDLE_GEOS_ERROR(label)