@loaders.gl/wms 4.0.0-beta.5 → 4.0.0-beta.6
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/index.cjs +28 -4
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-capabilities.d.ts +3 -5
- package/dist/lib/parsers/wms/parse-wms-capabilities.d.ts.map +1 -1
- package/dist/lib/parsers/wms/parse-wms-capabilities.js +2 -2
- package/dist/lib/parsers/wms/parse-wms-capabilities.js.map +1 -1
- package/dist/wms-capabilities-loader.d.ts +1 -3
- package/dist/wms-capabilities-loader.d.ts.map +1 -1
- package/dist/wms-capabilities-loader.js.map +1 -1
- package/package.json +11 -7
- package/src/index.ts +5 -9
- package/src/lib/parsers/wms/parse-wms-capabilities.ts +5 -8
- package/src/wms-capabilities-loader.ts +1 -3
- package/dist/dist.dev.js +0 -4194
package/dist/index.cjs
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
CSWService: () => CSWService,
|
|
37
37
|
ImageService: () => ImageService,
|
|
38
38
|
ImageSource: () => import_loader_utils5.ImageSource,
|
|
39
|
+
LERCLoader: () => LERCLoader,
|
|
39
40
|
WMSCapabilitiesLoader: () => WMSCapabilitiesLoader,
|
|
40
41
|
WMSErrorLoader: () => WMSErrorLoader,
|
|
41
42
|
WMSService: () => WMSService,
|
|
@@ -321,8 +322,8 @@ function parseWMSCapabilities(xmlText, options) {
|
|
|
321
322
|
addInheritedLayerProps(layer, null);
|
|
322
323
|
}
|
|
323
324
|
}
|
|
324
|
-
if (
|
|
325
|
-
capabilities.
|
|
325
|
+
if (options == null ? void 0 : options.includeRawJSON) {
|
|
326
|
+
capabilities.json = xmlCapabilities;
|
|
326
327
|
}
|
|
327
328
|
if (options == null ? void 0 : options.includeXMLText) {
|
|
328
329
|
capabilities.xml = xmlText;
|
|
@@ -1021,6 +1022,9 @@ function testXMLFile7(text) {
|
|
|
1021
1022
|
return text.startsWith("<?xml");
|
|
1022
1023
|
}
|
|
1023
1024
|
|
|
1025
|
+
// src/index.ts
|
|
1026
|
+
var import_loader_utils5 = require("@loaders.gl/loader-utils");
|
|
1027
|
+
|
|
1024
1028
|
// src/lib/services/create-image-service.ts
|
|
1025
1029
|
function createImageService(props, services) {
|
|
1026
1030
|
const { type = "auto" } = props;
|
|
@@ -1637,5 +1641,25 @@ function extractServices(directory, url) {
|
|
|
1637
1641
|
return services;
|
|
1638
1642
|
}
|
|
1639
1643
|
|
|
1640
|
-
// src/
|
|
1641
|
-
var
|
|
1644
|
+
// src/lerc-loader.ts
|
|
1645
|
+
var Lerc = __toESM(require("lerc"), 1);
|
|
1646
|
+
var VERSION8 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
|
|
1647
|
+
var LERCLoader = {
|
|
1648
|
+
id: "lerc",
|
|
1649
|
+
name: "LERC",
|
|
1650
|
+
module: "wms",
|
|
1651
|
+
version: VERSION8,
|
|
1652
|
+
worker: false,
|
|
1653
|
+
extensions: ["lrc", "lerc", "lerc2", "lerc1"],
|
|
1654
|
+
mimeTypes: ["application/octet-stream"],
|
|
1655
|
+
// test: ?,
|
|
1656
|
+
options: {
|
|
1657
|
+
wms: {}
|
|
1658
|
+
},
|
|
1659
|
+
parse: async (arrayBuffer, options) => parseLERC(arrayBuffer, options)
|
|
1660
|
+
};
|
|
1661
|
+
async function parseLERC(arrayBuffer, options) {
|
|
1662
|
+
await Lerc.load();
|
|
1663
|
+
const pixelBlock = Lerc.decode(arrayBuffer, options == null ? void 0 : options.lerc);
|
|
1664
|
+
return pixelBlock;
|
|
1665
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export { WFSCapabilitiesLoader as _WFSCapabilitiesLoader } from './wip/wfs-capab
|
|
|
19
19
|
export type { GeoJSON as _GeoJSON } from '@loaders.gl/schema';
|
|
20
20
|
export type { GMLLoaderOptions as _GMLLoaderOptions } from './gml-loader';
|
|
21
21
|
export { GMLLoader as _GMLLoader } from './gml-loader';
|
|
22
|
+
export { ImageSource } from '@loaders.gl/loader-utils';
|
|
22
23
|
export type { ImageType } from '@loaders.gl/images';
|
|
23
24
|
export type { CreateImageServiceProps } from './lib/services/create-image-service';
|
|
24
25
|
export { createImageService } from './lib/services/create-image-service';
|
|
@@ -30,7 +31,6 @@ export { CSWService } from './services/ogc/csw-service';
|
|
|
30
31
|
export { WMSSource, WMSService } from './services/ogc/wms-service';
|
|
31
32
|
export { getArcGISServices as _getArcGISServices } from './services/arcgis/arcgis-server';
|
|
32
33
|
export { ArcGISImageService as _ArcGISImageService } from './services/arcgis/arcgis-image-service';
|
|
33
|
-
|
|
34
|
-
export
|
|
35
|
-
export { ImageSource } from '@loaders.gl/loader-utils';
|
|
34
|
+
export type { LERCData } from './lib/parsers/lerc/lerc-types';
|
|
35
|
+
export { LERCLoader } from './lerc-loader';
|
|
36
36
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,YAAY,EAAC,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AAEhE,YAAY,EAAC,eAAe,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,qBAAqB,EAAC,MAAM,2BAA2B,CAAC;AAEhE,YAAY,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,YAAY,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAItD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAElD,YAAY,EACV,eAAe,EACf,QAAQ,EACR,cAAc,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,YAAY,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAC,YAAY,EAAC,MAAM,8BAA8B,CAAC;AAI1D,OAAO,EAAC,UAAU,EAAC,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAC,SAAS,EAAE,UAAU,EAAC,MAAM,4BAA4B,CAAC;AAIjE,OAAO,EAAC,iBAAiB,IAAI,kBAAkB,EAAC,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAC,kBAAkB,IAAI,mBAAmB,EAAC,MAAM,wCAAwC,CAAC;AAGjG,YAAY,EAAC,QAAQ,EAAC,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export { WMSFeatureInfoLoader as _WMSFeatureInfoLoader } from "./wip/wms-feature
|
|
|
7
7
|
export { WMSLayerDescriptionLoader as _WMSLayerDescriptionLoader } from "./wip/wms-layer-description-loader.js";
|
|
8
8
|
export { WFSCapabilitiesLoader as _WFSCapabilitiesLoader } from "./wip/wfs-capabilities-loader.js";
|
|
9
9
|
export { GMLLoader as _GMLLoader } from "./gml-loader.js";
|
|
10
|
+
export { ImageSource } from '@loaders.gl/loader-utils';
|
|
10
11
|
export { createImageService } from "./lib/services/create-image-service.js";
|
|
11
12
|
export { createImageSource } from "./services/create-image-source.js";
|
|
12
13
|
export { ImageService } from "./lib/services/image-service.js";
|
|
@@ -14,5 +15,5 @@ export { CSWService } from "./services/ogc/csw-service.js";
|
|
|
14
15
|
export { WMSSource, WMSService } from "./services/ogc/wms-service.js";
|
|
15
16
|
export { getArcGISServices as _getArcGISServices } from "./services/arcgis/arcgis-server.js";
|
|
16
17
|
export { ArcGISImageService as _ArcGISImageService } from "./services/arcgis/arcgis-image-service.js";
|
|
17
|
-
export {
|
|
18
|
+
export { LERCLoader } from "./lerc-loader.js";
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CSWCapabilitiesLoader","CSWDomainLoader","CSWRecordsLoader","WMSErrorLoader","WMSCapabilitiesLoader","WMSFeatureInfoLoader","_WMSFeatureInfoLoader","WMSLayerDescriptionLoader","_WMSLayerDescriptionLoader","WFSCapabilitiesLoader","_WFSCapabilitiesLoader","GMLLoader","_GMLLoader","createImageService","createImageSource","ImageService","CSWService","WMSSource","WMSService","getArcGISServices","_getArcGISServices","ArcGISImageService","_ArcGISImageService","
|
|
1
|
+
{"version":3,"file":"index.js","names":["CSWCapabilitiesLoader","CSWDomainLoader","CSWRecordsLoader","WMSErrorLoader","WMSCapabilitiesLoader","WMSFeatureInfoLoader","_WMSFeatureInfoLoader","WMSLayerDescriptionLoader","_WMSLayerDescriptionLoader","WFSCapabilitiesLoader","_WFSCapabilitiesLoader","GMLLoader","_GMLLoader","ImageSource","createImageService","createImageSource","ImageService","CSWService","WMSSource","WMSService","getArcGISServices","_getArcGISServices","ArcGISImageService","_ArcGISImageService","LERCLoader"],"sources":["../src/index.ts"],"sourcesContent":["// loaders.gl, MIT license\n\n// CSW - Catalog Service for the Web\n\nexport type {CSWLoaderOptions} from './csw-capabilities-loader';\n\nexport type {CSWCapabilities} from './csw-capabilities-loader';\nexport {CSWCapabilitiesLoader} from './csw-capabilities-loader';\n\nexport type {CSWDomain} from './csw-domain-loader';\nexport {CSWDomainLoader} from './csw-domain-loader';\n\nexport type {CSWRecords} from './csw-records-loader';\nexport {CSWRecordsLoader} from './csw-records-loader';\n\n// WMS - Web Map Service\n\nexport {WMSErrorLoader} from './wms-error-loader';\n\nexport type {\n WMSCapabilities,\n WMSLayer,\n WMSBoundingBox,\n WMSDimension\n} from './wms-capabilities-loader';\nexport type {WMSCapabilitiesLoaderOptions} from './wms-capabilities-loader';\nexport {WMSCapabilitiesLoader} from './wms-capabilities-loader';\n\nexport type {WMSFeatureInfo as _WMSFeatureInfo} from './wip/wms-feature-info-loader';\nexport {WMSFeatureInfoLoader as _WMSFeatureInfoLoader} from './wip/wms-feature-info-loader';\n\nexport type {WMSLayerDescription as _WMSLayerDescription} from './wip/wms-layer-description-loader';\nexport {WMSLayerDescriptionLoader as _WMSLayerDescriptionLoader} from './wip/wms-layer-description-loader';\n\n// WMTS - Web Map Tile Service\n\n// export type {WMTSLoaderOptions as _WMTSLoaderOptions} from './wip/wmts-capabilities-loader';\n// export type {WMTSCapabilities as _WMTSCapabilities} from './wip/wmts-capabilities-loader';\n// export {WMTSCapabilitiesLoader as _WMTSCapabilitiesLoader} from './wip/wmts-capabilities-loader';\n\n// WFS - Web Feature Service\n\nexport type {WFSLoaderOptions as _WFSLoaderOptions} from './wip/wfs-capabilities-loader';\n\nexport type {WFSCapabilities as _WFSCapabilities} from './wip/wfs-capabilities-loader';\nexport {WFSCapabilitiesLoader as _WFSCapabilitiesLoader} from './wip/wfs-capabilities-loader';\n\n// GML - Geographic Markup Language\n\nexport type {GeoJSON as _GeoJSON} from '@loaders.gl/schema';\nexport type {GMLLoaderOptions as _GMLLoaderOptions} from './gml-loader';\nexport {GMLLoader as _GMLLoader} from './gml-loader';\n\n// EXPERIMENTAL: DATA SOURCES\n\n// TODO - restore once deck.gl has been udpated\nexport {ImageSource} from '@loaders.gl/loader-utils';\n\nexport type {ImageType} from '@loaders.gl/images';\n\nexport type {CreateImageServiceProps} from './lib/services/create-image-service';\nexport {createImageService} from './lib/services/create-image-service';\n\nexport type {ImageServiceType} from './services/create-image-source';\nexport {createImageSource} from './services/create-image-source';\n\n// Generic (Template URL) Services\n\nexport type {ImageServiceProps} from './lib/services/image-service';\nexport {ImageService} from './lib/services/image-service';\n\n// OGC Services\n\nexport {CSWService} from './services/ogc/csw-service';\nexport {WMSSource, WMSService} from './services/ogc/wms-service';\n\n// ArcGIS Services\n\nexport {getArcGISServices as _getArcGISServices} from './services/arcgis/arcgis-server';\nexport {ArcGISImageService as _ArcGISImageService} from './services/arcgis/arcgis-image-service';\n\n// LERC - Limited Error Raster Compression\nexport type {LERCData} from './lib/parsers/lerc/lerc-types';\nexport {LERCLoader} from './lerc-loader';\n"],"mappings":"SAOQA,qBAAqB;AAAA,SAGrBC,eAAe;AAAA,SAGfC,gBAAgB;AAAA,SAIhBC,cAAc;AAAA,SASdC,qBAAqB;AAAA,SAGrBC,oBAAoB,IAAIC,qBAAqB;AAAA,SAG7CC,yBAAyB,IAAIC,0BAA0B;AAAA,SAavDC,qBAAqB,IAAIC,sBAAsB;AAAA,SAM/CC,SAAS,IAAIC,UAAU;AAK/B,SAAQC,WAAW,QAAO,0BAA0B;AAAC,SAK7CC,kBAAkB;AAAA,SAGlBC,iBAAiB;AAAA,SAKjBC,YAAY;AAAA,SAIZC,UAAU;AAAA,SACVC,SAAS,EAAEC,UAAU;AAAA,SAIrBC,iBAAiB,IAAIC,kBAAkB;AAAA,SACvCC,kBAAkB,IAAIC,mBAAmB;AAAA,SAIzCC,UAAU"}
|
|
@@ -26,8 +26,8 @@ export type WMSCapabilities = {
|
|
|
26
26
|
requests: Record<string, WMSRequest>;
|
|
27
27
|
/** Information about any exceptions that the service will report (HTTP status != 2xx) */
|
|
28
28
|
exceptions?: WMSExceptions;
|
|
29
|
-
/** Only if `options.
|
|
30
|
-
|
|
29
|
+
/** Only if `options.json`: raw untyped JSON parsed from XML. Can include information not extracted in the typed response. */
|
|
30
|
+
json?: Record<string, unknown>;
|
|
31
31
|
/** Only if `options.xml`, the unparsed XML string can be requested */
|
|
32
32
|
xml?: string;
|
|
33
33
|
};
|
|
@@ -113,11 +113,9 @@ export type ParseWMSCapabilitiesOptions = {
|
|
|
113
113
|
/** Add inherited layer information to sub layers */
|
|
114
114
|
inheritedLayerProps?: boolean;
|
|
115
115
|
/** Include the "raw" JSON (parsed but untyped, unprocessed XML). May contain additional fields */
|
|
116
|
-
|
|
116
|
+
includeRawJSON?: boolean;
|
|
117
117
|
/** Include the original XML document text. May contain additional information. */
|
|
118
118
|
includeXMLText?: boolean;
|
|
119
|
-
/** @deprecated Use includeRawData` */
|
|
120
|
-
raw?: boolean;
|
|
121
119
|
};
|
|
122
120
|
/**
|
|
123
121
|
* Parses a typed data structure from raw XML for `GetCapabilities` response
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-wms-capabilities.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-capabilities.ts"],"names":[],"mappings":"AAWA,gHAAgH;AAChH,MAAM,MAAM,eAAe,GAAG;IAC5B,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,8GAA8G;IAC9G,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0GAA0G;IAC1G,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+EAA+E;IAC/E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,2HAA2H;IAC3H,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IACrC,yFAAyF;IACzF,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,
|
|
1
|
+
{"version":3,"file":"parse-wms-capabilities.d.ts","sourceRoot":"","sources":["../../../../src/lib/parsers/wms/parse-wms-capabilities.ts"],"names":[],"mappings":"AAWA,gHAAgH;AAChH,MAAM,MAAM,eAAe,GAAG;IAC5B,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,IAAI,EAAE,M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;AAEF,8CAA8C;AAC9C,MAAM,MAAM,UAAU,GAAG;IACvB,sDAAsD;IACtD,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,kDAAkD;IAClD,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,oDAAoD;IACpD,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kGAAkG;IAClG,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kFAAkF;IAClF,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,2BAA2B,GACpC,eAAe,CAwBjB"}
|
|
@@ -10,8 +10,8 @@ export function parseWMSCapabilities(xmlText, options) {
|
|
|
10
10
|
addInheritedLayerProps(layer, null);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
if (options !== null && options !== void 0 && options.
|
|
14
|
-
capabilities.
|
|
13
|
+
if (options !== null && options !== void 0 && options.includeRawJSON) {
|
|
14
|
+
capabilities.json = xmlCapabilities;
|
|
15
15
|
}
|
|
16
16
|
if (options !== null && options !== void 0 && options.includeXMLText) {
|
|
17
17
|
capabilities.xml = xmlText;
|
|
@@ -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","includeRawData","raw","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\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.raw`: raw untyped JSON parsed from XML. Can include information not extracted in the typed response. */\n raw?: 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 includeRawData?: boolean;\n /** Include the original XML document text. May contain additional information. */\n includeXMLText?: boolean;\n /** @deprecated Use includeRawData` */\n raw?: boolean;\n // xml options are passed through to xml loader\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?.includeRawData || options?.raw) {\n capabilities.raw = 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":"AAEA,SAAQA,SAAS,QAAO,iBAAiB;AAAC,SAExCC,WAAW,EACXC,iBAAiB,EACjBC,aAAa,EACbC,WAAW,EACXC,aAAa;AAyJf,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;EAGzD,IAAIL,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEU,mBAAmB,EAAE;IAEhC,KAAK,MAAMC,KAAK,IAAIH,YAAY,CAACI,MAAM,EAAE;MACvCC,sBAAsB,CAACF,KAAK,EAAE,IAAI,CAAC;IACrC;EAEF;EAEA,IAAIX,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEc,cAAc,IAAId,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEe,GAAG,EAAE;IAC3CP,YAAY,CAACO,GAAG,GAAGV,eAAe;EACpC;EAEA,IAAIL,OAAO,aAAPA,OAAO,eAAPA,OAAO,CAAEgB,cAAc,EAAE;IAC3BR,YAAY,CAACS,GAAG,GAAGlB,OAAO;EAC5B;EAEA,OAAOS,YAAY;AACrB;AAGA,SAASC,mBAAmBA,CAACQ,GAAQ,EAAmB;EAAA,IAAAC,YAAA,EAAAC,aAAA,EAAAC,aAAA,EAAAC,aAAA,EAAAC,aAAA,EAAAC,aAAA,EAAAC,qBAA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ANA,MAAM,CAAEvD,GAAG,IAAI,CAACvE,KAAK,CAACuE,GAAG,EAAE;IAC7BvE,KAAK,CAACuE,GAAG,GAAG,CAAC,GAAGuD,MAAM,CAACvD,GAAG,CAAC;EAC7B;EAEA,IAAIuD,MAAM,aAANA,MAAM,eAANA,MAAM,CAAE3C,aAAa,IAAI,CAACnF,KAAK,CAACmF,aAAa,EAAE;IACjDnF,KAAK,CAACmF,aAAa,GAAG,CAAC,GAAG2C,MAAM,CAAC3C,aAAa,CAAC;EACjD;EAEA,IAAI2C,MAAM,aAANA,MAAM,eAANA,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, MIT license\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":"AAEA,SAAQA,SAAS,QAAO,iBAAiB;AAAC,SAExCC,WAAW,EACXC,iBAAiB,EACjBC,aAAa,EACbC,WAAW,EACXC,aAAa;AAsJf,OAAO,SAASC,oBAAoBA,CAClCC,OAAe,EACfC,OAAqC,EACpB;EA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M,aAANA,MAAM,eAANA,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"}
|
|
@@ -7,11 +7,9 @@ export type WMSCapabilitiesLoaderOptions = XMLLoaderOptions & {
|
|
|
7
7
|
/** Add inherited layer information to sub layers */
|
|
8
8
|
inheritedLayerProps?: boolean;
|
|
9
9
|
/** Include the "raw" JSON (parsed but untyped, unprocessed XML). May contain additional fields */
|
|
10
|
-
|
|
10
|
+
includeRawJSON?: boolean;
|
|
11
11
|
/** Include the original XML document text. May contain additional information. */
|
|
12
12
|
includeXMLText?: boolean;
|
|
13
|
-
/** @deprecated Use options.includeRawData` */
|
|
14
|
-
raw?: boolean;
|
|
15
13
|
};
|
|
16
14
|
};
|
|
17
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-capabilities-loader.d.ts","sourceRoot":"","sources":["../src/wms-capabilities-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAC,eAAe,EAAuB,MAAM,0CAA0C,CAAC;AAO/F,YAAY,EACV,eAAe,EACf,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,aAAa,EACd,MAAM,0CAA0C,CAAC;AAElD,MAAM,MAAM,4BAA4B,GAAG,gBAAgB,GAAG;IAC5D,GAAG,CAAC,EAAE;QACJ,oDAAoD;QACpD,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,kGAAkG;QAClG,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,kFAAkF;QAClF,cAAc,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"wms-capabilities-loader.d.ts","sourceRoot":"","sources":["../src/wms-capabilities-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAC,eAAe,EAAuB,MAAM,0CAA0C,CAAC;AAO/F,YAAY,EACV,eAAe,EACf,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,UAAU,EACV,aAAa,EACd,MAAM,0CAA0C,CAAC;AAElD,MAAM,MAAM,4BAA4B,GAAG,gBAAgB,GAAG;IAC5D,GAAG,CAAC,EAAE;QACJ,oDAAoD;QACpD,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,kGAAkG;QAClG,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,kFAAkF;QAClF,cAAc,CAAC,EAAE,OAAO,CAAC;KAC1B,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,gBAAgB,CAClD,eAAe,EACf,KAAK,EACL,4BAA4B,CAoB7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wms-capabilities-loader.js","names":["parseWMSCapabilities","VERSION","__VERSION__","WMSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","arrayBuffer","TextDecoder","decode","parseTextSync","text","startsWith"],"sources":["../src/wms-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {XMLLoaderOptions} from '@loaders.gl/xml';\nimport {WMSCapabilities, parseWMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n// Parsed data types\nexport type {\n WMSCapabilities,\n WMSLayer,\n WMSBoundingBox,\n WMSDimension,\n WMSRequest,\n WMSExceptions\n} from './lib/parsers/wms/parse-wms-capabilities';\n\nexport type WMSCapabilitiesLoaderOptions = XMLLoaderOptions & {\n wms?: {\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
|
|
1
|
+
{"version":3,"file":"wms-capabilities-loader.js","names":["parseWMSCapabilities","VERSION","__VERSION__","WMSCapabilitiesLoader","id","name","module","version","worker","extensions","mimeTypes","testText","testXMLFile","options","wms","parse","arrayBuffer","TextDecoder","decode","parseTextSync","text","startsWith"],"sources":["../src/wms-capabilities-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n\nimport type {LoaderWithParser} from '@loaders.gl/loader-utils';\nimport type {XMLLoaderOptions} from '@loaders.gl/xml';\nimport {WMSCapabilities, parseWMSCapabilities} from './lib/parsers/wms/parse-wms-capabilities';\n\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof __VERSION__ !== 'undefined' ? __VERSION__ : 'latest';\n\n// Parsed data types\nexport type {\n WMSCapabilities,\n WMSLayer,\n WMSBoundingBox,\n WMSDimension,\n WMSRequest,\n WMSExceptions\n} from './lib/parsers/wms/parse-wms-capabilities';\n\nexport type WMSCapabilitiesLoaderOptions = XMLLoaderOptions & {\n wms?: {\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/**\n * Loader for the response to the WMS GetCapability request\n */\nexport const WMSCapabilitiesLoader: LoaderWithParser<\n WMSCapabilities,\n never,\n WMSCapabilitiesLoaderOptions\n> = {\n id: 'wms-capabilities',\n name: 'WMS Capabilities',\n\n module: 'wms',\n version: VERSION,\n worker: false,\n extensions: ['xml'],\n mimeTypes: ['application/vnd.ogc.wms_xml', 'application/xml', 'text/xml'],\n testText: testXMLFile,\n options: {\n wms: {}\n },\n parse: async (arrayBuffer: ArrayBuffer, options?: WMSCapabilitiesLoaderOptions) =>\n // TODO pass in XML options\n parseWMSCapabilities(new TextDecoder().decode(arrayBuffer), options?.wms),\n parseTextSync: (text: string, options?: WMSCapabilitiesLoaderOptions) =>\n // TODO pass in XML options\n parseWMSCapabilities(text, options?.wms)\n};\n\nfunction testXMLFile(text: string): boolean {\n // TODO - There could be space first.\n return text.startsWith('<?xml');\n}\n"],"mappings":"SAIyBA,oBAAoB;AAI7C,MAAMC,OAAO,GAAG,OAAOC,WAAW,KAAK,WAAW,GAAGA,WAAW,GAAG,QAAQ;AA0B3E,OAAO,MAAMC,qBAIZ,GAAG;EACFC,EAAE,EAAE,kBAAkB;EACtBC,IAAI,EAAE,kBAAkB;EAExBC,MAAM,EAAE,KAAK;EACbC,OAAO,EAAEN,OAAO;EAChBO,MAAM,EAAE,KAAK;EACbC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,6BAA6B,EAAE,iBAAiB,EAAE,UAAU,CAAC;EACzEC,QAAQ,EAAEC,WAAW;EACrBC,OAAO,EAAE;IACPC,GAAG,EAAE,CAAC;EACR,CAAC;EACDC,KAAK,EAAE,MAAAA,CAAOC,WAAwB,EAAEH,OAAsC,KAE5Eb,oBAAoB,CAAC,IAAIiB,WAAW,CAAC,CAAC,CAACC,MAAM,CAACF,WAAW,CAAC,EAAEH,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,GAAG,CAAC;EAC3EK,aAAa,EAAEA,CAACC,IAAY,EAAEP,OAAsC,KAElEb,oBAAoB,CAACoB,IAAI,EAAEP,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEC,GAAG;AAC3C,CAAC;AAED,SAASF,WAAWA,CAACQ,IAAY,EAAW;EAE1C,OAAOA,IAAI,CAACC,UAAU,CAAC,OAAO,CAAC;AACjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/wms",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.6",
|
|
4
4
|
"description": "Framework-independent loaders for the WMS (Web Map Service) standard",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -43,17 +43,21 @@
|
|
|
43
43
|
],
|
|
44
44
|
"scripts": {
|
|
45
45
|
"pre-build": "npm run build-bundle && npm run build-bundle -- --env=dev",
|
|
46
|
-
"build-bundle": "ocular-bundle ./src/index.ts"
|
|
46
|
+
"build-bundle": "# ocular-bundle ./src/index.ts --external:{util,fs,path}"
|
|
47
|
+
},
|
|
48
|
+
"browser": {
|
|
49
|
+
"fs": false,
|
|
50
|
+
"path": false
|
|
47
51
|
},
|
|
48
52
|
"dependencies": {
|
|
49
53
|
"@babel/runtime": "^7.3.1",
|
|
50
|
-
"@loaders.gl/images": "4.0.0-beta.
|
|
51
|
-
"@loaders.gl/loader-utils": "4.0.0-beta.
|
|
52
|
-
"@loaders.gl/schema": "4.0.0-beta.
|
|
53
|
-
"@loaders.gl/xml": "4.0.0-beta.
|
|
54
|
+
"@loaders.gl/images": "4.0.0-beta.6",
|
|
55
|
+
"@loaders.gl/loader-utils": "4.0.0-beta.6",
|
|
56
|
+
"@loaders.gl/schema": "4.0.0-beta.6",
|
|
57
|
+
"@loaders.gl/xml": "4.0.0-beta.6",
|
|
54
58
|
"@turf/rewind": "^5.1.5",
|
|
55
59
|
"deep-strict-equal": "^0.2.0",
|
|
56
60
|
"lerc": "^4.0.1"
|
|
57
61
|
},
|
|
58
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "2840f605b7a551e2ffef5f960231d989a0414c50"
|
|
59
63
|
}
|
package/src/index.ts
CHANGED
|
@@ -53,6 +53,9 @@ export {GMLLoader as _GMLLoader} from './gml-loader';
|
|
|
53
53
|
|
|
54
54
|
// EXPERIMENTAL: DATA SOURCES
|
|
55
55
|
|
|
56
|
+
// TODO - restore once deck.gl has been udpated
|
|
57
|
+
export {ImageSource} from '@loaders.gl/loader-utils';
|
|
58
|
+
|
|
56
59
|
export type {ImageType} from '@loaders.gl/images';
|
|
57
60
|
|
|
58
61
|
export type {CreateImageServiceProps} from './lib/services/create-image-service';
|
|
@@ -77,12 +80,5 @@ export {getArcGISServices as _getArcGISServices} from './services/arcgis/arcgis-
|
|
|
77
80
|
export {ArcGISImageService as _ArcGISImageService} from './services/arcgis/arcgis-image-service';
|
|
78
81
|
|
|
79
82
|
// LERC - Limited Error Raster Compression
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
// export {LERCLoader} from './lerc-loader';
|
|
83
|
-
|
|
84
|
-
/** @deprecated Use WMSCapabilitiesLoaderOptions */
|
|
85
|
-
export type {WMSCapabilitiesLoaderOptions as WMSLoaderOptions} from './wms-capabilities-loader';
|
|
86
|
-
|
|
87
|
-
// TODO - restore once deck.gl has been udpated
|
|
88
|
-
export {ImageSource} from '@loaders.gl/loader-utils';
|
|
83
|
+
export type {LERCData} from './lib/parsers/lerc/lerc-types';
|
|
84
|
+
export {LERCLoader} from './lerc-loader';
|
|
@@ -37,8 +37,8 @@ export type WMSCapabilities = {
|
|
|
37
37
|
requests: Record<string, WMSRequest>;
|
|
38
38
|
/** Information about any exceptions that the service will report (HTTP status != 2xx) */
|
|
39
39
|
exceptions?: WMSExceptions;
|
|
40
|
-
/** Only if `options.
|
|
41
|
-
|
|
40
|
+
/** Only if `options.json`: raw untyped JSON parsed from XML. Can include information not extracted in the typed response. */
|
|
41
|
+
json?: Record<string, unknown>;
|
|
42
42
|
/** Only if `options.xml`, the unparsed XML string can be requested */
|
|
43
43
|
xml?: string;
|
|
44
44
|
};
|
|
@@ -147,12 +147,9 @@ export type ParseWMSCapabilitiesOptions = {
|
|
|
147
147
|
/** Add inherited layer information to sub layers */
|
|
148
148
|
inheritedLayerProps?: boolean;
|
|
149
149
|
/** Include the "raw" JSON (parsed but untyped, unprocessed XML). May contain additional fields */
|
|
150
|
-
|
|
150
|
+
includeRawJSON?: boolean;
|
|
151
151
|
/** Include the original XML document text. May contain additional information. */
|
|
152
152
|
includeXMLText?: boolean;
|
|
153
|
-
/** @deprecated Use includeRawData` */
|
|
154
|
-
raw?: boolean;
|
|
155
|
-
// xml options are passed through to xml loader
|
|
156
153
|
};
|
|
157
154
|
|
|
158
155
|
/**
|
|
@@ -177,8 +174,8 @@ export function parseWMSCapabilities(
|
|
|
177
174
|
// Not yet implemented
|
|
178
175
|
}
|
|
179
176
|
|
|
180
|
-
if (options?.
|
|
181
|
-
capabilities.
|
|
177
|
+
if (options?.includeRawJSON) {
|
|
178
|
+
capabilities.json = xmlCapabilities;
|
|
182
179
|
}
|
|
183
180
|
|
|
184
181
|
if (options?.includeXMLText) {
|
|
@@ -23,11 +23,9 @@ export type WMSCapabilitiesLoaderOptions = XMLLoaderOptions & {
|
|
|
23
23
|
/** Add inherited layer information to sub layers */
|
|
24
24
|
inheritedLayerProps?: boolean;
|
|
25
25
|
/** Include the "raw" JSON (parsed but untyped, unprocessed XML). May contain additional fields */
|
|
26
|
-
|
|
26
|
+
includeRawJSON?: boolean;
|
|
27
27
|
/** Include the original XML document text. May contain additional information. */
|
|
28
28
|
includeXMLText?: boolean;
|
|
29
|
-
/** @deprecated Use options.includeRawData` */
|
|
30
|
-
raw?: boolean;
|
|
31
29
|
};
|
|
32
30
|
};
|
|
33
31
|
|