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

Hi everyone,

I have an experimental osm postgres database and website api set according to

https://github.com/openstreetmap/openstreetmap-website

Is there any way I can set the overpass-API to read my own osm postgres db?

Issue: https://github.com/drolbr/Overpass-API/issues/624

The contributor implies that I need to export my database in OSM XML format, is there any instructions on how to achieve that?

Thanks in advance!

asked 29 Jun '21, 09:32

ubill88's gravatar image

ubill88
11113
accept rate: 0%


You haven't said why you have your own database. If you have your own database because you have non-OSM data in it, then yes, exporting that data in OSM XML and importing into Overpass is the way to go. You would typically use the "osmosis" command line tool with a combination of the --read-apidb and --write-xml flags. See https://wiki.openstreetmap.org/wiki/Osmosis/Detailed_Usage_0.48 for details.

If you have your own database but it has standard OSM data in it, then of course this makes no sense at all and you would simply feed Overpass OSM data downloaded from any of the usual sources!

Also, consider if you really need Overpass. It might be possible to run any queries that you are interested in on your existing API database with some SQL cleverness, which would save you the - potentially long-running - export-import step.

If your own database is very big and the osmosis export step takes too long, you might consider a special tool to convert an API database dump created with pg_dump into an XML representation: https://github.com/zerebubuth/planet-dump-ng

permanent link

answered 29 Jun '21, 09:43

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

edited 29 Jun '21, 09:49

Hi @Frederik Ramm ♦ thanks for your reply, I have my own postgres database with standard OSM data in it. There are some custom keys and values stored in my experimental region so I'm trying to create my own Overpass API. According to your reply, I just need to feed Overpass my own OSM data. I'm actually stuck in this part. According to the installation guide: https://overpass-api.de/no_frills.html bin/download_clone.sh --source=https://dev.overpass-api.de/api_drolbr/ --db-dir="db/" --meta=no My question is actually here, how to feed my local osm postgres database to Overpass API? Thank you very much!

(30 Jun '21, 04:16) ubill88

Hello @ubill88, I was wondering if you managed to do this ? I am also looking to do something like this. It would be great if you can share the solution.

permanent link

answered 31 Mar '22, 13:19

Allhad's gravatar image

Allhad
1
accept rate: 0%

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:

×483
×165
×118
×85
×84

question asked: 29 Jun '21, 09:32

question was seen: 1,932 times

last updated: 31 Mar '22, 13:19

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