-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #303 from OpenHistoricalMap/tiler-imposm
Add Tiler imposm
- Loading branch information
Showing
16 changed files
with
1,872 additions
and
167 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
FROM osgeo/gdal:ubuntu-small-3.2.3 | ||
|
||
RUN apt-get -y update | ||
RUN apt-get install -y \ | ||
g++ \ | ||
libboost-dev \ | ||
libboost-system-dev \ | ||
libboost-filesystem-dev \ | ||
libexpat1-dev \ | ||
zlib1g-dev \ | ||
libbz2-dev \ | ||
libpq-dev \ | ||
libgeos++-dev \ | ||
libproj-dev \ | ||
libleveldb-dev \ | ||
libgeos-dev \ | ||
libprotobuf-dev \ | ||
git-core \ | ||
curl \ | ||
wget \ | ||
unzip \ | ||
software-properties-common && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# # Install python | ||
RUN add-apt-repository ppa:deadsnakes/ppa && \ | ||
apt-get update && \ | ||
apt-get install -y build-essential python3.6 python3.6-dev python3-pip && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
python3 -m pip install pip --upgrade && \ | ||
python3 -m pip install wheel | ||
|
||
# Install postgresql-client | ||
RUN apt-get update && apt-get install -y postgresql-client && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install go | ||
RUN wget -c https://dl.google.com/go/go1.10.linux-amd64.tar.gz -O - | tar -xz -C /usr/local | ||
ENV PATH $PATH:/usr/local/go/bin | ||
|
||
WORKDIR /go | ||
ENV GOPATH /go | ||
RUN go get github.com/omniscale/imposm3 | ||
WORKDIR $GOPATH/src/github.com/omniscale/imposm3 | ||
RUN git checkout v0.11.1 | ||
RUN go install github.com/omniscale/imposm3/cmd/imposm | ||
ENV PATH $PATH:$GOPATH/bin | ||
|
||
# Install awscli and gsutil to get the pbf file | ||
RUN pip3 install -U setuptools | ||
RUN pip3 install awscli | ||
RUN pip3 install gsutil | ||
|
||
ENV IMPOSMDATA /mnt/data | ||
RUN mkdir -p $IMPOSMDATA && chmod 777 -R $IMPOSMDATA | ||
WORKDIR $IMPOSMDATA | ||
VOLUME $IMPOSMDATA | ||
|
||
WORKDIR /osm | ||
COPY . . | ||
CMD ./start.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Tiler imposm | ||
|
||
This container is responsible to import the replication PBF files from osm-seed or OSM planet dump into the `tiler-db` | ||
|
||
If we are running the container for the first time the container will import the [OSM Land](http://data.openstreetmapdata.com/land-polygons-split-3857.zip) and [Natural Earth dataset](http://nacis.org/initiatives/natural-earth) and [osm-land] files into the data bases. [Check more here](https://github.com/go-spatial/tegola-osm#import-the-osm-land-and-natural-earth-dataset-requires-gdal-natural-earth-can-be-skipped-if-youre-only-interested-in-osm). | ||
|
||
|
||
### Configuration | ||
|
||
In order to run this container we need environment variables, these can be found in the following files👇: | ||
|
||
- [.env.tiler-db.example](./../../envs/.env.tiler-db.example) | ||
- [.env.tiler-imposm.example](./../../envs/.env.tiler-imposm.example) | ||
|
||
**Note**: Rename the above files as `.env.tiler-db` and `.env.tiler-imposm` | ||
|
||
#### Running tiler-imposm container | ||
|
||
```sh | ||
# Docker compose | ||
docker-compose run tiler-imposm | ||
|
||
# Docker | ||
docker run \ | ||
--env-file ./envs/.env.tiler-db \ | ||
--env-file ./envs/.env.tiler-imposm \ | ||
-v ${PWD}/data/tiler-imposm-data:/mnt/data \ | ||
--network osm-seed_default \ | ||
-it osmseed-tiler-imposm:v1 | ||
``` | ||
|
Oops, something went wrong.