s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
100 lines • 4.65 kB
TypeScript
import { GBFSFreeBikeStatusV2, GBFSGeofencingZonesV2, GBFSGeofencingZonesV2Properties, GBFSStationInformationV2, GBFSStationStatusV2, GBFSSystemAlertsV2, GBFSSystemCalendarV2, GBFSSystemHoursV2, GBFSSystemInformationV2, GBFSSystemPricingPlansV2, GBFSSystemRegionsV2, GBFSV2, GBFSVehicleTypesV2, GBFSVersionsV2 } from '.';
import type { Feature, FeatureIterator, MultiPolygonGeometry, PointGeometry, Properties } from '../../..';
export * from './freeBikeStatus';
export * from './gbfs';
export * from './gbfsVersions';
export * from './geofencingZones';
export * from './stationInformation';
export * from './stationStatus';
export * from './systemAlerts';
export * from './systemCalendar';
export * from './systemHours';
export * from './systemInformation';
export * from './systemPricingPlans';
export * from './systemRegions';
export * from './vehicleTypes';
/** Geofencing Feature */
export type GBFSGeofencingFeatureV2 = Feature<undefined, Properties, GBFSGeofencingZonesV2Properties, MultiPolygonGeometry<Properties>>;
/** Station Information feature properties */
export interface GBFSStationV2FeaturesV2Properties extends Properties {
station_id: string;
name: string;
short_name?: string;
address?: string;
cross_street?: string;
region_id?: string;
post_code?: string;
rental_methods?: Array<'key' | 'creditcard' | 'paypass' | 'applepay' | 'androidpay' | 'transitcard' | 'accountnumber' | 'phone' | '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 GBFSStationPointFeatureV2 = Feature<undefined, Properties, GBFSStationV2FeaturesV2Properties, PointGeometry<Properties>>;
/** Station Information Area Feature */
export type GBFSStationAreaFeatureV2 = Feature<undefined, Properties, GBFSStationV2FeaturesV2Properties, MultiPolygonGeometry>;
/** All potential feature types in a GBFS V2 specification */
export type GBFSFeaturesV2 = GBFSGeofencingFeatureV2 | GBFSStationPointFeatureV2 | GBFSStationAreaFeatureV2;
/** All potential feature property types in a GBFS V2 specification */
export type GBFSFeaturePropertiesV2 = GBFSGeofencingZonesV2Properties | GBFSStationV2FeaturesV2Properties;
/**
* GBFS Version 1 Reader
*/
export declare class GBFSReaderV2 implements FeatureIterator<undefined, Properties, GBFSFeaturePropertiesV2> {
version: number;
freeBikeStatus?: GBFSFreeBikeStatusV2;
gbfs: GBFSV2;
gbfsVersions?: GBFSVersionsV2;
geofencingZones?: GBFSGeofencingZonesV2;
stationInformation?: GBFSStationInformationV2;
stationStatus?: GBFSStationStatusV2;
systemAlerts?: GBFSSystemAlertsV2;
systemCalendar?: GBFSSystemCalendarV2;
systemHours?: GBFSSystemHoursV2;
systemInformation: GBFSSystemInformationV2;
systemPricingPlans?: GBFSSystemPricingPlansV2;
systemRegions?: GBFSSystemRegionsV2;
vehicleTypes?: GBFSVehicleTypesV2;
/**
* @param gbfs - the GBFS schema
* @param feeds - the feeds for the GBFS
*/
constructor(gbfs: GBFSV2, feeds?: FeedResV2);
/**
* Yields all of the shapes
* @yields an iterator that contains shapes, stops, location data, and routes
*/
[Symbol.asyncIterator](): AsyncGenerator<GBFSFeaturesV2>;
}
/** Parsing all the available feeds */
export interface FeedResV2 {
gbfs_versions?: GBFSVersionsV2;
system_information?: GBFSSystemInformationV2;
vehicle_types?: GBFSVehicleTypesV2;
station_information?: GBFSStationInformationV2;
station_status?: GBFSStationStatusV2;
free_bike_status?: GBFSFreeBikeStatusV2;
system_hours?: GBFSSystemHoursV2;
system_alerts?: GBFSSystemAlertsV2;
system_calendar?: GBFSSystemCalendarV2;
system_regions?: GBFSSystemRegionsV2;
system_pricing_plans?: GBFSSystemPricingPlansV2;
geofencing_zones?: GBFSGeofencingZonesV2;
}
/**
* @param gbfs - the GBFS schema to parse
* @param locale - the locale to use if provided, otherwise default to en
* @param path - if provided, will use this path instead of the url (for testing)
* @returns - the GBFS reader
*/
export declare function buildGBFSReaderV2(gbfs: GBFSV2, locale?: string, path?: string): Promise<GBFSReaderV2>;
//# sourceMappingURL=index.d.ts.map