@loaders.gl/ogc 5.0.0-beta.2 → 5.0.0-beta.5
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/README.md +1 -1
- package/dist/gml-loader.cjs +16 -7
- package/dist/gml-loader.cjs.map +2 -2
- package/dist/index.cjs +17 -8
- package/dist/index.cjs.map +1 -1
- package/dist/stac/index.cjs +1 -1
- package/dist/stac/stac-source-loader-types.js +1 -1
- package/dist/stac-source.cjs +1 -1
- package/dist/wms/bundled.cjs +24 -15
- package/dist/wms/bundled.cjs.map +2 -2
- package/dist/wms/csw-capabilities-loader.js +1 -1
- package/dist/wms/csw-domain-loader.js +1 -1
- package/dist/wms/csw-records-loader.js +1 -1
- package/dist/wms/csw-source-loader.js +1 -1
- package/dist/wms/gml-loader-types.js +1 -1
- package/dist/wms/index.cjs +25 -16
- package/dist/wms/index.cjs.map +2 -2
- package/dist/wms/unbundled.cjs +16 -7
- package/dist/wms/unbundled.cjs.map +1 -1
- package/dist/wms/wfs-capabilities-loader.js +1 -1
- package/dist/wms/wip/wcs-capabilities-loader.js +1 -1
- package/dist/wms/wip/wmts-capabilities-loader.js +1 -1
- package/dist/wms/wms-capabilities-loader.js +1 -1
- package/dist/wms/wms-error-loader.js +1 -1
- package/dist/wmts-capabilities-loader-with-parser.cjs +9 -0
- package/dist/wmts-capabilities-loader-with-parser.cjs.map +1 -1
- package/package.json +6 -6
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { CSWCapabilitiesFormat } from "./wms-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
8
8
|
/** Preloads the parser-bearing CSW capabilities loader implementation. */
|
|
9
9
|
async function preload() {
|
|
10
10
|
const { CSWCapabilitiesLoaderWithParser } = await import("./csw-capabilities-loader-with-parser.js");
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { CSWDomainFormat } from "./wms-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
8
8
|
/** Preloads the parser-bearing CSW domain loader implementation. */
|
|
9
9
|
async function preload() {
|
|
10
10
|
const { CSWDomainLoaderWithParser } = await import("./csw-domain-loader-with-parser.js");
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { CSWRecordsFormat } from "./wms-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
8
8
|
/** Preloads the parser-bearing CSW records loader implementation. */
|
|
9
9
|
async function preload() {
|
|
10
10
|
const { CSWRecordsLoaderWithParser } = await import("./csw-records-loader-with-parser.js");
|
|
@@ -8,7 +8,7 @@ import { CSWDomainLoaderWithParser } from "./csw-domain-loader-with-parser.js";
|
|
|
8
8
|
import { WMSErrorLoaderWithParser } from "./wms-error-loader-with-parser.js";
|
|
9
9
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
10
10
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
11
|
-
const VERSION = typeof "5.0.0-beta.
|
|
11
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
12
12
|
export const CSWSourceLoader = {
|
|
13
13
|
dataType: null,
|
|
14
14
|
batchType: null,
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { GMLFormat } from "./wms-format.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "5.0.0-beta.
|
|
7
|
+
const VERSION = typeof "5.0.0-beta.5" !== 'undefined' ? "5.0.0-beta.5" : 'latest';
|
|
8
8
|
/** Preloads the parser-bearing GML loader implementation. */
|
|
9
9
|
async function preload() {
|
|
10
10
|
const { GMLLoaderWithParser } = await import('@loaders.gl/ogc/gml-loader');
|
package/dist/wms/index.cjs
CHANGED
|
@@ -1595,6 +1595,7 @@ var init_parse_xml_internal = __esm({
|
|
|
1595
1595
|
path: parent ? `${parent.path}.${elementName}` : elementName,
|
|
1596
1596
|
attributes: this.normalizeAttributes(attributes),
|
|
1597
1597
|
children: {},
|
|
1598
|
+
orderedChildren: [],
|
|
1598
1599
|
text: ""
|
|
1599
1600
|
});
|
|
1600
1601
|
}
|
|
@@ -1609,6 +1610,11 @@ var init_parse_xml_internal = __esm({
|
|
|
1609
1610
|
if (!node) return;
|
|
1610
1611
|
const value = this.finalizeElement(node);
|
|
1611
1612
|
const parent = this.stack[this.stack.length - 1];
|
|
1613
|
+
if (this.options.preserveOrder) {
|
|
1614
|
+
if (parent) parent.orderedChildren.push(value);
|
|
1615
|
+
else this.result = value;
|
|
1616
|
+
return;
|
|
1617
|
+
}
|
|
1612
1618
|
if (parent) this.addChild(parent.children, node.name, node.path, value);
|
|
1613
1619
|
else {
|
|
1614
1620
|
if (this.result === void 0) this.result = {};
|
|
@@ -1618,6 +1624,9 @@ var init_parse_xml_internal = __esm({
|
|
|
1618
1624
|
/** Converts a completed element, keeping grouping and coercion independent. */
|
|
1619
1625
|
finalizeElement(node) {
|
|
1620
1626
|
const text3 = this.options.trimValues === false ? node.text : node.text.trim();
|
|
1627
|
+
if (this.options.preserveOrder) {
|
|
1628
|
+
return { name: node.name, attributes: node.attributes, children: node.orderedChildren, text: text3 };
|
|
1629
|
+
}
|
|
1621
1630
|
const hasAttributes = Object.keys(node.attributes).length > 0;
|
|
1622
1631
|
if (!hasAttributes && !Object.keys(node.children).length) {
|
|
1623
1632
|
return this.parseValue(text3, this.options.parseTagValue !== false);
|
|
@@ -1856,7 +1865,7 @@ var init_csw_capabilities_loader = __esm({
|
|
|
1856
1865
|
"dist/wms/csw-capabilities-loader.js"() {
|
|
1857
1866
|
"use strict";
|
|
1858
1867
|
init_wms_format();
|
|
1859
|
-
VERSION2 = true ? "5.0.0-beta.
|
|
1868
|
+
VERSION2 = true ? "5.0.0-beta.5" : "latest";
|
|
1860
1869
|
CSWCapabilitiesLoader = {
|
|
1861
1870
|
...CSWCapabilitiesFormat,
|
|
1862
1871
|
dataType: null,
|
|
@@ -1944,7 +1953,7 @@ var init_csw_domain_loader = __esm({
|
|
|
1944
1953
|
"dist/wms/csw-domain-loader.js"() {
|
|
1945
1954
|
"use strict";
|
|
1946
1955
|
init_wms_format();
|
|
1947
|
-
VERSION3 = true ? "5.0.0-beta.
|
|
1956
|
+
VERSION3 = true ? "5.0.0-beta.5" : "latest";
|
|
1948
1957
|
CSWDomainLoader = {
|
|
1949
1958
|
...CSWDomainFormat,
|
|
1950
1959
|
dataType: null,
|
|
@@ -2075,7 +2084,7 @@ var init_csw_records_loader = __esm({
|
|
|
2075
2084
|
"dist/wms/csw-records-loader.js"() {
|
|
2076
2085
|
"use strict";
|
|
2077
2086
|
init_wms_format();
|
|
2078
|
-
VERSION4 = true ? "5.0.0-beta.
|
|
2087
|
+
VERSION4 = true ? "5.0.0-beta.5" : "latest";
|
|
2079
2088
|
CSWRecordsLoader = {
|
|
2080
2089
|
...CSWRecordsFormat,
|
|
2081
2090
|
dataType: null,
|
|
@@ -2162,7 +2171,7 @@ var init_wms_error_loader = __esm({
|
|
|
2162
2171
|
"dist/wms/wms-error-loader.js"() {
|
|
2163
2172
|
"use strict";
|
|
2164
2173
|
init_wms_format();
|
|
2165
|
-
VERSION5 = true ? "5.0.0-beta.
|
|
2174
|
+
VERSION5 = true ? "5.0.0-beta.5" : "latest";
|
|
2166
2175
|
WMSErrorLoader = {
|
|
2167
2176
|
...WMSErrorFormat,
|
|
2168
2177
|
dataType: null,
|
|
@@ -2485,7 +2494,7 @@ var init_wms_capabilities_loader = __esm({
|
|
|
2485
2494
|
"dist/wms/wms-capabilities-loader.js"() {
|
|
2486
2495
|
"use strict";
|
|
2487
2496
|
init_wms_format();
|
|
2488
|
-
VERSION6 = true ? "5.0.0-beta.
|
|
2497
|
+
VERSION6 = true ? "5.0.0-beta.5" : "latest";
|
|
2489
2498
|
WMSCapabilitiesLoader = {
|
|
2490
2499
|
...WMSCapabilitiesFormat,
|
|
2491
2500
|
dataType: null,
|
|
@@ -2986,7 +2995,7 @@ var init_wfs_capabilities_loader = __esm({
|
|
|
2986
2995
|
"dist/wms/wfs-capabilities-loader.js"() {
|
|
2987
2996
|
"use strict";
|
|
2988
2997
|
init_wms_format();
|
|
2989
|
-
VERSION7 = true ? "5.0.0-beta.
|
|
2998
|
+
VERSION7 = true ? "5.0.0-beta.5" : "latest";
|
|
2990
2999
|
WFSCapabilitiesLoader = {
|
|
2991
3000
|
...WFSCapabilitiesFormat,
|
|
2992
3001
|
dataType: null,
|
|
@@ -3023,7 +3032,7 @@ var init_gml_loader_types = __esm({
|
|
|
3023
3032
|
"dist/wms/gml-loader-types.js"() {
|
|
3024
3033
|
"use strict";
|
|
3025
3034
|
init_wms_format();
|
|
3026
|
-
VERSION8 = true ? "5.0.0-beta.
|
|
3035
|
+
VERSION8 = true ? "5.0.0-beta.5" : "latest";
|
|
3027
3036
|
GMLLoader = {
|
|
3028
3037
|
...GMLFormat,
|
|
3029
3038
|
dataType: null,
|
|
@@ -5191,7 +5200,7 @@ function convertGeometryToWKT(geometry, options) {
|
|
|
5191
5200
|
if (geometry.geometries.length === 0) return "GEOMETRYCOLLECTION EMPTY";
|
|
5192
5201
|
return `GEOMETRYCOLLECTION (${geometry.geometries.map((child) => convertGeometryToWKT(child)).join(", ")})`;
|
|
5193
5202
|
}
|
|
5194
|
-
return (0,
|
|
5203
|
+
return (0, import_wkb.formatWKT)(normalizeGeometryDimension(geometry, dimension), dimension);
|
|
5195
5204
|
}
|
|
5196
5205
|
function normalizeGeometryDimension(geometry, dimension) {
|
|
5197
5206
|
if (geometry.type === "GeometryCollection") {
|
|
@@ -5250,11 +5259,11 @@ function getFirstCoordinate(geometry) {
|
|
|
5250
5259
|
function getDimensionSize(dimension) {
|
|
5251
5260
|
return dimension === "xy" ? 2 : dimension === "xyzm" ? 4 : 3;
|
|
5252
5261
|
}
|
|
5253
|
-
var
|
|
5262
|
+
var import_wkb;
|
|
5254
5263
|
var init_geometry_to_wkt = __esm({
|
|
5255
5264
|
"../core/src/arrow-geometry/geometry-to-wkt.ts"() {
|
|
5256
5265
|
"use strict";
|
|
5257
|
-
|
|
5266
|
+
import_wkb = require("@math.gl/arrow/wkb");
|
|
5258
5267
|
}
|
|
5259
5268
|
});
|
|
5260
5269
|
|
|
@@ -5268,7 +5277,7 @@ function convertGeometryToWKB(input, options = {}) {
|
|
|
5268
5277
|
}
|
|
5269
5278
|
function encodeGeometry(geometry, dimension) {
|
|
5270
5279
|
if (geometry.type !== "GeometryCollection") {
|
|
5271
|
-
return (0,
|
|
5280
|
+
return (0, import_wkb2.writeWKB)(geometry, dimension);
|
|
5272
5281
|
}
|
|
5273
5282
|
const children = geometry.geometries.map(
|
|
5274
5283
|
(child) => encodeGeometry(
|
|
@@ -5276,13 +5285,13 @@ function encodeGeometry(geometry, dimension) {
|
|
|
5276
5285
|
child.__geoarrowDimension ?? dimension
|
|
5277
5286
|
)
|
|
5278
5287
|
);
|
|
5279
|
-
const headerBuilder = new
|
|
5288
|
+
const headerBuilder = new import_wkb2.WKBBuilder({ mode: "measure", dimension });
|
|
5280
5289
|
headerBuilder.beginGeometry("GeometryCollection", children.length);
|
|
5281
5290
|
const headerLength = headerBuilder.finishGeometry();
|
|
5282
5291
|
const bytes = new Uint8Array(
|
|
5283
5292
|
headerLength + children.reduce((total, child) => total + child.length, 0)
|
|
5284
5293
|
);
|
|
5285
|
-
const writer = new
|
|
5294
|
+
const writer = new import_wkb2.WKBBuilder({ mode: "write", target: bytes, dimension });
|
|
5286
5295
|
writer.beginGeometry("GeometryCollection", children.length);
|
|
5287
5296
|
let byteOffset = writer.finishGeometry();
|
|
5288
5297
|
for (const child of children) {
|
|
@@ -5291,11 +5300,11 @@ function encodeGeometry(geometry, dimension) {
|
|
|
5291
5300
|
}
|
|
5292
5301
|
return bytes;
|
|
5293
5302
|
}
|
|
5294
|
-
var
|
|
5303
|
+
var import_wkb2;
|
|
5295
5304
|
var init_geometry_codecs = __esm({
|
|
5296
5305
|
"../core/src/arrow-geometry/geometry-codecs.ts"() {
|
|
5297
5306
|
"use strict";
|
|
5298
|
-
|
|
5307
|
+
import_wkb2 = require("@math.gl/arrow/wkb");
|
|
5299
5308
|
init_geometry_to_wkt();
|
|
5300
5309
|
}
|
|
5301
5310
|
});
|
|
@@ -7808,7 +7817,7 @@ init_csw_capabilities_loader_with_parser();
|
|
|
7808
7817
|
init_csw_records_loader_with_parser();
|
|
7809
7818
|
init_csw_domain_loader_with_parser();
|
|
7810
7819
|
init_wms_error_loader_with_parser();
|
|
7811
|
-
var VERSION10 = true ? "5.0.0-beta.
|
|
7820
|
+
var VERSION10 = true ? "5.0.0-beta.5" : "latest";
|
|
7812
7821
|
var CSWSourceLoader = {
|
|
7813
7822
|
dataType: null,
|
|
7814
7823
|
batchType: null,
|