geom1 same as geom2 iff
- have same type
- have same bvol
- each object in geom1 has a corresponding object in geom2 (see above)
- Parameters
-
Definition at line 544 of file lwgeom.c.
References LWGEOM::bbox, CIRCSTRINGTYPE, COLLECTIONTYPE, COMPOUNDTYPE, CURVEPOLYTYPE, LWGEOM::flags, FLAGS_GET_ZM, gbox_same(), LINETYPE, LW_FALSE, lwcircstring_same(), lwcollection_same(), LWDEBUG, LWDEBUGF, lwerror(), lwline_same(), lwpoint_same(), lwpoly_same(), lwtriangle_same(), lwtype_name(), MULTICURVETYPE, MULTILINETYPE, MULTIPOINTTYPE, MULTIPOLYGONTYPE, MULTISURFACETYPE, POINTTYPE, POLYGONTYPE, POLYHEDRALSURFACETYPE, TINTYPE, TRIANGLETYPE, LWGEOM::type, and LWCOLLECTION::type.
Referenced by assert_all_results_found(), lwcollection_same(), LWGEOM_same(), test_lwcurve_linearize(), test_lwgeom_force_clockwise(), test_lwgeom_node(), and test_lwgeom_same().
546 LWDEBUGF(2,
"lwgeom_same(%s, %s) called",
550 if ( lwgeom1->
type != lwgeom2->
type )
559 LWDEBUG(3,
" ZM flags differ");
565 if ( lwgeom1->
bbox && lwgeom2->
bbox )
570 LWDEBUG(3,
" bounding boxes differ");
577 switch (lwgeom1->
type)
607 lwerror(
"lwgeom_same: unsupported geometry type: %s",
char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2)
#define FLAGS_GET_ZM(flags)
#define LWDEBUG(level, msg)
#define POLYHEDRALSURFACETYPE
char lwcollection_same(const LWCOLLECTION *p1, const LWCOLLECTION *p2)
check for same geometry composition
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
char lwcircstring_same(const LWCIRCSTRING *p1, const LWCIRCSTRING *p2)
char lwtriangle_same(const LWTRIANGLE *p1, const LWTRIANGLE *p2)
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define LWDEBUGF(level, msg,...)
int gbox_same(const GBOX *g1, const GBOX *g2)
Check if 2 given Gbox are the same.
char lwpoly_same(const LWPOLY *p1, const LWPOLY *p2)
char lwline_same(const LWLINE *p1, const LWLINE *p2)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.