You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for the new version of CityJSON("version"=1.1), the pymesh library (1.0.2) is not usable anymore. Only runnable without "pip install pymesh". Otherwise, get output: "problem with {id}".
For object without geometry, get error:
Traceback (most recent call last):
File "/content/3d-building-metrics/cityStats.py", line 683, in
main()
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/content/3d-building-metrics/cityStats.py", line 591, in main
r = rtree.index.Index(tree_generator_function(cm, vertices), properties=p)
File "/usr/local/lib/python3.10/dist-packages/rtree/index.py", line 282, in init
raise self._exception
File "/usr/local/lib/python3.10/dist-packages/rtree/index.py", line 1246, in py_next_item
p_id[0], coordinates, obj = next(stream_iter)
File "/content/3d-building-metrics/cityStats.py", line 255, in tree_generator_function
if len(obj["geometry"]) == 0:
KeyError: 'geometry'
need to add " if "geometry" not in obj: " condition into function tree_generator_function(cm, verts) and function get_neighbours(cm, obj, r, verts). Happens to "Vienna.city.json" and other datasets on cityjson website.
The text was updated successfully, but these errors were encountered:
Actually, this library was never meant to work with the pypi version of pymesh. Which, confusingly, is a different library than the pymesh we are pointing in the readme. I am sorry for not having it clear enough in the instructions. 🙈
That's true, the library was built with CityJSON v1.0 which required a "geometry" object to exist in every city object. Since you pinpointed the issue, please feel free to make a PR if you can 😊 Otherwise I will address it soon.
Traceback (most recent call last):
File "/content/3d-building-metrics/cityStats.py", line 683, in
main()
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/content/3d-building-metrics/cityStats.py", line 591, in main
r = rtree.index.Index(tree_generator_function(cm, vertices), properties=p)
File "/usr/local/lib/python3.10/dist-packages/rtree/index.py", line 282, in init
raise self._exception
File "/usr/local/lib/python3.10/dist-packages/rtree/index.py", line 1246, in py_next_item
p_id[0], coordinates, obj = next(stream_iter)
File "/content/3d-building-metrics/cityStats.py", line 255, in tree_generator_function
if len(obj["geometry"]) == 0:
KeyError: 'geometry'
need to add " if "geometry" not in obj: " condition into function tree_generator_function(cm, verts) and function get_neighbours(cm, obj, r, verts). Happens to "Vienna.city.json" and other datasets on cityjson website.
The text was updated successfully, but these errors were encountered: