You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To retrieve only the ways for the area that corresponds to the first occurrence of the {city} parameter, you can use the following query:
area[name="{city}"][1];
(way["highway"](area); >;);
out skel;
The [1] operator in the area parameter specifies that only the first matching area should be returned. This ensures that you will only get the ways for the Berlin in Germany and not in the USA or any other place with the same name.
The previous query was returning all matching areas for the `{city}` parameter,
which could cause problems if the city name was used in multiple locations.
This commit modifies the query to use the `[1]` operator in the `area`
parameter, which ensures that only the first matching area is returned.
This improves the reliability and accuracy of the query results.
Issue: #8
For example: "--city Berlin" returns besides german one, a city in the USA.
In overpass-turbo API there is an extension that returns only the first appearance (
{{geocodeArea:name}}
). Implement something like this.Useful links:
The text was updated successfully, but these errors were encountered: