mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Draw transit vehicles as trolleybuses, cable cars, funiculars, gondolas and monorails
The transit layer knew five modes, so a trolleybus drew as a bus, a funicular as a train and a coach as a city bus. The GTFS basic route types are now modes of their own (trolleybus, cable_tram, monorail, funicular, aerial_lift), each with an icon, colour, detection tier, card word, voice name, speed ceiling and fleet model. A vehicle record may carry its route's GTFS route_type as routeType. It settles the mode after the feed's fleet hint and before its route hint, and picks the finer model (a coach for 200, a high-speed set for 101) when the type is a kind of the vehicle's mode. Retained history classifies epochs through transitModeFor too, so trails join the live vehicle. Route hints from each operator's routes.txt: Prague's trolleybus lines (51-59, 232, 275) and Petrin funicular, and the trams, trolleybuses and metro lines of Bucharest, Cluj-Napoca and Turin. A feed may also name route corrections that outrank the route type: Le Havre's routes.txt types its funicular (8-FUNI) as a bus, so it is corrected to a funicular.
This commit is contained in:
1 parent
250f0e20c3
commit
39c89d563b
32 files changed
+708
-61
No files matched your search
@@ -62,7 +62,7 @@ test('the raster cache is bounded by kind, size and halo — never by call count
|
||||
assert.ok(transitIconCacheSize() <= before + 3 + TRANSIT_ICON_KINDS.length);
|
||||
});
|
||||
|
||||
test('all 72 variants retain the specified final halo at both display sizes', async () => {
|
||||
test('every variant retains the specified final halo at both display sizes', async () => {
|
||||
const { presetSpriteScale, presetSpriteOutlinePx } =
|
||||
await import('./transitPresetStyle.js');
|
||||
for (const kind of TRANSIT_ICON_KINDS) {
|
||||
@@ -97,7 +97,8 @@ test('all 72 variants retain the specified final halo at both display sizes', as
|
||||
}
|
||||
for (let i = 0; i < 100; i++)
|
||||
transitIcon('invalid', i, { haloScreenPx: i, screenPx: i });
|
||||
assert.equal(transitIconCacheSize(), 72);
|
||||
// Every kind at two sizes, three profiles, with and without a course.
|
||||
assert.equal(transitIconCacheSize(), TRANSIT_ICON_KINDS.length * 12);
|
||||
});
|
||||
|
||||
test('every mono raster preserves the normal silhouette mask and aspect at CRT display size', async () => {
|
||||
@@ -197,6 +198,11 @@ test('sensor raster halo stays dark across its screen-space band on a white roof
|
||||
subway: 11.5,
|
||||
rail: 10.5,
|
||||
ferry: 12.5,
|
||||
trolleybus: 15,
|
||||
cable_tram: 11,
|
||||
monorail: 8.5,
|
||||
funicular: 11,
|
||||
aerial_lift: 12,
|
||||
unknown: 10,
|
||||
};
|
||||
for (const selected of [false, true]) {
|
||||
|
||||
Reference in new issue
Block a user