Skip to content

Commit

Permalink
Fix GitHub #186: UOE with modifying a BBox
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <tsmock@fb.com>
  • Loading branch information
tsmock committed Jul 14, 2021
1 parent 8497518 commit 78ab84a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ private static void hideNearbyAddableObjs(boolean hideObjects) {
dataSet.allNonDeletedPrimitives().stream().filter(p -> !p.hasKey(NEARBY_KEY)
&& osmEquivalentPossible.contains(ObjectDetections.valueOfMapillaryValue(p.get("value")))).forEach(p -> {
TagMap tags = ObjectDetections.valueOfMapillaryValue(p.get("value")).getOsmKeys();
BBox searchBBox = p.getBBox();
BBox searchBBox = new BBox(p.getBBox());
searchBBox.addPrimitive(p, distance / 111000); // convert meters to degrees (roughly)
String nearby = MainApplication.getLayerManager().getLayersOfType(OsmDataLayer.class).stream()
.map(OsmDataLayer::getDataSet).flatMap(d -> d.searchPrimitives(searchBBox).stream())
Expand Down

0 comments on commit 78ab84a

Please sign in to comment.