21 lines
544 B
Bash
Executable file
21 lines
544 B
Bash
Executable file
#!/bin/bash
|
|
# scripts/03_import_pois.sh
|
|
|
|
PBF_FILE="/data/osm/region.osm.pbf"
|
|
PG_CONN="postgresql://maps:maps@postgres:5432/maps"
|
|
|
|
# Run the initial migration to create the pois table
|
|
psql "$PG_CONN" -f /app/migrations/001_create_pois.sql
|
|
|
|
# Import POIs using osm2pgsql with a custom Lua transform
|
|
osm2pgsql \
|
|
--create \
|
|
--output=flex \
|
|
--style /app/scripts/poi_flex.lua \
|
|
--database "$PG_CONN" \
|
|
--cache 2048 \
|
|
--number-processes 4 \
|
|
--flat-nodes /data/osm/nodes.cache \
|
|
"$PBF_FILE"
|
|
|
|
echo "POI import complete."
|