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

Hi

I am working on a parser for the opening_hours tag. I would like to download all 209.722 values taginfo to search over them with regular expressions and to run the parser on all values.

I already tried http://www.overpass-api.de/api/xapi_meta?[opening_hours=] but it returns "runtime error: Query timed out in "query" at line 3 after 181 seconds.". Does anyone know a second possibility without downloading the planet ;)

asked 01 Sep '13, 18:19

ypid's gravatar image

ypid
106237
accept rate: 0%


All right. I found a way using the API from taginfo: http://taginfo.openstreetmap.org/api/4/key/values?key=opening_hours

You might not want to open this in a browser ;) The returned json is currently 8 Megabyte in size.

permanent link

answered 01 Sep '13, 18:25

ypid's gravatar image

ypid
106237
accept rate: 0%

edited 08 Sep '13, 10:59

1

taginfo also lets you download its .sqlite files which you can then open and search offline.

(02 Sep '13, 20:50) Frederik Ramm ♦

Thanks but I am already quite lucky with the way it works. I now have written a simple regex parser which is also integrated with the opening_hours parser (should be easy to adopted for other keys, projects or just to search over some keys). The nice thing with the one API query per key is that I could also integrate it nicely with the Makefile :)

(08 Sep '13, 11:07) ypid

You can increase the timeout of the Overpass API, see the Osm-Script section and the timeout attribute.

permanent link

answered 01 Sep '13, 18:26

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

1

Thanks. But after thinking about it, taginfo seems to be the much better source because taginfo already works with this kind of information and has it in an optimized format I guess (at least the download was much faster).

(01 Sep '13, 18:56) ypid
Your answer
toggle preview

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:

×27

question asked: 01 Sep '13, 18:19

question was seen: 5,608 times

last updated: 08 Sep '13, 11:07

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