@Test public void testFindCompletelyObscuredTiles() { List<TileBounds> completelyObscuredTiles = tree.findCompletelyObscuredTiles(); Assert.assertEquals("incorrect number of obscured tiles found in default tree", 0, completelyObscuredTiles.size()); tree.addTile(new TileBounds("zzz-1", "1", 1.0, 5.0, 5.0, 25.0, 25.0)); tree.addTile(new TileBounds("zzz-2", "1", 1.0, 0.0, 0.0, 15.0, 15.0)); tree.addTile(new TileBounds("aaa-3", "1", 1.0, -10.0, 12.0, 15.0, 25.0)); completelyObscuredTiles = tree.findCompletelyObscuredTiles(); Assert.assertEquals("incorrect number of obscured tiles found in modified tree", 2, completelyObscuredTiles.size()); }
public List<TileBounds> findCompletelyObscuredTiles() { final List<TileBounds> completelyObscuredTiles = new ArrayList<>(tileBoundsList.size()); List<TileBounds> intersectingTiles; for (final TileBounds tile : tileBoundsList) { intersectingTiles = findTilesInBox(tile.getMinX(), tile.getMinY(), tile.getMaxX(), tile.getMaxY()); if (isCompletelyObscured(tile, intersectingTiles)) { completelyObscuredTiles.add(tile); } } return completelyObscuredTiles; }
TileBoundsRTree { public List<TileBounds> findCompletelyObscuredTiles() { final List<TileBounds> completelyObscuredTiles = new ArrayList<>(tileBoundsList.size()); List<TileBounds> intersectingTiles; for (final TileBounds tile : tileBoundsList) { intersectingTiles = findTilesInBox(tile.getMinX(), tile.getMinY(), tile.getMaxX(), tile.getMaxY()); if (isCompletelyObscured(tile, intersectingTiles)) { completelyObscuredTiles.add(tile); } } return completelyObscuredTiles; } }
TileBoundsRTree { public List<TileBounds> findCompletelyObscuredTiles() { final List<TileBounds> completelyObscuredTiles = new ArrayList<>(tileBoundsList.size()); List<TileBounds> intersectingTiles; for (final TileBounds tile : tileBoundsList) { intersectingTiles = findTilesInBox(tile.getMinX(), tile.getMinY(), tile.getMaxX(), tile.getMaxY()); if (isCompletelyObscured(tile, intersectingTiles)) { completelyObscuredTiles.add(tile); } } return completelyObscuredTiles; } TileBoundsRTree(final Double z,
                           final List<TileBounds> tileBoundsList); }
TileBoundsRTree { public List<TileBounds> findCompletelyObscuredTiles() { final List<TileBounds> completelyObscuredTiles = new ArrayList<>(tileBoundsList.size()); List<TileBounds> intersectingTiles; for (final TileBounds tile : tileBoundsList) { intersectingTiles = findTilesInBox(tile.getMinX(), tile.getMinY(), tile.getMaxX(), tile.getMaxY()); if (isCompletelyObscured(tile, intersectingTiles)) { completelyObscuredTiles.add(tile); } } return completelyObscuredTiles; } TileBoundsRTree(final Double z,
                           final List<TileBounds> tileBoundsList); int size(); List<TileBounds> getTileBoundsList(); void addTile(final TileBounds tileBounds); List<TileBounds> findTilesInBox(final double minX,
                                           final double minY,
                                           final double maxX,
                                           final double maxY); List<TileBounds> findCompletelyObscuredTiles(); List<TileBounds> findVisibleTiles(); List<TileBounds> findTilesNearestToBox(final double minX,
                                                  final double minY,
                                                  final double maxX,
                                                  final double maxY,
                                                  final double maxDistance,
                                                  final int maxCount); Set<OrderedCanvasIdPair> getCircleNeighbors(final List<TileBounds> sourceTileBoundsList,
                                                       final List<TileBoundsRTree> neighborTrees,
                                                       final double neighborRadiusFactor,
                                                       final Double explicitRadius,
                                                       final boolean excludeCornerNeighbors,
                                                       final boolean excludeSameLayerNeighbors,
                                                       final boolean excludeSameSectionNeighbors); static Set<OrderedCanvasIdPair> getDistinctPairs(final TileBounds fromTile,
                                                            final List<TileBounds> toTiles,
                                                            final boolean excludeCornerNeighbors,
                                                            final boolean excludeSameSectionNeighbors,
                                                            final boolean includeRelativePosition); }
TileBoundsRTree { public List<TileBounds> findCompletelyObscuredTiles() { final List<TileBounds> completelyObscuredTiles = new ArrayList<>(tileBoundsList.size()); List<TileBounds> intersectingTiles; for (final TileBounds tile : tileBoundsList) { intersectingTiles = findTilesInBox(tile.getMinX(), tile.getMinY(), tile.getMaxX(), tile.getMaxY()); if (isCompletelyObscured(tile, intersectingTiles)) { completelyObscuredTiles.add(tile); } } return completelyObscuredTiles; } TileBoundsRTree(final Double z,
                           final List<TileBounds> tileBoundsList); int size(); List<TileBounds> getTileBoundsList(); void addTile(final TileBounds tileBounds); List<TileBounds> findTilesInBox(final double minX,
                                           final double minY,
                                           final double maxX,
                                           final double maxY); List<TileBounds> findCompletelyObscuredTiles(); List<TileBounds> findVisibleTiles(); List<TileBounds> findTilesNearestToBox(final double minX,
                                                  final double minY,
                                                  final double maxX,
                                                  final double maxY,
                                                  final double maxDistance,
                                                  final int maxCount); Set<OrderedCanvasIdPair> getCircleNeighbors(final List<TileBounds> sourceTileBoundsList,
                                                       final List<TileBoundsRTree> neighborTrees,
                                                       final double neighborRadiusFactor,
                                                       final Double explicitRadius,
                                                       final boolean excludeCornerNeighbors,
                                                       final boolean excludeSameLayerNeighbors,
                                                       final boolean excludeSameSectionNeighbors); static Set<OrderedCanvasIdPair> getDistinctPairs(final TileBounds fromTile,
                                                            final List<TileBounds> toTiles,
                                                            final boolean excludeCornerNeighbors,
                                                            final boolean excludeSameSectionNeighbors,
                                                            final boolean includeRelativePosition);  }