Skip to content

Commit

Permalink
Merge branch 'master' of github.com:hiddewie/OpenRailwayMap-vector in…
Browse files Browse the repository at this point in the history
…to import-ring-form
  • Loading branch information
hiddewie committed Dec 15, 2024
2 parents 6909d3c + b8d503a commit 5089ac7
Show file tree
Hide file tree
Showing 24 changed files with 5,417 additions and 4,805 deletions.
12 changes: 8 additions & 4 deletions SETUP.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The import process will filter the file before importing it. The filtered file w

Start the tile server:
```shell
docker compose up --build martin
docker compose up --build --watch martin
```

Prepare and start the API:
Expand All @@ -25,14 +25,18 @@ docker compose up api

Start the web server:
```shell
docker compose up --build martin-proxy
docker compose up --build --watch martin-proxy
```

The OpenRailwayMap is now available on http://localhost:8000.

To ease development, Docker Compose can automatically rebuild containers when dependent files change. Enable *watch mode* with:
Docker Compose will automatically rebuild and restart the `martin` and `martin-proxy` containers if relevant files are modified.

### Making changes

If changes are made to features, the materialized views in the database have to be refreshed:
```shell
docker compose watch
docker compose run --build import refresh
```

## Deployment
Expand Down
2 changes: 1 addition & 1 deletion api/prepare_facilities.sql
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ CREATE TABLE openrailwaymap_facilities_for_search AS
railway_ref,
name_tags,
route_count,
way AS geom
ST_Centroid(way) AS geom
FROM stations_with_route_counts
WHERE
railway IN ('station', 'halt', 'tram_stop', 'service_station', 'yard', 'junction', 'spur_junction', 'crossover', 'site')
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ services:
[ "$$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" = "high" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source railway_line_high,railway_text_km --output-file /tiles/high.mbtiles && mbtiles summary /tiles/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_switch_ref --output-file /tiles/standard.mbtiles && mbtiles summary /tiles/standard.mbtiles
[ "$$TILES" = "standard" ] && $$MARTIN --min-zoom 8 --max-zoom "$$MAX_ZOOM" --source standard_railway_turntables,standard_railway_text_stations,standard_railway_grouped_stations,standard_railway_symbols,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
Expand Down
Loading

0 comments on commit 5089ac7

Please sign in to comment.