7# include <nlohmann/json.hpp>
49 nlohmann::ordered_json
surfaces = nlohmann::ordered_json::array();
50 std::optional<std::vector<std::uint32_t>>
values;
107std::vector<MaterialMapping>
encode_material(
const nlohmann::ordered_json& material);
131std::vector<TextureMapping>
encode_texture(
const nlohmann::ordered_json& texture);
139 std::optional<std::vector<TextureMapping>>
textures;
GeometryKind geometry_kind_from_name(const std::string &name)
Maps a CityJSON geometry type string to GeometryKind.
GMBoundaries encode_boundaries(GeometryKind kind, const nlohmann::ordered_json &boundaries)
Flattens boundaries (nested CityJSON boundary arrays, straight off the JSON as parsed – no intermedia...
GMSemantics encode_semantics(const nlohmann::ordered_json &semantics, const GMBoundaries &boundaries)
Flattens semantics (the CityJSON semantics object: surfaces plus values), using boundaries's shell/so...
std::vector< MaterialMapping > encode_material(const nlohmann::ordered_json &material)
Flattens material (the CityJSON geometry.material object: theme name -> {"value": N} / {"values": [....
EncodedGeometry encode(const nlohmann::ordered_json &geometry)
Flattens one CityJSON geometry object – its boundaries and whatever semantics, material and texture i...
GeometryKind
The FlatBuffers GeometryType enumerators, mirrored here so a caller can name a geometry type without ...
std::vector< TextureMapping > encode_texture(const nlohmann::ordered_json &texture)
Flattens texture (the CityJSON geometry.texture object).
Everything one CityJSON geometry object flattens to.
std::optional< std::vector< TextureMapping > > textures
std::optional< GMSemantics > semantics
std::optional< std::vector< MaterialMapping > > materials
Flattened geometry boundaries: a flat vertex-index list plus one count array per level of the dimensi...
std::vector< std::uint32_t > strings
std::vector< std::uint32_t > shells
std::vector< std::uint32_t > solids
std::vector< std::uint32_t > surfaces
std::vector< std::uint32_t > indices
Flattened semantics: surfaces is the CityJSON semantics.surfaces array, passed through verbatim (Flat...
nlohmann::ordered_json surfaces
std::optional< std::vector< std::uint32_t > > values
One theme's material mapping.
std::vector< std::uint32_t > vertices
std::vector< std::uint32_t > shells
std::vector< std::uint32_t > solids
One theme's texture mapping.
std::vector< std::uint32_t > solids
std::vector< std::uint32_t > strings
std::vector< std::uint32_t > surfaces
std::vector< std::uint32_t > vertices
std::vector< std::uint32_t > shells