Changeset: 35387180
pt:Campinas (BR)
Closed by Aleks-Berlin
Tags
build | 2.4-12-g7158c69 |
---|---|
created_by | Potlatch 2 |
version | 2.4 |
Discussion
-
Comment from naoliv
Aleks, why you are adding "is_in:iso_3166_2" to some cities?
I don't think that it adds more information than it's already available in the data. -
Comment from Aleks-Berlin
https://taginfo.openstreetmap.org/keys/is_in%3Aiso_3166_2
tells 26463 uses for this key.
Yes this data could also be derived from other data, but more complicated.
But I would first remove is_in:continent, -state, -country, is_in, etc., and still keep this short one. I you process 1mio POI it takes much longer to find out where you are, than having it as a tag.
I hope you can live with this.
Thanks, Alex -
Comment from naoliv
But they are mainly in US. It seems they were imported from Tiger, as can be seen at https://taginfo.openstreetmap.org/keys/is_in%3Aiso_3166_2#combinations and not inserted by mappers.
I don't think it's useful to start adding this tag if we can get the same result using spatial indexing.
With overpass it's really simple (even more simple than adding the key to every city). For example, the equivalent of adding "is_in:iso_3166_2=BR-SP" to every place here is http://overpass-turbo.eu/s/cSn
It's much more clean, easy, fast and don't pollute the objects. -
Comment from Aleks-Berlin
Could you please tell me how to do it automatic (from script, eg. using wget).
The task should look like: get all key="place" from inside iso:DE-HE.
I dont want mouse interaction because we have >1000 different ISO-regions on this planet. Thank you for your help. -
Comment from naoliv
I will take a look at a scriptable solution and get back to you.
-
Comment from Aleks-Berlin
many thanks in advance. Alex
-
Comment from Aleks-Berlin
the id of border (way or relation) is known to me. perhaps this makes it easier for you.
-
Comment from naoliv
Indeed knwoing the id helps a lot.
For your DE-HE example, try this: http://naoliv.iq.unesp.br/osm/alex.html
Note tha the id is in bold. It will be the only place where you will need to change.
You can use "-O output-file" in wget to have a better final name too.
It will always query directly from overpass.
This query catches only the nodes. Do you need ways and/or relations too? -
Comment from Aleks-Berlin
This gives all nodes place=town in "Brandenburg, germany", I think..
-
Comment from naoliv
Yep, as JSON.
I don't know if you took a look at my example, but it uses the same output, but as XML. -
Comment from Aleks-Berlin
Yes it seems to works.
But now I suffer on:
all place=city && population>10000000 on full planet. Thanks alot, Alex -
Comment from naoliv
Use a regex for this
http://overpass-turbo.eu/s/cZH
This matches cities with population from 10000000 up to 99999999. -
Comment from naoliv
And I guess "is_in:iso_3166_2" isn't needed anymore in Brazil? :-)
-
Comment from Aleks-Berlin
there are megabytes of key="is_in" having long values, and only kilobytes of is_in:iso*, so why it is so urgend to remove it? I would still like them, but not adding them.
The problem is at the moment: questions with big results are still very slow and often aborting. -
Comment from naoliv
Did you increase (or remove) the timeout in your overpass queries? Setting a too low timeout with slower queries won't return any result indeed.
-
Comment from Aleks-Berlin
I'm working on it to find a good solution.
But beside this: 99% of is_in_iso (even outside USA) is not from me, so others also need it. I think we should start a broader discussion about all is_in* keys. -
Comment from naoliv
What exactly do you need to find or process? Do you always need fresh data or you can use a daily extract?
-
Comment from Aleks-Berlin
only relation["place"="city"]["population"~"[0-9]{7}"]({{bbox}}); // over europe timeout=444 is breaking with internal server error but only 23 cities >1mio are inside.
It should be doable, but is stille the limit (no timeout). -
Comment from naoliv
Maybe querying smaller areas/countries and merging the results?
Nodes (1)
Welcome to OpenStreetMap!
OpenStreetMap is a map of the world, created by people like you and free to use under an open license.
Hosting is supported by Fastly, OSMF corporate members, and other partners.
https://openstreetmap.org/copyright | https://openstreetmap.org |
Copyright OpenStreetMap and contributors, under an open license |