Skip to content

Commit

Permalink
remove unneeded text layers, now part of line layers
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie committed Mar 3, 2024
1 parent e6ea49f commit 6d2bd5e
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 263 deletions.
6 changes: 3 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ services:
command: [
'sh',
'-c',
'martin-cp --config /config/configuration.yml --mbtiles-type flat --min-zoom "$$MIN_ZOOM" --max-zoom "$$MAX_ZOOM" "--bbox=$$BBOX" --source standard_railway_line_med,standard_railway_turntables,standard_railway_line_fill,standard_railway_text_stations,standard_railway_symbols,standard_railway_text,standard_railway_text_km,standard_railway_switch_ref --output-file /tiles/standard.mbtiles --on-duplicate override &&
martin-cp --config /config/configuration.yml --mbtiles-type flat --min-zoom "$$MIN_ZOOM" --max-zoom "$$MAX_ZOOM" "--bbox=$$BBOX" --source speed_railway_line_casing,speed_railway_line_med,speed_railway_line_fill,speed_railway_signals,speed_railway_line_text --output-file /tiles/speed.mbtiles --on-duplicate override &&
'martin-cp --config /config/configuration.yml --mbtiles-type flat --min-zoom "$$MIN_ZOOM" --max-zoom "$$MAX_ZOOM" "--bbox=$$BBOX" --source standard_railway_line_med,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 --on-duplicate override &&
martin-cp --config /config/configuration.yml --mbtiles-type flat --min-zoom "$$MIN_ZOOM" --max-zoom "$$MAX_ZOOM" "--bbox=$$BBOX" --source speed_railway_line_casing,speed_railway_line_med,speed_railway_line_fill,speed_railway_signals --output-file /tiles/speed.mbtiles --on-duplicate override &&
martin-cp --config /config/configuration.yml --mbtiles-type flat --min-zoom "$$MIN_ZOOM" --max-zoom "$$MAX_ZOOM" "--bbox=$$BBOX" --source signals_railway_line,signals_railway_signals,signals_signal_boxes --output-file /tiles/signals.mbtiles --on-duplicate override &&
martin-cp --config /config/configuration.yml --mbtiles-type flat --min-zoom "$$MIN_ZOOM" --max-zoom "$$MAX_ZOOM" "--bbox=$$BBOX" --source electrification_railway_line_med,electrification_railway_line,electrification_future,electrification_signals,electrification_railway_text_med,electrification_railway_text_high --output-file /tiles/electrification.mbtiles --on-duplicate override &&
martin-cp --config /config/configuration.yml --mbtiles-type flat --min-zoom "$$MIN_ZOOM" --max-zoom "$$MAX_ZOOM" "--bbox=$$BBOX" --source electrification_railway_line_med,electrification_railway_line,electrification_future,electrification_signals --output-file /tiles/electrification.mbtiles --on-duplicate override &&
martin-cp --config /config/configuration.yml --mbtiles-type flat --min-zoom "$$MIN_ZOOM" --max-zoom "$$MAX_ZOOM" "--bbox=$$BBOX" --source gauge_railway_line_low,gauge_railway_line_med,gauge_railway_line --output-file /tiles/gauge.mbtiles --on-duplicate override'
]
volumes:
Expand Down
63 changes: 7 additions & 56 deletions martin/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ postgres:
highspeed: string
tunnel: boolean
bridge: boolean
label: string

standard_railway_turntables:
schema: public
Expand All @@ -64,6 +65,9 @@ postgres:
highspeed: string
tunnel: boolean
bridge: boolean
ref: string
track_ref: string
label: string

standard_railway_text_stations:
schema: public
Expand All @@ -86,21 +90,6 @@ postgres:
railway: string
man_made: string

standard_railway_text:
schema: public
table: standard_railway_text
srid: 3857
geometry_column: way
geometry_type: LINESTRING
properties:
railway: string
feature: string
usage: string
service: string
ref: string
track_ref: string
label: string

standard_railway_text_km:
schema: public
table: standard_railway_text_km
Expand Down Expand Up @@ -162,6 +151,7 @@ postgres:
usage: string
service: string
maxspeed: number
label: string

speed_railway_signals:
schema: public
Expand All @@ -173,19 +163,6 @@ postgres:
feature: string
type: string

speed_railway_line_text:
schema: public
table: speed_railway_line_text
srid: 3857
geometry_column: way
geometry_type: LINESTRING
properties:
railway: string
feature: string
usage: string
service: string
label: string

