36 Feature(std::shared_ptr<
const std::vector<std::uint8_t>> buffer, std::uint64_t
byte_offset,
37 std::size_t body_offset);
40 bool empty()
const {
return buffer_ ==
nullptr; }
43 std::string
id()
const;
60 bool object_extent(std::size_t i, std::array<double, 6>& out)
const;
77 std::string
object_id(std::size_t i)
const;
99 const ::CityFeature*
raw()
const;
104 std::shared_ptr<const std::vector<std::uint8_t>> buffer_;
105 std::uint64_t byte_offset_ = 0;
106 std::size_t body_offset_ = 0;
One decoded feature that OWNS the bytes it points into.
bool object_extent(std::size_t i, std::array< double, 6 > &out) const
CityObject i's own bounding box, if it declares one.
bool object_has_attributes(std::size_t i) const
Whether CityObject i declares an attributes vector at all.
bytes_view object_attributes(std::size_t i) const
Raw attribute blob of CityObject i, or empty if it has none.
const ::CityFeature * raw() const
The generated CityFeature table behind this Feature.
std::uint64_t byte_offset() const
Byte offset of this feature RELATIVE to the start of the features section, matching the offsets store...
std::string object_id(std::size_t i) const
CityObject i's id.
bool object_has_columns(std::size_t i) const
CityObject i's own column schema, if it declares one.
std::string id() const
The feature's CityJSON id. Empty when empty().
bool empty() const
True for a default-constructed Feature.
std::vector< ColumnInfo > object_columns(std::size_t i) const
std::size_t city_object_count() const
How many CityObjects this feature carries. Zero when empty().
Minimal C++17 stand-in for std::span: a non-owning view over contiguous memory.
Internal gateway to Feature's generated FlatBuffers pointer.