Class SelectByInternalPointAction


  • public final class SelectByInternalPointAction
    extends java.lang.Object
    This allows to select a polygon/multipolygon by an internal point.
    Since:
    7144
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getSurroundingObjects

        public static java.util.Collection<OsmPrimitivegetSurroundingObjects​(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<OsmPrimitivegetSurroundingObjects​(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.