This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Are there any XAPI-like services that return “the first N” rather than “all” matches?

3

Imagine that I'm looking at the various options for "highway" tagging, and have found highway=services.

If there were more objects in the OSM database then using taginfo, I'd be able to look at combinations. If there were fewer I'd be able to use the overpass "XAPI" link from that page to look at individual objects.

Assuming that in this case I don't want to look at all 4000-odd objects but only a few, is there an easy way to obtain a sample of the matching data, without using a local "select" statement on a local SQL database or passing a bounding box to the XAPI server?

asked 12 Feb '13, 21:40

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%


2 Answers:

4

answered 12 Feb '13, 23:37

cartinus's gravatar image

cartinus
7.0k1066105
accept rate: 27%

edited 20 Nov '17, 23:17

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866

That would work for a specific area but not for obtaining a world-wide sample.

(13 Feb '13, 07:31) scai ♦
2

@scai: because?

  • way["name"="Wed"];out 20; Gives three ways (in Rotterdam, Utrecht en Höchst)
  • way["name"="Wed"];out 2; Gives only two ways (in Rotterdam and Utrecht)
(13 Feb '13, 13:06) cartinus

@cartinus Ah you are right. I thought it requires a bbox.

(13 Feb '13, 13:53) scai ♦

0

Since taginfo's API seems to have the same restrictions you could download their database and see if it still contains this information.

Update: No, taginfo-db.db doesn't contain this information anymore :(

answered 13 Feb '13, 07:44

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 13 Feb '13, 08:09

Source code available on GitHub .