Skip to content

Commit

Permalink
Merge branch 'release/3.1.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
rbreslow committed Mar 10, 2021
2 parents dfabe34 + eb32a3f commit ffb619e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions deployment/dataproc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM ubuntu:20.04

RUN mkdir -p /usr/local/src
WORKDIR /usr/local/src

RUN apt update && apt install -y curl osmctools

COPY . /usr/local/src
20 changes: 20 additions & 0 deletions deployment/dataproc/combine-and-clip.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

BOUNDS=-76.209582,38.441753,-74.243725,40.725449

declare -a STATES=("pennsylvania" "new-jersey" "delaware")

for STATE in "${STATES[@]}"; do
echo "extracting OSM data for the region served by CAC for ${STATE}..."
osmconvert ${STATE}.pbf -b=${BOUNDS} \
--complete-ways --complex-ways --complete-boundaries --complete-multipolygons \
-o=${STATE}.o5m
done

echo "combining state region extracts..."

INPUTS=$(printf "%s.o5m " "${STATES[@]}")

osmconvert ${INPUTS} -o=cac.pbf

echo "all done!"
8 changes: 8 additions & 0 deletions deployment/dataproc/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: "3"
services:
osm:
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/usr/local/src
8 changes: 8 additions & 0 deletions deployment/dataproc/download-osm-data.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

declare -a STATES=("pennsylvania" "new-jersey" "delaware")

for STATE in "${STATES[@]}"; do
echo "downloading OSM data for ${STATE}..."
curl https://download.geofabrik.de/north-america/us/${STATE}-latest.osm.pbf -o ${STATE}.pbf
done

0 comments on commit ffb619e

Please sign in to comment.