Changeset 10658 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2016-07-27T02:16:37+02:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r10656 r10658 888 888 * @return {@code true} if the node is inside the multipolygon 889 889 */ 890 public static boolean isNodeInsideMultiPolygon(Node node, Relation multiPolygon, Predicate<Way> isOuterWayAMatch) {890 public static boolean isNodeInsideMultiPolygon(Node node, Relation multiPolygon, java.util.function.Predicate<Way> isOuterWayAMatch) { 891 891 return isPolygonInsideMultiPolygon(Collections.singletonList(node), multiPolygon, isOuterWayAMatch); 892 892 } … … 902 902 * @return {@code true} if the polygon formed by nodes is inside the multipolygon 903 903 */ 904 public static boolean isPolygonInsideMultiPolygon(List<Node> nodes, Relation multiPolygon, Predicate<Way> isOuterWayAMatch) { 904 public static boolean isPolygonInsideMultiPolygon(List<Node> nodes, Relation multiPolygon, 905 java.util.function.Predicate<Way> isOuterWayAMatch) { 905 906 // Extract outer/inner members from multipolygon 906 907 final MultiPolygonMembers mpm = new MultiPolygonMembers(multiPolygon); … … 936 937 if (!insideInner) { 937 938 // Final check using predicate 938 if (isOuterWayAMatch == null || isOuterWayAMatch. evaluate(out.ways.get(0)939 if (isOuterWayAMatch == null || isOuterWayAMatch.test(out.ways.get(0) 939 940 /* TODO give a better representation of the outer ring to the predicate */)) { 940 941 return true;
Note: See TracChangeset
for help on using the changeset viewer.