s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
115 lines • 5.05 kB
TypeScript
import { GBFSGeofencingZonesV3, GBFSGeofencingZonesV3Properties, GBFSManifestV3, GBFSStationInformationV3, GBFSStationStatusV3, GBFSSystemAlertsV3, GBFSSystemInformationV3, GBFSSystemPricingPlansV3, GBFSSystemRegionsV3, GBFSV3, GBFSVehicleStatusV3, GBFSVehicleTypesV3, GBFSVehicleV3, GBFSVersionsV3 } from '.';
import type { Feature, FeatureIterator, MultiPolygonGeometry, PointGeometry, Properties } from '../../..';
export * from './gbfs';
export * from './gbfsVersions';
export * from './geofencingZones';
export * from './manifest';
export * from './stationInformation';
export * from './stationStatus';
export * from './systemAlerts';
export * from './systemInformation';
export * from './systemPricingPlans';
export * from './systemRegions';
export * from './vehicleStatus';
export * from './vehicleTypes';
/** Geofencing Feature */
export type GBFSGeofencingFeatureV3 = Feature<undefined, Properties, GBFSGeofencingZonesV3Properties, MultiPolygonGeometry<Properties>>;
/** Station Information feature properties */
export interface GBFSStationV3FeaturesV3Properties extends Properties {
station_id: string;
name: Array<{
text: string;
language: string;
}>;
short_name?: Array<{
text: string;
language: string;
}>;
address?: string;
cross_street?: string;
region_id?: string;
post_code?: string;
station_opening_hours?: string;
rental_methods?: Array<'key' | 'creditcard' | 'paypass' | 'applepay' | 'androidpay' | 'transitcard' | 'accountnumber' | 'phone'>;
is_virtual_station?: boolean;
parking_type?: 'parking_lot' | 'street_parking' | 'underground_parking' | 'sidewalk_parking' | 'other';
parking_hoop?: boolean;
contact_phone?: string;
capacity?: number;
is_valet_station?: boolean;
is_charging_station?: boolean;
rental_uris?: {
android?: string;
ios?: string;
web?: string;
};
}
/** Station Information Point Feature */
export type GBFSStationPointFeatureV3 = Feature<undefined, Properties, GBFSStationV3FeaturesV3Properties, PointGeometry<Properties>>;
/** Station Information Area Feature */
export type GBFSStationAreaFeatureV3 = Feature<undefined, Properties, GBFSStationV3FeaturesV3Properties, MultiPolygonGeometry>;
/** Vehicle Point Feature */
export type GBFSVehiclePointFeatureV3 = Feature<undefined, Properties, GBFSVehicleV3, PointGeometry>;
/** Metadata Database Properties */
export interface GBFSDatasetAreaPropertiesV3 extends Properties {
system_id: string;
versions?: {
version: '1.0' | '1.1' | '2.0' | '2.1' | '2.2' | '2.3' | '3.0' | '3.1-RC';
url: string;
}[];
country_code?: string;
}
/** Metadata Database Feature */
export type GBFSDatasetAreaFeatureV3 = Feature<undefined, Properties, GBFSDatasetAreaPropertiesV3, MultiPolygonGeometry>;
/** All potential feature types in a GBFS V3 specification */
export type GBFSFeaturesV3 = GBFSGeofencingFeatureV3 | GBFSStationPointFeatureV3 | GBFSVehiclePointFeatureV3 | GBFSDatasetAreaFeatureV3;
/** All potential feature property types in a GBFS V3 specification */
export type GBFSFeaturePropertiesV3 = GBFSGeofencingZonesV3Properties | GBFSStationV3FeaturesV3Properties | GBFSVehicleV3 | GBFSDatasetAreaPropertiesV3;
/**
* GBFS Version 3 Reader
*/
export declare class GBFSReaderV3 implements FeatureIterator<undefined, Properties, GBFSFeaturePropertiesV3> {
version: number;
gbfs: GBFSV3;
gbfsVersions?: GBFSVersionsV3;
systemInformation: GBFSSystemInformationV3;
stationInformation?: GBFSStationInformationV3;
stationStatus?: GBFSStationStatusV3;
vehicleStatus?: GBFSVehicleStatusV3;
systemAlerts?: GBFSSystemAlertsV3;
systemRegions?: GBFSSystemRegionsV3;
systemPricingPlans?: GBFSSystemPricingPlansV3;
geofencingZones?: GBFSGeofencingZonesV3;
manifest?: GBFSManifestV3;
/**
* @param gbfs - the GBFS schema
* @param feeds - the feeds for the GBFS
*/
constructor(gbfs: GBFSV3, feeds?: FeedResV3);
/**
* Yields all of the shapes
* @yields an iterator that contains shapes, stops, location data, and routes
*/
[Symbol.asyncIterator](): AsyncGenerator<GBFSFeaturesV3>;
}
/** Parsing all the available feeds */
export interface FeedResV3 {
gbfs_versions?: GBFSVersionsV3;
system_information?: GBFSSystemInformationV3;
vehicle_types?: GBFSVehicleTypesV3;
station_information?: GBFSStationInformationV3;
station_status?: GBFSStationStatusV3;
vehicle_status?: GBFSVehicleStatusV3;
system_alerts?: GBFSSystemAlertsV3;
system_regions?: GBFSSystemRegionsV3;
system_pricing_plans?: GBFSSystemPricingPlansV3;
geofencing_zones?: GBFSGeofencingZonesV3;
manifest?: GBFSManifestV3;
}
/**
* @param gbfs - the GBFS schema to parse
* @param path - if provided, will use this path instead of the url (for testing)
* @returns - the GBFS reader
*/
export declare function buildGBFSReaderV3(gbfs: GBFSV3, path?: string): Promise<GBFSReaderV3>;
//# sourceMappingURL=index.d.ts.map