Class DefaultGeoProperty

    • Constructor Detail

      • DefaultGeoProperty

        public DefaultGeoProperty​(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 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