import { ConformanceClass, OgcApiCollectionInfo, OgcApiCollectionItem, OgcApiEndpointInfo, OgcStyleBrief, OgcStyleFull } from './model.js'; import { BoundingBox, CrsCode, MimeType } from '../shared/models.js'; /** * Represents an OGC API endpoint advertising various collections and services. */ export default class OgcApiEndpoint { private baseUrl; private root_; private conformance_; private data_; private tileMatrixSetsFull_; private styles_; private get root(); private get conformance(); private get collectionsUrl(); private get data(); private get tileMatrixSetsFull(); private get styles(); /** * Creates a new OGC API endpoint. * @param baseUrl Base URL used to query the endpoint. Note that this can point to nested * documents inside the endpoint, such as `/collections`, `/collections/items` etc. */ constructor(baseUrl: string); /** * A Promise which resolves to the endpoint information. */ get info(): Promise; /** * A Promise which resolves to an array of conformance classes. */ get conformanceClasses(): Promise; /** * A Promise which resolves to an array of all collection identifiers as strings. */ get allCollections(): Promise<{ name: string; hasRecords?: boolean; hasFeatures?: boolean; hasVectorTiles?: boolean; hasMapTiles?: boolean; }[]>; /** * A Promise which resolves to an array of records collection identifiers as strings. */ get recordCollections(): Promise; /** * A Promise which resolves to an array of feature collection identifiers as strings. */ get featureCollections(): Promise; /** * A Promise which resolves to an array of vector tile collection identifiers as strings. */ get vectorTileCollections(): Promise; /** * A Promise which resolves to an array of map tile collection identifiers as strings. */ get mapTileCollections(): Promise; /** * A Promise which resolves to a boolean indicating whether the endpoint offer tiles. */ get hasTiles(): Promise; /** * A Promise which resolves to a boolean indicating whether the endpoint offer styles. */ get hasStyles(): Promise; /** * A Promise which resolves to a boolean indicating whether the endpoint offer feature collections. */ get hasFeatures(): Promise; /** * A Promise which resolves to a boolean indicating whether the endpoint offer record collections. */ get hasRecords(): Promise; /** * Retrieve the tile matrix sets identifiers advertised by the endpoint. Empty if tiles are not supported */ get tileMatrixSets(): Promise; private getCollectionDocument; private getStyleMetadataDocument; /** * Returns a promise resolving to a document describing the specified collection. * @param collectionId */ getCollectionInfo(collectionId: string): Promise; /** * Returns a promise resolving to an array of items from a collection with the given query parameters. * @param collectionId * @param limit * @param offset * @param skipGeometry * @param sortby * @param bbox * @param properties */ getCollectionItems(collectionId: string, limit?: number, offset?: number, skipGeometry?: boolean, sortby?: string[], bbox?: [number, number, number, number], properties?: string[]): Promise; /** * Returns a promise resolving to a specific item from a collection. * @param collectionId * @param itemId */ getCollectionItem(collectionId: string, itemId: string): Promise; /** * Asynchronously retrieves a URL for the items of a specified collection, with optional query parameters. * @param collectionId - The unique identifier for the collection. * @param options - An object containing optional parameters: * - query: Additional query parameters to be included in the URL. * - asJson: Will query items as GeoJson or JSON-FG if available; takes precedence on `outputFormat`. * - outputFormat: The MIME type for the output format. * - limit: The maximum number of features to include. * - extent: Bounding box to limit the features. * - offset: Pagination offset for the returned results. * - outputCrs: Coordinate Reference System code for the output. * - extentCrs: Coordinate Reference System code for the bounding box. * @returns A promise that resolves to the URL as a string or rejects if an error occurs. */ getCollectionItemsUrl(collectionId: string, options?: { query?: string; asJson?: boolean; outputFormat?: MimeType; limit?: number; offset?: number; outputCrs?: CrsCode; extent?: BoundingBox; extentCrs?: CrsCode; }): Promise; /** * Asynchronously retrieves a URL to render a specified collection as vector tiles, with a given tile matrix set. * @param collectionId - The unique identifier for the collection. * @param tileMatrixSet - The identifier of the tile matrix set to use. Default is 'WebMercatorQuad'. */ getVectorTilesetUrl(collectionId: string, tileMatrixSet?: string): Promise; /** * Asynchronously retrieves a URL to render a specified collection as map tiles, with a given tile matrix set. * @param collectionId - The unique identifier for the collection. * @param tileMatrixSet - The identifier of the tile matrix set to use. Default is 'WebMercatorQuad'. */ getMapTilesetUrl(collectionId: string, tileMatrixSet?: string): Promise; /** * A Promise which resolves to an array of all style items. This includes the supported style formats. * @param collectionId - Optional unique identifier for the collection. */ allStyles(collectionId?: string): Promise; /** * Returns a promise resolving to a document describing the style. Looks for a relation of type * "describedby" to fetch metadata. If no relation is found, only basic info will be returned. * @param styleId - The style identifier * @param collectionId - Optional unique identifier for the collection. */ getStyle(styleId: string, collectionId?: string): Promise; /** * Returns a promise resolving to a stylesheet URL for a given style and type. * @param styleId - The style identifier * @param mimeType - Stylesheet MIME type * @param collectionId - Optional unique identifier for the collection. */ getStylesheetUrl(styleId: string, mimeType: string, collectionId?: string): Promise; } //# sourceMappingURL=endpoint.d.ts.map