Package org.openstreetmap.josm.actions
Class SelectByInternalPointAction
- java.lang.Object
-
- org.openstreetmap.josm.actions.SelectByInternalPointAction
-
public final class SelectByInternalPointAction extends java.lang.Object
This allows to select a polygon/multipolygon by an internal point.- Since:
- 7144
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SelectByInternalPointAction()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static OsmPrimitive
getSmallestSurroundingObject(EastNorth internalPoint)
Returns the smallest surrounding polygon/multipolygon which contains the internal point.static java.util.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 java.util.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 void
performSelection(EastNorth internalPoint, boolean doAdd, boolean doRemove)
Select a polygon or multipolygon by an internal point.
-
-
-
Constructor Detail
-
SelectByInternalPointAction
private SelectByInternalPointAction()
-
-
Method Detail
-
getSurroundingObjects
public static java.util.Collection<OsmPrimitive> getSurroundingObjects(EastNorth internalPoint)
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 java.util.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
public static OsmPrimitive getSmallestSurroundingObject(EastNorth internalPoint)
Returns the smallest surrounding polygon/multipolygon which contains the internal point.- Parameters:
internalPoint
- the internal point.- Returns:
- the smallest surrounding polygon/multipolygon
-
performSelection
public static void performSelection(EastNorth internalPoint, boolean doAdd, boolean doRemove)
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.
-
-