Package org.openstreetmap.josm.actions
Class SelectByInternalPointAction
java.lang.Object
org.openstreetmap.josm.actions.SelectByInternalPointAction
This allows to select a polygon/multipolygon by an internal point.
- Since:
- 7144
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OsmPrimitivegetSmallestSurroundingObject(EastNorth internalPoint) Returns the smallest surrounding polygon/multipolygon which contains the internal point.static Collection<OsmPrimitive>getSurroundingObjects(EastNorth internalPoint) Returns the surrounding polygons/multipolygons ordered by their area size (from small to large) which contain the internal point.static Collection<OsmPrimitive>getSurroundingObjects(DataSet ds, EastNorth internalPoint, boolean includeMultipolygonWays) Returns the surrounding polygons/multipolygons ordered by their area size (from small to large) which contain the internal point.static voidperformSelection(EastNorth internalPoint, boolean doAdd, boolean doRemove) Select a polygon or multipolygon by an internal point.
-
Constructor Details
-
SelectByInternalPointAction
private SelectByInternalPointAction()
-
-
Method Details
-
getSurroundingObjects
Returns the surrounding polygons/multipolygons ordered by their area size (from small to large) which contain the internal point.- Parameters:
internalPoint- the internal point.- Returns:
- the surrounding polygons/multipolygons
-
getSurroundingObjects
public static Collection<OsmPrimitive> getSurroundingObjects(DataSet ds, EastNorth internalPoint, boolean includeMultipolygonWays) Returns the surrounding polygons/multipolygons ordered by their area size (from small to large) which contain the internal point.- Parameters:
ds- the data setinternalPoint- the internal point.includeMultipolygonWays- whether to include multipolygon ways in the result (false by default)- Returns:
- the surrounding polygons/multipolygons
- Since:
- 11247
-
getSmallestSurroundingObject
Returns the smallest surrounding polygon/multipolygon which contains the internal point.- Parameters:
internalPoint- the internal point.- Returns:
- the smallest surrounding polygon/multipolygon
-
performSelection
Select a polygon or multipolygon by an internal point.- Parameters:
internalPoint- the internal point.doAdd- whether to add selected polygon to the current selection.doRemove- whether to remove the selected polygon from the current selection.
-