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

Align line layers #85

Merged
merged 10 commits into from
Aug 3, 2024
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
matrix:
tiles:
- low-med
- high
- standard
- speed
- signals
- electrification
- gauge

steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ docker compose run --build import import
Build the tiles:
```shell
export BBOX='-11.3818,35.8891,25.0488,70.0'
for tile in low-med standard speed signals electrification gauge; do
for tile in low-med high standard speed signals electrification; do
env "TILES=$tile" docker compose up martin-cp
done
```
Expand Down
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ services:
[ "$$TILES" = "low-med" ] && $$MARTIN --min-zoom 0 --max-zoom 6 --source standard_railway_text_stations_low --output-file /tiles/standard_railway_text_stations_low.mbtiles && mbtiles summary /tiles/standard_railway_text_stations_low.mbtiles
[ "$$TILES" = "low-med" ] && $$MARTIN --min-zoom 7 --max-zoom 7 --source railway_line_med --output-file /tiles/railway_line_med.mbtiles && mbtiles summary /tiles/railway_line_med.mbtiles
[ "$$TILES" = "low-med" ] && $$MARTIN --min-zoom 7 --max-zoom 7 --source standard_railway_text_stations_med --output-file /tiles/standard_railway_text_stations_med.mbtiles && mbtiles summary /tiles/standard_railway_text_stations_med.mbtiles
[ "$$TILES" = "standard" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source standard_railway_turntables,standard_railway_line_fill,standard_railway_text_stations,standard_railway_symbols,standard_railway_text_km,standard_railway_switch_ref --output-file /tiles/standard.mbtiles && mbtiles summary /tiles/standard.mbtiles
[ "$$TILES" = "speed" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source speed_railway_line_fill,speed_railway_signals --output-file /tiles/speed.mbtiles && mbtiles summary /tiles/speed.mbtiles
[ "$$TILES" = "signals" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source signals_railway_line,signals_railway_signals,signals_signal_boxes --output-file /tiles/signals.mbtiles && mbtiles summary /tiles/signals.mbtiles
[ "$$TILES" = "electrification" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source electrification_railway_line,electrification_future,electrification_signals --output-file /tiles/electrification.mbtiles && mbtiles summary /tiles/electrification.mbtiles
[ "$$TILES" = "gauge" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source gauge_railway_line --output-file /tiles/gauge.mbtiles && mbtiles summary /tiles/gauge.mbtiles
[ "$$TILES" = "high" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source railway_line_high --output-file /tiles/railway_line_high.mbtiles && mbtiles summary /tiles/railway_line_high.mbtiles
[ "$$TILES" = "standard" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source standard_railway_turntables,standard_railway_text_stations,standard_railway_symbols,standard_railway_text_km,standard_railway_switch_ref --output-file /tiles/standard.mbtiles && mbtiles summary /tiles/standard.mbtiles
[ "$$TILES" = "speed" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source speed_railway_signals --output-file /tiles/speed.mbtiles && mbtiles summary /tiles/speed.mbtiles
[ "$$TILES" = "signals" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source signals_railway_signals,signals_signal_boxes --output-file /tiles/signals.mbtiles && mbtiles summary /tiles/signals.mbtiles
[ "$$TILES" = "electrification" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source electrification_signals --output-file /tiles/electrification.mbtiles && mbtiles summary /tiles/electrification.mbtiles
true
'

Expand All @@ -70,6 +70,7 @@ services:
environment:
# Europe center: -10.0,35.7,39.0,70.0
# AT: 9.52678,46.36851,17.16273,48.90201
# BE: 2.51357303225,49.5294835476,6.15665815596,51.4750237087
# CH: 6.0974,45.8269,10.5579,47.7941
# DE: 5.864417,47.26543,15.05078,55.14777
# FI: 19.02427,59.28783,31.6159,70.09959
Expand Down
1 change: 1 addition & 0 deletions import/sql/functions.sql
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ END;
$$ LANGUAGE plpgsql;

-- Get state of electrification
-- TODO move to import
CREATE OR REPLACE FUNCTION railway_electrification_state(railway TEXT, electrified TEXT,
deelectrified TEXT, abandoned_electrified TEXT, construction_electrified TEXT,
proposed_electrified TEXT, ignore_future_states BOOLEAN) RETURNS TEXT AS $$
Expand Down
Loading