UNPKG

s2-tools

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

129 lines 3.6 kB
import type { Properties } from '../../..'; /** * Properties object from GTFS stops */ export interface GTFSStopProperties extends Properties { id: string; code: string; name: string; ttsName: string; desc: string; zoneId: string; url: string; locationType: number; parentStation: string; timezone: string; wheelchairBoarding: number; levelId: string; platformCode: string; } /** * # Stop Information * * ## Details * **Conditionally Required** - Stops where vehicles pick up or drop off riders. * Also defines stations, entrances, etc. */ export declare class GTFSStop { /** * **Required** * Identifies a location: stop/platform, station, entrance/exit, generic node, or boarding area. * Must be unique across: * - stops.stop_id * - locations.geojson id * - location_groups.location_group_id * Multiple routes may use the same `stop_id`. */ id: string; /** * **Optional** * Short text or a number that identifies the location for riders. */ code?: string; /** * **Conditionally Required** * Name of the location. Required if `location_type` is 0, 1, or 2. Optional otherwise. */ name?: string; /** * **Optional** * Readable version of the stop_name for text-to-speech systems. */ ttsName?: string; /** * **Optional** * Description providing useful information about the location. * Should not be a duplicate of `name`. */ desc?: string; /** * **Conditionally Required** * Latitude of the location. Required if `location_type` is 0, 1, or 2. Optional otherwise. */ lat?: number; /** * **Conditionally Required** * Longitude of the location. Required if `location_type` is 0, 1, or 2. Optional otherwise. */ lon?: number; /** * **Optional** * Identifies the fare zone for a stop. */ zoneId?: string; /** * **Optional** * URL of a web page about this location. */ url?: string; /** * **Optional** * Location type. Valid options: * 0 or empty = Stop/Platform, * 1 = Station, * 2 = Entrance/Exit, * 3 = Generic Node, * 4 = Boarding Area. */ locationType?: number; /** * **Conditionally Required** * Defines hierarchy between different locations. Required if `location_type` is 2, 3, or 4. */ parentStation?: string; /** * **Optional** * Timezone of the location. Inherits from parent station if not specified. */ timezone?: string; /** * **Optional** * Indicates whether wheelchair boardings are possible at this location. * For parentless stops: 0 = no info, 1 = possible, 2 = not possible. * For child stops, entrance/exits: inherits or overrides parent station accessibility. */ wheelchairBoarding?: number; /** * **Optional** * Level of the location. References levels.level_id. */ levelId?: string; /** * **Optional** * Platform identifier for a platform stop. */ platformCode?: string; /** @param data - the parsed GTFS CSV data */ constructor(data: Record<string, string>); /** * Returns the properties of this stop * @returns - the properties of this stop */ properties(): GTFSStopProperties; } /** * @param input - the input string to parse from * @returns - an array of Stops */ export declare function parseGTFSStops(input: string): Record<string, GTFSStop>; //# sourceMappingURL=stops.d.ts.map