Package com.geodesk.feature
Interface Features
- All Known Implementing Classes:
 FeatureLibrary,com.geodesk.feature.query.View,com.geodesk.feature.query.WorldView
A collection of features.
- 
Method Summary
Modifier and TypeMethodDescriptiondefault FeaturesReturns all features that have at least one common node with the given `Feature`.default FeaturesconnectedTo(Geometry geom) Returns all features that have at least one common vertex with the given `Geometry`.default Featurescontaining(Feature feature) Returns all features that contain the given feature.default Featurescontaining(Geometry geom) Returns all features that contain the given `Geometry`.default Featurescontaining(PreparedGeometry prepared) Returns all features that contain the given `PreparedGeometry`.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()Returns `true` if this collection contains no features.default FeaturesmaxMetersFrom(double distance, Feature feature) Returns all features that lie within a given distance from another `Feature`.default FeaturesmaxMetersFrom(double distance, Geometry geom) Returns all features that lie within a given distance from a `Geometry`.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.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).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 and `other`.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) 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
Returns a view of this collection that only contains features matching the given query.- Parameters:
 query- a query in GOQL format- Returns:
 - a feature collection
 
 - 
nodes
Features nodes()Returns a view of this collection that contains only nodes.- Returns:
 - a collection of 
Nodeobjects 
 - 
nodes
Returns a view of this collection that contains only nodes matching the given query. - 
ways
Features ways()Returns a view of this collection that contains only ways.- Returns:
 - a collection of 
Wayobjects 
 - 
ways
Returns a view of this collection that contains only ways matching the given query. - 
relations
Features relations()Returns a view of this collection that contains only relations.- Returns:
 - a collection of 
Relationobjects 
 - 
relations
Returns a view of this collection that contains only relations matching the given query. - 
nodesOf
Returns a sub-view that contains only the features that are nodes of the given way.- Parameters:
 parent- a way or relation- Returns:
 - a collection of features
 
 - 
membersOf
Returns the features that are nodes of the given way, or members of the given relation. If a node is passed as `parent`, an empty view is returned (as nodes cannot have child elements).- Parameters:
 parent- a way or relation- Returns:
 - a collection of features
 
 - 
parentsOf
Returns the features that are parent elements of the given feature (ways and/or relations).- Parameters:
 child- a way or relation- Returns:
 - a collection of features
 
 - 
in
Returns a view of this collection that contains only features whose bounding box intersects the givenBounds.- Parameters:
 bbox- the bounding box to use as a filter- Returns:
 - a collection of 
Featureobjects 
 - 
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 `null` if 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()Returns `true` if this collection contains no features.- Returns:
 - `true` if this collection contains no features
 
 - 
toList
Creates aListcontaining all features in this collection.- Returns:
 - a list containing all features
 
 - 
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:
 - `true` if this collection contains the specified object
 
 - 
select
 - 
connectedTo
Returns all features that have at least one common node with the given `Feature`.- Parameters:
 f- the `Feature` whose nodes to check against- Returns:
 
 - 
connectedTo
Returns all features that have at least one common vertex with the given `Geometry`. Coordinates of the `Geometry` are rounded to integers.- Parameters:
 geom- the `Geometry` whose vertexes to check against- Returns:
 
 - 
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
Returns all features that contain the given feature.- Parameters:
 feature-- Returns:
 
 - 
containing
Returns all features that contain the given `Geometry`.- Parameters:
 geom-- Returns:
 
 - 
containing
Returns all features that contain the given `PreparedGeometry`.- 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 a `Geometry`. 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 another `Feature`. 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
Returns the features present in both this collection and `other`.- Parameters:
 other-- Returns:
 
 
 -