/* check coordinate equality */ char lwtriangle_same(const LWTRIANGLE *t1, const LWTRIANGLE *t2) { char r = ptarray_same(t1->points, t2->points); LWDEBUGF(5, "returning %d", r); return r; }
char lwtriangle_is_repeated_points(LWTRIANGLE *triangle) { char ret; POINTARRAY *pa; pa = ptarray_remove_repeated_points(triangle->points, 0.0); ret = ptarray_same(pa, triangle->points); ptarray_free(pa); return ret; }
/* * check coordinate equality * ring and coordinate order is considered */ char lwpoly_same(const LWPOLY *p1, const LWPOLY *p2) { uint32_t i; if ( p1->nrings != p2->nrings ) return 0; for (i=0; i<p1->nrings; i++) { if ( ! ptarray_same(p1->rings[i], p2->rings[i]) ) return 0; } return 1; }
/* check coordinate equality */ char lwpoint_same(const LWPOINT *p1, const LWPOINT *p2) { return ptarray_same(p1->point, p2->point); }
/* check coordinate equality */ char lwcircstring_same(const LWCIRCSTRING *me, const LWCIRCSTRING *you) { return ptarray_same(me->points, you->points); }
/* check coordinate equality */ char lwline_same(const LWLINE *l1, const LWLINE *l2) { return ptarray_same(l1->points, l2->points); }