update README and run.sh
This commit is contained in:
parent
8c83b3adb7
commit
0524d471f4
18
README.md
18
README.md
@ -5,29 +5,29 @@
|
|||||||
|
|
||||||
This is an adaptation of https://github.com/Overv/openstreetmap-tile-server/ for testing different cartoCss styles and generating tiles.
|
This is an adaptation of https://github.com/Overv/openstreetmap-tile-server/ for testing different cartoCss styles and generating tiles.
|
||||||
|
|
||||||
### Use with docker-compose
|
### Use with docker compose
|
||||||
|
|
||||||
#### Fresh install
|
#### Fresh install
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
#docker volume create osm-data
|
#docker volume create osm-data
|
||||||
docker-compose build
|
docker compose build
|
||||||
```
|
```
|
||||||
|
|
||||||
For entering into the container, use the "terminal" argument of the run.sh script:
|
For entering into the container, use the "terminal" argument of the run.sh script:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose run --rm map terminal
|
docker compose run --rm map terminal
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Do an import
|
#### Do an import
|
||||||
|
|
||||||
Download a pbf and a poly file of your choice on https://download.geofabrik.de and put it in the `pbf` folder. Change the lines of the pbf and poly paths in the volumes in the `docker-compose.yml` file
|
Download a pbf and a poly file of your choice on https://download.geofabrik.de and put it in the `pbf` folder. Change the lines of the pbf and poly paths in the volumes in the `docker compose.yml` file
|
||||||
|
|
||||||
Then, you can import the OSM data by doing this command:
|
Then, you can import the OSM data by doing this command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose run --rm map import
|
docker compose run --rm map import
|
||||||
```
|
```
|
||||||
|
|
||||||
This will take a while, about 15 min for Luxembourg for example.
|
This will take a while, about 15 min for Luxembourg for example.
|
||||||
@ -47,7 +47,7 @@ INFO:root: Import complete
|
|||||||
#### Run the server to produce and view tiles
|
#### Run the server to produce and view tiles
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose run --rm map run
|
docker compose run --rm map run
|
||||||
```
|
```
|
||||||
|
|
||||||
The tiles are available on http://192.168.176.2/ or something like that. Have a look at the docker container to know which is the IP address: there is a message like "Could not reliably determine the server's fully qualified domain name, using 192.168.176.2.". (should be on http://localhost:8080/ though...)
|
The tiles are available on http://192.168.176.2/ or something like that. Have a look at the docker container to know which is the IP address: there is a message like "Could not reliably determine the server's fully qualified domain name, using 192.168.176.2.". (should be on http://localhost:8080/ though...)
|
||||||
@ -63,11 +63,13 @@ python3 generate-tiles-list.py > tiles.list
|
|||||||
Move this `tiles.list` file in the `/tiles/` directory and then run:
|
Move this `tiles.list` file in the `/tiles/` directory and then run:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker-compose run --rm map generate_tiles
|
docker compose run --rm map generate_tiles
|
||||||
```
|
```
|
||||||
|
|
||||||
For Belgium up to zoom 18, it might take >48 hours!
|
For Belgium up to zoom 18, it might take >48 hours!
|
||||||
|
|
||||||
|
NB: use `cat tiles.list | grep " 18" > tiles_18.list` to split the tiles.list per zoom level
|
||||||
|
|
||||||
#### Transfer the tiles to tiles.champs-libres.be
|
#### Transfer the tiles to tiles.champs-libres.be
|
||||||
|
|
||||||
|
|
||||||
@ -186,7 +188,7 @@ Your tiles will now be available at `http://localhost:8080/tile/{z}/{x}/{y}.png`
|
|||||||
|
|
||||||
### Using Docker Compose
|
### Using Docker Compose
|
||||||
|
|
||||||
The `docker-compose.yml` file included with this repository shows how the aforementioned command can be used with Docker Compose to run your server.
|
The `docker compose.yml` file included with this repository shows how the aforementioned command can be used with Docker Compose to run your server.
|
||||||
|
|
||||||
### Preserving rendered tiles
|
### Preserving rendered tiles
|
||||||
|
|
||||||
|
4
run.sh
4
run.sh
@ -22,7 +22,7 @@ function compileStyle() {
|
|||||||
mkdir /data/style/scripts/
|
mkdir /data/style/scripts/
|
||||||
mv /data/style/openstreetmap-carto-be/scripts/* /data/style/scripts/
|
mv /data/style/openstreetmap-carto-be/scripts/* /data/style/scripts/
|
||||||
mv /data/style/openstreetmap-carto-be/external-data.yml /data/style/external-data.yml
|
mv /data/style/openstreetmap-carto-be/external-data.yml /data/style/external-data.yml
|
||||||
carto openstreetmap-carto-be/project-fr.mml > mapnik.xml
|
carto openstreetmap-carto-be/project.mml > mapnik.xml
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -213,7 +213,7 @@ if [ "$1" == "generate_tiles" ]; then
|
|||||||
|
|
||||||
sudo -u renderer renderd -c /etc/renderd.conf
|
sudo -u renderer renderd -c /etc/renderd.conf
|
||||||
|
|
||||||
cat /data/tiles/osmbe/tiles.list | render_list --map osmbe
|
cat /data/tiles/osmbe/tiles.list | render_list --map osmbe -n 1
|
||||||
|
|
||||||
bash
|
bash
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user