Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion import/sql/stations_clustered.sql
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ CREATE MATERIALIZED VIEW IF NOT EXISTS stations_clustered AS
state,
array_agg(facilities.id) as station_ids,
ST_Centroid(ST_ConvexHull(ST_RemoveRepeatedPoints(ST_Collect(way)))) as center,
ST_Buffer(ST_ConvexHull(ST_RemoveRepeatedPoints(ST_Collect(way))), 50) as buffered,
CASE feature
WHEN 'yard' THEN ST_Buffer(ST_RemoveRepeatedPoints(ST_Collect(way)), 10)
ELSE ST_Buffer(ST_ConvexHull(ST_RemoveRepeatedPoints(ST_Collect(way))), 50)
END as buffered,
ST_NumGeometries(ST_RemoveRepeatedPoints(ST_Collect(way))) as count
FROM (
SELECT
Expand Down
2 changes: 2 additions & 0 deletions proxy/js/styles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,7 @@ const layers = {
'fill-color': ['case',
['in', ['get', 'state'], ['literal', ['disused', 'abandoned', 'preserved']]], colors.styles.standard.past,
['in', ['get', 'state'], ['literal', ['construction', 'proposed']]], colors.styles.standard.future,
['==', ['get', 'feature'], 'yard'], 'hsl(267 100% 83.5%)',
['==', ['get', 'station'], 'light_rail'], colors.styles.standard.light_rail,
['==', ['get', 'station'], 'subway'], colors.styles.standard.subway,
['==', ['get', 'station'], 'monorail'], colors.styles.standard.monorail,
Expand Down Expand Up @@ -1508,6 +1509,7 @@ const layers = {
filter: ['==', ['get', 'state'], state],
paint: {
'line-color': ['case',
['==', ['get', 'feature'], 'yard'], 'hsl(267 100% 83.5%)',
// Use outline color of feature, without taking state into account
['==', ['get', 'station'], 'light_rail'], colors.styles.standard.light_rail,
['==', ['get', 'station'], 'subway'], colors.styles.standard.subway,
Expand Down