Class DefaultGeoProperty

java.lang.Object
org.openstreetmap.josm.tools.DefaultGeoProperty
All Implemented Interfaces:
GeoProperty<Boolean>

public class DefaultGeoProperty extends Object implements GeoProperty<Boolean>
Implementation of simple boolean GeoProperty.
  • Field Details

  • Constructor Details

    • DefaultGeoProperty

      Create DefaultGeoProperty based on a collection of closed ways.
      Parameters:
      ways - the ways forming the area
    • DefaultGeoProperty

      public DefaultGeoProperty(Relation multipolygon)
      Create DefaultGeoProperty based on a multipolygon relation.
      Parameters:
      multipolygon - the multipolygon
  • Method Details

    • get

      public Boolean get(LatLon ll)
      Description copied from interface: GeoProperty
      Look up the property for a point.
      Specified by:
      get in interface GeoProperty<Boolean>
      Parameters:
      ll - the point coordinates
      Returns:
      property value at that point. Must not be null.
    • get

      public Boolean get(BBox box)
      Description copied from interface: GeoProperty
      Look up the property for a coordinate rectangle.
      Specified by:
      get in interface GeoProperty<Boolean>
      Parameters:
      box - the rectangle
      Returns:
      the property, if it is the same in the entire rectangle; null otherwise
    • getArea

      public final Area getArea()
      Returns the area.
      Returns:
      the area
      Since:
      14484
    • getRandomLatLon

      public final LatLon getRandomLatLon()
      Returns a random lat/lon in the area.
      Returns:
      a random lat/lon in the area
      Since:
      15359