Package org.openstreetmap.josm.tools
Class DefaultGeoProperty
java.lang.Object
org.openstreetmap.josm.tools.DefaultGeoProperty
- All Implemented Interfaces:
GeoProperty<Boolean>
Implementation of simple boolean
GeoProperty.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultGeoProperty(Collection<Way> ways) Create DefaultGeoProperty based on a collection of closed ways.DefaultGeoProperty(Relation multipolygon) Create DefaultGeoProperty based on a multipolygon relation. -
Method Summary
-
Field Details
-
area
-
random
-
-
Constructor Details
-
DefaultGeoProperty
Create DefaultGeoProperty based on a collection of closed ways.- Parameters:
ways- the ways forming the area
-
DefaultGeoProperty
Create DefaultGeoProperty based on a multipolygon relation.- Parameters:
multipolygon- the multipolygon
-
-
Method Details
-
get
Description copied from interface:GeoPropertyLook up the property for a point.- Specified by:
getin interfaceGeoProperty<Boolean>- Parameters:
ll- the point coordinates- Returns:
- property value at that point. Must not be null.
-
get
Description copied from interface:GeoPropertyLook up the property for a coordinate rectangle.- Specified by:
getin interfaceGeoProperty<Boolean>- Parameters:
box- the rectangle- Returns:
- the property, if it is the same in the entire rectangle; null otherwise
-
getArea
Returns the area.- Returns:
- the area
- Since:
- 14484
-
getRandomLatLon
Returns a random lat/lon in the area.- Returns:
- a random lat/lon in the area
- Since:
- 15359
-