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
From CityJSON v1.1 the geometry property is not mandatory anymore for CityObjects. If this is the case, the plugin breaks:
Traceback (most recent call last):
File "/home/balazs/.local/share/QGIS/QGIS3/profiles/balazs/python/plugins/CityJSON-loader/cityjson_loader.py", line 301, in run
self.load_cityjson(filepath)
File "/home/balazs/.local/share/QGIS/QGIS3/profiles/balazs/python/plugins/CityJSON-loader/cityjson_loader.py", line 323, in load_cityjson
skipped_geometries = loader.load()
File "/home/balazs/.local/share/QGIS/QGIS3/profiles/balazs/python/plugins/CityJSON-loader/core/loading.py", line 114, in load
self.layer_manager.add_object(key, obj)
File "/home/balazs/.local/share/QGIS/QGIS3/profiles/balazs/python/plugins/CityJSON-loader/core/layers.py", line 55, in add_object
new_features = self._feature_builder.create_features(self._fields, object_key, cityobject)
File "/home/balazs/.local/share/QGIS/QGIS3/profiles/balazs/python/plugins/CityJSON-loader/core/layers.py", line 230, in create_features
geom = self._geometry_reader.read_geometry(cityobject["geometry"])
KeyError: 'geometry'
If qgis allows empty geometries I think it would be good to create features with an empty geometry. That is in case the CO has attributes, they'll be added to the feature.
I decided to go with the latter option (load with empty geometries). There is only a issue, for now, that if you split features per LoD then all features without a geometry will be excluded (as there is no LoD to load these features at).
Nevertheless, this is now fixed and the fix is included in the latest release.
You can install it here or wait for the new version to be approved in the repository soon and upgrade from within QGIS plugin manager.
From CityJSON v1.1 the
geometry
property is not mandatory anymore for CityObjects. If this is the case, the plugin breaks:File:
DH_01_subs.zip
The text was updated successfully, but these errors were encountered: