class Geometry(dtcc_model.model.Model)[source]

Base class for all geometry classes.

Geometry classes represent geometric objects such as point clouds, surfaces, polygons, and meshes. They are used to represent the geometry of city objects.

All geometries are stored in a local coordinate system, which may be different for each geometry. The transform attribute is used to transform the geometry from the local coordinate system to a global coordinate system.

A geometry may have a list of fields which are values (scalars or vectors) defined on the entities of the geometry (vertices, edges, faces, etc.).

bounds

Bounding box of the geometry in the local coordinate system.

Type:

Bounds

transform

Affine transform to a global coordinate system.

Type:

Transform

fields
Type:

list[Field]

Public members

abstract calculate_bounds()[source]
property bounds
add_field(field: Field)[source]

Add a field to the geometry.

to_proto() Geometry[source]

Return a protobuf representation of the Geometry.

from_proto(pb: Geometry | bytes)[source]

Initialize Geometry from a protobuf representation.

Geometry(...)

Initialize self. See help(type(self)) for accurate signature.

__repr__()

Return repr(self).

__eq__(other)

Return self==value.

transform : Transform
fields : list[Field]
to_json() str

Return a JSON representation of the object.

copy(**kwargs)

Return a copy of the object.

classmethod add_methods(module, name=None)

Adds methods from a module or function to the class.

classmethod print_methods(verbose=False)

Print the methods that have been added to the class.