Changeset 8114 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2015-03-04T19:43:41+01:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/SelectByInternalPointAction.java
r7937 r8114 20 20 21 21 /** 22 * This allows to select a polygon/multipolgon by an internal point. 22 * This allows to select a polygon/multipolygon by an internal point. 23 * @since 7144 23 24 */ 24 25 public class SelectByInternalPointAction extends JosmAction { 25 26 26 27 /** 27 * Returns the surrounding polygons/multipol gons28 * Returns the surrounding polygons/multipolygons 28 29 * ordered by their area size (from small to large) 29 30 * which contain the internal point. 30 31 * 31 32 * @param internalPoint the internal point. 33 * @return the surrounding polygons/multipolygons 32 34 */ 33 35 public static Collection<OsmPrimitive> getSurroundingObjects(EastNorth internalPoint) { … … 39 41 final TreeMap<Double, OsmPrimitive> found = new TreeMap<>(); 40 42 for (Way w : ds.getWays()) { 41 if (w.isUsable() && w.isClosed() ) {43 if (w.isUsable() && w.isClosed() && w.isSelectable()) { 42 44 if (Geometry.nodeInsidePolygon(n, w.getNodes())) { 43 45 found.put(Geometry.closedWayArea(w), w); … … 68 70 69 71 /** 70 * Returns the smallest surrounding polygon/multipol gon which contains the internal point.72 * Returns the smallest surrounding polygon/multipolygon which contains the internal point. 71 73 * 72 74 * @param internalPoint the internal point. 75 * @return the smallest surrounding polygon/multipolygon 73 76 */ 74 77 public static OsmPrimitive getSmallestSurroundingObject(EastNorth internalPoint) {
Note:
See TracChangeset
for help on using the changeset viewer.