The contains relation is not commutative hence in source/geom/Geometry.cpp
lines 425-427 should be removed.

See:

bool
Geometry::contains(const Geometry *g) const
{
#ifdef SHORTCIRCUIT_PREDICATES
        // short-circuit test
        if (! getEnvelopeInternal()->contains(g->getEnvelopeInternal()))
                return false;
#endif

        // optimization for rectangle arguments
        if (isRectangle()) {
                return predicate::RectangleContains::contains((Polygon&)*this, 
*g);
        }
/*
 *       if (g->isRectangle()) {
 *               return predicate::RectangleContains::contains((const 
Polygon&)*g, *this);
 *       }
 */
        IntersectionMatrix *im=relate(g);
        bool res=im->isContains();
        delete im;
        return res;
}

Cheers,
Oliver

-- 
Oliver Baltzer
Faculty of Computer Science  
Dalhousie University

Attachment: signature.asc
Description: Digital signature

_______________________________________________
geos-devel mailing list
geos-devel@geos.refractions.net
http://geos.refractions.net/mailman/listinfo/geos-devel

Reply via email to