Class DefaultGeoProperty

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.awt.geom.Area area  
      private LatLon random  
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultGeoProperty​(java.util.Collection<Way> ways)
      Create DefaultGeoProperty based on a collection of closed ways.
      DefaultGeoProperty​(Relation multipolygon)
      Create DefaultGeoProperty based on a multipolygon relation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Boolean get​(LatLon ll)
      Look up the property for a point.
      java.lang.Boolean get​(BBox box)
      Look up the property for a coordinate rectangle.
      java.awt.geom.Area getArea()
      Returns the area.
      LatLon getRandomLatLon()
      Returns a random lat/lon in the area.
      • Methods inherited from class java.lang.Object

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

      • DefaultGeoProperty

        public DefaultGeoProperty​(java.util.Collection<Way> ways)
        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 Detail

      • get

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

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

        public final java.awt.geom.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