Closed 1ec5 closed 5 months ago
If we're going to do this right, @1ec5, we should eliminate as much mystery/magic as we can.
In the oldest building example, how would a user find that Ohio has relation(id:2663622)
?
The first three example queries are live on the site. It's likely you'll need to clear localStorage
to see them.
In Chrome dev tools, select the Application
tab. At left, find the Storage
section, expand Local Storage
, then right-click and Clear
.
In the oldest building example, how would a user find that Ohio has
relation(id:2663622)
?
There’s a couple ways to do it, such as {{geocodeArea:Ohio}}
(if Nominatim were in better shape), or area["name"="Ohio"]
(if we could get rid of the dates inside name
).
Anyhow, I didn’t meant to say that the examples on the wiki are polished enough to go in the UI – feel free to tweak them as needed for clarity.
@Rub21, thanks for getting the front end code up at https://overpass-turbo-staging.openhistoricalmap.org/. I'm getting an Ajax Error modal in the browser–
-and am getting a Failed to load resource: net::ERR_CERT_AUTHORITY_INVALID
error in the console that's associated with an incorrect URL: overpass-api.staging.openhistoricalmap.org/api/interpreter.
In case we want to make the “Oldest building in Ohio” example more transparent:
// Get present-day Ohio as an area.
area["name"="Ohio"][!"end_date"]->.ohio;
I didn’t demonstrate this approach on the wiki page, because way too many boundary relations still have date ranges stuffed into their name
s: #793.
@1ec5, this is ready for testing at https://overpass-turbo-staging.openhistoricalmap.org/. With the caveats about finding Ohio above I punted on expanding the comments.
Ha; simultaneous posts.
I renamed the “Chronology relations” example to “Chronology relations with boundary geometries” so users can figure out what it’s about without reading the full description.
Overpass turbo comes with a set of seven example queries, accessible via the Load button in the toolbar, that are fairly OpenStreetMap-specific. At the same time, I see users get stuck on how to filter by date, which is such a basic task for OpenHistoricalMap but not very intuitive to someone just learning OverpassQL. We should replace the examples with ones that are more relevant to OHM workflows while keeping them basic enough to serve as pedagogical tools. Some of these examples on the wiki are good candidates for this UI.
The examples are defined here, before getting automatically converted from Overpass XML to OverpassQL:
https://github.com/OpenHistoricalMap/overpass-turbo/blob/43d1d9aa7e8bbb7152c89354900fdd327f9f7ffe/js/settings.js#L212-L235
Equivalent wizard syntax is defined here:
https://github.com/OpenHistoricalMap/overpass-turbo/blob/43d1d9aa7e8bbb7152c89354900fdd327f9f7ffe/js/settings.js#L290-L308
Other parts of the same file name and describe the queries.