GIScience / ohsome-dashboard

Web Client for easy access to OSM History and Quality Analyses
https://dashboard.ohsome.org/
GNU General Public License v3.0
7 stars 2 forks source link

Navigating to an ohsome dashboard link that has empty tag values (indicating all values) incorrectly gets replaced by "tree" as the value #3

Closed watmildon closed 1 year ago

watmildon commented 1 year ago

I'm tracking work for address additions in this project by looking at the Count of addr:housenumber tags on all nodes, ways, and relations from the first of 2023 to today (usually by week).

The generated link looks correct:

https://dashboard.ohsome.org/#backend=ohsomeApi&groupBy=none&time=2023-01-01T00%3A00%3A00Z%2F2023-07-02T20%3A00%3A00Z%2FP1W&key=addr%3Ahousenumber&value=&types=node%2Cway%2Crelation&measure=count&adminids=-162018

but navigating to the page rewrites the link to this incorrect one, with the empty tag value replaced by "tree":

https://dashboard.ohsome.org/#backend=ohsomeApi&groupBy=none&time=2023-01-01T00%3A00%3A00Z%2F2023-07-02T20%3A00%3A00Z%2FP1W&key=addr%3Ahousenumber&value=tree&types=node%2Cway%2Crelation&measure=count&adminids=-162018

The chart should look something like: image

Let me know if there's any other information I can provide.

tyrasd commented 1 year ago

Thank you for the detailed report. This is now fixed and already live on the deployed version on https://dashboard.ohsome.org

watmildon commented 1 year ago

Happy to help. Thanks for the quick update!

mcauer commented 1 year ago

Feedback from Jochen Topf was: Ich hab grad mal probiert, wenn ich den "value" in der URL bei Euch weglasse, also so

Dann hat er als value aus irgendeinem Grund "tree" eingesetzt. Das scheint mir noch ein Fehler zu sein.

Proposed solution:

no key/ no value => use defaults no key / value empty => not allowed key empty / value empty => both empty meaning (only filter by geometry type without tagfilter) key there / no value => use key and set value to empty (meaning *) key there/ value empty => same as above key there/ value there => use them

tyrasd commented 1 year ago

@mcauer that's a slightly different issue :sweat_smile: (empty, but present value vs. omitted value). But I agree that it does not make sense to set the field default values for the value form element if a key was submitted via the URL. That should be fixed in 7753c98.