Changeset 7392 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2014-08-14T11:27:38+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r7193 r7392 24 24 import org.openstreetmap.josm.data.coor.LatLon; 25 25 import org.openstreetmap.josm.data.osm.BBox; 26 import org.openstreetmap.josm.data.osm.Multipolygon Create;26 import org.openstreetmap.josm.data.osm.MultipolygonBuilder; 27 27 import org.openstreetmap.josm.data.osm.Node; 28 28 import org.openstreetmap.josm.data.osm.NodePositionComparator; … … 899 899 final MultiPolygonMembers mpm = new MultiPolygonMembers(multiPolygon); 900 900 // Construct complete rings for the inner/outer members 901 final List<Multipolygon Create.JoinedPolygon> outerRings;902 final List<Multipolygon Create.JoinedPolygon> innerRings;901 final List<MultipolygonBuilder.JoinedPolygon> outerRings; 902 final List<MultipolygonBuilder.JoinedPolygon> innerRings; 903 903 try { 904 outerRings = Multipolygon Create.joinWays(mpm.outers);905 innerRings = Multipolygon Create.joinWays(mpm.inners);906 } catch (Multipolygon Create.JoinedPolygonCreationException ex) {904 outerRings = MultipolygonBuilder.joinWays(mpm.outers); 905 innerRings = MultipolygonBuilder.joinWays(mpm.inners); 906 } catch (MultipolygonBuilder.JoinedPolygonCreationException ex) { 907 907 Main.debug("Invalid multipolygon " + multiPolygon); 908 908 return false; 909 909 } 910 910 // Test if object is inside an outer member 911 for (Multipolygon Create.JoinedPolygon out : outerRings) {911 for (MultipolygonBuilder.JoinedPolygon out : outerRings) { 912 912 if (nodes.size() == 1 913 913 ? nodeInsidePolygon(nodes.get(0), out.getNodes()) … … 915 915 boolean insideInner = false; 916 916 // If inside an outer, check it is not inside an inner 917 for (Multipolygon Create.JoinedPolygon in : innerRings) {917 for (MultipolygonBuilder.JoinedPolygon in : innerRings) { 918 918 if (polygonIntersection(in.getNodes(), out.getNodes()) == PolygonIntersection.FIRST_INSIDE_SECOND 919 919 && (nodes.size() == 1
Note:
See TracChangeset
for help on using the changeset viewer.