[talk-au] place town subject and Download

Marc Gemis marc.gemis at gmail.com
Sat May 14 15:34:46 UTC 2016


with this query, you immediately have a CSV file as output.

Use this  http://overpass-turbo.eu/s/gdp

or copy the query below to http://overpass-turbo.eu/



[out:csv (name, population)][timeout:25];
// gather results
(
  // query part for: “place=town”
  node["place"="town"]({{bbox}});
  way["place"="town"]({{bbox}});
  relation["place"="town"]({{bbox}});
);
// print results
out body;
>;
out skel qt;

see http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Output_Format_.28out.29
for more options on the CSV output

You can make the timeout longer in case you want to cover a larger area.

regards

m

On Sat, May 14, 2016 at 4:48 AM, Warin <61sundowner at gmail.com> wrote:
> On 5/14/2016 11:30 AM, Simon Slater wrote:
>>
>> On Fri, 13 May 2016 07:11:39 PM Warin wrote:
>> 2 things:
>> First, I may have mussed up the threading here but the subject of Warin's
>> last
>> thread looked like "ᅵᅵᅵᅵ...".  My e-mail client has been playing
>> silly-buggers lately, so was this the intended subject or just my client?
>
>
> Yer... I think that is the use of ? and/or = characters that much up these
> email clients. Sorry about that, did not realise.
>
>>
>>> I have gotten some 1,400 'towns from the OSM data base ..
>>
>> Second, how does one extract data like this from the OSM database?  Is
>> there a
>> wikipage or other guide?
>
>
> I am using JOSM -
>
> file - Download from Overpass API
> Build query ... enter 'place=town' in the box on the right then  click on
> the 'Build query' and that gets the Overpass query built blow your entry.
> Then select the area .. if you make this too large it will time out.
> Download...
>
> This gets you it into JOSM .. then save as to get a .osm file and I then use
> a small script to extract the name and population from that file into a .csv
> file.
>
> I just followed my nose to get here.
>
>
> _______________________________________________
> Talk-au mailing list
> Talk-au at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/talk-au



More information about the Talk-au mailing list