8000 GitHub - jimmyrocks/osm-tiles-mapnik: A docker-compose approach to rendering tiles with Mapnik
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jimmyrocks/osm-tiles-mapnik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Building a tile server based on Ubuntu 16.04

How to use

Pre-reqs

Since this project is aiming to be contained within Docker, there isn't much you will need other than Docker, docker-compose, and a system that can run Ubuntu based Dockerfiles.

If you are running Ubuntu, and don't have Docker installed, there is a bash script in the "scripts" directory called "install_docker.sh". Running this with 'sudo' will install bo 71E6 th Docker and docker-compose.

Loading the docker-file

This should be quite simple to start with docker-compose, although it may take a while depending on your system at network connection. (Depending on how you have Docker set up, you may need to 'sudo' some of these commands.)

  1. Clone the repository git clone https://github.com/jimmyrocks/osm-tiles-mapnik
  2. Navigate into the repo directory cd osm-tiles-mapnik
  3. Build the docker-compose using the command (This may take a while) docker-compose build
  4. Bring up the docker-compose docker-compose up -d
  5. Run the scripts to load the data into the database and start the tile server bash ./scripts/initialize-server.sh
  6. Navigate your browser to: http://localhost:3000

Changing the map data from the sample data

By default this project uses the US state of Rhode Island, since it is the smallest PBF available within the US. You may want to view different data.

  1. Find a .pbf file available for download, possibly from Geofabrik.
  2. Edit the "tileserver.env" file, change the "SAMPLE_DATASET_URL" variable to the URL for your selected PBF file.
  3. Edit the file at "tileserver/site/index.html", and find the Javascript variables "center" and "zoom". Replace these values with values that are relevant to your PBF file.

Background

This project includes a docker-compose.yml file that pulls together three Dockerfiles:

  1. A base PostGIS:10 image (from mdillon)
  2. A "tools" Dockerfile (based on Ubuntu 16.04) which takes care of the data transformation tasks at set up
  3. A "tileserver" Dockerfile (based on Ubuntu 16.04) which runs Apache and mod_tile.

The guide that was used to create this process can be found on the switch2osm.org website. Many of the steps that are outlined in that guide have been coding into the Dockerfiles (especially in the tileserver Dockerfile). The tools Dockerfile follows closely to the Dockerfile contained in the OpenStreetMap Carto Project. The differences are mostly changes that were made in order to support PostGIS as well.

About

A docker-compose approach to rendering tiles with Mapnik

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  
0