2782 GEOSGeometry *g1, *g2;
2786 geom1 = PG_GETARG_GSERIALIZED_P(0);
2787 geom2 = PG_GETARG_GSERIALIZED_P(1);
2794 PG_RETURN_BOOL(
TRUE);
2805 PG_RETURN_BOOL(
FALSE);
2813 if (VARSIZE(geom1) == VARSIZE(geom2) && !memcmp(geom1, geom2, VARSIZE(geom1))) {
2814 PG_RETURN_BOOL(
TRUE);
2832 GEOSGeom_destroy(g1);
2836 result = GEOSEquals(g1,g2);
2838 GEOSGeom_destroy(g1);
2839 GEOSGeom_destroy(g2);
2847 PG_FREE_IF_COPY(geom1, 0);
2848 PG_FREE_IF_COPY(geom2, 1);
2850 PG_RETURN_BOOL(result);
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 error_if_srid_mismatch(int srid1, int srid2)
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
void lwgeom_geos_error(const char *fmt,...)
GEOSGeometry * POSTGIS2GEOS(GSERIALIZED *pglwgeom)
#define HANDLE_GEOS_ERROR(label)
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)...
void errorIfGeometryCollection(GSERIALIZED *g1, GSERIALIZED *g2)
Throws an ereport ERROR if either geometry is a COLLECTIONTYPE.