s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
604 lines • 26.5 kB
TypeScript
import type { FeatureCollection, MValue, Properties, ValueArrayObject } from '../../..';
/**
* # GBFS Geofencing Zones Schema V3.1-RC & V3.0
* Describes geofencing zones and their associated rules and attributes (added in v2.1-RC).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v3.1-RC/gbfs.md#geofencing_zonesjson)
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v3.0/gbfs.md#geofencing_zonesjson)
*/
export type GBFSGeofencingZonesV3 = GBFSGeofencingZonesV31RC | GBFSGeofencingZonesV30;
/**
* # GBFS Geofencing Zones Schema V3.1-RC
* Describes geofencing zones and their associated rules and attributes (added in v2.1-RC).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v3.1-RC/gbfs.md#geofencing_zonesjson)
*/
export declare const gbfsGeofencingZonesSchemaV31RC: {
$schema: string;
$id: string;
description: string;
type: string;
properties: {
last_updated: {
description: string;
type: string;
format: string;
};
ttl: {
description: string;
type: string;
minimum: number;
};
version: {
description: string;
type: string;
const: string;
};
data: {
description: string;
type: string;
properties: {
geofencing_zones: {
type: string;
description: string;
properties: {
type: {
description: string;
type: string;
enum: string[];
};
features: {
description: string;
type: string;
items: {
title: string;
type: string;
properties: {
type: {
type: string;
enum: string[];
};
properties: {
description: string;
type: string;
properties: {
name: {
description: string;
type: string;
items: {
type: string;
properties: {
text: {
description: string;
type: string;
};
language: {
description: string;
type: string;
pattern: string;
};
};
required: string[];
};
};
start: {
description: string;
type: string;
format: string;
};
end: {
description: string;
type: string;
format: string;
};
rules: {
description: string;
type: string;
items: {
type: string;
properties: {
vehicle_type_ids: {
type: string;
description: string;
items: {
type: string;
};
};
ride_start_allowed: {
description: string;
type: string;
};
ride_end_allowed: {
description: string;
type: string;
};
ride_through_allowed: {
description: string;
type: string;
};
maximum_speed_kph: {
description: string;
type: string;
minimum: number;
};
station_parking: {
description: string;
type: string;
};
};
required: string[];
};
};
};
};
geometry: {
description: string;
title: string;
type: string;
properties: {
type: {
type: string;
enum: string[];
};
coordinates: {
type: string;
items: {
type: string;
items: {
type: string;
minItems: number;
items: {
type: string;
minItems: number;
items: {
type: string;
};
};
};
};
};
};
required: string[];
};
};
required: string[];
};
};
};
required: string[];
};
global_rules: {
description: string;
type: string;
items: {
type: string;
properties: {
vehicle_type_ids: {
type: string;
description: string;
items: {
type: string;
};
};
ride_start_allowed: {
description: string;
type: string;
};
ride_end_allowed: {
description: string;
type: string;
};
ride_through_allowed: {
description: string;
type: string;
};
maximum_speed_kph: {
description: string;
type: string;
minimum: number;
};
station_parking: {
description: string;
type: string;
};
};
required: string[];
};
};
};
required: string[];
};
};
required: string[];
};
/**
* GBFS V3: Public name of the geofencing zone.
*/
export interface GBFSGeofencingZonesV3PropertiesName extends ValueArrayObject {
/**
* The translated text.
*/
text: string;
/**
* IETF BCP 47 language code.
* **pattern** ^[a-z]{2,3}(-[A-Z]{2})?$
*/
language: string;
}
/**
* GBFS V3: Restrictions that apply within the area of the polygon.
*/
export interface GBFSGeofencingZonesV3PropertiesRule extends ValueArrayObject {
/**
* Array of vehicle type IDs for which these restrictions apply.
*/
vehicle_type_ids?: string[];
/**
* Is the ride allowed to start in this zone?
*/
ride_start_allowed: boolean;
/**
* Is the ride allowed to end in this zone?
*/
ride_end_allowed: boolean;
/**
* Is the ride allowed to travel through this zone?
*/
ride_through_allowed: boolean;
/**
* Maximum speed allowed, in kilometers per hour.
* **minimum** 0
*/
maximum_speed_kph?: number;
/**
* Vehicle MUST be parked at stations defined in station_information.json within this zone.
*/
station_parking?: boolean;
}
/** Properties of a geofencing zone */
export interface GBFSGeofencingZonesV3Properties extends Properties {
/** Public name of the geofencing zone. */
name: GBFSGeofencingZonesV3PropertiesName[];
/**
* Start time of the geofencing zone in RFC3339 format.
* **format** date-time
*/
start?: string;
/**
* End time of the geofencing zone in RFC3339 format.
* **format** date-time
*/
end?: string;
/** Array of rules defining restrictions within the geofence. */
rules?: GBFSGeofencingZonesV3PropertiesRule[];
}
/**
* # GBFS Geofencing Zones Schema V3.1-RC
* Describes geofencing zones and their associated rules and attributes (added in v2.1-RC).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v3.1-RC/gbfs.md#geofencing_zonesjson)
*/
export interface GBFSGeofencingZonesV31RC {
/**
* Last time the data in the feed was updated in RFC3339 format.
* **format** date-time
*/
last_updated: string;
/**
* Number of seconds before the data in the feed will be updated again
* (0 if the data should always be refreshed).
* **minimum** 0
*/
ttl: number;
/**
* GBFS version number to which the feed conforms, according to the versioning framework.
*/
version: '3.1-RC';
/**
* Array that contains geofencing information for the system.
*/
data: {
/**
* Geofencing zones and their associated rules and attributes.
*/
geofencing_zones: FeatureCollection<undefined, MValue, GBFSGeofencingZonesV3Properties>;
/**
* Global rules defining restrictions that apply globally in all areas.
*/
global_rules: Array<{
/**
* Array of vehicle type IDs for which these restrictions apply.
*/
vehicle_type_ids?: string[];
/**
* Is the ride allowed to start in this zone?
*/
ride_start_allowed: boolean;
/**
* Is the ride allowed to end in this zone?
*/
ride_end_allowed: boolean;
/**
* Is the ride allowed to travel through this zone?
*/
ride_through_allowed: boolean;
/**
* Maximum speed allowed, in kilometers per hour.
* **minimum** 0
*/
maximum_speed_kph?: number;
/**
* Vehicle MUST be parked at stations defined in station_information.json within this geofence zone.
*/
station_parking?: boolean;
}>;
};
}
/**
* # GBFS Geofencing Zones Schema V3.0
* Describes geofencing zones and their associated rules and attributes (added in v2.1-RC).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v3.0/gbfs.md#geofencing_zonesjson)
*/
export declare const gbfsGeofencingZonesSchemaV30: {
$schema: string;
$id: string;
description: string;
type: string;
properties: {
last_updated: {
description: string;
type: string;
format: string;
};
ttl: {
description: string;
type: string;
minimum: number;
};
version: {
description: string;
type: string;
const: string;
};
data: {
description: string;
type: string;
properties: {
geofencing_zones: {
type: string;
description: string;
properties: {
type: {
description: string;
type: string;
enum: string[];
};
features: {
description: string;
type: string;
items: {
title: string;
type: string;
properties: {
type: {
type: string;
enum: string[];
};
properties: {
description: string;
type: string;
properties: {
name: {
description: string;
type: string;
items: {
type: string;
properties: {
text: {
description: string;
type: string;
};
language: {
description: string;
type: string;
pattern: string;
};
};
required: string[];
};
};
start: {
description: string;
type: string;
format: string;
};
end: {
description: string;
type: string;
format: string;
};
rules: {
description: string;
type: string;
items: {
type: string;
properties: {
vehicle_type_ids: {
type: string;
description: string;
items: {
type: string;
};
};
ride_start_allowed: {
description: string;
type: string;
};
ride_end_allowed: {
description: string;
type: string;
};
ride_through_allowed: {
description: string;
type: string;
};
maximum_speed_kph: {
description: string;
type: string;
minimum: number;
};
station_parking: {
description: string;
type: string;
};
};
required: string[];
};
};
};
};
geometry: {
description: string;
title: string;
type: string;
properties: {
type: {
type: string;
enum: string[];
};
coordinates: {
type: string;
items: {
type: string;
items: {
type: string;
minItems: number;
items: {
type: string;
minItems: number;
items: {
type: string;
};
};
};
};
};
};
required: string[];
};
};
required: string[];
};
};
};
required: string[];
};
global_rules: {
description: string;
type: string;
items: {
type: string;
properties: {
vehicle_type_ids: {
type: string;
description: string;
items: {
type: string;
};
};
ride_start_allowed: {
description: string;
type: string;
};
ride_end_allowed: {
description: string;
type: string;
};
ride_through_allowed: {
description: string;
type: string;
};
maximum_speed_kph: {
description: string;
type: string;
minimum: number;
};
station_parking: {
description: string;
type: string;
};
};
required: string[];
};
};
};
required: string[];
};
};
required: string[];
};
/**
* # GBFS Geofencing Zones Schema V3.0
* Describes geofencing zones and their associated rules and attributes (added in v2.1-RC).
*
* ## Links
* - [GBFS Specification](https://github.com/MobilityData/gbfs/blob/v3.0/gbfs.md#geofencing_zonesjson)
*/
export interface GBFSGeofencingZonesV30 {
/**
* Last time the data in the feed was updated in RFC3339 format.
* **Format**: date-time
*/
last_updated: string;
/**
* Number of seconds before the data in the feed will be updated again (0 if the data should always be refreshed).
* **Minimum**: 0
*/
ttl: number;
/**
* GBFS version number to which the feed conforms, according to the versioning framework.
* **Const**: '3.0'
*/
version: '3.0';
/**
* Array that contains geofencing information for the system.
*/
data: {
geofencing_zones: FeatureCollection<undefined, MValue, GBFSGeofencingZonesV3Properties>;
/**
* Array of global rules defining restrictions that apply by default.
*/
global_rules: Array<{
/**
* Array of vehicle type IDs for which these restrictions apply.
*/
vehicle_type_ids?: string[];
/**
* Is the ride allowed to start in this zone?
*/
ride_start_allowed: boolean;
/**
* Is the ride allowed to end in this zone?
*/
ride_end_allowed: boolean;
/**
* Is the ride allowed to travel through this zone?
*/
ride_through_allowed: boolean;
/**
* Maximum speed allowed in kilometers per hour.
*/
maximum_speed_kph?: number;
/**
* Must vehicles be parked at stations within this geofence zone?
*/
station_parking?: boolean;
}>;
};
}
//# sourceMappingURL=geofencingZones.d.ts.map