Skip to content

attribute completness: fix combination of attribute filter and topic filter #951

@Hagellach37

Description

@Hagellach37

The attribute completeness indicator gives to high numbers for certain topic / attribute combinations.

I think this is due an incorrect concatenation of topic filter and attribute filter. Also the topic filter needs to be wrapped in brackets.

wrong topic filter + attribute filter:

  • (power=line) or (power=minor_line) and geometry:line and (voltage=*)

correct topic filter + attribute filter:

  • ( (power=line) or (power=minor_line) and geometry:line ) and (voltage=*)

This should be fixed in

def build_attribute_filter(attribute_key: List[str] | str, topic_key: str) -> str:

Example:

Image

https://dashboard.ohsome.org/#backend=oqtApi&topic=power_lines&attribute-completeness--attributes=voltage&adminids=-357981&indicators=attribute-completeness

When querying separately then it becomes clear that the value should be around 75% instead.

Image

https://dashboard.ohsome.org/#backend=ohsomeApi&groupBy=none&time=%2F2025-08-20T11%3A00Z%2FP1M&filter=%28+%28power%3Dline%29++or+%28power%3Dminor_line%29+and+geometry%3Aline%29+and+voltage%3D*&measure=length&adminids=-357981

https://dashboard.ohsome.org/#backend=ohsomeApi&groupBy=none&time=%2F2025-08-20T11%3A00Z%2FP1M&filter=+%28power%3Dline%29++or+%28power%3Dminor_line%29+and+geometry%3Aline+and+voltage%3D*&measure=length&adminids=-357981

Metadata

Metadata

Labels

bugSomething isn't workinggood first issueGood for newcomerspriority:highShould be addressed as soon as possible (next release)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions