Coder Social home page Coder Social logo

regiontileserver's Introduction

Regional Tileserver

This repo contains install and import scripts to host a regional part of a vector tile server backed by Openstreetmap data, currently used by the StreetComplete App.

Warning

currently only tested on a Debian Testing (Debian Buster) Server

Setup

copy settings.sh.example to settings.sh and change if needed

install dependencies, database user and some needed files:

./install_deps.sh

Copy and modify systemd file:

sudo cp [email protected] /etc/systemd/system/
sudo vim /etc/systemd/system/[email protected]
sudo systemctl daemon-reload

Configure

add a User to the Database:

sudo -u postgres psql
create user osm with encrypted password 'mypass';
CREATE DATABASE osm OWNER osm;

(The osm database is used to connect to do rename the database for production, )

add the Postgress password to the settings.sh

Tuning the Database configs: TODO (incrase memory in various places)

Import Database

the default port used will be 8001. (see ../workdir/port_mapping)

  • Select a region the tileserver should serve (Ask @Akasch for infos)

  • start the import inside of a screen/temux session because it wil propably take a loong time

  • start import:

    ./import_data.sh

for example:

sudo ./import_data.sh 6_30_22

This will download the data and import it. This will need up to 3 days on a HDD if the region .pbf file is ~1,5 GB. After the import a configuration is written and the systemd unit is started and enabled. It will listen on the next port not defined in port_mapping. There will be some SQL errors in the middel about columns not found, this is normal and expected (migrations which are not needed).

To integrate it into the global tileserver expose the port to the internet (best with nginx or apache as reverse proxy in front of it) and ping @Akasch.

Update Data

Currently the used data is sliced at most once per week. To reimport the data just rerun the import command. This will import the data into a second Database (defaults to _b) and switch them at the end so the old data gets served until the import finishes.

The reimport.sh script will import all installed regions. so you can add this script to the (root) crontab

Warning: This will need the database size (of the biggest region) a second time during import!

regiontileserver's People

Contributors

akasch avatar

Stargazers

Matija Nalis avatar

Watchers

James Cloos avatar  avatar

regiontileserver's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.