import * as rxjs from 'rxjs'; import { Subject, BehaviorSubject, Observable } from 'rxjs'; import { Layer, Vector } from 'ol/layer'; import { Source, Vector as Vector$1 } from 'ol/source'; import * as hslayers_ng_types from 'hslayers-ng/types'; import { DatasetType, AddDataUrlType, UrlDataObject, OwsType, FileDataObject, FileFormData, VectorDataObject, OverwriteResponse, HsLaymanLayerDescriptor, HsUrlTypeServiceModel, CapabilitiesResponseWrapper, LayerOptions, ArcGISRestResponseLayer, Service, AddLayersRecursivelyOptions, HsWmsLayer, LayerConnection, OwsConnection, HsEndpoint, HsLaymanGetLayer, HsAddDataLaymanLayerDescriptor, HsMapCompositionDescriptor, HsVectorLayerOptions, HsAddDataMickaLayerDescriptor, HsAddDataLayerDescriptor, WhatToAddDescriptor } from 'hslayers-ng/types'; import { HsCommonEndpointsService } from 'hslayers-ng/services/endpoints'; import { HsCommonLaymanService, PostPatchLayerResponse } from 'hslayers-ng/common/layman'; import { HsConfig } from 'hslayers-ng/config'; import { HsMapService } from 'hslayers-ng/services/map'; import * as i0 from '@angular/core'; import { HsLanguageService } from 'hslayers-ng/services/language'; import { HsLayoutService } from 'hslayers-ng/services/layout'; import { HsLogService } from 'hslayers-ng/services/log'; import { HsDimensionService, HsArcgisGetCapabilitiesService, HsWfsGetCapabilitiesService, HsWmsGetCapabilitiesService, HsWmtsGetCapabilitiesService, HsXyzGetCapabilitiesService, IGetCapabilities } from 'hslayers-ng/services/get-capabilities'; import { HsEventBusService } from 'hslayers-ng/services/event-bus'; import { HsToastService } from 'hslayers-ng/common/toast'; import TileGrid from 'ol/tilegrid/TileGrid'; import { Extent } from 'ol/extent'; import { HsHistoryListService } from 'hslayers-ng/common/history-list'; import { Feature } from 'ol'; import * as ol_geom from 'ol/geom'; import { Geometry } from 'ol/geom'; import { EventsKey } from 'ol/events'; import { Projection } from 'ol/proj'; declare class HsAddDataService { hsMapService: HsMapService; hsConfig: HsConfig; hsCommonEndpointsService: HsCommonEndpointsService; hsCommonLaymanService: HsCommonLaymanService; sidebarLoad: Subject; datasetSelected: BehaviorSubject; datasetTypeSelected: rxjs.Observable; addLayer(layer: Layer, underLayer?: Layer): void; selectType(type: DatasetType): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsAddDataUrlService { hsLog: HsLogService; hsLanguageService: HsLanguageService; hsLayoutService: HsLayoutService; private hsMapService; private hsToastService; typeSelected: AddDataUrlType; addingAllowed: boolean; connectFromParams: boolean; /** * Selects a service layer to be added (WMS | WMTS | ArcGIS Map Server) * @param services - Layer group of a service to select a layer from * @param layerToSelect - Layer to be selected (checked = true) * @param selector - Layer selector. Can be either 'Name' or 'Title'. Differs in between different services */ selectLayerByName(layerToSelect: string, services: any, selector: 'Title' | 'Name'): any; /** * Helper function for selectLayerByName() */ private selectSubLayerByName; /** * Helper function for selectLayerByName() * Does the actual selection (checked = true) */ private setLayerCheckedTrue; searchForChecked(records: Array): void; /** * Display layers extent parsing error */ private layerExtentParsingError; /** * Calculate cumulative bounding box which encloses all the provided layers (service layer definitions) * Common for WMS/WMTS (WFS has its own implementation) */ calcAllLayersExtent(layers: Layer[]): any; /** * For given array of layers (service layer definitions) it calculates a cumulative bounding box which encloses all the layers */ calcCombinedExtent(extents: number[][]): number[]; /** * Zoom map to one layers or combined layer list extent */ zoomToLayers(data: UrlDataObject): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsAddDataCommonService { hsMapService: HsMapService; hsAddDataUrlService: HsAddDataUrlService; hsToastService: HsToastService; hsAddDataService: HsAddDataService; hsDimensionService: HsDimensionService; hsEventBusService: HsEventBusService; layerToSelect: string | string[]; loadingInfo: boolean; showDetails: boolean; url: string; getDimensionValues: (dimension: hslayers_ng_types.WmsDimension) => Array; serviceLayersCalled: Subject; constructor(); clearParams(): void; setPanelToCatalogue(): void; /** * For the sake of possible future implementation changes * @param url - URL to be set */ updateUrl(url: string): void; checkTheSelectedLayer(services: any, serviceType: OwsType['type']): void; displayParsingError(e: any): void; throwParsingError(e: any): void; srsChanged(srs: any): any; /** * Test if current map projection is in supported projection list * * @param srss - List of supported projections * @returns True if map projection is in list, false otherwise */ currentProjectionSupported(srss: string[]): boolean; /** * Constructs body of LAYER parameter for getMap request for grouped layer e.g. * for a basemap or thematic layer with property group set to true * @param layerOrLayers - layer object or layers received from capabilities. If no layer is provided * merge all checked layer ids into one string * @param property - layer property */ getGroupedLayerNames(layerOrLayers: any | Array, property: string): string; getSublayerNames(service: any): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type errorMessageOptions = { message?: string; header?: string; details?: any; }; declare const FILE_UPLOAD_SIZE_LIMIT: 10485760; declare class HsAddDataCommonFileServiceParams { readingData: boolean; loadingToLayman: boolean; asyncLoading: boolean; /** * True when layer added successfully */ layerAddedAsService: Subject; dataObjectChanged: Subject; fileUploadErrorHeader: string; } declare class HsAddDataCommonFileService extends HsAddDataCommonFileServiceParams { private hsAddDataOwsService; private hsAddDataUrlService; private hsAddDataService; private hsDialogContainerService; private hsLanguageService; private hsLaymanService; private hsLog; private hsToastService; private hsCommonLaymanService; private hsCommonLaymanLayerService; private hsProxyService; /** * Clear service param values to default values */ clearParams(): void; /** * Check if provided URL exists and is obtainable * @param url - Provided URL */ isUrlObtainable(url: string): Promise; /** * Get tooltip translated text * @param data - File data object provided * @returns Translated string */ getToolTipText(data: FileDataObject): string; /** * Validate files before upload * @param files - Files provided for upload * @returns True, if files are valid for upload, false otherwise */ filesValid(files: File[]): boolean; /** * Check if file is a zip archive * @param type - Uploaded file type * @returns True, if upload file is a zip file, false otherwise */ isZip(type: string): boolean; /** * Check if file is a geotiff image * @param type - Uploaded file type * @returns True, if upload file is a geotiff image, false otherwise */ isGeotiff(type: string): boolean; /** * Check if file is a jp2 image * @param type - Uploaded file type * @returns True, if upload file is a jp2 image, false otherwise */ isJp2(type: string): boolean; /** * Load non-wms OWS data and create layer * @param endpoint - Layman endpoint description (url, name, user) * @param files - Array of files * @param name - Name of new layer * @param title - Title of new layer * @param abstract - Abstract of new layer * @param srs - EPSG code of selected projection (eg. "EPSG:4326") * @param sld - Array of sld files * @param access_rights - User access rights for the new layer, * @param overwrite - (Optional) Overwrite existing layman layer */ loadNonWmsLayer(formDataParams: FileFormData, overwrite?: boolean): Promise; /** * Try to find layer in Layman's database using Layman friendly layer name * @param name - Layman friendly layer name to search by */ lookupLaymanLayer(name: string): Promise; /** * Convert value from one range to another * @param value - value to convert * @param oldRange - min, max of values range * @param newRange - min, max of values range. Default to 0 - 1 */ convertRange(value: number, oldRange: { min: number; max: number; }, newRange?: { min: number; max: number; }): number; /** * Calculates progress of individual file being zipped by transforming value into 0 - 1 scale */ calculateFileProgress(value: any, nrOfFiles: any): number; /** * Construct a set of key/value pairs from, that can be easily sent using HTTP * @param files - Array of files * @param name - Name of new layer * @param title - Title of new layer * @param abstract - Abstract of new layer * @param srs - EPSG code of selected projection (eg. "EPSG:4326") * @param sld - Array of sld files * @param access_rights - User access rights for the new layer, * @returns FormData object for HTTP request */ constructFormData(formDataParams: FileFormData): Promise; /** * Handler for button click to send file to layman and wait for * answer with wms service url to add to map * @param data - Current data object for upload * @param options - (Optional) overwrite: Overwrite existing layman layer, repetive: Called for more than one time */ addAsService(data: FileDataObject, options?: { overwrite?: boolean; repetive?: boolean; }): Promise; /** * Load overwrite layer dialog * @param data - Current data object for upload */ loadOverwriteLayerDialog(data: FileDataObject | VectorDataObject, repetive?: boolean): Promise; /** * Call for overwrite dialog * @param data - Current data object to load * @param repetive - Called for more the one time */ callOverwriteDialog(data: FileDataObject, repetive?: boolean): Promise; /** * Process error server response after trying to load non-wms layer * @param response - Http post/past response after loading layer to Layman * @param data - Current data object to load */ loadNonWmsError(response: PostPatchLayerResponse, data: FileDataObject, repetive?: boolean): Promise; /** * Process success server response after trying to load non-wms layer * @param response - Http post/past response after loading layer to Layman */ handleLaymanError(response: PostPatchLayerResponse): void; /** * Process success server response after trying to load non-wms layer * @param response - HTTP POST/PATCH response after loading layer to Layman * @param data - Current data object to load */ loadNonWmsSuccess(response: PostPatchLayerResponse, data: FileDataObject): Promise; /** * @param endpoint - Selected endpoint (should be Layman) * @param layerName - Name of the layer to describe * @param pendingParam - (Optional) Param of descriptor that needs to pass PENDING and STARTING status * before returning. By default set to 'wms' * @returns Description of Layman layer */ describeNewLayer(layerName: string, pendingParams?: string[]): Promise; /** * Display error message toast, when called and broadcast event about a failed attempt to load wms layer * @param _options - Error message options: message, header or details */ displayErrorMessage(_options?: errorMessageOptions): void; /** * Check if srs from data is supported by Layman * @param data - Current data object to load * @returns True, if srs is supported, false otherwise */ isSRSSupported(data: FileDataObject): boolean; /** * Check if user is authorized as Layman user * @returns True, if user is authorized, false otherwise */ isAuthenticated(): boolean; /** * Set data object name based on uploaded files * @param data - Current data object to load */ setDataName(data: FileDataObject): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsUrlArcGisService implements HsUrlTypeServiceModel { hsArcgisGetCapabilitiesService: HsArcgisGetCapabilitiesService; hsLayoutService: HsLayoutService; hsMapService: HsMapService; hsAddDataUrlService: HsAddDataUrlService; hsAddDataCommonService: HsAddDataCommonService; hsToastService: HsToastService; private hsLanguageService; data: UrlDataObject; hasCachedTiles: boolean; tileGrid: TileGrid; constructor(); /** * Sets data to default values */ setDataToDefault(): void; /** * List and return layers from Arcgis getCapabilities response * @param wrapper - Capabilities response wrapper */ listLayerFromCapabilities(wrapper: CapabilitiesResponseWrapper, options?: LayerOptions): Promise[]>; /** * Parse information received in Arcgis getCapabilities response * @param response - getCapabilities response */ createLayer(response: any): Promise; /** * Loop through the list of layers and call getLayer * layerOptions - used to propagate props when loading a layers from composition */ getLayers(checkedOnly?: boolean, shallow?: boolean, layerOptions?: LayerOptions): Promise[]>; /** * Get selected layer * @param layer - capabilities layer object * @param layerTitle - layer name in the map * @param path - Path name * @param imageFormat - Format in which to serve image. Usually: image/png * @param queryFormat - See info_format in https://docs.geoserver.org/stable/en/user/services/wms/reference.html * @param tileSize - Tile size in pixels * @param crs - of the layer * @param subLayers - Static sub-layers of the layer */ getLayer(layers: ArcGISRestResponseLayer[], options: LayerOptions): Promise>; /** * Create a vector layer for feature service * @param layers - layers to be displayed * @param options - layer options * @returns vector layer */ getFeatureLayer(layers: ArcGISRestResponseLayer[], options: LayerOptions): Layer; /** * Create XYZ layer URL */ private createXYZUrl; /** * Calculate cumulative bounding box which encloses all the checked layers (ArcGISRestResponseLayer) */ calcAllLayersExtent(layers: ArcGISRestResponseLayer[], options: LayerOptions): Promise; /** * Loop through the list of layers and add them to the map * @param layers - Layers selected */ addLayers(layers: Layer[]): void; /** * Request services layers * @param service - Service URL */ expandService(service: Service): Promise; /** * Step back to the top layer of capabilities */ collapseServices(): Promise; /** * Add services layers * @param services - Services selected */ addServices(services: Service[]): Promise; /** * Check if getCapabilities response is Image service layer */ isImageService(): boolean; /** * Check if getCapabilities response is Feature service layer */ isFeatureService(): boolean; /** * Check validity of service */ isValidService(str: string): boolean; /** * Transforms provided extent to a map projection */ private transformLayerExtent; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } type WfsCapabilitiesLayer = { Abstract: string; DefaultCRS: string; Keywords: { Keyword: string[]; }; Name: string; Title: string; WGS84BoundingBox: { LowerCorner: string; UpperCorner: string; }; _attributes: any; }; type HsWfsCapabilitiesLayer = WfsCapabilitiesLayer & { featureCount: number; limitFeatureCount: boolean; loading: boolean; }; declare class HsUrlWfsService implements HsUrlTypeServiceModel { private http; hsWfsGetCapabilitiesService: HsWfsGetCapabilitiesService; private hsLog; hsMapService: HsMapService; hsEventBusService: HsEventBusService; hsLayoutService: HsLayoutService; hsAddDataCommonService: HsAddDataCommonService; private hsAddDataUrlService; private hsCommonLaymanService; private hsProxyService; data: UrlDataObject; definedProjections: string[]; loadingFeatures: boolean; private requestCancelSubjects; cancelUrlRequest: Subject; withCredentials: i0.Signal; constructor(); /** * Sets data object to default */ setDataToDefault(): void; /** * List and return layers from WFS getCapabilities response * @param wrapper - Capabilities response wrapper */ listLayerFromCapabilities(wrapper: CapabilitiesResponseWrapper, layerOptions?: LayerOptions): Promise[]>; /** * Parse information received in WFS getCapabilities response * @param response - A stringified XML response to getCapabilities request */ parseCapabilities(response: string): Promise; getLayerExtent(lyr: any, crs: string): number[]; /** * For given array of layers (service layer definitions) it calculates a cumulative bounding box which encloses all the layers */ calcAllLayersExtent(layers: Layer[]): any; /** * Get preferred GML version format * @param version - GML version */ getPreferredFormat(version: string): string; /** * Construct and send WFS service getFeature-hits request for a set of layers */ getFeatureCountForLayers(layers: HsWfsCapabilitiesLayer[], selectedLayer?: string): void; /** * Parse layer feature count and set feature limits */ private parseFeatureCount; /** * Cancel a specific request based on URL as identifier */ private cancelRequest; /** * Handle table row click event by getting layer feature count if necessary */ tableLayerChecked($event: any, layer: any): void; /** * Parse WFS json file * @param json - JSON file */ parseWFSJson(json: JSON): void; /** * Parse EPSG in usable formats */ parseEPSG(srss: any): Array; /** * Finalize layer retrieval * Calculates extent, zooms to layers, clears params, sets panel to catalogue and resets to default * @param collection - Layers created and retrieved collection * @param layerOptions - Layer options */ finalizeLayerRetrieval(collection: Layer[], layerOptions?: LayerOptions): void; /** * Loop through the list of layers and call getLayer * @param checkedOnly - Add all available layers or only checked ones. Checked=false=all * @param shallow - Whether to go through full depth of layer tree or to stop on first queryable */ getLayers(checkedOnly?: boolean, shallow?: boolean, layerOptions?: LayerOptions): Layer[]; /** * Loop through the list of layers and call getLayer recursively * @param layer - Layer selected * @param options - Add layers recursively options * (checkedOnly?: boolean; style?: string; layerOptions: @type LayerOptions) * @param collection - Layers created and retrieved collection */ getLayersRecursively(layer: any, options: AddLayersRecursivelyOptions, collection: Layer[]): void; /** * Get selected layer * @param layer - capabilities layer object * @param layerName - layer name in the map * @param folder - name * @param srs - of the layer */ getLayer(layer: any, options: LayerOptions): Layer; /** * Loop through the list of layers and add them to the map */ addLayers(layers: Layer[]): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsUrlWmsService implements HsUrlTypeServiceModel { private hsMapService; private hsWmsGetCapabilitiesService; private hsDimensionService; private hsLayoutService; private hsConfig; private hsAddDataService; private hsEventBusService; private hsAddDataUrlService; private hsAddDataCommonService; data: UrlDataObject; constructor(); /** * Sets data object to default */ setDataToDefault(): void; /** * List and return layers from WMS getCapabilities response * @param wrapper - Capabilities response wrapper */ listLayerFromCapabilities(wrapper: CapabilitiesResponseWrapper, options?: LayerOptions): Promise[]>; /** * Expands all sibling cells belonging to the same row after overflown cell is clicked */ expandTableRow(e: any): void; /** * Fills list of available projections */ fillProjections(caps: any, response: any): void; /** * Parse information received in WMS getCapabilities response */ capabilitiesReceived(response: any, layerToSelect: string): Promise; /** * Get extent for a single layer */ private getSingleLayerExtent; /** * Calculates extent for layer being created */ private getBufferExtent; /** * Get extent for a WMS layer. * URL: Single or multiple layer in params.LAYERS * CATALOGUE - layer obj */ getLayerExtent(serviceLayer: any, crs: string): number[]; /** * Filters out layers without 'Name' parameter */ filterCapabilitiesLayers(layers: HsWmsLayer | Array): Array; /** * Removes extra port which is added to the getMap request when * GetCapabilities is queried through proxy. * \ * then becomes * \ * which is wrong. * @param url - URL for which to remove port but only when proxified * with port in proxy path. * @returns URL without proxy services port added to it. */ removePortIfProxified(url: string): string; /** * Finalize layer retrieval * Calculates extent, zooms to layers, clears params, sets panel to catalogue and resets to default * @param collection - Layers created and retrieved collection * @param layerOptions - Layer options */ finalizeLayerRetrieval(collection: Layer[], layerOptions?: LayerOptions): void; /** * Get layer name for group. * If there is only one checked layer, return its name, otherwise return the group name */ getLayerNameForGroup(): string; /** * Loop through the list of layers and call getLayer. * @param checkedOnly - Add all available layers or only checked ones. checkedOnly=false=all * @param layerOptions - Optional layer parameters. Used to parse composition layers */ getLayers(checkedOnly: boolean, shallow?: any, layerOptions?: LayerOptions): Layer[]; /** * Get selected layer * @param layer - capabilities layer object * @param layerName - layer name in the map * @param path - Path (folder) name * @param imageFormat - Format in which to serve image. Usually: image/png * @param queryFormat - See info_format in https://docs.geoserver.org/stable/en/user/services/wms/reference.html * @param tileSize - Tile size in pixels * @param crs - of the layer * @param subLayers - Static sub-layers of the layer */ getLayer(layer: any, options: LayerOptions): Layer; /** * Loop through the list of layers and add them to the map */ addLayers(layers: Layer[]): void; /** * Get selected layer styles and legends * @param layer - Selected layer */ private getLayerStyles; /** * Loop through the list of layers and call getLayer recursively * @param layer - Layer selected. A descriptor similar to WmsLayer, but has additional properties, also specific to WFS and ArcGIS layers * @param options - Add layers recursively options * (checkedOnly?: boolean; shallow?: boolean; style?: string;) * @param collection - Layers created and retrieved collection */ getLayersRecursively(layer: any, //TODO: better typing. It is a wrapper similar to WmsLayer, but has additional properties, also specific to WFS and ArcGIS layers options: AddLayersRecursivelyOptions, collection: Layer[]): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsUrlWmtsService implements HsUrlTypeServiceModel { hsMapService: HsMapService; hsLayoutService: HsLayoutService; hsAddDataUrlService: HsAddDataUrlService; hsAddDataCommonService: HsAddDataCommonService; data: UrlDataObject; constructor(); setDataToDefault(): void; /** * List and return layers from WMTS getCapabilities response * @param wrapper - Capabilities response wrapper */ listLayerFromCapabilities(wrapper: CapabilitiesResponseWrapper, options?: LayerOptions): Promise[]>; /** * Parse information received in WMTS getCapabilities response * @param response - Url of requested service */ capabilitiesReceived(response: string): Promise; /** * Loop through the list of layers and call getLayer recursively * @param layer - Layer selected * @param collection - Layers created and retrieved collection */ getLayersRecursively(layer: any, options: AddLayersRecursivelyOptions, collection: any): void; /** * Loop through the list of layers and add them to the map */ addLayers(layers: Layer[]): void; /** * Loop through the list of layers and call getLayer. * @param checkedOnly - Add all available layers or only checked ones. checkedOnly=false=all * @param layerOptions - Optional layer parameters. Used to parse composition layers */ getLayers(checkedOnly: boolean, shallow?: boolean, layerOptions?: LayerOptions): Layer[]; /** * Return preferred tile format * @param formats - Set of available formats for layer being added */ getPreferredFormat(formats: any): string; /** * Return preferred tile tileMatrixSet * Looks for the occurrence of supported CRS's, if possible picks CRS of current view * otherwise returns 3857 as trial(some services support 3857 matrix set even though its not clear from capabilities ) * @param sets - Set of available matrixSets */ getPreferredMatrixSet(sets: any): string; /** * Return preferred info format * Looks for the occurrence of supported formats (query.wms) * if possible picks HTML, otherwise first from the list of supported is selected * @param response - Set of available info formats for layer being added */ getPreferredInfoFormat(formats: any): string; /*** * Get WMTS layer bounding box */ getWMTSExtent(identifier: string): Extent; /** * Get WMTS layer * Uses previously received capabilities response as a reference for the source * @param response - Set of available info formats for layer */ getLayer(layer: any, options: LayerOptions): Layer; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsUrlXyzService implements HsUrlTypeServiceModel { private hsConfig; private hsMapService; private hsLayoutService; private hsAddDataService; private hsEventBusService; private hsAddDataCommonService; data: UrlDataObject; constructor(); /** * Mock capabilities response for XYZ service */ listLayerFromCapabilities(wrapper: CapabilitiesResponseWrapper, layerOptions?: LayerOptions): Promise[]>; /** * Get layers based on checked state */ getLayers(checkedOnly: boolean, shallow?: boolean, layerOptions?: LayerOptions): Layer[]; /** * Loop through the list of layers and add them to the map */ addLayers(layers: Layer[]): void; /** * Sets data object to default */ setDataToDefault(): void; /** * Get layer with XYZ source */ getLayer(options: LayerOptions): Layer; /** * Finalize layer retrieval */ finalizeLayerRetrieval(collection: Layer[], layerOptions?: LayerOptions): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsAddDataOwsService { hsAddDataService: HsAddDataService; hsAddDataCommonService: HsAddDataCommonService; hsAddDataUrlService: HsAddDataUrlService; hsHistoryListService: HsHistoryListService; hsLog: HsLogService; hsArcgisGetCapabilitiesService: HsArcgisGetCapabilitiesService; hsUrlArcGisService: HsUrlArcGisService; hsUrlWfsService: HsUrlWfsService; hsWfsGetCapabilitiesService: HsWfsGetCapabilitiesService; hsUrlWmsService: HsUrlWmsService; hsWmsGetCapabilitiesService: HsWmsGetCapabilitiesService; hsWmtsGetCapabilitiesService: HsWmtsGetCapabilitiesService; hsUrlWmtsService: HsUrlWmtsService; hsUrlXyzService: HsUrlXyzService; hsXyzGetCapabilitiesService: HsXyzGetCapabilitiesService; private hsAddDataWmsLaymanService; private hsAddDataWfsLaymanService; typeService: HsUrlTypeServiceModel; typeCapabilitiesService: IGetCapabilities; constructor(); connect(options?: LayerConnection): Promise[]>; /** * Overwrites service defaults with layerOptions * @param layerOptions - Layer options to overwrite */ overwriteServiceDefaults(layerOptions: LayerOptions): void; /** * Connect to service of specified Url * @param params - Connection params */ setUrlAndConnect(params: OwsConnection): Promise[]>; changed(data: UrlDataObject): void; /** * replaces `ows.${type}_connecting` */ connectToOWS(params: OwsConnection): Promise[]>; setTypeServices(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Layman GET /layers response wrapper with custom HSLayers properties */ interface HsLaymanGetLayersWrapper { endpoint?: HsEndpoint; extentFeatureCreated?: (feature: Feature) => void; matched?: number; datasets?: HsLaymanGetLayer[]; } declare class HsLaymanBrowserService { private http; private log; hsCommonLaymanService: HsCommonLaymanService; private hsCommonLaymanLayerService; hsToastService: HsToastService; hsLanguageService: HsLanguageService; hsMapService: HsMapService; httpCall: any; /** * Loads datasets metadata from Layman * @param endpoint - Configuration of selected datasource (from app config) * extent feature is created. Has one parameter: feature * @param data - Query parameters */ queryCatalog(endpoint: HsEndpoint, data?: { onlyMine: boolean; limit?: string | number; query: any; filterByExtent?: boolean; }, extentFeatureCreated?: (feature: Feature) => void): Observable; /** * (PRIVATE) Callback for catalogue http query * @param data - HTTP response containing all the layers */ private datasetsReceived; /** * Fills metadata about layer, because Layman layer list API provides just name and UUID * @param endpoint - Configuration of selected datasource (from app config) * @param layer - Layman layer for which to get metadata * @returns Promise which is resolved when layer metadata is filled */ fillLayerMetadata(endpoint: HsEndpoint, layer: HsAddDataLaymanLayerDescriptor): Promise; /** * Gets layer metadata and returns promise which describes layer * @param ds - Configuration of selected datasource (from app config) * @param layer - Layman layer for which to get metadata * @returns Promise which describes layer in a common format for use in add-layers component */ describeWhatToAdd(ds: HsEndpoint, layer: HsAddDataLaymanLayerDescriptor): Promise<{ link: string; layer: string; dsType: string; extent: number[]; style: string; styleType: "sld" | "qml"; name: string; title: string; editable: boolean; workspace: string; type: string[]; layman_metadata?: { publication_status: "COMPLETE" | "INCOMPLETE" | "UPDATING"; }; description?: string; uuid?: string; wms?: hslayers_ng_types.LaymanGetWorkspaceLayerTypeWms; wfs?: hslayers_ng_types.LaymanGetWorkspaceLayerTypeWfs; thumbnail?: { path?: string; url?: string; status?: hslayers_ng_types.StatusStateType; error?: any; }; file?: { paths?: string[]; status?: hslayers_ng_types.StatusStateType; error?: { code?: number; message?: string; detail?: any; }; }; db?: { schema?: string; table?: string; geo_column?: string; external_uri?: string; status?: hslayers_ng_types.StatusStateType; error?: any; }; original_data_source?: "file" | "database_table"; metadata?: { identifier?: string; record_url?: string; csw_url?: string; comparison_url?: string; status?: hslayers_ng_types.StatusStateType; error?: any; }; image_mosaic?: boolean; exists?: boolean; message?: string; detail?: string; code?: number; sub_code?: number; access_rights?: { read: string[]; write: string[]; }; bounding_box?: number[]; geodata_type?: "vector" | "raster" | "unknown"; native_bounding_box?: number[]; native_crs?: string; url?: string; updated_at?: string; used_in_maps?: { name: string; workspace: string; }[]; publication_type?: string; wfs_wms_status?: hslayers_ng_types.HsLaymanGetLayerWfsWmsStatus; highlighted?: boolean; toRemove?: boolean; endpoint?: HsEndpoint; availableTypes?: string[]; bbox?: number[]; wfsWmsStatus?: hslayers_ng_types.HsLaymanGetLayerWfsWmsStatus; featureId?: string; id?: string; }>; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsAddDataCatalogueMapService { hsMapService: HsMapService; hsLogService: HsLogService; private hsSaveMapService; private hsCommonEndpointsService; private hsLayoutService; extentLayer: Vector>; pointerMoveListener: EventsKey; constructor(); /** * Add debounced pointer move listener */ private addPointerMoveListener; /** * @param evt - Event object */ mapPointerMoved(evt: any): void; clearExtentLayer(): void; /** * Removes layer extent features from map * @param dataset - Configuration of selected datasource (from app config) */ clearDatasetFeatures(dataset: any): void; /** * Callback function which gets executed when extent feature * is created. It should add the feature to vector layer source * @param extentFeature - OpenLayers Feature */ addExtentFeature(extentFeature: Feature): void; highlightLayer(composition: HsMapCompositionDescriptor, state: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsAddDataVectorService { private hsAddDataCommonFileService; private hsAddDataService; private hsLaymanService; private hsCommonLaymanService; private hsCommonLaymanLayerService; private hsMapService; private hsStylerService; private hsAddDataVectorUtilsService; private hsToastService; private hsProxyService; /** * Load non-wms OWS data and create layer * @param type - Type of data to load (supports Kml, Geojson, Wfs and Sparql) * @param url - Url of data/service localization * @param title - Title of new layer * @param abstract - Abstract of new layer * @param srs - EPSG code of selected projection (eg. "EPSG:4326") * @param options - Other options * @param addUnder - Layer to add new layer under * @returns Promise which return OpenLayers vector layer */ addVectorLayer(type: string, url: string, name: string, title: string, abstract: string, srs: string, options: HsVectorLayerOptions, addUnder?: Layer): Promise>>; /** * Load non-wms OWS data and create layer * @param type - Type of data to load (supports KML, GeoJSON, WFS and SPARQL) * @param url - Url of data/service localization * @param name - Name of new layer * @param title - Title of new layer * @param abstract - Abstract of new layer * @param srs - EPSG code of selected projection (eg. "EPSG:4326") * @param options - Other options * @returns Promise which returns OpenLayer's vector layer */ createVectorLayer(type: string, url: string, name: string, title: string, abstract: string, srs: string, options?: HsVectorLayerOptions): Promise>, Feature>>; /** * Fit map view to layer's extent * @param lyr - Provided layer */ fitExtent(lyr: Vector>): void; /** * Set catalogue as active HSLayers panel */ setPanelToCatalogue(): void; /** * Listen to any source changes made * @param src - Layer source provided */ changeListener(src: any): any; /** * Construct options parameter for new vector layer being added */ private buildNewLayerOptions; /** * Add new layer to map and Layman (if possible) * @param data - Layer data object provided * @returns Created layer and layer adding state (true, if complete, false otherwise) */ addNewLayer(data: VectorDataObject): Promise<{ layer: Vector>; complete: boolean; }>; /** * Get layer style from Layman endpoint before creating layer to ensure all params and values used * are in sync with what's on Layman e.g. to prevent inconsistencies caused by attribute names laundering */ setLaymanLayerStyle(layerName: string, data: VectorDataObject): Promise; /** * Prepare layer for upsertion to Layman * @param data - Vector data object */ upsertLayer(data: VectorDataObject): Promise; /** * Check if layer with the same name exists in Layman database and provide the user to choose * what action he wishes to take * @param data - Layer data object provided * @returns Action the user took, inside prompted dialog */ checkForLayerInLayman(data: VectorDataObject, repetitive?: boolean): Promise; /** * Check if uploaded data are KML * @param fileType - Uploaded data type * @param url - Upload source url * @returns True, if data are in KML format, false otherwise */ isKml(fileType: string, url: string): boolean; /** * Try to fit layer extent as map view * @param extent - Extent provided * @param src - Layer source provided */ tryFit(extent: any, src: Source): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsMickaBrowserService { private http; private log; hsMapService: HsMapService; hsToastService: HsToastService; hsLanguageService: HsLanguageService; private hsProxyService; httpCall: any; /** * @param dataset - Configuration of selected datasource (from app config) * @param data - Query properties * @param extentFeatureCreated - Function which gets called * @param textField - Name of the field to search in * extent feature is created. Has one parameter: feature * Loads datasets metadata from selected source (CSW server). * Currently supports only "Micka" type of source. * Use all query params (search text, bbox, params.., sorting, start) */ queryCatalog(endpoint: HsEndpoint, data: any, extentFeatureCreated: any, textField: string): any; private createRequestUrl; /** * @param data - HTTP response containing all the layers * Callback for catalogue http query */ private datasetsReceived; /** * @param which - Parameter name to parse * Parse query parameter into encoded key value pair. */ private param2Query; /** * @param layer - Micka layer for which to get metadata * @param type - Optional service type specification * @returns Url of service or resource * Get first link from records links array or link * property of record in older Micka versions * in a common format for use in add-layers component */ getLayerLink(layer: HsAddDataMickaLayerDescriptor, type?: string): string; /** * Parse layer name from dataset url (Micka includes LAYER parameters for both WMS/WFS in record url) */ private parseLayerName; /** * Parse workspace from micka dataset record. Null if not layman layer */ private parseWorkspaceFromURL; private isLinkValid; /** * @param ds - Configuration of selected datasource (from app config) * @param layer - Micka layer for which to get metadata * @returns Promise which describes layer * in a common format for use in add-layers component * Gets layer metadata and returns promise which describes layer * in a common format for use in add-layers component */ describeWhatToAdd(ds: HsEndpoint, layer: HsAddDataMickaLayerDescriptor): Promise; datasourceParsingError(title: string, error: string): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Options for adding catalogue layer to map */ type AddCatalogueLayerOptions = { useTiles?: boolean; }; declare class HsAddDataCatalogueParams { data: any; selectedEndpoint: HsEndpoint; selectedLayer: HsAddDataLayerDescriptor; catalogEntries: HsAddDataLayerDescriptor[]; dataLoading: boolean; recordsPerPage: number; listStart: number; listNext: number; catalogQuery: any; endpoints: HsEndpoint[]; matchedRecords: number; extentChangeSuppressed: boolean; addDataCatalogueLoaded: Subject; constructor(); } declare class HsAddDataCatalogueService extends HsAddDataCatalogueParams { hsConfig: HsConfig; hsAddDataVectorService: HsAddDataVectorService; hsEventBusService: HsEventBusService; hsMickaBrowserService: HsMickaBrowserService; hsLaymanBrowserService: HsLaymanBrowserService; hsLayoutService: HsLayoutService; hsCommonEndpointsService: HsCommonEndpointsService; hsMapService: HsMapService; hsAddDataCatalogueMapService: HsAddDataCatalogueMapService; hsAddDataService: HsAddDataService; private zone; hsCommonLaymanService: HsCommonLaymanService; hsAddDataOwsService: HsAddDataOwsService; constructor(); resetList(): void; reloadData(): void; /** * Queries all configured catalogs for datasources (layers) */ queryCatalogs(suspendLimitCalculation?: boolean): void; /** * Calculates each endpoint layer request limit, based on the matched layers ratio * from all endpoint matched layers */ calculateEndpointLimits(): void; createLayerList(): void; filterDuplicates(endpoint: HsEndpoint): Array; getNextRecords(): void; getPreviousRecords(): void; changeRecordsPerPage(perPage: number): void; clearLoadedData(): void; /** * Loads datasets metadata from selected source (CSW server). * Uses pagination set by 'start' attribute of 'dataset' param. * Currently supports only "Micka" type of source. * Use all query params (search text, bbox, params.., sorting, start) * @param catalog - Configuration of selected datasource (from app config) */ queryCatalog(catalog: HsEndpoint): Observable; /** * Test if layer of selected record is downloadable (KML and JSON files, with direct URL) and gives URL. * @param ds - Datasource of selected layer * @param layer - Metadata record of selected layer * @returns Download URL of layer if possible */ layerDownload(ds: HsEndpoint, layer: any): string; /** * Get URL for RDF-DCAT record of selected layer * @param ds - Datasource of selected layer * @param layer - Metadata record of selected layer * @returns URL to record file */ layerRDF(ds: HsEndpoint, layer: any): string; /** * Get catalogue layer descriptor * @param ds - Datasource of selected layer * @param layer - Metadata record of selected layer * @returns Type or array of types in which this layer can be added to map */ describeCatalogueLayer(ds: HsEndpoint, layer: HsAddDataLayerDescriptor): Promise; /** * Add selected layer to map * @param ds - Datasource of selected layer * @param whatToAdd - Catalogue layer descriptor. Among others holds the type of the layer (supported values: WMS, WFS, Sparql, kml, geojson, json) * @param options - Options for adding the layer */ addLayerToMap(ds: HsEndpoint, whatToAdd: WhatToAddDescriptor, options?: AddCatalogueLayerOptions): Promise; /** * Handle adding a WMS layer to the map */ private handleWmsLayer; /** * Handle adding a WFS layer to the map */ private handleWfsLayer; /** * Handle adding a Micka WFS layer to the map */ private handleMickaWfsLayer; /** * Handle adding a Layman WFS layer to the map */ private handleLaymanWfsLayer; /** * Handle adding a vector layer (KML, GEOJSON) to the map */ private handleVectorLayer; /** * Handle adding a WMTS layer to the map */ private handleWmtsLayer; datasetSelect(id_selected: DatasetType): void; /** * Clear the "query" property */ clear(): void; calcExtentLayerVisibility(): void; private dataSourceExistsAndEmpty; private panelVisible; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsAddDataVectorUploadService { private hsLog; private hsMapService; private hsAddDataVectorUtilsService; readUploadedFileAsText: (inputFile: any) => Promise; readUploadedFileAsURL: (inputFile: any) => Promise; /** * Create a object containing data from XML dataset * @param file - File uploaded by the user * @param type - Data type */ createVectorObjectFromXml(file: File, type: string): Promise; /** * Read uploaded file and extract the data as JSON object * @param file - File uploaded by the user * @returns JSON object with parsed data */ readUploadedFile(file: File): Promise; /** * Convert uploaded KML or GPX files into GeoJSON format / parse loaded GeoJSON * @param file - Uploaded KML, GPX or GeoJSON files */ convertUploadedData(file: File): Promise; /** * Read features from uploaded file as objects * @param json - Uploaded file parsed as json object * @returns JSON object with file name and read features */ createVectorObjectFromJson(json: any): Promise; /** * Transform features to other projection if needed * @param features - Extracted features from uploaded file * @param projection - Projection to which transform the features */ transformFeaturesIfNeeded(features: Feature[], projection: Projection): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsAddDataVectorUtilsService { private hsLaymanService; /** * Tries to guess file type based on the file extension * @param extension - Parsed file extension from uploaded file */ tryGuessTypeFromNameOrUrl(extension: string): string; /** * Returns layman supported projection */ getFeaturesProjection(projection: Projection): Projection; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { FILE_UPLOAD_SIZE_LIMIT, HsAddDataCatalogueMapService, HsAddDataCatalogueService, HsAddDataCommonFileService, HsAddDataCommonFileServiceParams, HsAddDataCommonService, HsAddDataOwsService, HsAddDataService, HsAddDataUrlService, HsAddDataVectorService, HsAddDataVectorUploadService, HsAddDataVectorUtilsService, HsLaymanBrowserService, HsMickaBrowserService, HsUrlArcGisService, HsUrlWfsService, HsUrlWmsService, HsUrlWmtsService, HsUrlXyzService }; export type { AddCatalogueLayerOptions, HsLaymanGetLayersWrapper, HsWfsCapabilitiesLayer, errorMessageOptions };