132 operator bool()
const;
208 std::optional<Feature>
first()
const;
221 operator std::vector<Feature>()
const;
227 operator std::vector<FeaturePtr>()
const;
231 void addTo(std::vector<Feature>& features)
const;
236 void addTo(std::vector<FeaturePtr>& features)
const;
389 template <
typename Predicate>
An axis-aligned bounding box.
Definition Box.h:34
A pair of Cartesian coordinate values.
Definition Coordinate.h:17
A geographic feature.
Definition Feature.h:27
A Geographic Object Library.
Definition FeatureStore.h:35
A collection of geographic features.
Definition Features.h:112
Features(const char *golFile)
Creates a collection that contains all features in the given Geographic Object Library.
Ways ways() const
Only ways.
Ways ways(const char *query) const
Only ways that match the given query.
Features containingLonLat(double lon, double lat) const
Only features whose geometry contains the given location.
double length() const
Computes the total length (in meters) of the features in this collection.
Features containing(const Feature &feature) const
Only features whose geometry contains the given Feature.
Features maxMetersFrom(double distance, double lon, double lat) const
Only features whose closest point lies within distance meters of the given location.
bool contains(const Feature &feature) const
Checks if the specified Feature exists in this collection.
Features nodesOf(const Feature &feature) const
Only nodes that belong to the given Way.
void addTo(std::vector< FeaturePtr > &features) const
Appends the Feature objects in this collection to the given std::vector as FeaturePtr pointers.
FeatureStore * store() const noexcept
Returns a pointer to the FeatureStore which contains the features in this collection.
Features crossing(const Feature &feature) const
Only features whose geometry crosses the given Feature.
Features membersOf(const Feature &feature) const
Only features that belong to the given Relation.
Relations relations() const
Only relations.
Features filter(Predicate predicate) const
Only features that match the given predicate.
Feature one() const
Returns the one and only Feature in this collection.
Features within(const Feature &feature) const
Only features that lie entirely inside the geometry of the given Feature.
Relations relations(const char *query) const
Only relations that match the given query.
void addTo(std::vector< Feature > &features) const
Appends the Feature objects in this collection to the given std::vector.
Features parentsOf(const Feature &feature) const
Only features that are parent relations of the given Feature (or parent ways of the given Node).
std::optional< Feature > first() const
Returns the first Feature in this collection, or std::nullopt if the collection is empty.
Features operator()(const char *query) const
Only features that match the given query.
Nodes nodes() const
Only nodes.
double area() const
Computes the total area (in square meters) of the features in this collection.
Features(const Features &other)
Creates a collection with all the features in the other collection.
Features operator()(const Box &box) const
Only features whose bounding box intersects the given bounding box.
uint64_t count() const
Returns the total number of features in this collection.
Features intersecting(const Feature &feature) const
Only features whose geometry intersects with the given Feature.
Features operator()(const Feature &feature) const
Only features whose geometry intersects with the given Feature (short form of intersecting())
bool operator!() const
Returns true if this collection is empty.
Features operator()(Coordinate xy) const
Only features whose bounding box contains the given Coordinate.
Features maxMetersFrom(double distance, Coordinate xy) const
Only features whose closest point lies within distance meters of xy.
Features connectedTo(const Feature &feature) const
Only features that share a common node with the given Feature.
Nodes nodes(const char *query) const
Only nodes that match the given query.
Features containing(Coordinate xy) const
Only features whose geometry contains the given Coordinate.
A collection containing only Node features.
Definition Features.h:407
A collection containing only Relation features.
Definition Features.h:419
A collection containing only Way features.
Definition Features.h:413