# --- Signals --- #

signals_railway_line:
Expand Down Expand Up @@ -241,6 +218,7 @@ postgres:
service: string
frequency: number
voltage: number
label: string

electrification_railway_line:
schema: public
Expand All @@ -256,6 +234,7 @@ postgres:
service: string
frequency: number
voltage: number
label: string

electrification_future:
schema: public
Expand All @@ -281,34 +260,6 @@ postgres:
properties:
feature: string

electrification_railway_text_med:
schema: public
table: electrification_railway_text_med
srid: 3857
geometry_column: way
geometry_type: LINESTRING
properties:
railway: string
feature: string
state: string
usage: string
service: string
label: string

electrification_railway_text_high:
schema: public
table: electrification_railway_text_high
srid: 3857
geometry_column: way
geometry_type: LINESTRING
properties:
railway: string
feature: string
state: string
usage: string
service: string
label: string

# --- Gauge --- #

gauge_railway_line_low:
Expand Down
13 changes: 7 additions & 6 deletions proxy/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@
const speedCasingPaint = {
'line-color': 'white',
'line-width': railwayLineWidth,
'line-gap-width': 2,
'line-gap-width': 1,
};
const speedLayout = {
'line-join': 'round',
Expand Down Expand Up @@ -1547,7 +1547,7 @@
type: 'symbol',
minzoom: 8,
source: 'openrailwaymap',
'source-layer': 'standard_railway_text',
'source-layer': 'standard_railway_line_fill',
filter: ['step', ['zoom'],
['all',
['!=', ['get', 'ref'], null],
Expand Down Expand Up @@ -1865,7 +1865,7 @@
type: 'symbol',
minzoom: 17,
source: 'openrailwaymap',
'source-layer': 'standard_railway_text',
'source-layer': 'standard_railway_line_fill',
filter: ['!=', ['get', 'track_ref'], null],
paint: {
'text-color': 'white',
Expand Down Expand Up @@ -1984,7 +1984,8 @@
type: 'symbol',
minzoom: 9,
source: 'openrailwaymap',
'source-layer': 'speed_railway_line_text',
'source-layer': 'speed_railway_line_fill',
// TODO zoom filters do not match line zoom levels
filter: ['step', ['zoom'],
['==', ['get', 'feature'], 'rail'],
11,
Expand Down Expand Up @@ -2366,7 +2367,7 @@
minzoom: 8,
maxzoom: 9,
source: 'openrailwaymap',
'source-layer': 'electrification_railway_text_med',
'source-layer': 'electrification_railway_line_med',
filter: ['all',
['==', ['get', 'railway'], 'rail'],
['any',
Expand Down Expand Up @@ -2395,7 +2396,7 @@
type: 'symbol',
minzoom: 9,
source: 'openrailwaymap',
'source-layer': 'electrification_railway_text_high',
'source-layer': 'electrification_railway_line',
filter: ['step', ['zoom'],
['all',
['==', ['get', 'railway'], 'rail'],
Expand Down
6 changes: 3 additions & 3 deletions proxy/proxy.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ server {

location / {
if ($http_referer ~ ^http://localhost) {
rewrite ^/standard$ /standard_railway_line_med,standard_railway_turntables,standard_railway_line_fill,standard_railway_text_stations,standard_railway_symbols,standard_railway_text,standard_railway_text_km,standard_railway_switch_ref last;
rewrite ^/speed$ /speed_railway_line_casing,speed_railway_line_med,speed_railway_line_fill,speed_railway_signals,speed_railway_line_text last;
rewrite ^/standard$ /standard_railway_line_med,standard_railway_turntables,standard_railway_line_fill,standard_railway_text_stations,standard_railway_symbols,standard_railway_text_km,standard_railway_switch_ref last;
rewrite ^/speed$ /speed_railway_line_casing,speed_railway_line_med,speed_railway_line_fill,speed_railway_signals last;
rewrite ^/signals$ /signals_railway_line,signals_railway_signals,signals_signal_boxes last;
rewrite ^/electrification$ /electrification_railway_line_med,electrification_railway_line,electrification_future,electrification_signals,electrification_railway_text_med,electrification_railway_text_high last;
rewrite ^/electrification$ /electrification_railway_line_med,electrification_railway_line,electrification_future,electrification_signals last;
rewrite ^/gauge$ /gauge_railway_line_low,gauge_railway_line_med,gauge_railway_line last;
}

Expand Down
Loading

0 comments on commit 6d2bd5e

Please sign in to comment.