FlatCityBuf C++ reader 0.8.0
Native C++17 reader for FlatCityBuf, the cloud-optimized CityJSON format
Loading...
Searching...
No Matches
geom_encoder.cpp File Reference
#include <fcb/writer/geom_encoder.hpp>
#include <fcb/error.hpp>
#include <algorithm>
#include <cstdint>
#include <limits>

Go to the source code of this file.

Namespaces

namespace  fcb
 

Functions

GeometryKind fcb::geometry_kind_from_name (const std::string &name)
 Maps a CityJSON geometry type string to GeometryKind.
 
GMBoundaries fcb::encode_boundaries (GeometryKind kind, const nlohmann::ordered_json &boundaries)
 Flattens boundaries (nested CityJSON boundary arrays, straight off the JSON as parsed – no intermediate typed representation) at exactly the depth kind implies.
 
GMSemantics fcb::encode_semantics (const nlohmann::ordered_json &semantics, const GMBoundaries &boundaries)
 Flattens semantics (the CityJSON semantics object: surfaces plus values), using boundaries's shell/solid counts to expand a null shell or solid into the right number of per-surface nulls (there is no wire encoding for a whole-null shell in semantics, unlike material).
 
std::vector< MaterialMappingfcb::encode_material (const nlohmann::ordered_json &material)
 Flattens material (the CityJSON geometry.material object: theme name -> {"value": N} / {"values": [...]} / {"values": null}).
 
std::vector< TextureMappingfcb::encode_texture (const nlohmann::ordered_json &texture)
 Flattens texture (the CityJSON geometry.texture object).
 
EncodedGeometry fcb::encode (const nlohmann::ordered_json &geometry)
 Flattens one CityJSON geometry object – its boundaries and whatever semantics, material and texture it carries – into the FlatCityBuf arrays.