Class SelectByInternalPointAction

java.lang.Object
org.openstreetmap.josm.actions.SelectByInternalPointAction

public final class SelectByInternalPointAction extends Object
This allows to select a polygon/multipolygon by an internal point.
Since:
7144
  • Constructor Details

  • Method Details

    • getSurroundingObjects

      public 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.
      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 set
      internalPoint - 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.