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 582 of file lwgeom.c.
584 LWDEBUGF(2,
"lwgeom_same(%s, %s) called",
588 if ( lwgeom1->
type != lwgeom2->
type )
597 LWDEBUG(3,
" ZM flags differ");
603 if ( lwgeom1->
bbox && lwgeom2->
bbox )
608 LWDEBUG(3,
" bounding boxes differ");
615 switch (lwgeom1->
type)
645 lwerror(
"lwgeom_same: unsupported geometry type: %s",
int gbox_same(const GBOX *g1, const GBOX *g2)
Check if 2 given Gbox are the same.
#define POINTTYPE
LWTYPE numbers, used internally by PostGIS.
#define POLYHEDRALSURFACETYPE
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.
#define FLAGS_GET_ZM(flags)
char lwcollection_same(const LWCOLLECTION *p1, const LWCOLLECTION *p2)
check for same geometry composition
char lwtriangle_same(const LWTRIANGLE *p1, const LWTRIANGLE *p2)
char lwline_same(const LWLINE *p1, const LWLINE *p2)
char lwpoly_same(const LWPOLY *p1, const LWPOLY *p2)
char lwcircstring_same(const LWCIRCSTRING *p1, const LWCIRCSTRING *p2)
char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2)
#define LWDEBUG(level, msg)
#define LWDEBUGF(level, msg,...)
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
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 LWPOINT::type.
Referenced by _lwt_AddPoint(), assert_all_results_found(), lwcollection_same(), LWGEOM_same(), test_lwcurve_linearize(), test_lwgeom_force_clockwise(), test_lwgeom_node(), and test_lwgeom_same().