void RemoveDuplicateAreaVisitor::visit(const shared_ptr<Element>& e1) { OsmSchema& schema = OsmSchema::getInstance(); auto_ptr<Envelope> env(e1->getEnvelope(_map->shared_from_this())); // if the envelope is null or the element is incomplete. if (env->isNull() || IsCompleteVisitor::isComplete(_map, e1->getElementId()) == false || schema.isArea(e1) == false) { return; } set<ElementId> neighbors = _map->getIndex().findWayRelations(*env); for (set<ElementId>::const_iterator it = neighbors.begin(); it != neighbors.end(); ++it) { ElementId eit = *it; if (e1->getElementId() < eit && eit.getType() != ElementType::Node) { shared_ptr<Element> e2 = _map->getElement(*it); // check to see if e2 is null, it is possible that we removed it w/ a previous call to remove // a parent. if (e2 != 0 && schema.isArea(e2) && _equals(e1, e2)) { // remove the crummier one. _removeOne(e1, e2); // if we've deleted the element we're visiting. if (_map->containsElement(e1) == false) { return; } } } } }
bool IntervalMatrix::operator==(const IntervalMatrix& m) const { return _equals(*this,m); }
bool Affine2Vector::operator==(const IntervalVector& x) const { return _equals(*this,x); }
bool MgBaseShape::equals(const MgObject& src) const { return src.isKindOf(Type()) && _equals((const MgBaseShape&)src); }
bool Matrix::operator==(const Matrix& m) const { return _equals(*this,m); }