NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

1)what is the total amount of places per country (by places I mean village, city, hamlet, etc). The count does not have to be split out, just one number per nation. And how do I figure this number out on my own for future reference?

2)I was told to run a overpass turbo query to extract specific features I wanted to review. How would I run it, or create it based on this information:

nsroadimport #thailand, source = digitalglobe and import = yes

asked 09 Oct '17, 23:01

MapMakinMeyers's gravatar image

MapMakinMeyers
26113
accept rate: 0%


Here's a sample script for counting the place features in a country:

http://overpass-turbo.eu/s/seM

(click on show data when the warning pops up)

The geocodeArea:Thailand is a feature of the Overpass Turbo website, to do the query directly against Overpass API it needs to be replaced with a reference to the OSM object the Overpass API area object is created from:

http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_area_.28area.29

A query like area["name:en"="Thailand"][admin_level="2"]->.searchArea; should also usually work.

Overpass API doesn't support queries against changeset tags, but if the tags are on the objects you want to review, just putting something like import=yes and source=digitalglobe into the Overpass Turbo wizard will return objects with those tags. There are some resource limits on the public instances, so queries returning a large number of objects may time out. Limiting the query to some smaller bounding box is one way to deal with that.

permanent link

answered 09 Oct '17, 23:24

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

edited 09 Oct '17, 23:28

Seeing how place is sometimes used, the more interesting query probably also checks for name.

(11 Oct '17, 16:03) maxerickson

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×13
×10
×9

question asked: 09 Oct '17, 23:01

question was seen: 3,671 times

last updated: 11 Oct '17, 16:03

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum