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

Add railroad tracks #476

Merged
merged 53 commits into from
Aug 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
5bfb3cd
Add railways
claysmalley Jul 7, 2022
1b43580
Change railroads to gray
claysmalley Jul 7, 2022
f0c5052
Change minimum zoom for railroads
claysmalley Jul 7, 2022
97691b6
Merge branch 'main' into clay-rail
claysmalley Jul 8, 2022
a67002f
Merge branch 'main' into clay-rail
claysmalley Jul 8, 2022
ca8b2d0
Merge branch 'main' into clay-rail
claysmalley Jul 9, 2022
3f4b2bc
Merge branch 'main' into clay-rail
claysmalley Jul 10, 2022
2a70738
Merge branch 'main' into clay-rail
claysmalley Jul 14, 2022
e2b8098
Add narrow gauge railways
claysmalley Jul 15, 2022
97e8de6
Add railroad bridge casing
claysmalley Jul 16, 2022
9606556
Simplify railroad bridge casing
claysmalley Jul 17, 2022
b5faa9f
Factor out dash fill color
claysmalley Jul 17, 2022
5f138c1
Add subways
claysmalley Jul 17, 2022
0d8ffb4
Fix dash color on railroad tunnels
claysmalley Jul 17, 2022
f77557f
Remove dash pattern from railroad bridges
claysmalley Jul 17, 2022
967c880
Add light rail, tram, funicular
claysmalley Jul 17, 2022
44a821a
Merge branch 'main' into clay-rail
claysmalley Jul 19, 2022
aaa87ec
Halve railway line width
claysmalley Jul 19, 2022
53c739f
Remove funicular service track
claysmalley Jul 20, 2022
f8e8d76
Widen railroad bridge casing
claysmalley Jul 20, 2022
8ded237
Rewrite rail dash array code
claysmalley Jul 20, 2022
e4be672
Merge branch 'main' into clay-rail
claysmalley Jul 21, 2022
9504fd9
Merge branch 'main' into clay-rail
claysmalley Jul 21, 2022
c54cb31
Add taginfo descriptions for railroads
claysmalley Jul 21, 2022
05a9986
Add monorails
claysmalley Jul 21, 2022
a98b6e8
Remove this.hue from railroads
claysmalley Jul 21, 2022
3b1e036
Adjust railroad bridge casing and dash width
claysmalley Jul 21, 2022
fb3d97f
Combine railroad bridge casing layers
claysmalley Jul 22, 2022
1790172
Add blur to railroad bridge casing
claysmalley Jul 22, 2022
14c34af
Merge branch 'main' into clay-rail
claysmalley Jul 22, 2022
ee3ec52
Adjust minimum zoom for railroad bridge casing
claysmalley Jul 22, 2022
d688b11
Change narrow gauge railways to double tie pattern
claysmalley Jul 22, 2022
ba64164
Sort railway tunnels beneath road tunnels
claysmalley Jul 22, 2022
cde194d
Merge branch 'main' into clay-rail
claysmalley Jul 23, 2022
d082358
Merge branch 'main' into clay-rail
claysmalley Jul 23, 2022
eae9576
Disable tie pattern for crossover tracks
claysmalley Jul 23, 2022
a57ddb4
Document use of railway service tag
claysmalley Jul 23, 2022
6c7bb98
Combine bridge casing layers
claysmalley Jul 23, 2022
3b1ebc8
Better handling of null maxzoom
claysmalley Jul 23, 2022
5acdb79
Merge branch 'main' into clay-rail
claysmalley Jul 23, 2022
6c1d441
Remove blur from railroad bridge casing
claysmalley Jul 24, 2022
d99ab22
Merge branch 'main' into clay-rail
claysmalley Jul 25, 2022
393b943
Merge branch 'main' into clay-rail
claysmalley Jul 27, 2022
4b9432f
Merge branch 'main' into clay-rail
claysmalley Jul 28, 2022
94275c7
Merge branch 'main' into clay-rail
claysmalley Jul 29, 2022
a5fcba0
Add preserved railways
claysmalley Jul 29, 2022
51aa5b5
Merge branch 'main' into clay-rail
claysmalley Jul 29, 2022
be3c5b6
Refactor rail to facilitate future conversion to Maplibre expressions
claysmalley Jul 30, 2022
1067395
Combine railway fill layers
claysmalley Jul 30, 2022
345e67b
Combine light rail and tram dash layers
claysmalley Jul 30, 2022
2da0263
Factor out railway colors
claysmalley Jul 30, 2022
b49cb52
Merge branch 'main' into clay-rail
claysmalley Jul 31, 2022
d93c685
Remove preserved railway styling
claysmalley Jul 31, 2022
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
77 changes: 77 additions & 0 deletions scripts/taginfo_template.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,83 @@
"object_types": ["way"],
"description": "Major roads under construction have a dotted line pattern and a more prominent color.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "rail",
"object_types": ["way"],
"description": "Conventional railroads are represented by a thick light gray line with a sparse tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "narrow_gauge",
"object_types": ["way"],
"description": "Narrow gauge railroads are represented by a thick light gray line with a sparse doubled tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "subway",
"object_types": ["way"],
"description": "Subways are represented by a thick dark gray line with no tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "monorail",
"object_types": ["way"],
"description": "Monorails are represented by a thin dark gray line with no tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "light_rail",
"object_types": ["way"],
"description": "Light rail is represented by a thin dark gray line with a dense tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "tram",
"object_types": ["way"],
"description": "Trams are represented by a thin light gray line with a dense tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "railway",
"value": "funicular",
"object_types": ["way"],
"description": "Funiculars are represented by a thin dark gray line with a very dense tie pattern.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "service",
"value": "crossover",
"object_types": ["way"],
"description": "Displays railroads with normal line width but ties removed.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "service",
"value": "siding",
"object_types": ["way"],
"description": "Displays railroads with a thinner line width but normal tie spacing.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "service",
"value": "spur",
"object_types": ["way"],
"description": "Displays railroads with a thinner line width but normal tie spacing.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
},
{
"key": "service",
"value": "yard",
"object_types": ["way"],
"description": "Displays railroads with a thinner line width but normal tie spacing.",
"doc_url": "https://openmaptiles.org/schema/#transportation"
}
]
}
42 changes: 42 additions & 0 deletions src/americana.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import * as lyrHighwayShield from "./layer/highway_shield.js";
import * as lyrOneway from "./layer/oneway.js";
import * as lyrPark from "./layer/park.js";
import * as lyrPlace from "./layer/place.js";
import * as lyrRail from "./layer/rail.js";
import * as lyrRoad from "./layer/road.js";
import * as lyrTransportationLabel from "./layer/transportation_label.js";
import * as lyrWater from "./layer/water.js";
Expand Down Expand Up @@ -59,6 +60,19 @@ americanaLayers.push(
lyrBackground.pierArea,
lyrBackground.pierLine,

lyrRail.railTunnel.dashes(),
lyrRail.railServiceTunnel.dashes(),

lyrRail.narrowGaugeTunnel.dashes(),
lyrRail.narrowGaugeServiceTunnel.dashes(),

lyrRail.lightRailTramTunnel.dashes(),
lyrRail.lightRailTramServiceTunnel.dashes(),

lyrRail.funicularTunnel.dashes(),

lyrRail.railwayTunnel.fill(),

lyrConstruction.road,

lyrRoad.motorwayLinkTunnel.casing(),
Expand Down Expand Up @@ -222,13 +236,28 @@ americanaLayers.push(
lyrRoad.secondaryToll.surface(),
lyrRoad.primaryToll.surface(),

lyrRail.rail.dashes(),
lyrRail.railService.dashes(),

lyrRail.narrowGauge.dashes(),
lyrRail.narrowGaugeService.dashes(),

lyrRail.lightRailTram.dashes(),
lyrRail.lightRailTramService.dashes(),

lyrRail.funicular.dashes(),

lyrRail.railway.fill(),

lyrOneway.road,
lyrOneway.link
);

americanaLayers.push(lyrBuilding.building);

var bridgeLayers = [
lyrRail.bridgeCasing,

lyrRoad.tertiaryLinkBridge.casing(),
lyrRoad.secondaryLinkBridge.casing(),
lyrRoad.primaryLinkBridge.casing(),
Expand Down Expand Up @@ -310,6 +339,19 @@ var bridgeLayers = [
lyrRoad.secondaryTollBridge.surface(),
lyrRoad.primaryTollBridge.surface(),

lyrRail.railBridge.dashes(),
lyrRail.railServiceBridge.dashes(),

lyrRail.narrowGaugeBridge.dashes(),
lyrRail.narrowGaugeServiceBridge.dashes(),

lyrRail.lightRailTramBridge.dashes(),
lyrRail.lightRailTramServiceBridge.dashes(),

lyrRail.funicularBridge.dashes(),

lyrRail.railwayBridge.fill(),

lyrOneway.bridge,
lyrOneway.bridgeLink,
];
Expand Down
10 changes: 10 additions & 0 deletions src/constants/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ export const shields = {
yellow: "#ffcd00", // Pantone 116
yellow_green: "#c4d600", // Pantone 382
};

export const railwayTunnelFill = "hsl(0, 0%, 90%)";

export const railFill = "hsl(0, 0%, 60%)";
export const narrowGaugeFill = "hsl(0, 0%, 60%)";
export const subwayFill = "hsl(0, 0%, 50%)";
export const lightRailFill = "hsl(0, 0%, 50%)";
export const tramFill = "hsl(0, 0%, 60%)";
export const monorailFill = "hsl(0, 0%, 50%)";
export const funicularFill = "hsl(0, 0%, 50%)";
Loading