Interface Features
- All Known Implementing Classes:
FeatureLibrary
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddTo(Collection<Feature> collection) Adds all features in this collection to the given collection.default FeaturesReturns all features that have at least one common node with the givenFeature.default FeaturesconnectedTo(Geometry geom) Returns all features that have at least one common vertex with the givenGeometry.default Featurescontaining(Feature feature) Returns all features that contain the given feature.default Featurescontaining(Geometry geom) Returns all features that contain the givenGeometry.default Featurescontaining(PreparedGeometry prepared) Returns all features that contain the givenPreparedGeometry.default FeaturescontainingLonLat(double lon, double lat) Returns all features that contain the given coordinate expressed at longitude and latitudedefault FeaturescontainingXY(int x, int y) Returns all features that contain the given Mercator-projected coordinatedefault booleanChecks whether this collection contains the given object.default longcount()Returns the number of features in this collection.default Featuresdefault Featuresdefault FeaturescoveredBy(PreparedGeometry prepared) default Featuresdefault Featuresdefault Featurescrossing(PreparedGeometry prepared) default Featuresdefault Featuresdefault Featuresdisjoint(PreparedGeometry prepared) default Featurefirst()Returns the first feature in the collection.Returns a view of this collection that contains only features whose bounding box intersects the givenBounds.default Featuresintersecting(Feature feature) default Featuresintersecting(Geometry geom) default Featuresintersecting(PreparedGeometry prepared) default booleanisEmpty()Returnstrueif this collection contains no features.default FeaturesmaxMetersFrom(double distance, Feature feature) Returns all features that lie within a given distance from anotherFeature.default FeaturesmaxMetersFrom(double distance, Geometry geom) Returns all features that lie within a given distance from aGeometry.default FeaturesmaxMetersFromLonLat(double distance, double lon, double lat) Returns all features whose closest point lies within a given radius.default FeaturesmaxMetersFromXY(double distance, int x, int y) Returns all features whose closest point lies within a given radius.default FeaturesReturns the features that are nodes of the given way, or members of the given relation.default Nodenode(long id) Returns the node with the given ID (ornull).nodes()Returns a view of this collection that contains only nodes.Returns a view of this collection that contains only nodes matching the given query.default FeaturesReturns a sub-view that contains only the features that are nodes of the given way.default Featuresoverlapping(Feature feature) default Featuresoverlapping(Geometry geom) default Featuresoverlapping(PreparedGeometry prepared) default FeaturesReturns the features that are parent elements of the given feature (ways and/or relations).default Relationrelation(long id) Returns the relation with the given ID (ornull).Returns a view of this collection that contains only relations.Returns a view of this collection that contains only relations matching the given query.Returns the features present in both this collection andother.Returns a view of this collection that only contains features matching the given query.default Object[]toArray()Creates an array containing all features in this collection.default Feature[]toList()Creates aListcontaining all features in this collection.default Featuresdefault Featuresdefault Featurestouching(PreparedGeometry prepared) default Wayway(long id) Returns the way with the given ID (ornull).ways()Returns a view of this collection that contains only ways.Returns a view of this collection that contains only ways matching the given query.default Featuresdefault Featuresdefault Featureswithin(PreparedGeometry prepared) Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
select
-
nodes
-
nodes
-
ways
-
ways
-
relations
-
relations
-
nodesOf
-
membersOf
-
parentsOf
-
in
-
first
Returns the first feature in the collection. If the collection is unordered, this method selects one of multiple features in a non-deterministic way.- Returns:
- the first feature, or
nullif the collection is empty
-
count
default long count()Returns the number of features in this collection.- Returns:
- the number of features
-
isEmpty
default boolean isEmpty()Returnstrueif this collection contains no features.- Returns:
trueif this collection contains no features
-
toList
-
toArray
Creates an array containing all features in this collection.- Returns:
- an array containing all features
-
toArray
-
contains
Checks whether this collection contains the given object.- Parameters:
f- the object whose presence in this collection is to be tested- Returns:
trueif this collection contains the specified object
-
select
-
connectedTo
-
connectedTo
-
containingXY
Returns all features that contain the given Mercator-projected coordinate- Parameters:
x-y-- Returns:
-
containingLonLat
Returns all features that contain the given coordinate expressed at longitude and latitude- Parameters:
lon-lat-- Returns:
-
containing
-
containing
-
containing
Returns all features that contain the givenPreparedGeometry.- Parameters:
prepared-- Returns:
-
coveredBy
-
coveredBy
-
coveredBy
-
crossing
-
crossing
-
crossing
-
disjoint
-
disjoint
-
disjoint
-
intersecting
-
intersecting
-
intersecting
-
maxMetersFromXY
Returns all features whose closest point lies within a given radius.- Parameters:
distance- the maximum distance (in meters)x- the X coordinate of the center pointy- the Y coordinate of the center point- Returns:
-
maxMetersFromLonLat
Returns all features whose closest point lies within a given radius.- Parameters:
distance- the maximum distance (in meters)lon- the longitude of the center pointlat- the latitude of the center point- Returns:
-
maxMetersFrom
Returns all features that lie within a given distance from aGeometry. The Filter measures the distance between the closest points of the Geometry and the candidate Feature.- Parameters:
distance- the maximum distance (in meters)geom- the Geometry from which to measure- Returns:
-
maxMetersFrom
Returns all features that lie within a given distance from anotherFeature. The Filter measures the distance between the closest points of the features.- Parameters:
distance- the maximum distance (in meters)feature- the Feature from which to measure- Returns:
-
overlapping
-
overlapping
-
overlapping
-
touching
-
touching
-
touching
-
within
-
within
-
within
-
select
-
addTo
Adds all features in this collection to the given collection.- Parameters:
collection- a general-purpose collection (such asList,Set, o another type derived fromjava.util.Collection)
-
node
-
way
-
relation
-