API Reference¶
Classes¶
- class GeometryType(enum.Enum)[source]
An enumeration.
- class Building(dtcc.Object)[source]
Represents a building in a city.
- class BuildingPart(dtcc.Object)[source]
- class City(dtcc.Object)[source]
Represents a city, the top-level container class for city models.
- class CityObject(dtcc.Object)[source]
Represents a generic object in a city.
- class Terrain(dtcc.Object)[source]
Represents a terrain object in a city.
- class RoadNetwork(dtcc.Object)[source]
- class Landuse(dtcc.Object)[source]
- class LanduseClasses(enum.Enum)[source]
An enumeration.
- class Bounds(dtcc_model.model.Model)[source]
Represents the boundaries of a rectangular region in the xy plane) with optional extension along the z-axis (depth)
- class Grid(dtcc.Geometry)[source]
Represents a structured quadrilateral grid in 2D.
- class Mesh(dtcc.Geometry)[source]
Represents an unstructured triangular mesh in 3D.
- class MultiSurface(dtcc.Geometry)[source]
Represents a planar surfaces in 3D.
- class PointCloud(dtcc.Geometry)[source]
Represents a set of points in 3D.
- class Surface(dtcc.Geometry)[source]
Represents a planar surface in 3D.
- class Transform(dtcc_model.model.Model)[source]
Represents an affine transformation to a global coordinate system.
- class VolumeGrid(dtcc.Geometry)[source]
Represents a structured hexahedral grid in 3D.
- class VolumeMesh(dtcc.Geometry)[source]
Represents an unstructured tetrahedral mesh in 3D.
- class LineString(dtcc.Geometry)[source]
- class Field(dtcc_model.model.Model)[source]
Represents a field (scalar or vector) defined on a geometry.
Free functions¶
- init_logging(name)[source]
Initialize logging for given package
- set_log_level(level)[source]
Set log level. Valid levels are:
- save_mesh(mesh, path)
- load_volume_mesh(path)[source]
- save_volume_mesh(mesh, path)
- load_pointcloud(path: str | list[str], ...) PointCloud
Load a LAS/LAZ/CSV file or a directory containing LAS/LAZ/CSV files as a PointCloud object.
- save_pointcloud(pointcloud, outfile)
-
load_raster(path, delimiter=
','
) Raster Load a raster file as a Raster object.
- save_raster(raster: Raster, path)
Save a Raster object to a file.
- load_city(path)
- load_footprints(...) [<class 'dtcc_model.object.building.Building'>]
Load the buildings from a supported file and return a City object.
- save_footprints(city, path)
Save the buildings in a City object to a supported file.
- load_cityjson(path: str | dict) City
Load a CityJSON file into a City object.
-
load_roadnetwork(path, id_field=
'id'
, ...) RoadNetwork
- extract_roof_points(...) list[Building] [source]
- compute_building_heights(buildings, ...) list[Building] [source]
- build_lod1_buildings(...) list[Building] [source]
Build the LOD1 representation of the given buildings.
- build_surface_mesh(city: City, ...) Mesh [source]
Build a mesh from the surfaces of the buildings in the city.
- build_terrain_raster(pc: PointCloud, cell_size, ...) Raster [source]
Rasterize a point cloud into a Raster object.
- merge_building_footprints(buildings, ...) list[Building] [source]
- simplify_building_footprints(buildings, ...) list[Building] [source]
- fix_building_footprint_clearance(buildings, ...) list[Building] [source]
- split_footprint_walls(buildings, ...) list[Building] [source]
-
view_pointcloud(pc: PointCloud, size: float =
0.2
, ...) View a point cloud in 3D with a GLFW window.
- view_building(building: Building)
View a mesh in 3D with a GLFW window.
- view_object(obj: Object)
View a generic object in 3D with a GLFW window.
- view_raster(raster: Raster)
View a raster in 3D with a GLFW window.
- error(message)
- critical(message)