FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
Loading...
Searching...
No Matches
fcb::FileInfo Struct Reference

Everything a caller normally wants from the header, as owned values. More...

#include <fcb/header.hpp>

Public Attributes

std::uint64_t features_count = 0
 
std::uint16_t index_node_size = 0
 
std::vector< ColumnInfocolumns
 
std::vector< ColumnInfosemantic_columns
 Schema for SemanticObject.attributes, which is separate from the feature attribute schema (Header.semantic_columns in header.fbs).
 
bool has_extent = false
 
std::array< double, 6 > geographical_extent {}
 
bool has_transform = false
 
std::array< double, 3 > scale {}
 
std::array< double, 3 > translate {}
 
std::string crs
 Derived from Header.reference_system, so it has no absent-vs-empty distinction of its own to preserve: it is assembled from an authority plus a code, and stays empty when the header carries no reference system at all.
 
std::string cityjson_version
 (required) in header.fbs, so never absent in a valid file.
 
std::optional< std::string > identifier
 Schema-optional strings, held as std::optional because the Rust oracle distinguishes ABSENT from PRESENT-BUT-EMPTY for every one of them: identifier: header.identifier().map(|i| i.to_string()) and the same shape for reference_date/title (deserializer.rs:86-93), and .map() over the poc members (deserializer.rs:184-192).
 
std::optional< std::string > title
 
std::optional< std::string > reference_date
 
std::optional< std::string > poc_contact_name
 Point of contact, all optional (header.fbs:151-161).
 
std::optional< std::string > poc_contact_type
 
std::optional< std::string > poc_role
 
std::optional< std::string > poc_phone
 
std::optional< std::string > poc_email
 
std::optional< std::string > poc_website
 
std::string poc_address_thoroughfare_number
 Address sub-object: each member is emitted iff NON-EMPTY, independently of the others, and the sub-object is omitted only when every member is empty (to_cj_address, deserializer.rs:195-216).
 
std::string poc_address_thoroughfare_name
 
std::string poc_address_locality
 
std::string poc_address_postcode
 
std::string poc_address_country
 

Detailed Description

Everything a caller normally wants from the header, as owned values.

Definition at line 44 of file header.hpp.

Member Data Documentation

◆ cityjson_version

std::string fcb::FileInfo::cityjson_version

(required) in header.fbs, so never absent in a valid file.

Definition at line 65 of file header.hpp.

◆ columns

std::vector<ColumnInfo> fcb::FileInfo::columns

Definition at line 47 of file header.hpp.

Referenced by fcb::FcbReader::select_attr(), and fcb::to_cityjson_feature().

◆ crs

std::string fcb::FileInfo::crs

Derived from Header.reference_system, so it has no absent-vs-empty distinction of its own to preserve: it is assembled from an authority plus a code, and stays empty when the header carries no reference system at all.

(Its gating is upstream finding #20.10, still open.)

Definition at line 63 of file header.hpp.

◆ features_count

std::uint64_t fcb::FileInfo::features_count = 0

Definition at line 45 of file header.hpp.

Referenced by fcb::FeatureIterator::features_count(), and fcb::FeatureIterator::next().

◆ geographical_extent

std::array<double, 6> fcb::FileInfo::geographical_extent {}

Definition at line 53 of file header.hpp.

◆ has_extent

bool fcb::FileInfo::has_extent = false

Definition at line 52 of file header.hpp.

◆ has_transform

bool fcb::FileInfo::has_transform = false

Definition at line 55 of file header.hpp.

◆ identifier

std::optional<std::string> fcb::FileInfo::identifier

Schema-optional strings, held as std::optional because the Rust oracle distinguishes ABSENT from PRESENT-BUT-EMPTY for every one of them: identifier: header.identifier().map(|i| i.to_string()) and the same shape for reference_date/title (deserializer.rs:86-93), and .map() over the poc members (deserializer.rs:184-192).

Some("") is emitted as ""; only None omits the key. A plain std::string would flatten both cases to "" and silently drop a key the oracle keeps (upstream finding #20.11).

Definition at line 75 of file header.hpp.

◆ index_node_size

std::uint16_t fcb::FileInfo::index_node_size = 0

Definition at line 46 of file header.hpp.

◆ poc_address_country

std::string fcb::FileInfo::poc_address_country

Definition at line 100 of file header.hpp.

◆ poc_address_locality

std::string fcb::FileInfo::poc_address_locality

Definition at line 98 of file header.hpp.

◆ poc_address_postcode

std::string fcb::FileInfo::poc_address_postcode

Definition at line 99 of file header.hpp.

◆ poc_address_thoroughfare_name

std::string fcb::FileInfo::poc_address_thoroughfare_name

Definition at line 97 of file header.hpp.

◆ poc_address_thoroughfare_number

std::string fcb::FileInfo::poc_address_thoroughfare_number

Address sub-object: each member is emitted iff NON-EMPTY, independently of the others, and the sub-object is omitted only when every member is empty (to_cj_address, deserializer.rs:195-216).

Emptiness – not presence – IS the contract here, so these stay plain strings.

Definition at line 96 of file header.hpp.

◆ poc_contact_name

std::optional<std::string> fcb::FileInfo::poc_contact_name

Point of contact, all optional (header.fbs:151-161).

Presence of pointOfContact in CityJSON metadata hinges on poc_contact_name being SET – not on it being non-empty – matching Rust's match header.poc_contact_name() { Some(_) => ..., None => None } (deserializer.rs:81-84). poc_email is likewise required only in the presence sense: poc_email().ok_or(...) succeeds on Some("") and throws only on None, so poc_email.has_value() is the gate.

Definition at line 86 of file header.hpp.

◆ poc_contact_type

std::optional<std::string> fcb::FileInfo::poc_contact_type

Definition at line 87 of file header.hpp.

◆ poc_email

std::optional<std::string> fcb::FileInfo::poc_email

Definition at line 90 of file header.hpp.

◆ poc_phone

std::optional<std::string> fcb::FileInfo::poc_phone

Definition at line 89 of file header.hpp.

◆ poc_role

std::optional<std::string> fcb::FileInfo::poc_role

Definition at line 88 of file header.hpp.

◆ poc_website

std::optional<std::string> fcb::FileInfo::poc_website

Definition at line 91 of file header.hpp.

◆ reference_date

std::optional<std::string> fcb::FileInfo::reference_date

Definition at line 77 of file header.hpp.

◆ scale

std::array<double, 3> fcb::FileInfo::scale {}

Definition at line 56 of file header.hpp.

◆ semantic_columns

std::vector<ColumnInfo> fcb::FileInfo::semantic_columns

Schema for SemanticObject.attributes, which is separate from the feature attribute schema (Header.semantic_columns in header.fbs).

Definition at line 50 of file header.hpp.

Referenced by fcb::to_cityjson_feature().

◆ title

std::optional<std::string> fcb::FileInfo::title

Definition at line 76 of file header.hpp.

◆ translate

std::array<double, 3> fcb::FileInfo::translate {}

Definition at line 57 of file header.hpp.


The documentation for this struct was generated from the following file: