cityjson / cityjson-qgis-plugin

A QGIS plugin that adds support for CityJSON files
Apache License 2.0
35 stars 8 forks source link

Multi LoD file adds empty attributes to all layers #40

Open balazsdukai opened 2 years ago

balazsdukai commented 2 years ago

I'm loading a multi-lod file with BuildingBarts which has attributes only on the Building. I load the file by splitting the lod-s to layers. Then each lod-layer obtains the attributes from the Building, all with NULL, although they don't have attributes on their own.

File: https://data.3dbag.nl/cityjson/v210908_fd2cee53/3dbag_v210908_fd2cee53_5786.json

liberostelios commented 2 years ago

This is true. It's expected that all layers have all attributes that are identified in the whole dataset. The same applies to per object type layers.

I assume that it's not that problematic, but I can imagine that it can be annoying. I'll, therefore, flag it as an enhancement.

I guess there could be an option to remove unused fields in layers.

Any thoughts on that?

Athelena commented 2 years ago

Perhaps it would be useful to have an option to inherit attributes from the parent? Specifically in cases where you only want to work with one LoD.

liberostelios commented 2 years ago

That's a great point! I think it would be really useful for 3D BAG specifically.