VCityTeam / py3dtilers

Tilers accepting various input formats (OBJ, 3DCity databases, GeoJson, IFC) and producing 3DTiles tilesets.
Other
185 stars 49 forks source link

CityTiler IndexError #171

Open ghschier opened 10 months ago

ghschier commented 10 months ago

I try to create 3DTiles from a 3DCityDB database. Obviously it connects successfully to the database, but then i get the following error:

(venv) gerhard@HP17:~/bin/py3dtilers$ citygml-tiler
1 file(s) with supported extensions found
Connecting to database...
Retrieving city objects from database...
333 city objects of type 'CityMBuildings' found in the database.
Traceback (most recent call last):
  File "/home/gerhard/bin/py3dtilers/venv/bin/citygml-tiler", line 11, in <module>
    load_entry_point('py3dtilers', 'console_scripts', 'citygml-tiler')()
  File "/home/gerhard/bin/py3dtilers/py3dtilers/CityTiler/CityTiler.py", line 146, in main
    tileset = city_tiler.from_3dcitydb(cursor, objects_type)
  File "/home/gerhard/bin/py3dtilers/py3dtilers/CityTiler/CityTiler.py", line 113, in from_3dcitydb
    self.set_features_centroid(cursor, cityobjects, objects_type)
  File "/home/gerhard/bin/py3dtilers/py3dtilers/CityTiler/CityTiler.py", line 89, in set_features_centroid
    cityobject.centroid = np.array([centroid[0][0], centroid[0][1], centroid[0][2]])
IndexError: list index out of range

Any hints? Thank you.

Ubuntu 20.04 Postgres 12.16 Python 3.9.5

baal-lgln commented 10 months ago

Same here using v1.2.0:

citygml-tiler \
    --db_config_path /data/3dcitydb/CityTilerDBConfig.yaml \
    --type building \
    --crs_in EPSG:25832 \
    --crs_out EPSG:4978
OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k
OpenBLAS WARNING - could not determine the L2 cache size on this system, assuming 256k
1 file(s) with supported extensions found
Connecting to database...
Retrieving city objects from database...
2335 city objects of type 'CityMBuildings' found in the database.
Traceback (most recent call last):
  File "/usr/local/bin/citygml-tiler", line 33, in <module>
    sys.exit(load_entry_point('py3dtilers', 'console_scripts', 'citygml-tiler')())
  File "/py3dtilers/py3dtilers/CityTiler/CityTiler.py", line 152, in main
    tileset = city_tiler.from_3dcitydb(cursor, objects_type)
  File "/py3dtilers/py3dtilers/CityTiler/CityTiler.py", line 119, in from_3dcitydb
    self.set_features_centroid(cursor, cityobjects, objects_type)
  File "/py3dtilers/py3dtilers/CityTiler/CityTiler.py", line 95, in set_features_centroid
    cityobject.centroid = np.array([centroid[0][0], centroid[0][1], centroid[0][2]])
IndexError: list index out of range
adriansuciu09 commented 9 months ago

i have the same problem

kbratsy commented 1 week ago

I have the same problem. Is there a solution that can be produced?