5# include <fcb/generated/feature_generated.h>
6# include <fcb/generated/geometry_generated.h>
7# include <fcb/generated/header_generated.h>
12# include <nlohmann/json.hpp>
36 ::SemanticSurfaceType
type;
50::flatbuffers::Offset<::Appearance>
to_appearance(::flatbuffers::FlatBufferBuilder& fbb,
51 const nlohmann::ordered_json& appearance);
59::flatbuffers::Offset<::Geometry>
to_geometry(::flatbuffers::FlatBufferBuilder& fbb,
60 const nlohmann::ordered_json& geometry,
70::flatbuffers::Offset<::GeometryInstance>
71to_geometry_instance(::flatbuffers::FlatBufferBuilder& fbb,
const nlohmann::ordered_json& geometry);
84::flatbuffers::Offset<::CityObject>
to_city_object(::flatbuffers::FlatBufferBuilder& fbb,
85 const std::string&
id,
86 const nlohmann::ordered_json& co,
97std::pair<::flatbuffers::Offset<::CityFeature>,
NodeItem>
99 const nlohmann::ordered_json& city_feature,
const AttributeSchema& attr_schema,
::flatbuffers::Offset<::CityObject > to_city_object(::flatbuffers::FlatBufferBuilder &fbb, const std::string &id, const nlohmann::ordered_json &co, const AttributeSchema &attr_schema, const AttributeSchema *semantic_attr_schema)
Builds one CityObject table: type, geographical extent, geometry (split into non-instance and Geometr...
::flatbuffers::Offset<::GeometryInstance > to_geometry_instance(::flatbuffers::FlatBufferBuilder &fbb, const nlohmann::ordered_json &geometry)
Builds a GeometryInstance table: the template index, the 4x4 transformation matrix,...
CoType city_object_type_from_name(const std::string &name)
Maps a CityJSON CityObject type string to the FlatBuffers tag.
::flatbuffers::Offset<::Appearance > to_appearance(::flatbuffers::FlatBufferBuilder &fbb, const nlohmann::ordered_json &appearance)
Builds the Appearance table (materials, textures, UV vertices, default themes) from a CityJSON appear...
::flatbuffers::Offset<::Geometry > to_geometry(::flatbuffers::FlatBufferBuilder &fbb, const nlohmann::ordered_json &geometry, const AttributeSchema *semantic_attr_schema)
Builds one Geometry table – boundaries, and whatever semantics, material and texture it carries – fro...
::GeographicalExtent to_geographical_extent(const std::array< double, 6 > &extent)
Builds a GeographicalExtent struct from a 6-element [minx,miny,minz,maxx,maxy,maxz] array.
std::map< std::string, std::pair< std::uint16_t, ::ColumnType > > AttributeSchema
Attribute schema: name -> (column index, column type).
std::pair<::flatbuffers::Offset<::CityFeature >, NodeItem > to_fcb_city_feature(::flatbuffers::FlatBufferBuilder &fbb, const std::string &id, const nlohmann::ordered_json &city_feature, const AttributeSchema &attr_schema, const AttributeSchema *semantic_attr_schema)
Builds one CityFeature table – its CityObjects (visited in ascending id order), vertices,...
SurfaceType semantic_surface_type_from_name(const std::string &name)
Maps a CityJSON semantic surface type string to the FlatBuffers tag.
A CityObjectType tag, plus the verbatim CityJSON name when the tag is ExtensionObject (which has no s...
std::optional< std::string > extension_type
One R-tree node entry: 4 doubles then a u64, all little-endian, 40 bytes with no padding (packed_rtre...
A SemanticSurfaceType tag, plus the verbatim CityJSON name when the tag is ExtraSemanticSurface.
::SemanticSurfaceType type
std::optional< std::string > extension_type