/** * Whether this geometry is within the given geometry. * @param outer * @return */ public boolean within(Geoshape outer) { return getSpatialRelation(outer)==SpatialRelation.WITHIN; }
/** * Whether this geometry contains the given geometry. * @param outer * @return */ public boolean contains(Geoshape outer) { return getSpatialRelation(outer)==SpatialRelation.CONTAINS; }
/** * Whether this geometry has any points in common with the given geometry. * @param other * @return */ public boolean intersect(Geoshape other) { SpatialRelation r = getSpatialRelation(other); return r==SpatialRelation.INTERSECTS || r==SpatialRelation.CONTAINS || r==SpatialRelation.WITHIN; }
/** * Whether this geometry has no points in common with the given geometry. * @param other * @return */ public boolean disjoint(Geoshape other) { return getSpatialRelation(other)==SpatialRelation.DISJOINT; }