import type { Feature, FeatureCollection, Geometry } from "geojson"; import type { TrafficResponse } from "./responseTrimmer"; export type GeometryProperties = Record; export type GeometryFeature = Feature; export type GeometryCollection = FeatureCollection; interface RawGeometry { type?: unknown; coordinates?: unknown; } /** * Builds one capped, rounded feature from a raw geometry and a join key. * Only `type` and `coordinates` are read from the input. */ export declare function toFeature(raw: RawGeometry | undefined, properties: GeometryProperties): GeometryFeature | null; export declare function featureCollection(features: Array): GeometryCollection; /** The keys whose values are vertex indices into a route line. */ export declare const POINT_INDEX_KEYS: ReadonlySet; /** * Removes every vertex index (route sections, legs, progress, guidance) from a * compact response. They point into the API's original line, which the * simplified geometry no longer matches (ADR 0006). */ export declare function stripPointIndexes(value: T): T; /** The body of a geometry response: compact, without vertex indexes, plus `geometry`. */ export declare function withGeometry(compact: unknown, geometry: GeometryCollection): Record; interface RouteFeatureLike { geometry?: RawGeometry | null; properties?: Record | null; } interface GeoJSONRoutes { features?: RouteFeatureLike[]; } /** Routes (and the route of search along route): one LineString per route. */ export declare function routeFeaturesFromGeoJSON(routes: GeoJSONRoutes | undefined): GeometryFeature[]; /** * One feature per incident, Point or LineString as the API returns it. Pass the * capped result so `incident` matches the compact `incidents` order. */ export declare function incidentFeatures(response: TrafficResponse | undefined): GeometryFeature[]; /** The area search boundary, keyed by its shape: "circle", "polygon" or "boundingBox". */ export declare function boundaryFeature(boundary: { geometry?: RawGeometry; properties?: { geometryType?: unknown; } | null; } | null): GeometryFeature[]; export {}; //# sourceMappingURL=geometryResponse.d.ts.map