2505 GEOSGeometry *g1, *g2;
2509 geom1 = PG_GETARG_GSERIALIZED_P(0);
2510 geom2 = PG_GETARG_GSERIALIZED_P(1);
2517 PG_RETURN_BOOL(
true);
2528 PG_RETURN_BOOL(
false);
2536 if (VARSIZE(geom1) == VARSIZE(geom2) && !memcmp(geom1, geom2, VARSIZE(geom1))) {
2537 PG_RETURN_BOOL(
true);
2551 GEOSGeom_destroy(g1);
2555 result = GEOSEquals(g1,g2);
2557 GEOSGeom_destroy(g1);
2558 GEOSGeom_destroy(g2);
2562 PG_FREE_IF_COPY(geom1, 0);
2563 PG_FREE_IF_COPY(geom2, 1);
2565 PG_RETURN_BOOL(result);
int gbox_same_2d_float(const GBOX *g1, const GBOX *g2)
Check if two given GBOX are the same in x and y, or would round to the same GBOX in x and if serializ...
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_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
int gserialized_get_gbox_p(const GSERIALIZED *g, GBOX *box)
Read the bounding box off a serialization and calculate one if it is not already there.
void lwgeom_geos_error(const char *fmt,...)
void error_if_srid_mismatch(int srid1, int srid2)
#define HANDLE_GEOS_ERROR(label)
void errorIfGeometryCollection(GSERIALIZED *g1, GSERIALIZED *g2)
Throws an ereport ERROR if either geometry is a COLLECTIONTYPE.
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)