|
FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
|
The library's entry point. More...
#include <fcb/reader.hpp>
Public Member Functions | |
| const HeaderView & | header () const |
| FeatureIterator | select_all () |
| Iterate every feature in stored (Hilbert) order. | |
| FeatureIterator | select_bbox (const BBox &query) |
Iterate features whose 2D bounding box intersects query. | |
| FeatureIterator | select_attr (const AttrQuery &query, AttrQueryOptions opts={}) |
| Iterate features matching every condition (AND). | |
Static Public Member Functions | |
| static FcbReader | open_file (const std::string &path) |
| static FcbReader | open (std::shared_ptr< RangeReader > reader) |
The library's entry point.
Definition at line 67 of file reader.hpp.
|
inline |
Definition at line 72 of file reader.hpp.
Referenced by open().
|
static |
Definition at line 230 of file reader.cpp.
References header(), fcb::read_header(), and reader.
Referenced by open_file().
|
static |
Definition at line 226 of file reader.cpp.
References open().
| FeatureIterator fcb::FcbReader::select_all | ( | ) |
Iterate every feature in stored (Hilbert) order.
Definition at line 496 of file reader.cpp.
References fcb::SequentialScan.
| FeatureIterator fcb::FcbReader::select_attr | ( | const AttrQuery & | query, |
| AttrQueryOptions | opts = {} |
||
| ) |
Iterate features matching every condition (AND).
Fixed-width string keys are truncated to 50 or 100 bytes, so the index yields CANDIDATES for those columns; by default each is verified against the decoded, untruncated attribute before being returned. That makes this stricter than the Rust reader, which returns the false positives. Matching is existential: a feature matches if any of its CityObjects satisfies the condition. Each feature is returned at most once.
Definition at line 344 of file reader.cpp.
References fcb::HeaderView::attr_indices(), fcb::AttributeIndexNotFound, fcb::Feature::byte_offset(), fcb::Feature::city_object_count(), fcb::FileInfo::columns, fcb::FeatureIterator::current(), fcb::decode_attributes(), fcb::AttrQueryOptions::exact_index_only, fcb::ColumnInfo::index, fcb::HeaderView::info(), fcb::key_kind_for_column(), kind, fcb::FeatureIterator::next(), fcb::Feature::object_attributes(), fcb::Feature::object_columns(), fcb::Feature::object_has_columns(), fcb::OffsetList, ok, fcb::QueryExecutionError, fcb::stree_query(), fcb::ColumnInfo::type, and fcb::UnsupportedColumnType.
| FeatureIterator fcb::FcbReader::select_bbox | ( | const BBox & | query | ) |
Iterate features whose 2D bounding box intersects query.
The R-tree is 2D only, so any z filtering is the caller's job. Returns an empty iterator when nothing matches – which is distinct from a sequential scan, hence IterationMode.
Definition at line 235 of file reader.cpp.
References fcb::HeaderView::info(), fcb::HeaderView::layout(), fcb::NoIndex, fcb::OffsetList, and fcb::rtree_search_bbox().