Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSM Coastline Pipeline #235

Draft
wants to merge 4 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions compose/osmcoastline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: '3'
services:
#####################################################
## OSM Coastline
#####################################################
osmcoastline:
platform: linux/amd64
image: osmseed-osmcoastline:v1
build:
context: ../images/osmcoastline
dockerfile: Dockerfile
volumes:
- ../data/osmcoastline-data:/mnt/data
env_file:
- ../envs/.env.osmcoastline

1 change: 1 addition & 0 deletions envs/.env.osmcoastline.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IMPORT_PBF_URL=https://download.geofabrik.de/europe/monaco-latest.osm.pbf
84 changes: 84 additions & 0 deletions images/osmcoastline/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
FROM ubuntu:20.04
ENV workdir /mnt/data

RUN apt-get -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install \
build-essential \
libboost-program-options-dev \
libbz2-dev \
zlib1g-dev \
libexpat1-dev \
cmake \
pandoc \
git \
python3 \
python3-pip \
curl \
unzip \
wget \
software-properties-common \
libz-dev \
gdal-bin \
tar \
bzip2 \
clang \
default-jre \
default-jdk \
gradle \
apt-utils \
postgresql-client \
libgeos-dev \
sqlite3 \
spatialite-bin


#Install osmium-tool
RUN apt-get -y install \
libbz2-dev \
libgd-dev \
libprotozero-dev \
libsqlite3-dev \
make \
jq \
ca-certificates \
liblz4-dev

WORKDIR /home
RUN git clone https://github.com/osmcode/libosmium.git
RUN cd libosmium && git checkout v2.18.0
RUN cd libosmium && mkdir build
WORKDIR /home/libosmium/build
RUN cmake ..
RUN make ..

# Other useful packages
RUN apt-get install -y \
rsync \
tmux \
zsh \
libgdal-dev

WORKDIR /home
RUN echo 'hello'
RUN git clone https://github.com/osmcode/osmcoastline.git
RUN cd osmcoastline && git checkout v2.3.1 && mkdir build
WORKDIR /home/osmcoastline/build
RUN cmake ..
RUN make
RUN ln -s "$PWD"/src/osmcoastline /usr/local/bin/osmcoastline
RUN osmcoastline --version
# # Install AWS CLI
# RUN pip install awscli

# # Install GCP CLI
# RUN curl -sSL https://sdk.cloud.google.com | bash
# RUN ln -f -s /root/google-cloud-sdk/bin/gsutil /usr/bin/gsutil

# # Install Azure CLI
# RUN curl -sL https://aka.ms/InstallAzureCLIDeb | bash

VOLUME $workdir
WORKDIR $workdir
COPY start.sh /start.sh
RUN chmod +x /start.sh
CMD /start.sh
5 changes: 5 additions & 0 deletions images/osmcoastline/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
set -e

echo "Running coastline on $IMPORT_PBF_URL"
wget $IMPORT_PBF_URL -O planet.pbf
osmcoastline -o coastline.db planet.pbf
Loading