/** * Returns a boolean value that shows if this geometry contains the specified geometry. * * @param node1 xml element containing gml object(s) * @param node2 xml element containing gml object(s) * @return boolean value * @throws QueryException query exception */ @Deterministic public Bln contains(final ANode node1, final ANode node2) throws QueryException { final Geometry geo1 = checkGeo(node1); final Geometry geo2 = checkGeo(node2); return Bln.get(geo1.contains(geo2)); }
public void testPolygonRelate() throws Exception { Geometry bigPolygon = reader.read("POLYGON ((0 0, 0 50, 50 50, 50 0, 0 0))"); Geometry smallPolygon = reader.read("POLYGON ((10 10, 10 30, 30 30, 30 10, 10 10))"); assertTrue(bigPolygon.contains(smallPolygon)); }