Class IntersectionUtilities
- java.lang.Object
-
- org.openstreetmap.atlas.checks.utility.IntersectionUtilities
-
public final class IntersectionUtilities extends java.lang.ObjectA set of utilities that are common among intersection checks.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static doublefindIntersectionPercentage(org.openstreetmap.atlas.geography.Polygon polygon, org.openstreetmap.atlas.geography.Polygon otherPolygon)Find the percentage of overlap for givenPolygons.static booleanhaveExplicitLocationsForIntersections(org.openstreetmap.atlas.geography.Polygon areaCrossed, org.openstreetmap.atlas.geography.atlas.items.LineItem crossingItem)Verifies intersections of givenPolygonandLineItemare explicitLocations for both items
-
-
-
Method Detail
-
findIntersectionPercentage
public static double findIntersectionPercentage(org.openstreetmap.atlas.geography.Polygon polygon, org.openstreetmap.atlas.geography.Polygon otherPolygon)Find the percentage of overlap for givenPolygons.- Parameters:
polygon-Polygonto check for intersectionotherPolygon- AnotherPolygonto check against for intersection- Returns:
- percentage of overlap as a double; 0 if unable to clip
-
haveExplicitLocationsForIntersections
public static boolean haveExplicitLocationsForIntersections(org.openstreetmap.atlas.geography.Polygon areaCrossed, org.openstreetmap.atlas.geography.atlas.items.LineItem crossingItem)Verifies intersections of givenPolygonandLineItemare explicitLocations for both items- Parameters:
areaCrossed-Polygonbeing crossedcrossingItem-LineItemcrossing- Returns:
- whether given
PolygonandLineItem's intersections are actualLocations for both items
-
-