API Reference¶
Classes¶
- class GeometryType(enum.Enum)[source]
- 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]
- class Bounds(dtcc_core.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_core.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_core.model.model.Model)[source]
Represents a field (scalar or vector) defined on a geometry.
Free functions¶
-
init_logging(name=
'dtcc-core'
)[source] Initialize logging for given package
-
get_logger(name=
'dtcc-core'
)[source] Get logger for given package
- load_pointcloud(path, ...) PointCloud
Load a LAS/LAZ/CSV file or a directory containing LAS/LAZ/CSV files as a PointCloud object.
-
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_footprints(...) [<class 'dtcc_core.model.object.building.Building'>]
Load the buildings from a supported file and return a City object.
- save_footprints(city, filename)
Save the buildings in a City object to a supported file.
- load_cityjson(cityjson_path: str | dict) City
Load a CityJSON file into a City object.
-
load_roadnetwork(filename, 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_city_mesh(city: City, ...) Mesh [source]
Build a mesh from the surfaces of the buildings in the city.
- build_terrain_mesh(data: PointCloud | Raster, ...) Mesh [source]
- 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]
-
merge_buildings(city: City, max_distance=
0.15
, ...) City [source] Merge buildings that are close together.
- fix_building_clearance(city: City, target_clearance, ...) City [source]
Fix the clearance of the footprints in the building models. After running each building should have a minimum_clearance of tol meters and a minimum angle between each edge of min_angle degrees.
- clean_building_surfaces(city: City, lod: GeometryType, ...) City [source]
- building_heights_from_pointcloud(...) list[Building] [source]
- download_data(data_type: str, provider: str, bounds: Bounds, ...)[source]
A wrapper for downloading data, but with a dummy step for actual file transfer. If provider=’dtcc’, we do an SSH-based authentication check and then simulate a download. If provider=’OSM’, we just do a dummy download with no SSH.