Closed kolumdium closed 1 year ago
Hey @kolumdium , thanks for reaching out here and opening the issue. Glad to see that you are already using the API.
The short answer to your question is that you need to use a slightly adjusted endpoint path now: https://api.quality.ohsome.org/v1/indicators/mapping-saturation/data
.
I think @matthiasschaub might be able to provide us some more details.
Hello @kolumdium, -- @Hagellach37 is right: Please update your base URL and endpoint. Also, always send GeoJSON FeatureCollections (I think you already figured that out).
I hope that helps. Please let us know if you are able to get your code working.
I am curious, what is your cycleways filter query?
Hello @matthiasschaub and @Hagellach37,
Thank you for your assistance. I've successfully resolved the issue by changing the endpoint, as suggested.
It wasn't immediately clear where this endpoint change was documented. Could this information have been found somewhere other than opening a GitHub issue? The API documentation I referred to did not mention the new /data entrypoint. Is there a way to subscribe for notifications about API changes?
I also noticed that the new endpoint no longer supports the arguments includeSvg
, includeHtml
, or flatten
. Additionally, the results
key in the response has been renamed to result
. I'm noting this for the sake of completeness of this issue.
Also does that mean I have to plot the svg myself now?
Regarding my cycleway query: As you probably know OSM offers numerous tagging options for cycleways, which can lead to verbose queries. Here's the filter I'm using currently:
"filter": "(highway=cycleway
or cycleway in (lane,crossing,track,shared_lane,opposite,shared,opposite_lane,yes,share_busway,sidepath,opposite_track)
or cycleway:left in (lane,crossing,track,shared_lane,opposite,shared,opposite_lane,yes,share_busway,sidepath,opposite_track)
or cycleway:right in (lane,crossing,track,shared_lane,opposite,shared,opposite_lane,yes,share_busway,sidepath,opposite_track)
or bicycle in (yes,designated,use_sidepath,permissive,official,optional_sidepath)
or living_street=yes)
and geometry:line"
This filter seems to provide a comprehensive coverage of paths that are accessible to bicycles, as also discussed in Plank et al..
Looking forward to working with this API.
We document changes (especially breaking changes) of each release in our CHANGELOG. Usually we even include a "How to update" section in our changelog. Development happened quite fast over the last months, and we did a lot of breaking changes as you experienced yourself. But now we released a 1.0 version and do not plan to implement any breaking features in the near future.
In regard to the documentation: The endpoint you are using is not a feature we want to promote and document for now. The main reason is that it works for the Mapping Saturation indicator and not for the others. That said, we do not plan to discontinue this endpoint, it's just hidden from the docs for now.
include_svg and include_html are removed in favor of include_figure. We do not return an SVG anymore but a Plotly figure. For how to load and display this figure from the response in Python take a look at our examples: https://github.com/GIScience/ohsome-quality-api
flatten is also removed in favor of showcasing a workflow how to work with oqapi results in QGIS: https://heigit.org/visualizing-oqt-api-results-in-qgis/
Thanks for filling out this issue. If you still have questions, please ask!
Also thanks for sharing the filter query and research paper :) Will take a look at those.
I was able to fetch results from the ohsome api.
And Input them into the oqt API as input.
Such a request gets denied now with
RequestValidationError
. Even after adjusting to the new bpoly format a previously working request gets denied.Full Response log.
I am not sure if this is intentional or not. But I would like to continue using oqt with ohsome for arbitrary filters. I can't rule out a user error. But I could not find out the problem on my site. If it is an error on my site, I request clarification on using "input". I would also like to know if this is a feature no longer provided. Thank you very much.