Hadise Rasoulian
0979f2b96a
Level0 will walk you through: * Install PyCharm: It is a python editor that we use. * Install miniconda: It is a package and environment manager for python. * Set up an environment and install Cerc-hub. * Basic geometry import * Export back to .obj format The three files included in this commit are: 1. main.py: the final code created in the tutorial level0 pdf. 2. FZK-Haus-LoD2-KIT-IAI-KHH-B36-V1.gml: A geometry file used to create the city (input). 3. Unknown.obj: An export of the city to obj (output).
14 lines
382 B
Python
14 lines
382 B
Python
from hub.imports.geometry_factory import GeometryFactory
|
|
from hub.exports.exports_factory import ExportsFactory
|
|
|
|
|
|
gml_file = './FZK-Haus-LoD2-KIT-IAI-KHH-B36-V1.gml'
|
|
city = GeometryFactory('citygml', gml_file).city
|
|
|
|
for building in city.buildings:
|
|
print(building.name)
|
|
print(building.volume)
|
|
print(building.floor_area)
|
|
|
|
ExportsFactory('obj', city, './').export()
|