Docker container based loosely on https://github.com/Overv/openstreetmap-tile-server which handles importing into postgis and serving tiles.
The main difference is that this uses an external PostGIS database not one bound to the container
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
peter
64f26f306d
|
2 years ago | |
---|---|---|
apache | 2 years ago | |
bin | 2 years ago | |
.dockerignore | 2 years ago | |
.gitignore | 2 years ago | |
Dockerfile | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
env.list-example | 2 years ago | |
env.sh | 2 years ago | |
run.sh | 2 years ago |
README.md
MAPLU OSM
This docker container handles the import of OpenStreetMap data downloaded from download.geofabrik.de into a PostgreSQL database
Building
docker build -t mycontainername .
Creating a database
Manually create the database in postgresql. Then in psql or another client open that database and run:
create extension postgis;
create extension hstore;
alter table geometry_columns owner to gis;
alter table spatial_ref_sys owner to gis;
replacing gis
with the user this container will connect to it.
Importing a database
Run the container, replacing the relevant settings:
docker run -it --rm \
-e DBHOST=yourdbhost \
-e DBNAME=tablename \
-e DBUSER=username \
-e DBPASS=password \
-v /full/path/to/great-britain-latest.osm.pbf:/data/region.osm.pbf:ro \
-v /full/path/to/great-britain.poly.txt:/data/region.poly:ro \
mycontainername \
import.sh