Skip to main content

Crate cadkit_gml

Crate cadkit_gml 

Source
Expand description

Bounded CityGML 2.0 reader, validator, and writer.

Re-exports§

pub use native::CityGmlDocument;
pub use validate::ValidationOptions;
pub use validate::ValidationReport;
pub use validate::validate;

Modules§

native
Lossless CityGML 2.0 model preserving qualified XML names, namespaces, and object relationships.
tkgm
Local preflight for explicitly selected TKGM architectural model workflows.
validate
Structural, reference, numeric, and geometric validation for CityGML documents.

Structs§

ExportIssue
A source entity whose geometry is not present in the output.
ExportOptions
Coordinate, LoD, and resource-limit contract for CityGML export.
ExportReport
Counts of visited source entities, including group nodes.
GeometryIssue
A geometry diagnostic that omits source identifiers and coordinate values.
ImportOptions
Options controlling which CityGML geometry is projected into the neutral Document.

Enums§

UnsupportedGeometry
Handling of geometry without a supported, exact GML representation.

Functions§

from_document
Builds one gen:GenericCityObject per top-level neutral entity, rejecting unsupported geometry. Coordinates are written unchanged; matching the declared CRS and units is the caller’s responsibility.
from_document_with_report
Creates generic objects and reports geometry retained only as metadata. Native building/unit semantics must be supplied through CityGmlDocument. Invalid geometry and resource-limit errors always fail, under either policy.
geometry_issues
Collects all polygon and solid-shell geometry issues after structural validation. Shell edge matching welds vertices within options.tolerance and does not test inter-solid volumetric intersections.
inspect
Inspects the CityGML root element and boundedBy envelope without parsing thematic objects.
read
Reads CityGML into the format-neutral Document model; use read_native to preserve the full object graph.
read_native
Parses CityGML into its native XML tree while validating IDs, references, and numeric data.
read_native_json
Parses a serialized CityGmlDocument JSON string after checking the input byte limit and validates its structure.
sniff
Checks the root element’s namespace and local name without relying on file extensions.
to_document
Projects CityGML geometry into a neutral Document; full LoD ownership, shared references, and XML extensions remain in source.
write
Writes a CityGmlDocument as UTF-8 XML while preserving unknown XML elements and extensions.
write_document
Writes neutral Document geometry to CityGML 2.0 with an explicit CRS and LoD.
write_document_with_report
Writes a generic CAD projection with explicit handling of unsupported geometry. The report identifies entities by model index and child-index path, never by client values. Metadata-only entities are not rendered CityGML geometry and are not a delivery profile.