working on overhead imagery and not osm defaults
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# Build free local address data for Mississippi, including Jackson to the coast.
|
||||
set -euo pipefail
|
||||
for dependency in curl osmium go; do
|
||||
if ! command -v "$dependency" >/dev/null 2>&1; then
|
||||
echo "Missing $dependency. Install curl, Go, and osmium-tool (osmium on Arch)." >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
repo_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$repo_dir"
|
||||
work_dir="$(mktemp -d)"
|
||||
trap 'rm -rf -- "$work_dir"' EXIT
|
||||
curl --fail --location --retry 3 --output "$work_dir/mississippi.osm.pbf" \
|
||||
https://download.geofabrik.de/north-america/us/mississippi-latest.osm.pbf
|
||||
# Referenced nodes are retained by default; required for building footprints.
|
||||
osmium tags-filter "$work_dir/mississippi.osm.pbf" nw/addr:housenumber \
|
||||
--output "$work_dir/addresses.osm"
|
||||
go run ./server -import-osm "$work_dir/addresses.osm" \
|
||||
-addresses "${1:-data/mississippi-addresses.json}"
|
||||
echo 'Address data ready. Restart the server to load it.'
|
||||
Reference in New Issue
Block a user