@loaders.gl/wms 4.1.0-alpha.1 → 4.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/csw-capabilities-loader.d.ts.map +1 -1
- package/dist/csw-capabilities-loader.js +1 -1
- package/dist/csw-capabilities-loader.js.map +1 -1
- package/dist/csw-domain-loader.d.ts.map +1 -1
- package/dist/csw-domain-loader.js +1 -1
- package/dist/csw-domain-loader.js.map +1 -1
- package/dist/csw-records-loader.d.ts.map +1 -1
- package/dist/csw-records-loader.js +1 -1
- package/dist/csw-records-loader.js.map +1 -1
- package/dist/gml-loader.d.ts.map +1 -1
- package/dist/gml-loader.js +1 -1
- package/dist/gml-loader.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/parsers/csw/parse-csw-capabilities.d.ts.map +1 -1
- package/dist/lib/parsers/csw/parse-csw-capabilities.js.map +1 -1
- package/dist/lib/parsers/csw/parse-csw-domain.d.ts.map +1 -1
- package/dist/lib/parsers/csw/parse-csw-domain.js.map +1 -1
- package/dist/lib/parsers/csw/parse-csw-records.d.ts.map +1 -1
- package/dist/lib/parsers/csw/parse-csw-records.js.map +1 -1
- package/dist/lib/parsers/csw/parse-exception-report.d.ts.map +1 -1
- package/dist/lib/parsers/csw/parse-exception-report.js.map +1 -1
- package/dist/lib/parsers/gml/parse-gml.d.ts.map +1 -1
- package/dist/lib/parsers/gml/parse-gml.js.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-capabilities.d.ts.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-capabilities.js.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-error.d.ts.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-error.js.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-features.d.ts.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-features.js.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-layer-description.d.ts.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-layer-description.js.map +1 -1
- package/dist/lib/parsers/xml/parse-xml-helpers.d.ts.map +1 -1
- package/dist/lib/parsers/xml/parse-xml-helpers.js.map +1 -1
- package/dist/lib/services/create-image-service.d.ts.map +1 -1
- package/dist/lib/services/create-image-service.js.map +1 -1
- package/dist/lib/services/image-service.d.ts.map +1 -1
- package/dist/lib/services/image-service.js.map +1 -1
- package/dist/services/arcgis/arcgis-image-service.d.ts.map +1 -1
- package/dist/services/arcgis/arcgis-image-service.js.map +1 -1
- package/dist/services/arcgis/arcgis-server.d.ts.map +1 -1
- package/dist/services/arcgis/arcgis-server.js.map +1 -1
- package/dist/services/create-image-source.d.ts.map +1 -1
- package/dist/services/create-image-source.js.map +1 -1
- package/dist/services/ogc/csw-service.d.ts.map +1 -1
- package/dist/services/ogc/csw-service.js.map +1 -1
- package/dist/services/ogc/wms-service.d.ts.map +1 -1
- package/dist/services/ogc/wms-service.js.map +1 -1
- package/dist/wip/wcs-capabilities-loader.js +1 -1
- package/dist/wip/wcs-capabilities-loader.js.map +1 -1
- package/dist/wip/wfs-capabilities-loader.js +1 -1
- package/dist/wip/wfs-capabilities-loader.js.map +1 -1
- package/dist/wip/wms-layer-description-loader.d.ts +1 -1
- package/dist/wip/wmts-capabilities-loader.js +1 -1
- package/dist/wip/wmts-capabilities-loader.js.map +1 -1
- package/dist/wms-capabilities-loader.d.ts.map +1 -1
- package/dist/wms-capabilities-loader.js +1 -1
- package/dist/wms-capabilities-loader.js.map +1 -1
- package/dist/wms-error-loader.d.ts.map +1 -1
- package/dist/wms-error-loader.js +1 -1
- package/dist/wms-error-loader.js.map +1 -1
- package/package.json +8 -8
- package/src/csw-capabilities-loader.ts +2 -1
- package/src/csw-domain-loader.ts +2 -1
- package/src/csw-records-loader.ts +2 -1
- package/src/gml-loader.ts +2 -1
- package/src/index.ts +2 -1
- package/src/lib/parsers/csw/parse-csw-capabilities.ts +2 -1
- package/src/lib/parsers/csw/parse-csw-domain.ts +2 -1
- package/src/lib/parsers/csw/parse-csw-records.ts +2 -1
- package/src/lib/parsers/csw/parse-exception-report.ts +2 -1
- package/src/lib/parsers/gml/parse-gml.ts +2 -1
- package/src/lib/parsers/wms/parse-wms-capabilities.ts +2 -1
- package/src/lib/parsers/wms/parse-wms-error.ts +2 -1
- package/src/lib/parsers/wms/parse-wms-features.ts +2 -1
- package/src/lib/parsers/wms/parse-wms-layer-description.ts +2 -1
- package/src/lib/parsers/xml/parse-xml-helpers.ts +2 -1
- package/src/lib/services/create-image-service.ts +2 -1
- package/src/lib/services/image-service.ts +2 -1
- package/src/services/arcgis/arcgis-image-service.ts +2 -1
- package/src/services/arcgis/arcgis-server.ts +2 -1
- package/src/services/create-image-source.ts +2 -1
- package/src/services/ogc/csw-service.ts +2 -1
- package/src/services/ogc/wms-service.ts +2 -1
- package/src/wms-capabilities-loader.ts +2 -1
- package/src/wms-error-loader.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-capabilities.js","names":["XMLLoader","getXMLArray","getXMLStringArray","getXMLInteger","getXMLFloat","getXMLBoolean","parseWMSCapabilities","xmlText","options","_XMLLoader$parseTextS","parsedXML","parseTextSync","call","xmlCapabilities","WMT_MS_Capabilities","WMS_Capabilities","capabilities","extractCapabilities","inheritedLayerProps","layer","layers","addInheritedLayerProps","includeRawJSON","json","includeXMLText","xml","_xml$Service","_xml$Service2","_xml$Service3","_xml$Service4","_xml$Service5","_xml$Service6","_xml$Service6$Keyword","_xml$Service7","_xml$Service8","_xml$Service9","_xml$Service10","_xml$Service11","_xml$Service12","_xml$Service13","_xml$Capability","_xml$Capability2","version","String","name","Service","Name","title","Title","undefined","abstract","Abstract","keywords","KeywordList","Keyword","fees","Fees","JSON","stringify","accessConstraints","AccessConstraints","layerLimit","LayerLimit","maxWidth","maxHeight","requests","extractRequests","Capability","Request","exceptions","extractExceptions","Exception","xmlLayers","Layer","xmlSubLayer","push","extractLayer","key","value","Object","entries","xmlRequests","xmlRequest","mimeTypes","Format","xmlException","xmlExceptionFormats","length","xmlLayer","_xmlLayer$KeywordList","crs","CRS","SRS","Array","isArray","every","_","geographicBoundingBox","EX_GeographicBoundingBox","extractEXBoundingBox","LatLonBoundingBox","extractLatLonBoundingBox","boundingBoxes","BoundingBox","extractWMSBoundingBoxes","xmlDimensions","Dimension","dimensions","map","extractDimension","opaque","cascaded","queryable","xmlBoundingBox","westBoundLongitude","w","northBoundLatitude","n","eastBoundLongitude","e","southBoundLatitude","s","minx","miny","maxx","maxy","xmlBoundingBoxes","xmlBoxes","xmlBox","extractWMSBoundingBox","resx","resy","boundingBox","xResolution","yResolution","xmlDimension","units","extent","dimension","unitSymbol","default","defaultValue","multipleValues","nearestValue","current","parent","subLayer"],"sources":["../../../../src/lib/parsers/wms/parse-wms-capabilities.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport {XMLLoader} from '@loaders.gl/xml';\nimport {\n getXMLArray,\n getXMLStringArray,\n getXMLInteger,\n getXMLFloat,\n getXMLBoolean\n} from '../xml/parse-xml-helpers';\n\n/** All capabilities of a WMS service - response to a WMS `GetCapabilities` data structure extracted from XML */\nexport type WMSCapabilities = {\n /** Version of the WMS service */\n version?: string; // '1.3.0' | '1.1.1' | '1.1.0' | '1.0.0'\n /** A short name for the service */\n name: string;\n /** A human readable name for the service */\n title?: string;\n /** A more extensive description of the service */\n abstract?: string;\n /** A set of keywords e.g. for searching services */\n keywords: string[];\n /** A field of unspecified format, if present describes any access constraints required to use the service. */\n accessConstraints?: string;\n /** A field of unspecified format, if present describes any fees associated with the use of the service */\n fees?: string;\n /** If present, the max number of layers that can be rendered by the service */\n layerLimit?: number;\n /** If present, the widest image that can be rendered by the service */\n maxWidth?: number;\n /** If present, the tallest image that can be rendered by the service */\n maxHeight?: number;\n /** Hierarchical list of layers. */\n layers: WMSLayer[];\n /** A map with information about supported WMS requests. If a record is present, the request is supported by the service */\n requests: Record<string, WMSRequest>;\n /** Information about any exceptions that the service will report (HTTP status != 2xx) */\n exceptions?: WMSExceptions;\n /** Only if `options.json`: raw untyped JSON parsed from XML. Can include information not extracted in the typed response. */\n json?: Record<string, unknown>;\n /** Only if `options.xml`, the unparsed XML string can be requested */\n xml?: string;\n};\n\n/**\n * Metadata about a layer\n * Layers inherit many properties from their parent layers, see description of individual props for details.\n * @see https://www.ogc.org/standard/wms/ 7.2.4.6\n */\nexport type WMSLayer = {\n /** The title is a human readable name. It is mandatory on each layer. Not inherited. */\n title: string;\n /** A layer is renderable if it has a name. A named parent layer will render all its sublayers. Not inherited. */\n name?: string;\n /** A narrative description of the map layer. */\n abstract?: string;\n /** A set of keywords e.g. for searching layers */\n keywords: string[];\n /** layer limits in unspecified CRS:84-like lng/lat, for quick access w/o CRS calculations. Defined or inherited. */\n geographicBoundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Supported CRS. Either defined or inherited. */\n crs?: string[];\n /** Bounding boxes in specific CRS:es */\n boundingBoxes?: WMSBoundingBox[];\n\n // minScale: number;\n // maxScale: number;\n // dimensions: ?? 7.2.4.6.10\n // MetadataURL\n // Attribution\n // Identifier and AuthorityURL\n // FeatureListURL\n // DataURL\n\n /** any extra dimension such as time */\n dimensions?: WMSDimension[];\n\n /** Whether queries can be performed on the layer */\n queryable?: boolean;\n /** `false` if layer has significant no-data areas that the client can display as transparent. */\n opaque?: boolean;\n /** WMS cascading allows server to expose layers coming from other WMS servers as if they were local layers */\n cascaded?: boolean;\n // noSubsets: boolean\n // fixedWith: number\n // fixedHeight: number\n\n /** A list of styles. @note not yet supported by WMSCapabilitiesLoader */\n styles?: unknown[];\n\n /** Sublayers - these inherit crs and boundingBox) if not overridden) */\n layers?: WMSLayer[];\n};\n\n/**\n * A bounding box specifies the coordinate range for data in the layer.\n * No data is available outside the bounding box.\n */\nexport type WMSBoundingBox = {\n /** CRS indicates the Layer CRS that applies to this bounding box. */\n crs: string;\n /** `[[w, s], [e, n]]`, indicates the limits of the bounding box using the axis units and order of the specified CRS. */\n boundingBox: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Spatial horizontal resolution of data in same units as bounding box */\n xResolution?: number;\n /** Spatial vertical resolution of data in same units as bounding box */\n yResolution?: number;\n};\n\n/**\n * An optional dimension that can be queried using the `name=...` parameter\n * Note that layers that have at least one dimension without `default` value\n * become unrenderable unless the dimension value is supplied to GetMap requests.\n */\nexport type WMSDimension = {\n /** name of dimension, becomes a valid parameter key for this layer */\n name: string;\n /** Textual units for this dimensional axis */\n units: string;\n /** Unit symbol for this dimensional axis */\n unitSymbol?: string;\n /** Default value if no value is supplied. If dimension lacks defaultValue, requests fail if no value is supplied */\n defaultValue?: string;\n /** Can multiple values of the dimension be requested? */\n multipleValues?: boolean;\n /* Will nearest values will be substituted when out of range, if false exact values are required */\n nearestValue?: boolean;\n /** A special value \"current\" is supported, typically for time dimension */\n current?: boolean;\n /** Text content indicating available values for dimension */\n extent: string;\n};\n\n/** Metadata about a supported WMS request */\nexport type WMSRequest = {\n /** MIMEtypes that can be returned by this request. */\n mimeTypes: string[];\n};\n\nexport type WMSExceptions = {\n /** MIME types for exception response payloads. */\n mimeTypes: string[];\n};\n\nexport type ParseWMSCapabilitiesOptions = {\n /** Add inherited layer information to sub layers */\n inheritedLayerProps?: boolean;\n /** Include the \"raw\" JSON (parsed but untyped, unprocessed XML). May contain additional fields */\n includeRawJSON?: boolean;\n /** Include the original XML document text. May contain additional information. */\n includeXMLText?: boolean;\n};\n\n/**\n * Parses a typed data structure from raw XML for `GetCapabilities` response\n * @note Error handlings is fairly weak\n */\nexport function parseWMSCapabilities(\n xmlText: string,\n options?: ParseWMSCapabilitiesOptions\n): WMSCapabilities {\n const parsedXML = XMLLoader.parseTextSync?.(xmlText, options);\n const xmlCapabilities: any =\n parsedXML.WMT_MS_Capabilities || parsedXML.WMS_Capabilities || parsedXML;\n const capabilities = extractCapabilities(xmlCapabilities);\n // In case the processed, normalized capabilities do not contain everything,\n // the user can get the parsed XML structure.\n if (options?.inheritedLayerProps) {\n // Traverse layers and inject missing props from parents\n for (const layer of capabilities.layers) {\n addInheritedLayerProps(layer, null);\n }\n // Not yet implemented\n }\n\n if (options?.includeRawJSON) {\n capabilities.json = xmlCapabilities;\n }\n\n if (options?.includeXMLText) {\n capabilities.xml = xmlText;\n }\n\n return capabilities;\n}\n\n/** Extract typed capability data from XML */\nfunction extractCapabilities(xml: any): WMSCapabilities {\n const capabilities: WMSCapabilities = {\n version: String(xml.version || ''),\n name: String(xml.Service?.Name || 'unnamed'),\n title: xml.Service?.Title ? String(xml.Service?.Title) : undefined,\n abstract: xml.Service?.Abstract ? String(xml.Service?.Abstract) : undefined,\n keywords: getXMLStringArray(xml.Service?.KeywordList?.Keyword),\n fees: xml.Service?.Fees ? JSON.stringify(xml.Service?.Fees) : undefined,\n accessConstraints: xml.Service?.AccessConstraints\n ? JSON.stringify(xml.Service?.AccessConstraints)\n : undefined,\n layerLimit: getXMLInteger(xml.Service?.LayerLimit),\n maxWidth: getXMLInteger(xml.Service?.maxWidth),\n maxHeight: getXMLInteger(xml.Service?.maxHeight),\n layers: [],\n requests: extractRequests(xml.Capability?.Request),\n exceptions: extractExceptions(xml.Exception)\n // contact field is a mess of largely irrelevant information, put it last\n // contact: xml.Service?.Contact ? JSON.stringify(xml.Service?.Contact) : undefined,\n };\n\n // LAYERS\n const xmlLayers = getXMLArray(xml.Capability?.Layer);\n for (const xmlSubLayer of xmlLayers) {\n capabilities.layers.push(extractLayer(xmlSubLayer));\n }\n\n // Clean up object\n for (const [key, value] of Object.entries(capabilities)) {\n if (value === undefined) {\n delete capabilities[key];\n }\n }\n\n return capabilities;\n}\n\n/** Extract typed request metadata from XML requests field */\nfunction extractRequests(xmlRequests: any): Record<string, WMSRequest> {\n const requests: Record<string, WMSRequest> = {};\n for (const [name, xmlRequest] of Object.entries(xmlRequests || {}) as any) {\n const mimeTypes = getXMLStringArray(xmlRequest?.Format);\n requests[name] = {mimeTypes};\n }\n return requests;\n}\n\nfunction extractExceptions(xmlException: any): WMSExceptions | undefined {\n const xmlExceptionFormats = getXMLArray(xmlException?.Format);\n if (xmlExceptionFormats.length > 0) {\n return {\n mimeTypes: getXMLStringArray(xmlException)\n };\n }\n return undefined;\n}\n\n/** Extract request data */\n// eslint-disable-next-line complexity, max-statements\nfunction extractLayer(xmlLayer: any): WMSLayer {\n const layer: WMSLayer = {\n // All layers must have a title\n title: String(xmlLayer?.Title || ''),\n // Name is required only if renderable\n name: xmlLayer?.Name && String(xmlLayer?.Name),\n abstract: xmlLayer?.Name && String(xmlLayer?.Abstract),\n keywords: getXMLStringArray(xmlLayer.KeywordList?.Keyword)\n };\n\n // WMS 1.3.0 changes SRS to CRS\n const crs = xmlLayer?.CRS || xmlLayer?.SRS;\n if (crs && Array.isArray(crs) && crs.every((_) => typeof _ === 'string')) {\n layer.crs = crs;\n }\n\n // v1.3.0 extract simple geographic bounding box\n let geographicBoundingBox =\n xmlLayer?.EX_GeographicBoundingBox && extractEXBoundingBox(xmlLayer?.EX_GeographicBoundingBox);\n if (geographicBoundingBox) {\n layer.geographicBoundingBox = geographicBoundingBox;\n }\n\n // v1.1.1 extract simple geographic bounding box\n geographicBoundingBox =\n xmlLayer?.LatLonBoundingBox && extractLatLonBoundingBox(xmlLayer?.LatLonBoundingBox);\n if (geographicBoundingBox) {\n layer.geographicBoundingBox = geographicBoundingBox;\n }\n\n // Extract per-CRS bounding boxes\n const boundingBoxes = xmlLayer?.BoundingBox && extractWMSBoundingBoxes(xmlLayer?.BoundingBox);\n if (boundingBoxes && boundingBoxes.length > 0) {\n layer.boundingBoxes = boundingBoxes;\n }\n\n // Extract dimensions\n const xmlDimensions = getXMLArray(xmlLayer?.Dimension);\n const dimensions = xmlDimensions.map((xml) => extractDimension(xml));\n if (dimensions.length) {\n layer.dimensions = dimensions;\n }\n\n if (xmlLayer?.opaque) {\n layer.opaque = getXMLBoolean(xmlLayer?.opaque);\n }\n if (xmlLayer?.cascaded) {\n layer.cascaded = getXMLBoolean(xmlLayer?.cascaded);\n }\n if (xmlLayer?.queryable) {\n layer.queryable = getXMLBoolean(xmlLayer?.queryable);\n }\n\n // Single layer is not represented as array in XML\n const xmlLayers = getXMLArray(xmlLayer?.Layer);\n const layers: WMSLayer[] = [];\n\n for (const xmlSubLayer of xmlLayers) {\n layers.push(extractLayer(xmlSubLayer));\n }\n\n if (layers.length > 0) {\n layer.layers = layers;\n }\n\n // Clean up object\n for (const [key, value] of Object.entries(layer)) {\n if (value === undefined) {\n delete layer[key];\n }\n }\n\n return layer;\n}\n\n/** WMS 1.3.0 Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractEXBoundingBox(xmlBoundingBox: any): [[number, number], [number, number]] {\n const {\n westBoundLongitude: w,\n northBoundLatitude: n,\n eastBoundLongitude: e,\n southBoundLatitude: s\n } = xmlBoundingBox;\n return [\n [w, s],\n [e, n]\n ];\n}\n\n/** WMS 1.1.1 Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractLatLonBoundingBox(xmlBoundingBox: any): [[number, number], [number, number]] {\n const {minx, miny, maxx, maxy} = xmlBoundingBox;\n return [\n [minx, miny],\n [maxx, maxy]\n ];\n}\n\n/** Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractWMSBoundingBoxes(xmlBoundingBoxes: any): WMSBoundingBox[] {\n const xmlBoxes = getXMLArray(xmlBoundingBoxes);\n return xmlBoxes.map((xmlBox) => extractWMSBoundingBox(xmlBox));\n}\n\n/** Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractWMSBoundingBox(xmlBoundingBox: any): WMSBoundingBox {\n const {CRS, SRS, minx, miny, maxx, maxy, resx, resy} = xmlBoundingBox;\n const boundingBox: WMSBoundingBox = {\n // CRS in 1.3.0, SRS in 1.1.1\n crs: CRS || SRS,\n boundingBox: [\n [getXMLFloat(minx) as number, getXMLFloat(miny) as number],\n [getXMLFloat(maxx) as number, getXMLFloat(maxy) as number]\n ]\n };\n if (resx) {\n boundingBox.xResolution = resx;\n }\n if (resy) {\n boundingBox.yResolution = resy;\n }\n return boundingBox;\n}\n\n/**\n * Extracts optional WMS Dimension layer field\n * @param xmlDimension\n * @example <Dimension name=\"time\" units=\"ISO8601\" default=\"2018-01-01\" nearestValue=\"0\">2001-01-01/2018-01-01/P1Y</Dimension>\n * @see https://mapserver.org/ogc/wms_dimension.html\n */\nfunction extractDimension(xmlDimension: any): WMSDimension {\n const {name, units, value: extent} = xmlDimension;\n\n const dimension: WMSDimension = {name, units, extent};\n\n if (xmlDimension.unitSymbol) {\n dimension.unitSymbol = xmlDimension.unitSymbol;\n }\n if (xmlDimension.default) {\n dimension.defaultValue = xmlDimension.default;\n }\n if (xmlDimension.multipleValues) {\n dimension.multipleValues = getXMLBoolean(xmlDimension.multipleValues);\n }\n if (xmlDimension.nearestValue) {\n dimension.nearestValue = getXMLBoolean(xmlDimension.nearestValue);\n }\n if (xmlDimension.current) {\n dimension.current = getXMLBoolean(xmlDimension.current);\n }\n\n return dimension;\n}\n\n/** Traverse layers and inject missing props from parents */\n// eslint-disable-next-line complexity\nfunction addInheritedLayerProps(layer: WMSLayer, parent: WMSLayer | null): void {\n if (parent?.geographicBoundingBox && !layer.geographicBoundingBox) {\n layer.geographicBoundingBox = [...parent.geographicBoundingBox];\n }\n\n if (parent?.crs && !layer.crs) {\n layer.crs = [...parent.crs];\n }\n\n if (parent?.boundingBoxes && !layer.boundingBoxes) {\n layer.boundingBoxes = [...parent.boundingBoxes];\n }\n\n if (parent?.dimensions && !layer.dimensions) {\n layer.dimensions = [...parent.dimensions];\n }\n\n for (const subLayer of layer.layers || []) {\n addInheritedLayerProps(subLayer, layer);\n }\n}\n"],"mappings":"AAGA,SAAQA,SAAS,QAAO,iBAAiB;AAAC,SAExCC,WAAW,EACXC,iBAAiB,EACjBC,aAAa,EACbC,WAAW,EACXC,aAAa;AAsJf,OAAO,SAASC,oBAAoBA,CAClCC,OAAe,EACfC,OAAqC,EACpB;EAAA,IAAAC,qBAA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AANA,MAAM,CAAEtC,UAAU,IAAI,CAACxF,KAAK,CAACwF,UAAU,EAAE;IAC3CxF,KAAK,CAACwF,UAAU,GAAG,CAAC,GAAGsC,MAAM,CAACtC,UAAU,CAAC;EAC3C;EAEA,KAAK,MAAMuC,QAAQ,IAAI/H,KAAK,CAACC,MAAM,IAAI,EAAE,EAAE;IACzCC,sBAAsB,CAAC6H,QAAQ,EAAE/H,KAAK,CAAC;EACzC;AACF"}
|
|
1
|
+
{"version":3,"file":"parse-wms-capabilities.js","names":["XMLLoader","getXMLArray","getXMLStringArray","getXMLInteger","getXMLFloat","getXMLBoolean","parseWMSCapabilities","xmlText","options","_XMLLoader$parseTextS","parsedXML","parseTextSync","call","xmlCapabilities","WMT_MS_Capabilities","WMS_Capabilities","capabilities","extractCapabilities","inheritedLayerProps","layer","layers","addInheritedLayerProps","includeRawJSON","json","includeXMLText","xml","_xml$Service","_xml$Service2","_xml$Service3","_xml$Service4","_xml$Service5","_xml$Service6","_xml$Service6$Keyword","_xml$Service7","_xml$Service8","_xml$Service9","_xml$Service10","_xml$Service11","_xml$Service12","_xml$Service13","_xml$Capability","_xml$Capability2","version","String","name","Service","Name","title","Title","undefined","abstract","Abstract","keywords","KeywordList","Keyword","fees","Fees","JSON","stringify","accessConstraints","AccessConstraints","layerLimit","LayerLimit","maxWidth","maxHeight","requests","extractRequests","Capability","Request","exceptions","extractExceptions","Exception","xmlLayers","Layer","xmlSubLayer","push","extractLayer","key","value","Object","entries","xmlRequests","xmlRequest","mimeTypes","Format","xmlException","xmlExceptionFormats","length","xmlLayer","_xmlLayer$KeywordList","crs","CRS","SRS","Array","isArray","every","_","geographicBoundingBox","EX_GeographicBoundingBox","extractEXBoundingBox","LatLonBoundingBox","extractLatLonBoundingBox","boundingBoxes","BoundingBox","extractWMSBoundingBoxes","xmlDimensions","Dimension","dimensions","map","extractDimension","opaque","cascaded","queryable","xmlBoundingBox","westBoundLongitude","w","northBoundLatitude","n","eastBoundLongitude","e","southBoundLatitude","s","minx","miny","maxx","maxy","xmlBoundingBoxes","xmlBoxes","xmlBox","extractWMSBoundingBox","resx","resy","boundingBox","xResolution","yResolution","xmlDimension","units","extent","dimension","unitSymbol","default","defaultValue","multipleValues","nearestValue","current","parent","subLayer"],"sources":["../../../../src/lib/parsers/wms/parse-wms-capabilities.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {XMLLoader} from '@loaders.gl/xml';\nimport {\n getXMLArray,\n getXMLStringArray,\n getXMLInteger,\n getXMLFloat,\n getXMLBoolean\n} from '../xml/parse-xml-helpers';\n\n/** All capabilities of a WMS service - response to a WMS `GetCapabilities` data structure extracted from XML */\nexport type WMSCapabilities = {\n /** Version of the WMS service */\n version?: string; // '1.3.0' | '1.1.1' | '1.1.0' | '1.0.0'\n /** A short name for the service */\n name: string;\n /** A human readable name for the service */\n title?: string;\n /** A more extensive description of the service */\n abstract?: string;\n /** A set of keywords e.g. for searching services */\n keywords: string[];\n /** A field of unspecified format, if present describes any access constraints required to use the service. */\n accessConstraints?: string;\n /** A field of unspecified format, if present describes any fees associated with the use of the service */\n fees?: string;\n /** If present, the max number of layers that can be rendered by the service */\n layerLimit?: number;\n /** If present, the widest image that can be rendered by the service */\n maxWidth?: number;\n /** If present, the tallest image that can be rendered by the service */\n maxHeight?: number;\n /** Hierarchical list of layers. */\n layers: WMSLayer[];\n /** A map with information about supported WMS requests. If a record is present, the request is supported by the service */\n requests: Record<string, WMSRequest>;\n /** Information about any exceptions that the service will report (HTTP status != 2xx) */\n exceptions?: WMSExceptions;\n /** Only if `options.json`: raw untyped JSON parsed from XML. Can include information not extracted in the typed response. */\n json?: Record<string, unknown>;\n /** Only if `options.xml`, the unparsed XML string can be requested */\n xml?: string;\n};\n\n/**\n * Metadata about a layer\n * Layers inherit many properties from their parent layers, see description of individual props for details.\n * @see https://www.ogc.org/standard/wms/ 7.2.4.6\n */\nexport type WMSLayer = {\n /** The title is a human readable name. It is mandatory on each layer. Not inherited. */\n title: string;\n /** A layer is renderable if it has a name. A named parent layer will render all its sublayers. Not inherited. */\n name?: string;\n /** A narrative description of the map layer. */\n abstract?: string;\n /** A set of keywords e.g. for searching layers */\n keywords: string[];\n /** layer limits in unspecified CRS:84-like lng/lat, for quick access w/o CRS calculations. Defined or inherited. */\n geographicBoundingBox?: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Supported CRS. Either defined or inherited. */\n crs?: string[];\n /** Bounding boxes in specific CRS:es */\n boundingBoxes?: WMSBoundingBox[];\n\n // minScale: number;\n // maxScale: number;\n // dimensions: ?? 7.2.4.6.10\n // MetadataURL\n // Attribution\n // Identifier and AuthorityURL\n // FeatureListURL\n // DataURL\n\n /** any extra dimension such as time */\n dimensions?: WMSDimension[];\n\n /** Whether queries can be performed on the layer */\n queryable?: boolean;\n /** `false` if layer has significant no-data areas that the client can display as transparent. */\n opaque?: boolean;\n /** WMS cascading allows server to expose layers coming from other WMS servers as if they were local layers */\n cascaded?: boolean;\n // noSubsets: boolean\n // fixedWith: number\n // fixedHeight: number\n\n /** A list of styles. @note not yet supported by WMSCapabilitiesLoader */\n styles?: unknown[];\n\n /** Sublayers - these inherit crs and boundingBox) if not overridden) */\n layers?: WMSLayer[];\n};\n\n/**\n * A bounding box specifies the coordinate range for data in the layer.\n * No data is available outside the bounding box.\n */\nexport type WMSBoundingBox = {\n /** CRS indicates the Layer CRS that applies to this bounding box. */\n crs: string;\n /** `[[w, s], [e, n]]`, indicates the limits of the bounding box using the axis units and order of the specified CRS. */\n boundingBox: [min: [x: number, y: number], max: [x: number, y: number]];\n /** Spatial horizontal resolution of data in same units as bounding box */\n xResolution?: number;\n /** Spatial vertical resolution of data in same units as bounding box */\n yResolution?: number;\n};\n\n/**\n * An optional dimension that can be queried using the `name=...` parameter\n * Note that layers that have at least one dimension without `default` value\n * become unrenderable unless the dimension value is supplied to GetMap requests.\n */\nexport type WMSDimension = {\n /** name of dimension, becomes a valid parameter key for this layer */\n name: string;\n /** Textual units for this dimensional axis */\n units: string;\n /** Unit symbol for this dimensional axis */\n unitSymbol?: string;\n /** Default value if no value is supplied. If dimension lacks defaultValue, requests fail if no value is supplied */\n defaultValue?: string;\n /** Can multiple values of the dimension be requested? */\n multipleValues?: boolean;\n /* Will nearest values will be substituted when out of range, if false exact values are required */\n nearestValue?: boolean;\n /** A special value \"current\" is supported, typically for time dimension */\n current?: boolean;\n /** Text content indicating available values for dimension */\n extent: string;\n};\n\n/** Metadata about a supported WMS request */\nexport type WMSRequest = {\n /** MIMEtypes that can be returned by this request. */\n mimeTypes: string[];\n};\n\nexport type WMSExceptions = {\n /** MIME types for exception response payloads. */\n mimeTypes: string[];\n};\n\nexport type ParseWMSCapabilitiesOptions = {\n /** Add inherited layer information to sub layers */\n inheritedLayerProps?: boolean;\n /** Include the \"raw\" JSON (parsed but untyped, unprocessed XML). May contain additional fields */\n includeRawJSON?: boolean;\n /** Include the original XML document text. May contain additional information. */\n includeXMLText?: boolean;\n};\n\n/**\n * Parses a typed data structure from raw XML for `GetCapabilities` response\n * @note Error handlings is fairly weak\n */\nexport function parseWMSCapabilities(\n xmlText: string,\n options?: ParseWMSCapabilitiesOptions\n): WMSCapabilities {\n const parsedXML = XMLLoader.parseTextSync?.(xmlText, options);\n const xmlCapabilities: any =\n parsedXML.WMT_MS_Capabilities || parsedXML.WMS_Capabilities || parsedXML;\n const capabilities = extractCapabilities(xmlCapabilities);\n // In case the processed, normalized capabilities do not contain everything,\n // the user can get the parsed XML structure.\n if (options?.inheritedLayerProps) {\n // Traverse layers and inject missing props from parents\n for (const layer of capabilities.layers) {\n addInheritedLayerProps(layer, null);\n }\n // Not yet implemented\n }\n\n if (options?.includeRawJSON) {\n capabilities.json = xmlCapabilities;\n }\n\n if (options?.includeXMLText) {\n capabilities.xml = xmlText;\n }\n\n return capabilities;\n}\n\n/** Extract typed capability data from XML */\nfunction extractCapabilities(xml: any): WMSCapabilities {\n const capabilities: WMSCapabilities = {\n version: String(xml.version || ''),\n name: String(xml.Service?.Name || 'unnamed'),\n title: xml.Service?.Title ? String(xml.Service?.Title) : undefined,\n abstract: xml.Service?.Abstract ? String(xml.Service?.Abstract) : undefined,\n keywords: getXMLStringArray(xml.Service?.KeywordList?.Keyword),\n fees: xml.Service?.Fees ? JSON.stringify(xml.Service?.Fees) : undefined,\n accessConstraints: xml.Service?.AccessConstraints\n ? JSON.stringify(xml.Service?.AccessConstraints)\n : undefined,\n layerLimit: getXMLInteger(xml.Service?.LayerLimit),\n maxWidth: getXMLInteger(xml.Service?.maxWidth),\n maxHeight: getXMLInteger(xml.Service?.maxHeight),\n layers: [],\n requests: extractRequests(xml.Capability?.Request),\n exceptions: extractExceptions(xml.Exception)\n // contact field is a mess of largely irrelevant information, put it last\n // contact: xml.Service?.Contact ? JSON.stringify(xml.Service?.Contact) : undefined,\n };\n\n // LAYERS\n const xmlLayers = getXMLArray(xml.Capability?.Layer);\n for (const xmlSubLayer of xmlLayers) {\n capabilities.layers.push(extractLayer(xmlSubLayer));\n }\n\n // Clean up object\n for (const [key, value] of Object.entries(capabilities)) {\n if (value === undefined) {\n delete capabilities[key];\n }\n }\n\n return capabilities;\n}\n\n/** Extract typed request metadata from XML requests field */\nfunction extractRequests(xmlRequests: any): Record<string, WMSRequest> {\n const requests: Record<string, WMSRequest> = {};\n for (const [name, xmlRequest] of Object.entries(xmlRequests || {}) as any) {\n const mimeTypes = getXMLStringArray(xmlRequest?.Format);\n requests[name] = {mimeTypes};\n }\n return requests;\n}\n\nfunction extractExceptions(xmlException: any): WMSExceptions | undefined {\n const xmlExceptionFormats = getXMLArray(xmlException?.Format);\n if (xmlExceptionFormats.length > 0) {\n return {\n mimeTypes: getXMLStringArray(xmlException)\n };\n }\n return undefined;\n}\n\n/** Extract request data */\n// eslint-disable-next-line complexity, max-statements\nfunction extractLayer(xmlLayer: any): WMSLayer {\n const layer: WMSLayer = {\n // All layers must have a title\n title: String(xmlLayer?.Title || ''),\n // Name is required only if renderable\n name: xmlLayer?.Name && String(xmlLayer?.Name),\n abstract: xmlLayer?.Name && String(xmlLayer?.Abstract),\n keywords: getXMLStringArray(xmlLayer.KeywordList?.Keyword)\n };\n\n // WMS 1.3.0 changes SRS to CRS\n const crs = xmlLayer?.CRS || xmlLayer?.SRS;\n if (crs && Array.isArray(crs) && crs.every((_) => typeof _ === 'string')) {\n layer.crs = crs;\n }\n\n // v1.3.0 extract simple geographic bounding box\n let geographicBoundingBox =\n xmlLayer?.EX_GeographicBoundingBox && extractEXBoundingBox(xmlLayer?.EX_GeographicBoundingBox);\n if (geographicBoundingBox) {\n layer.geographicBoundingBox = geographicBoundingBox;\n }\n\n // v1.1.1 extract simple geographic bounding box\n geographicBoundingBox =\n xmlLayer?.LatLonBoundingBox && extractLatLonBoundingBox(xmlLayer?.LatLonBoundingBox);\n if (geographicBoundingBox) {\n layer.geographicBoundingBox = geographicBoundingBox;\n }\n\n // Extract per-CRS bounding boxes\n const boundingBoxes = xmlLayer?.BoundingBox && extractWMSBoundingBoxes(xmlLayer?.BoundingBox);\n if (boundingBoxes && boundingBoxes.length > 0) {\n layer.boundingBoxes = boundingBoxes;\n }\n\n // Extract dimensions\n const xmlDimensions = getXMLArray(xmlLayer?.Dimension);\n const dimensions = xmlDimensions.map((xml) => extractDimension(xml));\n if (dimensions.length) {\n layer.dimensions = dimensions;\n }\n\n if (xmlLayer?.opaque) {\n layer.opaque = getXMLBoolean(xmlLayer?.opaque);\n }\n if (xmlLayer?.cascaded) {\n layer.cascaded = getXMLBoolean(xmlLayer?.cascaded);\n }\n if (xmlLayer?.queryable) {\n layer.queryable = getXMLBoolean(xmlLayer?.queryable);\n }\n\n // Single layer is not represented as array in XML\n const xmlLayers = getXMLArray(xmlLayer?.Layer);\n const layers: WMSLayer[] = [];\n\n for (const xmlSubLayer of xmlLayers) {\n layers.push(extractLayer(xmlSubLayer));\n }\n\n if (layers.length > 0) {\n layer.layers = layers;\n }\n\n // Clean up object\n for (const [key, value] of Object.entries(layer)) {\n if (value === undefined) {\n delete layer[key];\n }\n }\n\n return layer;\n}\n\n/** WMS 1.3.0 Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractEXBoundingBox(xmlBoundingBox: any): [[number, number], [number, number]] {\n const {\n westBoundLongitude: w,\n northBoundLatitude: n,\n eastBoundLongitude: e,\n southBoundLatitude: s\n } = xmlBoundingBox;\n return [\n [w, s],\n [e, n]\n ];\n}\n\n/** WMS 1.1.1 Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractLatLonBoundingBox(xmlBoundingBox: any): [[number, number], [number, number]] {\n const {minx, miny, maxx, maxy} = xmlBoundingBox;\n return [\n [minx, miny],\n [maxx, maxy]\n ];\n}\n\n/** Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractWMSBoundingBoxes(xmlBoundingBoxes: any): WMSBoundingBox[] {\n const xmlBoxes = getXMLArray(xmlBoundingBoxes);\n return xmlBoxes.map((xmlBox) => extractWMSBoundingBox(xmlBox));\n}\n\n/** Loosely defined geospatial bounding box in unspecified CRS for quick content searches */\nfunction extractWMSBoundingBox(xmlBoundingBox: any): WMSBoundingBox {\n const {CRS, SRS, minx, miny, maxx, maxy, resx, resy} = xmlBoundingBox;\n const boundingBox: WMSBoundingBox = {\n // CRS in 1.3.0, SRS in 1.1.1\n crs: CRS || SRS,\n boundingBox: [\n [getXMLFloat(minx) as number, getXMLFloat(miny) as number],\n [getXMLFloat(maxx) as number, getXMLFloat(maxy) as number]\n ]\n };\n if (resx) {\n boundingBox.xResolution = resx;\n }\n if (resy) {\n boundingBox.yResolution = resy;\n }\n return boundingBox;\n}\n\n/**\n * Extracts optional WMS Dimension layer field\n * @param xmlDimension\n * @example <Dimension name=\"time\" units=\"ISO8601\" default=\"2018-01-01\" nearestValue=\"0\">2001-01-01/2018-01-01/P1Y</Dimension>\n * @see https://mapserver.org/ogc/wms_dimension.html\n */\nfunction extractDimension(xmlDimension: any): WMSDimension {\n const {name, units, value: extent} = xmlDimension;\n\n const dimension: WMSDimension = {name, units, extent};\n\n if (xmlDimension.unitSymbol) {\n dimension.unitSymbol = xmlDimension.unitSymbol;\n }\n if (xmlDimension.default) {\n dimension.defaultValue = xmlDimension.default;\n }\n if (xmlDimension.multipleValues) {\n dimension.multipleValues = getXMLBoolean(xmlDimension.multipleValues);\n }\n if (xmlDimension.nearestValue) {\n dimension.nearestValue = getXMLBoolean(xmlDimension.nearestValue);\n }\n if (xmlDimension.current) {\n dimension.current = getXMLBoolean(xmlDimension.current);\n }\n\n return dimension;\n}\n\n/** Traverse layers and inject missing props from parents */\n// eslint-disable-next-line complexity\nfunction addInheritedLayerProps(layer: WMSLayer, parent: WMSLayer | null): void {\n if (parent?.geographicBoundingBox && !layer.geographicBoundingBox) {\n layer.geographicBoundingBox = [...parent.geographicBoundingBox];\n }\n\n if (parent?.crs && !layer.crs) {\n layer.crs = [...parent.crs];\n }\n\n if (parent?.boundingBoxes && !layer.boundingBoxes) {\n layer.boundingBoxes = [...parent.boundingBoxes];\n }\n\n if (parent?.dimensions && !layer.dimensions) {\n layer.dimensions = [...parent.dimensions];\n }\n\n for (const subLayer of layer.layers || []) {\n addInheritedLayerProps(subLayer, layer);\n }\n}\n"],"mappings":"AAIA,SAAQA,SAAS,QAAO,iBAAiB;AAAC,SAExCC,WAAW,EACXC,iBAAiB,EACjBC,aAAa,EACbC,WAAW,EACXC,aAAa;AAsJf,OAAO,SAASC,oBAAoBA,CAClCC,OAAe,EACfC,OAAqC,EACpB;EAAA,IAAAC,qBAAA;EACjB,MAAMC,SAAS,IAAAD,qBAAA,GAAGT,SAAS,CAACW,aAAa,cAAAF,qBAAA,uBAAvBA,qBAAA,CAAAG,IAAA,CAAAZ,SAAS,EAAiBO,OAAO,EAAEC,OAAO,CAAC;EAC7D,MAAMK,eAAoB,GACxBH,SAAS,CAACI,mBAAmB,IAAIJ,SAAS,CAACK,gBAAgB,IAAIL,SAAS;EAC1E,MAAMM,YAAY,GAAGC,mBAAmB,CAACJ,eAAe,CAAC;EA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
|
|
1
|
-
{"version":3,"file":"parse-wms-error.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-wms-error.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-error.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,KAAA,GAAG,MAAM,CAW3D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-error.js","names":["XMLLoader","parseWMSError","text","options","_XMLLoader$parseTextS","_parsedXML$ServiceExc","_parsedXML$ogcServic","parsedXML","parseTextSync","call","serviceExceptionXML","ServiceExceptionReport","ServiceException","message","value","code"],"sources":["../../../../src/lib/parsers/wms/parse-wms-error.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"parse-wms-error.js","names":["XMLLoader","parseWMSError","text","options","_XMLLoader$parseTextS","_parsedXML$ServiceExc","_parsedXML$ogcServic","parsedXML","parseTextSync","call","serviceExceptionXML","ServiceExceptionReport","ServiceException","message","value","code"],"sources":["../../../../src/lib/parsers/wms/parse-wms-error.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {XMLLoader} from '@loaders.gl/xml';\n\n/**\n * Extract an error message from WMS error response XML\n * @param text\n * @param options\n * @returns a string with a human readable message\n */\nexport function parseWMSError(text: string, options): string {\n const parsedXML = XMLLoader.parseTextSync?.(text, options);\n const serviceExceptionXML =\n parsedXML?.ServiceExceptionReport?.ServiceException ||\n parsedXML?.['ogc:ServiceExceptionReport']?.['ogc:ServiceException'];\n // Sigh, can be either a string or an object\n const message =\n typeof serviceExceptionXML === 'string'\n ? serviceExceptionXML\n : serviceExceptionXML.value || serviceExceptionXML.code || 'Unknown error';\n return message;\n}\n"],"mappings":"AAIA,SAAQA,SAAS,QAAO,iBAAiB;AAQzC,OAAO,SAASC,aAAaA,CAACC,IAAY,EAAEC,OAAO,EAAU;EAAA,IAAAC,qBAAA,EAAAC,qBAAA,EAAAC,oBAAA;EAC3D,MAAMC,SAAS,IAAAH,qBAAA,GAAGJ,SAAS,CAACQ,aAAa,cAAAJ,qBAAA,uBAAvBA,qBAAA,CAAAK,IAAA,CAAAT,SAAS,EAAiBE,IAAI,EAAEC,OAAO,CAAC;EAC1D,MAAMO,mBAAmB,GACvB,CAAAH,SAAS,aAATA,SAAS,wBAAAF,qBAAA,GAATE,SAAS,CAAEI,sBAAsB,cAAAN,qBAAA,uBAAjCA,qBAAA,CAAmCO,gBAAgB,MACnDL,SAAS,aAATA,SAAS,wBAAAD,oBAAA,GAATC,SAAS,CAAG,4BAA4B,CAAC,cAAAD,oBAAA,uBAAzCA,oBAAA,CAA4C,sBAAsB,CAAC;EAErE,MAAMO,OAAO,GACX,OAAOH,mBAAmB,KAAK,QAAQ,GACnCA,mBAAmB,GACnBA,mBAAmB,CAACI,KAAK,IAAIJ,mBAAmB,CAACK,IAAI,IAAI,eAAe;EAC9E,OAAOF,OAAO;AAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-features.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-features.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-wms-features.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-features.ts"],"names":[],"mappings":"AAMA,oEAAoE;AACpE,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,UAAU,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAC;CACpE,CAAC;AAEF;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,KAAA,GAAG,cAAc,CASzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-features.js","names":["XMLLoader","parseWMSFeatureInfo","text","options","_XMLLoader$parseTextS","_parsedXML$FeatureInf","parsedXML","parseTextSync","call","xmlFeatureInfo","FeatureInfoResponse","FIELDS","xmlFeatures","Array","isArray","features","map","xmlFeature","extractFeature","xmlFields","attributes","type","bounds","bottom","top","left","right"],"sources":["../../../../src/lib/parsers/wms/parse-wms-features.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"parse-wms-features.js","names":["XMLLoader","parseWMSFeatureInfo","text","options","_XMLLoader$parseTextS","_parsedXML$FeatureInf","parsedXML","parseTextSync","call","xmlFeatureInfo","FeatureInfoResponse","FIELDS","xmlFeatures","Array","isArray","features","map","xmlFeature","extractFeature","xmlFields","attributes","type","bounds","bottom","top","left","right"],"sources":["../../../../src/lib/parsers/wms/parse-wms-features.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {XMLLoader} from '@loaders.gl/xml';\n\n/** WMS Feature info - response to a WMS `GetFeatureInfo` request */\nexport type WMSFeatureInfo = {\n features: WMSFeature[];\n};\n\nexport type WMSFeature = {\n attributes: Record<string, number | string>;\n type: string;\n bounds: {top: number; bottom: number; left: number; right: number};\n};\n\n/**\n * Parses a typed data structure from raw XML for `GetFeatureInfo` response\n * @note Error handlings is fairly weak\n */\nexport function parseWMSFeatureInfo(text: string, options): WMSFeatureInfo {\n const parsedXML = XMLLoader.parseTextSync?.(text, options);\n const xmlFeatureInfo: any = parsedXML.FeatureInfoResponse?.FIELDS || [];\n\n const xmlFeatures = Array.isArray(xmlFeatureInfo) ? xmlFeatureInfo : [xmlFeatureInfo];\n\n return {\n features: xmlFeatures.map((xmlFeature) => extractFeature(xmlFeature))\n };\n}\n\nfunction extractFeature(xmlFeature: any) {\n const xmlFields = xmlFeature || {};\n // TODO - not correct\n return {\n attributes: xmlFields,\n type: '',\n bounds: {bottom: 0, top: 0, left: 0, right: 0}\n };\n}\n"],"mappings":"AAIA,SAAQA,SAAS,QAAO,iBAAiB;AAiBzC,OAAO,SAASC,mBAAmBA,CAACC,IAAY,EAAEC,OAAO,EAAkB;EAAA,IAAAC,qBAAA,EAAAC,qBAAA;EACzE,MAAMC,SAAS,IAAAF,qBAAA,GAAGJ,SAAS,CAACO,aAAa,cAAAH,qBAAA,uBAAvBA,qBAAA,CAAAI,IAAA,CAAAR,SAAS,EAAiBE,IAAI,EAAEC,OAAO,CAAC;EAC1D,MAAMM,cAAmB,GAAG,EAAAJ,qBAAA,GAAAC,SAAS,CAACI,mBAAmB,cAAAL,qBAAA,uBAA7BA,qBAAA,CAA+BM,MAAM,KAAI,EAAE;EAEvE,MAAMC,WAAW,GAAGC,KAAK,CAACC,OAAO,CAACL,cAAc,CAAC,GAAGA,cAAc,GAAG,CAACA,cAAc,CAAC;EAErF,OAAO;IACLM,QAAQ,EAAEH,WAAW,CAACI,GAAG,CAAEC,UAAU,IAAKC,cAAc,CAACD,UAAU,CAAC;EACtE,CAAC;AACH;AAEA,SAASC,cAAcA,CAACD,UAAe,EAAE;EACvC,MAAME,SAAS,GAAGF,UAAU,IAAI,CAAC,CAAC;EAElC,OAAO;IACLG,UAAU,EAAED,SAAS;IACrBE,IAAI,EAAE,EAAE;IACRC,MAAM,EAAE;MAACC,MAAM,EAAE,CAAC;MAAEC,GAAG,EAAE,CAAC;MAAEC,IAAI,EAAE,CAAC;MAAEC,KAAK,EAAE;IAAC;EAC/C,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-layer-description.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-layer-description.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-wms-layer-description.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-layer-description.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAGtD,qEAAqE;AACrE,MAAM,MAAM,mBAAmB,GAAG;IAChC,MAAM,EAAE,EAAE,EAAE,CAAC;CACd,CAAC;AAEF;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,gBAAgB,GACzB,mBAAmB,CAIrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-layer-description.js","names":["XMLLoader","parseWMSLayerDescription","text","options","_XMLLoader$parseTextS","parsedXML","parseTextSync","call"],"sources":["../../../../src/lib/parsers/wms/parse-wms-layer-description.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"parse-wms-layer-description.js","names":["XMLLoader","parseWMSLayerDescription","text","options","_XMLLoader$parseTextS","parsedXML","parseTextSync","call"],"sources":["../../../../src/lib/parsers/wms/parse-wms-layer-description.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {XMLLoaderOptions} from '@loaders.gl/xml';\nimport {XMLLoader} from '@loaders.gl/xml';\n\n/** Layer description - response to a WMS `DescribeLayer` request */\nexport type WMSLayerDescription = {\n layers: {}[];\n};\n\n/**\n * Parses a typed data structure from raw XML for `GetFeatureInfo` response\n * @note Error handlings is fairly weak\n */\nexport function parseWMSLayerDescription(\n text: string,\n options?: XMLLoaderOptions\n): WMSLayerDescription {\n const parsedXML = XMLLoader.parseTextSync?.(text, options);\n // TODO - implement parser\n return parsedXML as unknown as WMSLayerDescription;\n}\n"],"mappings":"AAKA,SAAQA,SAAS,QAAO,iBAAiB;AAWzC,OAAO,SAASC,wBAAwBA,CACtCC,IAAY,EACZC,OAA0B,EACL;EAAA,IAAAC,qBAAA;EACrB,MAAMC,SAAS,IAAAD,qBAAA,GAAGJ,SAAS,CAACM,aAAa,cAAAF,qBAAA,uBAAvBA,qBAAA,CAAAG,IAAA,CAAAP,SAAS,EAAiBE,IAAI,EAAEC,OAAO,CAAC;EAE1D,OAAOE,SAAS;AAClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-xml-helpers.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/xml/parse-xml-helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parse-xml-helpers.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/xml/parse-xml-helpers.ts"],"names":[],"mappings":"AAIA,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,QAAQ,EAAE,GAAG,GAAG,GAAG,EAAE,CAWhD;AAED,qCAAqC;AACrC,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,GAAG,GAAG,MAAM,EAAE,CAOzD;AAED,oBAAoB;AACpB,wBAAgB,WAAW,CAAC,QAAQ,EAAE,GAAG,EAAE,YAAY,YAAY,GAAG,MAAM,GAAG,SAAS,CASvF;AAED,sBAAsB;AACtB,wBAAgB,aAAa,CAAC,QAAQ,EAAE,GAAG,EAAE,YAAY,YAAY,GAAG,MAAM,GAAG,SAAS,CASzF;AAED,yCAAyC;AACzC,wBAAgB,aAAa,CAAC,QAAQ,EAAE,GAAG,GAAG,OAAO,CAapD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-xml-helpers.js","names":["getXMLArray","xmlValue","Array","isArray","getXMLStringArray","xmlArray","length","every","_","getXMLFloat","defaultValue","arguments","undefined","parseFloat","getXMLInteger","parseInt","getXMLBoolean"],"sources":["../../../../src/lib/parsers/xml/parse-xml-helpers.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"parse-xml-helpers.js","names":["getXMLArray","xmlValue","Array","isArray","getXMLStringArray","xmlArray","length","every","_","getXMLFloat","defaultValue","arguments","undefined","parseFloat","getXMLInteger","parseInt","getXMLBoolean"],"sources":["../../../../src/lib/parsers/xml/parse-xml-helpers.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/** A single element of an array is not represented as an array in XML */\nexport function getXMLArray(xmlValue: any): any[] {\n // Already an array, return as is\n if (Array.isArray(xmlValue)) {\n return xmlValue;\n }\n // Single value, wrap in array\n if (xmlValue) {\n return [xmlValue];\n }\n // nullish, return empty array\n return [];\n}\n\n/** Get a list of strings from XML */\nexport function getXMLStringArray(xmlValue: any): string[] {\n const xmlArray = getXMLArray(xmlValue);\n if (xmlArray.length > 0 && xmlArray.every((_) => typeof _ === 'string')) {\n return xmlArray as string[];\n }\n // TODO - error handling?\n return [];\n}\n\n/** Get XML float */\nexport function getXMLFloat(xmlValue: any, defaultValue = undefined): number | undefined {\n switch (typeof xmlValue) {\n case 'number':\n return xmlValue;\n case 'string':\n return parseFloat(xmlValue);\n default:\n return undefined;\n }\n}\n\n/** Get XML integer */\nexport function getXMLInteger(xmlValue: any, defaultValue = undefined): number | undefined {\n switch (typeof xmlValue) {\n case 'number':\n return xmlValue;\n case 'string':\n return parseInt(xmlValue, 10);\n default:\n return undefined;\n }\n}\n\n/** Somewhat arbitrary boolean parsing */\nexport function getXMLBoolean(xmlValue: any): boolean {\n switch (xmlValue) {\n case 'true':\n return true;\n case 'false':\n return false;\n case '1':\n return true;\n case '0':\n return false;\n default:\n return false;\n }\n}\n"],"mappings":"AAKA,OAAO,SAASA,WAAWA,CAACC,QAAa,EAAS;EAEhD,IAAIC,KAAK,CAACC,OAAO,CAACF,QAAQ,CAAC,EAAE;IAC3B,OAAOA,QAAQ;EACjB;EAEA,IAAIA,QAAQ,EAAE;IACZ,OAAO,CAACA,QAAQ,CAAC;EACnB;EAEA,OAAO,EAAE;AACX;AAGA,OAAO,SAASG,iBAAiBA,CAACH,QAAa,EAAY;EACzD,MAAMI,QAAQ,GAAGL,WAAW,CAACC,QAAQ,CAAC;EACtC,IAAII,QAAQ,CAACC,MAAM,GAAG,CAAC,IAAID,QAAQ,CAACE,KAAK,CAAEC,CAAC,IAAK,OAAOA,CAAC,KAAK,QAAQ,CAAC,EAAE;IACvE,OAAOH,QAAQ;EACjB;EAEA,OAAO,EAAE;AACX;AAGA,OAAO,SAASI,WAAWA,CAACR,QAAa,EAAgD;EAAA,IAA9CS,YAAY,GAAAC,SAAA,CAAAL,MAAA,QAAAK,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAGC,SAAS;EACjE,QAAQ,OAAOX,QAAQ;IACrB,KAAK,QAAQ;MACX,OAAOA,QAAQ;IACjB,KAAK,QAAQ;MACX,OAAOY,UAAU,CAACZ,QAAQ,CAAC;IAC7B;MACE,OAAOW,SAAS;EACpB;AACF;AAGA,OAAO,SAASE,aAAaA,CAACb,QAAa,EAAgD;EAAA,IAA9CS,YAAY,GAAAC,SAAA,CAAAL,MAAA,QAAAK,SAAA,QAAAC,SAAA,GAAAD,SAAA,MAAGC,SAAS;EACnE,QAAQ,OAAOX,QAAQ;IACrB,KAAK,QAAQ;MACX,OAAOA,QAAQ;IACjB,KAAK,QAAQ;MACX,OAAOc,QAAQ,CAACd,QAAQ,EAAE,EAAE,CAAC;IAC/B;MACE,OAAOW,SAAS;EACpB;AACF;AAGA,OAAO,SAASI,aAAaA,CAACf,QAAa,EAAW;EACpD,QAAQA,QAAQ;IACd,KAAK,MAAM;MACT,OAAO,IAAI;IACb,KAAK,OAAO;MACV,OAAO,KAAK;IACd,KAAK,GAAG;MACN,OAAO,IAAI;IACb,KAAK,GAAG;MACN,OAAO,KAAK;IACd;MACE,OAAO,KAAK;EAChB;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-image-service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/create-image-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-image-service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/create-image-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,WAAW,EAAE,OAAO,EAAC,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAC,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG;IACxD,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,EAC9B,QAAQ,EAAE,OAAO,EAAE,GAClB,WAAW,CASb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-image-service.js","names":["createImageService","props","services","type","service","guessServiceType","url","getServiceOfType","Error","create","testURL"],"sources":["../../../src/lib/services/create-image-service.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"create-image-service.js","names":["createImageService","props","services","type","service","guessServiceType","url","getServiceOfType","Error","create","testURL"],"sources":["../../../src/lib/services/create-image-service.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {ImageSource, Service} from '@loaders.gl/loader-utils';\nimport {ImageServiceProps} from './image-service';\n\nexport type CreateImageServiceProps = ImageServiceProps & {\n type?: string | 'auto';\n};\n\n/**\n * Creates an image source\n * If type is not supplied, will try to automatically detect the the\n * @param url URL to the image source\n * @param type type of source. if not known, set to 'auto'\n * @returns an ImageSource instance\n */\nexport function createImageService(\n props: CreateImageServiceProps,\n services: Service[]\n): ImageSource {\n const {type = 'auto'} = props;\n const service: Service | null =\n type === 'auto' ? guessServiceType(props.url, services) : getServiceOfType(type, services);\n\n if (!service) {\n throw new Error('Not a valid image source type');\n }\n return service.create(props);\n}\n\n/** Guess service type from URL */\nfunction getServiceOfType(type: string, services: Service[]): Service | null {\n // if (type === 'template') {\n // return ImageService;\n // }\n\n for (const service of services) {\n if (service.type === type) {\n return service;\n }\n }\n\n return null;\n}\n\n/** Guess service type from URL */\nfunction guessServiceType(url: string, services: Service[]): Service | null {\n for (const service of services) {\n if (service.testURL && service.testURL(url)) {\n return service;\n }\n }\n\n return null;\n}\n"],"mappings":"AAkBA,OAAO,SAASA,kBAAkBA,CAChCC,KAA8B,EAC9BC,QAAmB,EACN;EACb,MAAM;IAACC,IAAI,GAAG;EAAM,CAAC,GAAGF,KAAK;EAC7B,MAAMG,OAAuB,GAC3BD,IAAI,KAAK,MAAM,GAAGE,gBAAgB,CAACJ,KAAK,CAACK,GAAG,EAAEJ,QAAQ,CAAC,GAAGK,gBAAgB,CAACJ,IAAI,EAAED,QAAQ,CAAC;EAE5F,IAAI,CAACE,OAAO,EAAE;IACZ,MAAM,IAAII,KAAK,CAAC,+BAA+B,CAAC;EAClD;EACA,OAAOJ,OAAO,CAACK,MAAM,CAACR,KAAK,CAAC;AAC9B;AAGA,SAASM,gBAAgBA,CAACJ,IAAY,EAAED,QAAmB,EAAkB;EAK3E,KAAK,MAAME,OAAO,IAAIF,QAAQ,EAAE;IAC9B,IAAIE,OAAO,CAACD,IAAI,KAAKA,IAAI,EAAE;MACzB,OAAOC,OAAO;IAChB;EACF;EAEA,OAAO,IAAI;AACb;AAGA,SAASC,gBAAgBA,CAACC,GAAW,EAAEJ,QAAmB,EAAkB;EAC1E,KAAK,MAAME,OAAO,IAAIF,QAAQ,EAAE;IAC9B,IAAIE,OAAO,CAACM,OAAO,IAAIN,OAAO,CAACM,OAAO,CAACJ,GAAG,CAAC,EAAE;MAC3C,OAAOF,OAAO;IAChB;EACF;EAEA,OAAO,IAAI;AACb"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/image-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"image-service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/image-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAGlD,OAAO,KAAK,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAC,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAErD,mFAAmF;AACnF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,gFAAgF;IAChF,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B,CAAC;AAEF;;;;GAIG;AACH,8BAAsB,YAAY,CAChC,MAAM,SAAS,iBAAiB,GAAG,iBAAiB,CACpD,SAAQ,WAAW,CAAC,MAAM,CAAC;IAC3B,MAAM,CAAC,IAAI,EAAE,MAAM,CAAc;IACjC,MAAM,CAAC,OAAO,QAAS,MAAM,KAAG,OAAO,CAAoC;gBAE/D,KAAK,EAAE,MAAM;IAMnB,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAI3C,QAAQ,CAAC,UAAU,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC;IAUlE,wDAAwD;IACxD,SAAS,CAAC,qBAAqB,CAAC,UAAU,EAAE,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAKxF,yCAAyC;IACzC,SAAS,CAAC,kBAAkB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM;CAU1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-service.js","names":["ImageLoader","ImageSource","ImageService","constructor","props","getMetadata","Error","getImage","parameters","granularParameters","getGranularParameters","url","getURLFromTemplate","response","fetch","arrayBuffer","parse","east","north","west","south","boundingBox","key","value","Object","entries","replace","String","type","testURL","toLowerCase","includes"],"sources":["../../../src/lib/services/image-service.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"image-service.js","names":["ImageLoader","ImageSource","ImageService","constructor","props","getMetadata","Error","getImage","parameters","granularParameters","getGranularParameters","url","getURLFromTemplate","response","fetch","arrayBuffer","parse","east","north","west","south","boundingBox","key","value","Object","entries","replace","String","type","testURL","toLowerCase","includes"],"sources":["../../../src/lib/services/image-service.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {ImageType} from '@loaders.gl/images';\nimport {ImageLoader} from '@loaders.gl/images';\n\nimport type {ImageSourceMetadata, GetImageParameters} from '@loaders.gl/loader-utils';\nimport {ImageSource} from '@loaders.gl/loader-utils';\n\n/** Template URL string should contain `${width}` etc which will be substituted. */\nexport type ImageServiceProps = {\n /** Base URL to the service */\n url: string;\n /** Any load options to the loaders.gl Loaders used by the WMSService methods */\n loadOptions?: LoaderOptions;\n};\n\n/**\n * Quickly connect to \"ad hoc\" image sources without subclassing ImageSource.\n * ImageSource allows template url strings to be used to ad hoc connect to arbitrary image data sources\n * Accepts a template url string and builds requests URLs\n */\nexport abstract class ImageService<\n PropsT extends ImageServiceProps = ImageServiceProps\n> extends ImageSource<PropsT> {\n static type: string = 'template';\n static testURL = (url: string): boolean => url.toLowerCase().includes('{');\n\n constructor(props: PropsT) {\n super(props);\n }\n\n // IMAGE SOURCE API\n\n async getMetadata(): Promise<ImageSourceMetadata> {\n throw new Error('ImageSource.getMetadata not implemented');\n }\n\n async getImage(parameters: GetImageParameters): Promise<ImageType> {\n const granularParameters = this.getGranularParameters(parameters);\n const url = this.getURLFromTemplate(granularParameters);\n const response = await this.fetch(url);\n const arrayBuffer = await response.arrayBuffer();\n return await ImageLoader.parse(arrayBuffer);\n }\n\n // HELPERS\n\n /** Break up bounding box in east, north, south, west */\n protected getGranularParameters(parameters: GetImageParameters): Record<string, unknown> {\n const [[east, north], [west, south]] = parameters.boundingBox;\n return {...parameters, east, north, south, west};\n }\n\n /** Supports both ${} and {} notations */\n protected getURLFromTemplate(parameters: Record<string, unknown>): string {\n let url = this.props.url;\n for (const [key, value] of Object.entries(parameters)) {\n // TODO - parameter could be repeated\n // const regex = new RegExp(`\\${${key}}`, 'g');\n url = url.replace(`\\${${key}}`, String(value));\n url = url.replace(`{${key}}`, String(value));\n }\n return url;\n }\n}\n"],"mappings":"AAMA,SAAQA,WAAW,QAAO,oBAAoB;AAG9C,SAAQC,WAAW,QAAO,0BAA0B;AAepD,OAAO,MAAeC,YAAY,SAExBD,WAAW,CAAS;EAI5BE,WAAWA,CAACC,KAAa,EAAE;IACzB,KAAK,CAACA,KAAK,CAAC;EACd;EAIA,MAAMC,WAAWA,CAAA,EAAiC;IAChD,MAAM,IAAIC,KAAK,CAAC,yCAAyC,CAAC;EAC5D;EAEA,MAAMC,QAAQA,CAACC,UAA8B,EAAsB;IACjE,MAAMC,kBAAkB,GAAG,IAAI,CAACC,qBAAqB,CAACF,UAAU,CAAC;IACjE,MAAMG,GAAG,GAAG,IAAI,CAACC,kBAAkB,CAACH,kBAAkB,CAAC;IACvD,MAAMI,QAAQ,GAAG,MAAM,IAAI,CAACC,KAAK,CAACH,GAAG,CAAC;IACtC,MAAMI,WAAW,GAAG,MAAMF,QAAQ,CAACE,WAAW,CAAC,CAAC;IAChD,OAAO,MAAMf,WAAW,CAACgB,KAAK,CAACD,WAAW,CAAC;EAC7C;EAKUL,qBAAqBA,CAACF,UAA8B,EAA2B;IACvF,MAAM,CAAC,CAACS,IAAI,EAAEC,KAAK,CAAC,EAAE,CAACC,IAAI,EAAEC,KAAK,CAAC,CAAC,GAAGZ,UAAU,CAACa,WAAW;IAC7D,OAAO;MAAC,GAAGb,UAAU;MAAES,IAAI;MAAEC,KAAK;MAAEE,KAAK;MAAED;IAAI,CAAC;EAClD;EAGUP,kBAAkBA,CAACJ,UAAmC,EAAU;IACxE,IAAIG,GAAG,GAAG,IAAI,CAACP,KAAK,CAACO,GAAG;IACxB,KAAK,MAAM,CAACW,GAAG,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACjB,UAAU,CAAC,EAAE;MAGrDG,GAAG,GAAGA,GAAG,CAACe,OAAO,CAAE,MAAKJ,GAAI,GAAE,EAAEK,MAAM,CAACJ,KAAK,CAAC,CAAC;MAC9CZ,GAAG,GAAGA,GAAG,CAACe,OAAO,CAAE,IAAGJ,GAAI,GAAE,EAAEK,MAAM,CAACJ,KAAK,CAAC,CAAC;IAC9C;IACA,OAAOZ,GAAG;EACZ;AACF;AA3CsBT,YAAY,CAGzB0B,IAAI,GAAW,UAAU;AAHZ1B,YAAY,CAIzB2B,OAAO,GAAIlB,GAAW,IAAcA,GAAG,CAACmB,WAAW,CAAC,CAAC,CAACC,QAAQ,CAAC,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arcgis-image-service.d.ts","sourceRoot":"","sources":["../../../src/services/arcgis/arcgis-image-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"arcgis-image-service.d.ts","sourceRoot":"","sources":["../../../src/services/arcgis/arcgis-image-service.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAC7C,OAAO,KAAK,EAAC,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,0BAA0B,CAAC;AAE/F,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAC,YAAY,EAAC,MAAM,kCAAkC,CAAC;AAK9D,MAAM,MAAM,sBAAsB,GAAG,iBAAiB,GAAG;IACvD,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IACzE,IAAI,EAAE,MAAM,CAAC;gBAED,KAAK,EAAE,sBAAsB;IAOnC,WAAW,IAAI,OAAO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MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,KAAK,CAAC;QACb,MAAM,CAAC,EAAE,QAAQ,CAAC;QAClB,SAAS,CAAC,EAAE,IAAI,CAAC;QACjB,MAAM,CAAC,EAAE,KAAK,CAAC;QACf,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;QAC5C,aAAa,CAAC,EAAE,sBAAsB,CAAC;QACvC,WAAW,CAAC,EAAE,KAAK,CAAC;QACpB,kBAAkB,CAAC,EAAE,KAAK,CAAC;QAC3B,OAAO,CAAC,EAAE,KAAK,CAAC;QAChB,UAAU,CAAC,EAAE,KAAK,CAAC;QACnB,aAAa,CAAC,EAAE,KAAK,CAAC;QACtB,CAAC,CAAC,EAAE,OAAO,CAAC;KACb,GAAG,MAAM;IAaV;;;SAGK;IACL,SAAS,CAAC,MAAM,CACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B,MAAM;IAeT,qFAAqF;cACrE,aAAa,CAAC,QAAQ,EAAE,QAAQ;CAQjD;AAED,eAAO,MAAM,kBAAkB,EAAE,OAIhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arcgis-image-service.js","names":["ImageService","ArcGISImageSource","constructor","props","data","url","getMetadata","metadata","getImage","parameters","Error","exportImage","options","metadataURL","exportImageURL","bbox","size","width","height","arcgisOptions","getUrl","path","extra","first","key","value","Object","entries","Array","isArray","toUpperCase","join","String","checkResponse","response","ok","ArcGISImageService","type","testURL","toLowerCase","includes","create"],"sources":["../../../src/services/arcgis/arcgis-image-service.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"arcgis-image-service.js","names":["ImageService","ArcGISImageSource","constructor","props","data","url","getMetadata","metadata","getImage","parameters","Error","exportImage","options","metadataURL","exportImageURL","bbox","size","width","height","arcgisOptions","getUrl","path","extra","first","key","value","Object","entries","Array","isArray","toUpperCase","join","String","checkResponse","response","ok","ArcGISImageService","type","testURL","toLowerCase","includes","create"],"sources":["../../../src/services/arcgis/arcgis-image-service.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport {ImageType} from '@loaders.gl/images';\nimport type {Service, ImageSourceMetadata, GetImageParameters} from '@loaders.gl/loader-utils';\n\nimport type {ImageServiceProps} from '../../lib/services/image-service';\nimport {ImageService} from '../../lib/services/image-service';\n\n// import type {ImageSourceProps} from '@loaders.gl/loader-utils';\n// import {ImageSource} from '@loaders.gl/loader-utils';\n\nexport type ArcGISImageServerProps = ImageServiceProps & {\n url: string;\n};\n\n/**\n * ArcGIS ImageServer\n * Note - exports a big API, that could be exposed here if there is a use case\n * @see https://developers.arcgis.com/rest/services-reference/enterprise/image-service.htm\n */\nexport class ArcGISImageSource extends ImageService<ArcGISImageServerProps> {\n data: string;\n\n constructor(props: ArcGISImageServerProps) {\n super(props);\n this.data = props.url;\n }\n\n // ImageSource (normalized endpoints)\n\n async getMetadata(): Promise<ImageSourceMetadata> {\n return (await this.metadata()) as ImageSourceMetadata;\n // TODO - normalize metadata\n }\n\n async getImage(parameters: GetImageParameters): Promise<ImageType> {\n throw new Error('not implemented');\n // TODO - Map generic parameters to ArcGIS specific parameters\n // return await this.exportImage(parameters);\n }\n\n // ImageServer endpoints\n\n async metadata(): Promise<unknown> {\n // We just need a JSON parsing...\n // return this.getUrl({path: '', ...options});\n throw new Error('not implemented');\n }\n\n /** \n * Form a URL to an ESRI ImageServer\n // https://sampleserver6.arcgisonline.com/arcgis/rest/services/NLCDLandCover2001/ImageServer/exportImage?bbox=${bounds[0]},${bounds[1]},${bounds[2]},${bounds[3]}&bboxSR=4326&size=${width},${height}&imageSR=102100&time=&format=jpgpng&pixelType=U8&noData=&noDataInterpretation=esriNoDataMatchAny&interpolation=+RSP_NearestNeighbor&compression=&compressionQuality=&bandIds=&mosaicRule=&renderingRule=&f=image`,\n */\n exportImage(options: {\n boundingBox: [number, number, number, number];\n boundingBoxSR?: string;\n width: number;\n height: number;\n imageSR?: string;\n time?: never;\n format?: 'jpgpng';\n pixelType?: 'U8';\n noData?: never;\n noDataInterpretation?: 'esriNoDataMatchAny';\n interpolation?: '+RSP_NearestNeighbor';\n compression?: never;\n compressionQuality?: never;\n bandIds?: never;\n mosaicRule?: never;\n renderingRule?: never;\n f?: 'image';\n }): Promise<ImageType> {\n // See WMSService.getMap()\n throw new Error('not implemented');\n }\n\n // URL creators\n\n metadataURL(options: {parameters?: Record<string, unknown>}): string {\n return `${this.props.url}?f=pjson`;\n }\n\n /** \n * Form a URL to an ESRI ImageServer\n // https://sampleserver6.arcgisonline.com/arcgis/rest/services/NLCDLandCover2001/ImageServer/exportImage?\n // bbox=${bounds[0]},${bounds[1]},${bounds[2]},${bounds[3]}&bboxSR=4326&\n // size=${width},${height}&imageSR=102100&time=&format=jpgpng&pixelType=U8&\n // noData=&noDataInterpretation=esriNoDataMatchAny&interpolation=+RSP_NearestNeighbor&compression=&\n // compressionQuality=&bandIds=&mosaicRule=&renderingRule=&\n // f=image\n */\n exportImageURL(options: {\n bbox: [number, number, number, number];\n boxSR?: string;\n width: number;\n height: number;\n imageSR?: string;\n time?: never;\n format?: 'jpgpng';\n pixelType?: 'U8';\n noData?: never;\n noDataInterpretation?: 'esriNoDataMatchAny';\n interpolation?: '+RSP_NearestNeighbor';\n compression?: never;\n compressionQuality?: never;\n bandIds?: never;\n mosaicRule?: never;\n renderingRule?: never;\n f?: 'image';\n }): string {\n const bbox = `bbox=${options.bbox[0]},${options.bbox[1]},${options.bbox[2]},${options.bbox[3]}`;\n const size = `size=${options.width},${options.height}`;\n const arcgisOptions = {...options, bbox, size};\n // @ts-expect-error\n delete arcgisOptions.width;\n // @ts-expect-error\n delete arcgisOptions.height;\n return this.getUrl('exportImage', arcgisOptions);\n }\n\n // INTERNAL METHODS\n\n /**\n * @note protected, since perhaps getWMSUrl may need to be overridden to handle certain backends?\n * @note if override is common, maybe add a callback prop?\n * */\n protected getUrl(\n path: string,\n options: Record<string, unknown>,\n extra?: Record<string, unknown>\n ): string {\n let url = `${this.props.url}/${path}`;\n let first = true;\n for (const [key, value] of Object.entries(options)) {\n url += first ? '?' : '&';\n first = false;\n if (Array.isArray(value)) {\n url += `${key.toUpperCase()}=${value.join(',')}`;\n } else {\n url += `${key.toUpperCase()}=${value ? String(value) : ''}`;\n }\n }\n return url;\n }\n\n /** Checks for and parses a WMS XML formatted ServiceError and throws an exception */\n protected async checkResponse(response: Response) {\n if (!response.ok) {\n // } || response.headers['content-type'] === WMSErrorLoader.mimeTypes[0]) {\n // const arrayBuffer = await response.arrayBuffer();\n // const error = await WMSErrorLoader.parse(arrayBuffer, this.loadOptions);\n throw new Error('error');\n }\n }\n}\n\nexport const ArcGISImageService: Service = {\n type: 'arcgis-image-server',\n testURL: (url: string): boolean => url.toLowerCase().includes('ImageServer'),\n create: (props: ArcGISImageServerProps): ArcGISImageSource => new ArcGISImageSource(props)\n};\n"],"mappings":"SAQQA,YAAY;AAcpB,OAAO,MAAMC,iBAAiB,SAASD,YAAY,CAAyB;EAG1EE,WAAWA,CAACC,KAA6B,EAAE;IACzC,KAAK,CAACA,KAAK,CAAC;IAAC,KAHfC,IAAI;IAIF,IAAI,CAACA,IAAI,GAAGD,KAAK,CAACE,GAAG;EACvB;EAIA,MAAMC,WAAWA,CAAA,EAAiC;IAChD,OAAQ,MAAM,IAAI,CAACC,QAAQ,CAAC,CAAC;EAE/B;EAEA,MAAMC,QAAQA,CAACC,UAA8B,EAAsB;IACjE,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;EAGpC;EAIA,MAAMH,QAAQA,CAAA,EAAqB;IAGjC,MAAM,IAAIG,KAAK,CAAC,iBAAiB,CAAC;EACpC;EAMAC,WAAWA,CAACC,OAkBX,EAAsB;IAErB,MAAM,IAAIF,KAAK,CAAC,iBAAiB,CAAC;EACpC;EAIAG,WA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AACP,KAAK,CAAC,GAAG,EAAG,EAAC;MAC7D;IACF;IACA,OAAOpB,GAAG;EACZ;EAGA,MAAgB4B,aAAaA,CAACC,QAAkB,EAAE;IAChD,IAAI,CAACA,QAAQ,CAACC,EAAE,EAAE;MAIhB,MAAM,IAAIzB,KAAK,CAAC,OAAO,CAAC;IAC1B;EACF;AACF;AAEA,OAAO,MAAM0B,kBAA2B,GAAG;EACzCC,IAAI,EAAE,qBAAqB;EAC3BC,OAAO,EAAGjC,GAAW,IAAcA,GAAG,CAACkC,WAAW,CAAC,CAAC,CAACC,QAAQ,CAAC,aAAa,CAAC;EAC5EC,MAAM,EAAGtC,KAA6B,IAAwB,IAAIF,iBAAiB,CAACE,KAAK;AAC3F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arcgis-server.d.ts","sourceRoot":"","sources":["../../../src/services/arcgis/arcgis-server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"arcgis-server.d.ts","sourceRoot":"","sources":["../../../src/services/arcgis/arcgis-server.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,OAAO,GAAG;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAAC;AAEhE,KAAK,SAAS,GAAG,OAAO,KAAK,CAAC;AAE9B;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EACX,SAAS,GAAE,SAAiB,GAC3B,OAAO,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,CAM3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arcgis-server.js","names":["getArcGISServices","url","fetchFile","arguments","length","undefined","fetch","includes","serverUrl","replace","loadServiceDirectory","path","serviceUrl","join","response","directory","json","services","extractServices","folders","promises","map","folder","folderServices","Promise","all","push","arcgisServices","service","name","type","toLocaleLowerCase"],"sources":["../../../src/services/arcgis/arcgis-server.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"arcgis-server.js","names":["getArcGISServices","url","fetchFile","arguments","length","undefined","fetch","includes","serverUrl","replace","loadServiceDirectory","path","serviceUrl","join","response","directory","json","services","extractServices","folders","promises","map","folder","folderServices","Promise","all","push","arcgisServices","service","name","type","toLocaleLowerCase"],"sources":["../../../src/services/arcgis/arcgis-server.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nexport type Service = {name: string; type: string; url: string};\n\ntype FetchLike = typeof fetch;\n\n/**\n * (Recursively) load the service directory from an ArcGIS Server URL\n * @param url\n * @param fetchFile= Optional fetch function override\n * @returns\n */\nexport async function getArcGISServices(\n url: string,\n fetchFile: FetchLike = fetch\n): Promise<Service[] | null> {\n if (url.includes('rest/services')) {\n const serverUrl = url.replace(/rest\\/services.*$/i, 'rest/services');\n return loadServiceDirectory(serverUrl, fetchFile, []);\n }\n return null;\n}\n\nasync function loadServiceDirectory(\n serverUrl: string,\n fetch: FetchLike,\n path: string[]\n): Promise<Service[]> {\n const serviceUrl = `${serverUrl}/${path.join('/')}`;\n\n const response = await fetch(`${serviceUrl}?f=pjson`);\n const directory = await response.json();\n\n const services = extractServices(directory, serviceUrl);\n\n const folders = (directory.folders || []) as string[];\n const promises = folders.map((folder) =>\n loadServiceDirectory(`${serverUrl}`, fetch, [...path, folder])\n );\n\n for (const folderServices of await Promise.all(promises)) {\n services.push(...folderServices);\n }\n\n return services;\n}\n\nfunction extractServices(directory: unknown, url: string): Service[] {\n const arcgisServices = ((directory as any).services || []) as {name: string; type: string}[];\n const services: Service[] = [];\n for (const service of arcgisServices) {\n services.push({\n name: service.name,\n type: `arcgis-${service.type.toLocaleLowerCase().replace('server', '-server')}`,\n url: `${url}${service.name}/${service.type}`\n });\n }\n return services;\n}\n"],"mappings":"AAcA,OAAO,eAAeA,iBAAiBA,CACrCC,GAAW,EAEgB;EAAA,IAD3BC,SAA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MW,OAAO,IAAID,cAAc,EAAE;IACpCV,QAAQ,CAACS,IAAI,CAAC;MACZG,IAAI,EAAED,OAAO,CAACC,IAAI;MAClBC,IAAI,EAAG,UAASF,OAAO,CAACE,IAAI,CAACC,iBAAiB,CAAC,CAAC,CAACtB,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAE,EAAC;MAC/ER,GAAG,EAAG,GAAEA,GAAI,GAAE2B,OAAO,CAACC,IAAK,IAAGD,OAAO,CAACE,IAAK;IAC7C,CAAC,CAAC;EACJ;EACA,OAAOb,QAAQ;AACjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-image-source.d.ts","sourceRoot":"","sources":["../../src/services/create-image-source.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-image-source.d.ts","sourceRoot":"","sources":["../../src/services/create-image-source.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAU,WAAW,EAAC,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAC,iBAAiB,EAAC,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAqB,uBAAuB,EAAC,MAAM,sCAAsC,CAAC;AAEjG,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAItD,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,qBAAqB,GAAG,UAAU,CAAC;AAI1E,KAAK,sBAAsB,GAAG,uBAAuB,GACnD,iBAAiB,GACjB,cAAc,GAAG;IACf,IAAI,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAAC;CAClC,CAAC;AAEJ;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,WAAW,CAE5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-image-source.js","names":["createImageService","WMSService","ArcGISImageService","SERVICES","createImageSource","props"],"sources":["../../src/services/create-image-source.ts"],"sourcesContent":["// loaders.gl
|
|
1
|
+
{"version":3,"file":"create-image-source.js","names":["createImageService","WMSService","ArcGISImageService","SERVICES","createImageSource","props"],"sources":["../../src/services/create-image-source.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\nimport type {Service, ImageSource} from '@loaders.gl/loader-utils';\n// import {ImageService} from '../lib/services/image-service';\nimport {ImageServiceProps} from '../lib/services/image-service';\nimport {createImageService, CreateImageServiceProps} from '../lib/services/create-image-service';\n\nimport type {WMSSourceProps} from './ogc/wms-service';\nimport {WMSService} from './ogc/wms-service';\nimport {ArcGISImageService} from './arcgis/arcgis-image-service';\n\nexport type ImageServiceType = 'wms' | 'arcgis-image-server' | 'template';\n\nconst SERVICES: Service[] = [WMSService, ArcGISImageService];\n\ntype CreateImageSourceProps = CreateImageServiceProps &\n ImageServiceProps &\n WMSSourceProps & {\n type?: ImageServiceType | 'auto';\n };\n\n/**\n * Creates an image source\n * If type is not supplied, will try to automatically detect the the\n * @param url URL to the image source\n * @param type type of source. if not known, set to 'auto'\n * @returns an ImageSource instance\n */\nexport function createImageSource(props: CreateImageSourceProps): ImageSource {\n return createImageService(props, SERVICES);\n}\n"],"mappings":"SAOQA,kBAAkB;AAAA,SAGlBC,UAAU;AAAA,SACVC,kBAAkB;AAI1B,MAAMC,QAAmB,GAAG,CAACF,UAAU,EAAEC,kBAAkB,CAAC;AAe5D,OAAO,SAASE,iBAAiBA,CAACC,KAA6B,EAAe;EAC5E,OAAOL,kBAAkB,CAACK,KAAK,EAAEF,QAAQ,CAAC;AAC5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csw-service.d.ts","sourceRoot":"","sources":["../../../src/services/ogc/csw-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"csw-service.d.ts","sourceRoot":"","sources":["../../../src/services/ogc/csw-service.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAC,UAAU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MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IAYT,qDAAqD;IACrD,YAAY,CACV,aAAa,CAAC,EAAE,sBAAsB,EACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IAaT;;SAEK;IACL,SAAS,CAAC,UAAU,CAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACzC,MAAM;IAeT,qFAAqF;IACrF,SAAS,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,GAAG,IAAI;IAQ5E,+BAA+B;IAC/B,SAAS,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,GAAG,KAAK;CAIvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csw-service.js","names":["DataSource","CSWCapabilitiesLoader","CSWRecordsLoader","CSWDomainLoader","WMSErrorLoader","CSWErrorLoader","CSWService","constructor","props","capabilities","data","url","loaders","getMetadata","getCapabilities","normalizeMetadata","getServiceDirectory","options","services","unknownServices","records","getRecords","record","reference","references","value","scheme","push","name","title","type","_parseOGCUrl","includeUnknown","concat","parts","split","params","wmsParameters","vendorParameters","getCapabilitiesURL","response","fetch","arrayBuffer","_checkResponse","parse","loadOptions","getRecordsURL","getDomain","getDomainURL","version","service","request","_getCSWUrl","typenames","first","key","Object","entries","Array","isArray","toUpperCase","join","String","encodeURI","contentType","headers","ok","mimeTypes","includes","_CSWErrorLoader$parse","error","parseSync","call","Error","_parseError","_CSWErrorLoader$parse2","testURL","toLowerCase"],"sources":["../../../src/services/ogc/csw-service.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\n/* eslint-disable camelcase */\n\nimport type {DataSourceProps} from '@loaders.gl/loader-utils';\nimport {DataSource} from '@loaders.gl/loader-utils';\n\nimport type {CSWCapabilities} from '../../csw-capabilities-loader';\nimport {CSWCapabilitiesLoader} from '../../csw-capabilities-loader';\n\nimport type {CSWRecords} from '../../csw-records-loader';\nimport {CSWRecordsLoader} from '../../csw-records-loader';\n\nimport type {CSWDomain} from '../../csw-domain-loader';\nimport {CSWDomainLoader} from '../../csw-domain-loader';\n\nimport {WMSErrorLoader as CSWErrorLoader} from '../../wms-error-loader';\n\ntype CSWCommonParameters = {\n /** In case the endpoint supports multiple services */\n service?: 'CSW';\n /** In case the endpoint supports multiple CSW versions */\n version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0';\n};\n\nexport type CSWGetCapabilitiesParameters = CSWCommonParameters & {\n /** Request type */\n request?: 'GetCapabilities';\n};\n\nexport type CSWGetRecordsParameters = CSWCommonParameters & {\n /** Request type */\n request?: 'GetRecords';\n /** type of records */\n typenames: 'csw:Record';\n};\n\nexport type CSWGetDomainParameters = CSWCommonParameters & {\n /** Request type */\n request?: 'GetDomain';\n // TBA\n};\n\n/** Describes a service or resource exposed by the catalog */\nexport type Service = {\n /** name of service or resource */\n name: string;\n /** type of service or resource */\n type: string;\n url: string;\n params?: string;\n scheme?: string;\n};\n\nexport type CSWServiceProps = DataSourceProps & {\n url: string;\n};\n\n/**\n * The CSWService class\n * - provides type safe methods to form URLs to a CSW service\n * - provides type safe methods to query and parse results (and errors) from a CSW service\n * @note Only the URL parameter conversion is supported. XML posts are not supported.\n */\nexport class CSWService extends DataSource<CSWServiceProps> {\n static readonly type = 'csw';\n static testURL = (url: string): boolean => url.toLowerCase().includes('csw');\n\n capabilities: CSWCapabilities | null = null;\n data: string;\n url: string;\n\n /** A list of loaders used by the CSWService methods */\n readonly loaders = [CSWErrorLoader, CSWCapabilitiesLoader];\n\n /** Create a CSWService */\n constructor(props: CSWServiceProps) {\n super(props);\n this.url = props.url;\n this.data = props.url;\n }\n\n async getMetadata(): Promise<CSWCapabilities> {\n const capabilities = await this.getCapabilities();\n return this.normalizeMetadata(capabilities);\n }\n\n normalizeMetadata(capabilities: CSWCapabilities): CSWCapabilities {\n return capabilities;\n }\n\n async getServiceDirectory(options?: {includeUnknown?: boolean}): Promise<Service[]> {\n const services: Service[] = [];\n const unknownServices: Service[] = [];\n\n const records = await this.getRecords();\n for (const record of records.records) {\n for (const reference of record.references) {\n const url = reference.value;\n switch (reference.scheme) {\n case 'OGC:WMS':\n services.push({name: record.title, type: 'ogc-wms-service', ...this._parseOGCUrl(url)});\n break;\n case 'OGC:WMTS':\n services.push({\n name: record.title,\n type: 'ogc-wmts-service',\n ...this._parseOGCUrl(url)\n });\n break;\n case 'OGC:WFS':\n services.push({name: record.title, type: 'ogc-wfs-service', ...this._parseOGCUrl(url)});\n break;\n default:\n unknownServices.push({\n name: record.title,\n type: 'unknown',\n url: reference.value,\n scheme: reference.scheme\n });\n }\n }\n }\n\n return options?.includeUnknown ? services.concat(unknownServices) : services;\n }\n\n _parseOGCUrl(url: string): {url: string; params: string} {\n const parts = url.split('?');\n return {\n url: parts[0],\n params: parts[1] || ''\n };\n }\n\n // CSW Service API Stubs\n\n /** Get Capabilities */\n async getCapabilities(\n wmsParameters?: CSWGetCapabilitiesParameters,\n vendorParameters?: Record<string, unknown>\n ): Promise<CSWCapabilities> {\n const url = this.getCapabilitiesURL(wmsParameters, vendorParameters);\n const response = await this.fetch(url);\n const arrayBuffer = await response.arrayBuffer();\n this._checkResponse(response, arrayBuffer);\n const capabilities = await CSWCapabilitiesLoader.parse(arrayBuffer, this.props.loadOptions);\n return capabilities;\n }\n\n /** Get Records */\n async getRecords(\n wmsParameters?: CSWGetRecordsParameters,\n vendorParameters?: Record<string, unknown>\n ): Promise<CSWRecords> {\n const url = this.getRecordsURL(wmsParameters, vendorParameters);\n const response = await this.fetch(url);\n const arrayBuffer = await response.arrayBuffer();\n this._checkResponse(response, arrayBuffer);\n return await CSWRecordsLoader.parse(arrayBuffer, this.props.loadOptions);\n }\n\n /** Get Domain */\n async getDomain(\n wmsParameters?: CSWGetDomainParameters,\n vendorParameters?: Record<string, unknown>\n ): Promise<CSWDomain> {\n const url = this.getDomainURL(wmsParameters, vendorParameters);\n const response = await this.fetch(url);\n const arrayBuffer = await response.arrayBuffer();\n this._checkResponse(response, arrayBuffer);\n return await CSWDomainLoader.parse(arrayBuffer, this.props.loadOptions);\n }\n\n // Typed URL creators\n // For applications that want full control of fetching and parsing\n\n /** Generate a URL for the GetCapabilities request */\n getCapabilitiesURL(\n wmsParameters?: CSWGetCapabilitiesParameters,\n vendorParameters?: Record<string, unknown>\n ): string {\n const options: Required<CSWGetCapabilitiesParameters> = {\n version: '3.0.0',\n ...wmsParameters,\n ...vendorParameters,\n service: 'CSW',\n request: 'GetCapabilities'\n };\n return this._getCSWUrl(options, vendorParameters);\n }\n\n /** Generate a URL for the GetCapabilities request */\n getRecordsURL(\n wmsParameters?: CSWGetRecordsParameters,\n vendorParameters?: Record<string, unknown>\n ): string {\n const options: Required<CSWGetRecordsParameters> = {\n version: '3.0.0',\n typenames: 'csw:Record',\n ...wmsParameters,\n ...vendorParameters,\n service: 'CSW',\n request: 'GetRecords'\n };\n return this._getCSWUrl(options, vendorParameters);\n }\n\n /** Generate a URL for the GetCapabilities request */\n getDomainURL(\n wmsParameters?: CSWGetDomainParameters,\n vendorParameters?: Record<string, unknown>\n ): string {\n const options: Required<CSWGetDomainParameters> = {\n version: '3.0.0',\n ...wmsParameters,\n ...vendorParameters,\n service: 'CSW',\n request: 'GetDomain'\n };\n return this._getCSWUrl(options, vendorParameters);\n }\n\n // INTERNAL METHODS\n\n /**\n * @note case _getCSWUrl may need to be overridden to handle certain backends?\n * */\n protected _getCSWUrl(\n options: Record<string, unknown>,\n vendorParameters?: Record<string, unknown>\n ): string {\n let url = this.props.url;\n let first = true;\n for (const [key, value] of Object.entries(options)) {\n url += first ? '?' : '&';\n first = false;\n if (Array.isArray(value)) {\n url += `${key.toUpperCase()}=${value.join(',')}`;\n } else {\n url += `${key.toUpperCase()}=${value ? String(value) : ''}`;\n }\n }\n return encodeURI(url);\n }\n\n /** Checks for and parses a CSW XML formatted ServiceError and throws an exception */\n protected _checkResponse(response: Response, arrayBuffer: ArrayBuffer): void {\n const contentType = response.headers['content-type'];\n if (!response.ok || CSWErrorLoader.mimeTypes.includes(contentType)) {\n const error = CSWErrorLoader.parseSync?.(arrayBuffer, this.props.loadOptions);\n throw new Error(error);\n }\n }\n\n /** Error situation detected */\n protected _parseError(arrayBuffer: ArrayBuffer): Error {\n const error = CSWErrorLoader.parseSync?.(arrayBuffer, this.props.loadOptions);\n return new Error(error);\n }\n}\n"],"mappings":"AAMA,SAAQA,UAAU,QAAO,0BAA0B;AAAC,SAG5CC,qBAAqB;AAAA,SAGrBC,gBAAgB;AAAA,SAGhBC,eAAe;AAAA,SAEfC,cAAc,IAAIC,cAAc;AAgDxC,OAAO,MAAMC,UAAU,SAASN,UAAU,CAAkB;EAY1DO,WAAWA,CAACC,KAAsB,EAAE;IAClC,KAAK,CAACA,KAAK,CAAC;IAAC,KATfC,YAAY,GAA2B,IAAI;IAAA,KAC3CC,IAAI;IAAA,KACJC,GAAG;IAAA,KAGMC,OAAO,GAAG,CAACP,cAAc,EAAEJ,qBAAqB,CAAC;IAKxD,IAAI,CAACU,GAAG,GAAGH,KAAK,CAACG,GAAG;IACpB,IAAI,CAACD,IAAI,GAAGF,KAAK,CAACG,GAAG;EACvB;EAEA,MAAME,WAAWA,CAAA,EAA6B;IAC5C,MAAMJ,YAAY,GAAG,MAAM,IAAI,CAACK,eAAe,CAAC,CAAC;IACjD,OAAO,IAAI,CAACC,iBAAiB,CAACN,YAAY,CAAC;EAC7C;EAEAM,iBAAiBA,CAACN,YAA6B,EAAmB;IAChE,OAAOA,YAAY;EACrB;EAEA,MAAMO,mBAAmBA,CAACC,OAAoC,EAAsB;IAClF,MAAMC,QAAmB,GAAG,EAAE;IAC9B,MAAMC,eAA0B,GAAG,EAAE;IAErC,MAAMC,OAAO,GAAG,MAAM,IAAI,CAACC,UAAU,CAAC,CAAC;IACvC,KAAK,MAAMC,MAAM,IAA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G,KAAK;AADjBxB,UAAU,CAEdsE,OAAO,GAAIjE,GAAW,IAAcA,GAAG,CAACkE,WAAW,CAAC,CAAC,CAACT,QAAQ,CAAC,KAAK,CAAC"}
|
|
1
|
+
{"version":3,"file":"csw-service.js","names":["DataSource","CSWCapabilitiesLoader","CSWRecordsLoader","CSWDomainLoader","WMSErrorLoader","CSWErrorLoader","CSWService","constructor","props","capabilities","data","url","loaders","getMetadata","getCapabilities","normalizeMetadata","getServiceDirectory","options","services","unknownServices","records","getRecords","record","reference","references","value","scheme","push","name","title","type","_parseOGCUrl","includeUnknown","concat","parts","split","params","wmsParameters","vendorParameters","getCapabilitiesURL","response","fetch","arrayBuffer","_checkResponse","parse","loadOptions","getRecordsURL","getDomain","getDomainURL","version","service","request","_getCSWUrl","typenames","first","key","Object","entries","Array","isArray","toUpperCase","join","String","encodeURI","contentType","headers","ok","mimeTypes","includes","_CSWErrorLoader$parse","error","parseSync","call","Error","_parseError","_CSWErrorLoader$parse2","testURL","toLowerCase"],"sources":["../../../src/services/ogc/csw-service.ts"],"sourcesContent":["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\n\n/* eslint-disable camelcase */\n\nimport type {DataSourceProps} from '@loaders.gl/loader-utils';\nimport {DataSource} from '@loaders.gl/loader-utils';\n\nimport type {CSWCapabilities} from '../../csw-capabilities-loader';\nimport {CSWCapabilitiesLoader} from '../../csw-capabilities-loader';\n\nimport type {CSWRecords} from '../../csw-records-loader';\nimport {CSWRecordsLoader} from '../../csw-records-loader';\n\nimport type {CSWDomain} from '../../csw-domain-loader';\nimport {CSWDomainLoader} from '../../csw-domain-loader';\n\nimport {WMSErrorLoader as CSWErrorLoader} from '../../wms-error-loader';\n\ntype CSWCommonParameters = {\n /** In case the endpoint supports multiple services */\n service?: 'CSW';\n /** In case the endpoint supports multiple CSW versions */\n version?: '1.1.1' | '2.0.0' | '2.0.1' | '3.0.0';\n};\n\nexport type CSWGetCapabilitiesParameters = CSWCommonParameters & {\n /** Request type */\n request?: 'GetCapabilities';\n};\n\nexport type CSWGetRecordsParameters = CSWCommonParameters & {\n /** Request type */\n request?: 'GetRecords';\n /** type of records */\n typenames: 'csw:Record';\n};\n\nexport type CSWGetDomainParameters = CSWCommonParameters & {\n /** Request type */\n request?: 'GetDomain';\n // TBA\n};\n\n/** Describes a service or resource exposed by the catalog */\nexport type Service = {\n /** name of service or resource */\n name: string;\n /** type of service or resource */\n type: string;\n url: string;\n params?: string;\n scheme?: string;\n};\n\nexport type CSWServiceProps = DataSourceProps & {\n url: string;\n};\n\n/**\n * The CSWService class\n * - provides type safe methods to form URLs to a CSW service\n * - provides type safe methods to query and parse results (and errors) from a CSW service\n * @note Only the URL parameter conversion is supported. XML posts are not supported.\n */\nexport class CSWService extends DataSource<CSWServiceProps> {\n static readonly type = 'csw';\n static testURL = (url: string): boolean => url.toLowerCase().includes('csw');\n\n capabilities: CSWCapabilities | null = null;\n data: string;\n url: string;\n\n /** A list of loaders used by the CSWService methods */\n readonly loaders = [CSWErrorLoader, CSWCapabilitiesLoader];\n\n /** Create a CSWService */\n constructor(props: CSWServiceProps) {\n super(props);\n this.url = props.url;\n this.data = props.url;\n }\n\n async getMetadata(): Promise<CSWCapabilities> {\n const capabilities = await this.getCapabilities();\n return this.normalizeMetadata(capabilities);\n }\n\n normalizeMetadata(capabilities: CSWCapabilities): CSWCapabilities {\n return capabilities;\n }\n\n async getServiceDirectory(options?: {includeUnknown?: boolean}): Promise<Service[]> {\n const services: Service[] = [];\n const unknownServices: Service[] = [];\n\n const records = await this.getRecords();\n for (const record of records.records) {\n for (const reference of record.references) {\n const url = reference.value;\n switch (reference.scheme) {\n case 'OGC:WMS':\n services.push({name: record.title, type: 'ogc-wms-service', ...this._parseOGCUrl(url)});\n break;\n case 'OGC:WMTS':\n services.push({\n name: record.title,\n type: 'ogc-wmts-service',\n ...this._parseOGCUrl(url)\n });\n break;\n case 'OGC:WFS':\n services.push({name: record.title, type: 'ogc-wfs-service', ...this._parseOGCUrl(url)});\n break;\n default:\n unknownServices.push({\n name: record.title,\n type: 'unknown',\n url: reference.value,\n scheme: reference.scheme\n });\n }\n }\n }\n\n return options?.includeUnknown ? services.concat(unknownServices) : services;\n }\n\n _parseOGCUrl(url: string): {url: string; params: string} {\n const parts = url.split('?');\n return {\n url: parts[0],\n params: parts[1] || ''\n };\n }\n\n // CSW Service API Stubs\n\n /** Get Capabilities */\n async getCapabilities(\n wmsParameters?: CSWGetCapabilitiesParameters,\n vendorParameters?: Record<string, unknown>\n ): Promise<CSWCapabilities> {\n const url = this.getCapabilitiesURL(wmsParameters, vendorParameters);\n const response = await this.fetch(url);\n const arrayBuffer = await response.arrayBuffer();\n this._checkResponse(response, arrayBuffer);\n const capabilities = await CSWCapabilitiesLoader.parse(arrayBuffer, this.props.loadOptions);\n return capabilities;\n }\n\n /** Get Records */\n async getRecords(\n wmsParameters?: CSWGetRecordsParameters,\n vendorParameters?: Record<string, unknown>\n ): Promise<CSWRecords> {\n const url = this.getRecordsURL(wmsParameters, vendorParameters);\n const response = await this.fetch(url);\n const arrayBuffer = await response.arrayBuffer();\n this._checkResponse(response, arrayBuffer);\n return await CSWRecordsLoader.parse(arrayBuffer, this.props.loadOptions);\n }\n\n /** Get Domain */\n async getDomain(\n wmsParameters?: CSWGetDomainParameters,\n vendorParameters?: Record<string, unknown>\n ): Promise<CSWDomain> {\n const url = this.getDomainURL(wmsParameters, vendorParameters);\n const response = await this.fetch(url);\n const arrayBuffer = await response.arrayBuffer();\n this._checkResponse(response, arrayBuffer);\n return await CSWDomainLoader.parse(arrayBuffer, this.props.loadOptions);\n }\n\n // Typed URL creators\n // For applications that want full control of fetching and parsing\n\n /** Generate a URL for the GetCapabilities request */\n getCapabilitiesURL(\n wmsParameters?: CSWGetCapabilitiesParameters,\n vendorParameters?: Record<string, unknown>\n ): string {\n const options: Required<CSWGetCapabilitiesParameters> = {\n version: '3.0.0',\n ...wmsParameters,\n ...vendorParameters,\n service: 'CSW',\n request: 'GetCapabilities'\n };\n return this._getCSWUrl(options, vendorParameters);\n }\n\n /** Generate a URL for the GetCapabilities request */\n getRecordsURL(\n wmsParameters?: CSWGetRecordsParameters,\n vendorParameters?: Record<string, unknown>\n ): string {\n const options: Required<CSWGetRecordsParameters> = {\n version: '3.0.0',\n typenames: 'csw:Record',\n ...wmsParameters,\n ...vendorParameters,\n service: 'CSW',\n request: 'GetRecords'\n };\n return this._getCSWUrl(options, vendorParameters);\n }\n\n /** Generate a URL for the GetCapabilities request */\n getDomainURL(\n wmsParameters?: CSWGetDomainParameters,\n vendorParameters?: Record<string, unknown>\n ): string {\n const options: Required<CSWGetDomainParameters> = {\n version: '3.0.0',\n ...wmsParameters,\n ...vendorParameters,\n service: 'CSW',\n request: 'GetDomain'\n };\n return this._getCSWUrl(options, vendorParameters);\n }\n\n // INTERNAL METHODS\n\n /**\n * @note case _getCSWUrl may need to be overridden to handle certain backends?\n * */\n protected _getCSWUrl(\n options: Record<string, unknown>,\n vendorParameters?: Record<string, unknown>\n ): string {\n let url = this.props.url;\n let first = true;\n for (const [key, value] of Object.entries(options)) {\n url += first ? '?' : '&';\n first = false;\n if (Array.isArray(value)) {\n url += `${key.toUpperCase()}=${value.join(',')}`;\n } else {\n url += `${key.toUpperCase()}=${value ? String(value) : ''}`;\n }\n }\n return encodeURI(url);\n }\n\n /** Checks for and parses a CSW XML formatted ServiceError and throws an exception */\n protected _checkResponse(response: Response, arrayBuffer: ArrayBuffer): void {\n const contentType = response.headers['content-type'];\n if (!response.ok || CSWErrorLoader.mimeTypes.includes(contentType)) {\n const error = CSWErrorLoader.parseSync?.(arrayBuffer, this.props.loadOptions);\n throw new Error(error);\n }\n }\n\n /** Error situation detected */\n protected _parseError(arrayBuffer: ArrayBuffer): Error {\n const error = CSWErrorLoader.parseSync?.(arrayBuffer, this.props.loadOptions);\n return new Error(error);\n }\n}\n"],"mappings":"AAOA,SAAQA,UAAU,QAAO,0BAA0B;AAAC,SAG5CC,qBAAqB;AAAA,SAGrB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ACpD,GAAG,CAAC;EACvB;EAGUgC,cAAcA,CAACH,QAAkB,EAAEE,WAAwB,EAAQ;IAC3E,MAAMsB,WAAW,GAAGxB,QAAQ,CAACyB,OAAO,CAAC,cAAc,CAAC;IACpD,IAAI,CAACzB,QAAQ,CAAC0B,EAAE,IAAI7D,cAAc,CAAC8D,SAAS,CAACC,QAAQ,CAACJ,WAAW,CAAC,EAAE;MAAA,IAAAK,qBAAA;MAClE,MAAMC,KAAK,IAAAD,qBAAA,GAAGhE,cAAc,CAACkE,SAAS,cAAAF,qBAAA,uBAAxBA,qBAAA,CAAAG,IAAA,CAAAnE,cAAc,EAAaqC,WAAW,EAAE,IAAI,CAAClC,KAAK,CAACqC,WAAW,CAAC;MAC7E,MAAM,IAAI4B,KAAK,CAACH,KAAK,CAAC;IACxB;EACF;EAGUI,WAAWA,CAAChC,WAAwB,EAAS;IAAA,IAAAiC,sBAAA;IACrD,MAAML,KAAK,IAAAK,sBAAA,GAAGtE,cAAc,CAACkE,SAAS,cAAAI,sBAAA,uBAAxBA,sBAAA,CAAAH,IAAA,CAAAnE,cAAc,EAAaqC,WAAW,EAAE,IAAI,CAAClC,KAAK,CAACqC,WAAW,CAAC;IAC7E,OAAO,IAAI4B,KAAK,CAACH,KAAK,CAAC;EACzB;AACF;AApMahE,UAAU,CACLwB,IAAI,GAAG,KAAK;AADjBxB,UAAU,CAEdsE,OAAO,GAAIjE,GAAW,IAAcA,GAAG,CAACkE,WAAW,CAAC,CAAC,CAACT,QAAQ,CAAC,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-service.d.ts","sourceRoot":"","sources":["../../../src/services/ogc/wms-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wms-service.d.ts","sourceRoot":"","sources":["../../../src/services/ogc/wms-service.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAIlD,OAAO,KAAK,EAA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