s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
91 lines • 2.56 kB
TypeScript
/**
* Indicates an organization’s role in producing the dataset:
* 0 or empty = No role
* 1 = Has the role
*
* At least one of is_producer, is_operator, or is_authority should be 1 in each record.
*/
export declare enum GTFSAttributionRole {
None = 0,
Yes = 1
}
/**
* # Attributions
*
* **Optional**
* Defines the attributions applied to the dataset or parts of it.
* If `agency_id`, `route_id`, or `trip_id` is specified, the attribution
* applies only to that entity. If none are specified, the attribution
* applies to the entire dataset.
*
* **Primary Key**: (attribution_id) - optional
*/
export declare class GTFSAttribution {
/**
* **Optional**
* Unique ID that identifies this attribution record.
* Useful if multiple attributions exist or for referencing translations.
*/
id?: string;
/**
* **Optional**
* Agency to which this attribution applies (`agency.agency_id`).
* Must be empty if route_id or trip_id are specified.
*/
agencyId?: string;
/**
* **Optional**
* Route to which this attribution applies (`routes.route_id`).
* Must be empty if agency_id or trip_id are specified.
*/
routeId?: string;
/**
* **Optional**
* Trip to which this attribution applies (`trips.trip_id`).
* Must be empty if agency_id or route_id are specified.
*/
tripId?: string;
/**
* **Required**
* Organization name to which the dataset is attributed.
*/
organizationName: string;
/**
* **Optional**
* 0 or empty = Not a producer, 1 = Is a producer
*/
isProducer?: GTFSAttributionRole;
/**
* **Optional**
* 0 or empty = Not an operator, 1 = Is an operator
*/
isOperator?: GTFSAttributionRole;
/**
* **Optional**
* 0 or empty = Not an authority, 1 = Is an authority
*/
isAuthority?: GTFSAttributionRole;
/**
* **Optional**
* URL of the organization.
*/
attributionUrl?: string;
/**
* **Optional**
* Email of the organization.
*/
attributionEmail?: string;
/**
* **Optional**
* Phone number of the organization.
*/
attributionPhone?: string;
/** @param data - the parsed GTFS CSV data */
constructor(data: Record<string, string>);
}
/**
* @param input - the input string to parse from
* @returns - an array of Attributions
*/
export declare function parseGTFSAttributions(input: string): Record<string, GTFSAttribution>;
//# sourceMappingURL=attributions.d.ts.map