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

Hello all,
As mentioned in my previous question I am currently trying to set my own OSM-Server instance including website, API and Tile Server. In this context I also want to set up an own Overpass and Nominatim, which hopefully be done tomorrow. My problem is that I don't have a clear idea of how to combine those services to "one application". Up to now the website is up and running and I also have a working Tile-Server machine including the dataset and the database with my relevant data. In my case the data for the Tile server cover only one city but this is enough for my use case.

Now my questions are:
1.) How can I combine both services (the website rails port and Tile-Server)? I would like to be able to query data using the API on my local server. As mentioned in the answer of my my previous question it's necessary to have a own database so the local port of the API can access the data.
2.) Apart from querying the data using the API, how can I change the map source to my Tile-Sever. I've checked the source code, but I did not find the right line, where I could change it.

Thanks for your input!

asked 15 May '14, 02:21

schlomm's gravatar image

schlomm
56336
accept rate: 0%


1.) You have to dump your API database into a "planet file" using Osmosis, and then load that file into a different PostGIS database with osm2pgsql, and run your tile server off of that database. If your data set is very small then you can make a complete dump and re-import any time you change something, or else set up a "diff" mechanism that only dumps and processes changes.

2.) The tile layers are defined in vendor/assets/leaflet/leaflet.osm.js - you can simply add your own to the list.

permanent link

answered 15 May '14, 07:35

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

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:

×290
×204
×14
×11

question asked: 15 May '14, 02:21

question was seen: 3,359 times

last updated: 15 May '14, 07:35

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