import { BoundingBox, CrsCode, GenericEndpointInfo, MimeType } from '../shared/models.js'; import { WfsFeatureTypeBrief, WfsFeatureTypeSummary, WfsVersion } from './model.js'; /** * Represents a WFS endpoint advertising several feature types */ export default class WfsEndpoint { private _capabilitiesUrl; private _capabilitiesPromise; private _info; private _featureTypes; private _version; /** * Creates a new WFS endpoint; wait for the `isReady()` promise before using the endpoint methods. * @param url WFS endpoint url; can contain any query parameters, these will be used to * initialize the endpoint */ constructor(url: string); /** * Resolves when the endpoint is ready to use. Returns the same endpoint object for convenience. * @throws {EndpointError} */ isReady(): Promise; /** * A Promise which resolves to the endpoint information. */ getServiceInfo(): GenericEndpointInfo; /** * Returns an array of feature types */ getFeatureTypes(): WfsFeatureTypeBrief[]; private _getFeatureTypeByName; /** * Returns the feature type in summary format. If a namespace is specified in the name, * this will be used for matching; otherwise, matching will be done without taking namespaces into account. * @param name Feature type name property (unique in the WFS service) * @return return null if layer was not found or endpoint is not ready */ getFeatureTypeSummary(name: string): WfsFeatureTypeSummary; /** * Returns the complete feature type. If a namespace is specified in the name, * this will be used for matching; otherwise, matching will be done without taking namespaces into account. * @param name Feature type name property (unique in the WFS service) * @return {Promise|null} return null if layer was not found or endpoint is not ready */ getFeatureTypeFull(name: string): Promise; /** * If only one single feature type is available, return its name; otherwise, returns null; */ getSingleFeatureTypeName(): string | null; /** * Returns a promise that will resolve with details on each of the feature type properties; * for now, this consists of a list of unique values in the whole dataset. * @param name Feature type name property (unique in the WFS service) * @return return null if layer was not found or endpoint is not ready */ getFeatureTypePropDetails(name: string): Promise; /** * Returns the highest protocol version that this WFS endpoint supports. * Note that if the url used for initialization does specify a version (e.g. 1.0.0), * this version will most likely be used instead of the highest supported one. */ getVersion(): WfsVersion; private _getJsonCompatibleOutputFormat; /** * Returns true if the given feature type can be downloaded as GeoJSON */ supportsJson(featureType: string): boolean; /** * Returns true if the WFS service supports the startIndex parameter. */ supportsStartIndex(): boolean; /** * Returns a URL that can be used to query features from this feature type. * @param featureType * @param {Object} [options] * @property [options.maxFeatures] no limit if undefined * @property [options.asJson] if true, will ask for GeoJSON; will throw if the service does not support it * @property [options.outputFormat] a supported output format (overridden by `asJson`) * @property [options.outputCrs] if unspecified, this will be the data native projection * @property [options.extent] an extent to restrict returned objects * @property [options.extentCrs] if unspecified, `extent` should be in the data native projection * @property [options.startIndex] if the service supports it, this will be the index of the first feature to return * @returns Returns null if endpoint is not ready */ getFeatureUrl(featureType: string, options: { maxFeatures?: number; asJson?: boolean; outputFormat?: MimeType; outputCrs?: CrsCode; extent?: BoundingBox; extentCrs?: CrsCode; startIndex?: number; }): string; } //# sourceMappingURL=endpoint.d.ts.map