@basemaps/cli-raster 8.2.0 → 8.3.0

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.
Files changed (2) hide show
  1. package/dist/index.cjs +316 -316
  2. package/package.json +6 -6
package/dist/index.cjs CHANGED
@@ -72934,9 +72934,9 @@ var ulid2 = __toESM(require_index_umd(), 1);
72934
72934
  var CliInfo = {
72935
72935
  // Detect unlinked packages looks for this string since its a package name, slightly work around it
72936
72936
  package: "@basemaps/cli",
72937
- version: "v8.2.0",
72938
- hash: "69195be692efa914369fa854d3bae16355dc0dc8",
72939
- buildId: "15601557572-1"
72937
+ version: "v8.3.0",
72938
+ hash: "fe8bbf9d0a3ca2f590505924f227a6d9da0ea5a8",
72939
+ buildId: "15719849199-1"
72940
72940
  };
72941
72941
  var CliDate = (/* @__PURE__ */ new Date()).toISOString();
72942
72942
  var CliId = ulid2.ulid();
@@ -80372,143 +80372,6 @@ Object.defineProperty(Projection, "AllowedFloatingError", {
80372
80372
  value: 1e-8
80373
80373
  });
80374
80374
 
80375
- // ../geo/build/proj/projection.loader.js
80376
- var ProjectionLoader = class {
80377
- /**
80378
- * Ensure that a projection EPSG code is avialable for use in Proj4js
80379
- *
80380
- * If its not already loaded, lookup definition from spatialreference.org
80381
- * @param code
80382
- */
80383
- static async load(code) {
80384
- if (Projection.tryGet(code) != null)
80385
- return Epsg.get(code);
80386
- const url = `https://spatialreference.org/ref/epsg/${code}/ogcwkt/`;
80387
- const res = await this._fetch(url);
80388
- if (!res.ok)
80389
- throw new Error("Failed to load projection information for:" + code);
80390
- let epsg = Epsg.tryGet(code);
80391
- if (epsg == null)
80392
- epsg = new Epsg(code);
80393
- const text = await res.text();
80394
- Projection.define(epsg, text);
80395
- return epsg;
80396
- }
80397
- };
80398
- Object.defineProperty(ProjectionLoader, "_fetch", {
80399
- enumerable: true,
80400
- configurable: true,
80401
- writable: true,
80402
- value: fetch
80403
- });
80404
-
80405
- // ../geo/build/proj/tile.set.name.js
80406
- var TileSetName;
80407
- (function(TileSetName2) {
80408
- TileSetName2["aerial"] = "aerial";
80409
- })(TileSetName || (TileSetName = {}));
80410
-
80411
- // ../geo/build/quad.key.js
80412
- var CHAR_0 = "0".charCodeAt(0);
80413
- var CHAR_1 = "1".charCodeAt(0);
80414
- var CHAR_2 = "2".charCodeAt(0);
80415
- var CHAR_3 = "3".charCodeAt(0);
80416
-
80417
- // ../geo/build/simplify.js
80418
- function getDistance(p1, p2) {
80419
- const dx = p1[0] - p2[0];
80420
- const dy = p1[1] - p2[1];
80421
- return dx * dx + dy * dy;
80422
- }
80423
- function getSqSegDist(p, p1, p2) {
80424
- let x = p1[0];
80425
- let y = p1[1];
80426
- let dx = p2[0] - x;
80427
- let dy = p2[1] - y;
80428
- if (dx !== 0 || dy !== 0) {
80429
- const t = ((p[0] - x) * dx + (p[1] - y) * dy) / (dx * dx + dy * dy);
80430
- if (t > 1) {
80431
- x = p2[0];
80432
- y = p2[1];
80433
- } else if (t > 0) {
80434
- x += dx * t;
80435
- y += dy * t;
80436
- }
80437
- }
80438
- dx = p[0] - x;
80439
- dy = p[1] - y;
80440
- return dx * dx + dy * dy;
80441
- }
80442
- function simplifyRadialDist(points, sqTolerance) {
80443
- let prevPoint = points[0];
80444
- let point = points[1];
80445
- const newPoints = [prevPoint];
80446
- for (let i = 1, len = points.length; i < len; i++) {
80447
- point = points[i];
80448
- if (getDistance(point, prevPoint) > sqTolerance) {
80449
- newPoints.push(point);
80450
- prevPoint = point;
80451
- }
80452
- }
80453
- if (prevPoint !== point)
80454
- newPoints.push(point);
80455
- return newPoints;
80456
- }
80457
- function simplifyDPStep(points, first, last, sqTolerance, simplified) {
80458
- let maxSqDist = sqTolerance;
80459
- let index = 0;
80460
- for (let i = first + 1; i < last; i++) {
80461
- const sqDist = getSqSegDist(points[i], points[first], points[last]);
80462
- if (sqDist > maxSqDist) {
80463
- index = i;
80464
- maxSqDist = sqDist;
80465
- }
80466
- }
80467
- if (maxSqDist > sqTolerance) {
80468
- if (index - first > 1)
80469
- simplifyDPStep(points, first, index, sqTolerance, simplified);
80470
- simplified.push(points[index]);
80471
- if (last - index > 1)
80472
- simplifyDPStep(points, index, last, sqTolerance, simplified);
80473
- }
80474
- }
80475
- function simplifyDouglasPeucker(points, sqTolerance) {
80476
- const last = points.length - 1;
80477
- const simplified = [points[0]];
80478
- simplifyDPStep(points, 0, last, sqTolerance, simplified);
80479
- simplified.push(points[last]);
80480
- return simplified;
80481
- }
80482
- var Simplify = {
80483
- points(points, tolerance, highestQuality) {
80484
- if (points.length <= 2)
80485
- return points;
80486
- const sqTolerance = tolerance * tolerance;
80487
- points = highestQuality ? points : simplifyRadialDist(points, sqTolerance);
80488
- points = simplifyDouglasPeucker(points, sqTolerance);
80489
- return points;
80490
- },
80491
- multiPolygon(coordinates, tolerance, removeArea = 1e-8) {
80492
- const output = [];
80493
- for (let k = 0; k < coordinates.length; k++) {
80494
- const outPoints = [];
80495
- for (let l = 0; l < coordinates[k].length; l++) {
80496
- const point = Simplify.points(coordinates[k][l], tolerance);
80497
- if (point.length > 2)
80498
- outPoints.push(point);
80499
- }
80500
- if (outPoints.length > 0) {
80501
- if (removeArea > 0 && Area.polygon(outPoints) < removeArea)
80502
- continue;
80503
- output.push(outPoints);
80504
- }
80505
- }
80506
- if (output.length === 0)
80507
- return null;
80508
- return output;
80509
- }
80510
- };
80511
-
80512
80375
  // ../geo/build/xy.order.js
80513
80376
  function getXyOrder(epsg) {
80514
80377
  const code = typeof epsg === "number" ? epsg : epsg.code;
@@ -80794,25 +80657,25 @@ var TileMatrixSet = class {
80794
80657
  }
80795
80658
  };
80796
80659
 
80797
- // ../geo/build/tms/citm2000.js
80798
- var Citm2000Tmst = {
80660
+ // ../geo/build/tms/google.js
80661
+ var GoogleTmst = {
80799
80662
  type: "TileMatrixSetType",
80800
- title: "Debug tile matrix for EPSG:3793",
80801
- abstract: "",
80802
- identifier: "CITM2000Quad",
80803
- supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3793",
80663
+ title: "Google Maps Compatible for the World",
80664
+ identifier: "WebMercatorQuad",
80804
80665
  boundingBox: {
80805
80666
  type: "BoundingBoxType",
80806
- crs: "https://www.opengis.net/def/crs/EPSG/0/3793",
80807
- lowerCorner: [5051234111622438e-9, 3.4301543757978342e6],
80808
- upperCorner: [5207777145550478e-9, 3.5866974097258747e6]
80667
+ crs: "http://www.opengis.net/def/crs/EPSG/0/3857",
80668
+ lowerCorner: [-200375083427892e-7, -200375083427892e-7],
80669
+ upperCorner: [200375083427892e-7, 200375083427892e-7]
80809
80670
  },
80671
+ supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3857",
80672
+ wellKnownScaleSet: "https://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible",
80810
80673
  tileMatrix: [
80811
80674
  {
80812
80675
  type: "TileMatrixType",
80813
80676
  identifier: "0",
80814
- scaleDenominator: 218391509386217e-8,
80815
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80677
+ scaleDenominator: 559082264028717e-6,
80678
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80816
80679
  tileWidth: 256,
80817
80680
  tileHeight: 256,
80818
80681
  matrixWidth: 1,
@@ -80821,8 +80684,8 @@ var Citm2000Tmst = {
80821
80684
  {
80822
80685
  type: "TileMatrixType",
80823
80686
  identifier: "1",
80824
- scaleDenominator: 109195754693108e-8,
80825
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80687
+ scaleDenominator: 279541132014358e-6,
80688
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80826
80689
  tileWidth: 256,
80827
80690
  tileHeight: 256,
80828
80691
  matrixWidth: 2,
@@ -80831,8 +80694,8 @@ var Citm2000Tmst = {
80831
80694
  {
80832
80695
  type: "TileMatrixType",
80833
80696
  identifier: "2",
80834
- scaleDenominator: 545978.773465544,
80835
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80697
+ scaleDenominator: 139770566007179e-6,
80698
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80836
80699
  tileWidth: 256,
80837
80700
  tileHeight: 256,
80838
80701
  matrixWidth: 4,
@@ -80841,8 +80704,8 @@ var Citm2000Tmst = {
80841
80704
  {
80842
80705
  type: "TileMatrixType",
80843
80706
  identifier: "3",
80844
- scaleDenominator: 272989.386732772,
80845
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80707
+ scaleDenominator: 698852830035897e-7,
80708
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80846
80709
  tileWidth: 256,
80847
80710
  tileHeight: 256,
80848
80711
  matrixWidth: 8,
@@ -80851,8 +80714,8 @@ var Citm2000Tmst = {
80851
80714
  {
80852
80715
  type: "TileMatrixType",
80853
80716
  identifier: "4",
80854
- scaleDenominator: 136494.693366386,
80855
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80717
+ scaleDenominator: 349426415017948e-7,
80718
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80856
80719
  tileWidth: 256,
80857
80720
  tileHeight: 256,
80858
80721
  matrixWidth: 16,
@@ -80861,8 +80724,8 @@ var Citm2000Tmst = {
80861
80724
  {
80862
80725
  type: "TileMatrixType",
80863
80726
  identifier: "5",
80864
- scaleDenominator: 68247.346683193,
80865
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80727
+ scaleDenominator: 174713207508974e-7,
80728
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80866
80729
  tileWidth: 256,
80867
80730
  tileHeight: 256,
80868
80731
  matrixWidth: 32,
@@ -80871,8 +80734,8 @@ var Citm2000Tmst = {
80871
80734
  {
80872
80735
  type: "TileMatrixType",
80873
80736
  identifier: "6",
80874
- scaleDenominator: 34123.6733415964,
80875
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80737
+ scaleDenominator: 873566037544871e-8,
80738
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80876
80739
  tileWidth: 256,
80877
80740
  tileHeight: 256,
80878
80741
  matrixWidth: 64,
@@ -80881,8 +80744,8 @@ var Citm2000Tmst = {
80881
80744
  {
80882
80745
  type: "TileMatrixType",
80883
80746
  identifier: "7",
80884
- scaleDenominator: 17061.8366707982,
80885
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80747
+ scaleDenominator: 436783018772435e-8,
80748
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80886
80749
  tileWidth: 256,
80887
80750
  tileHeight: 256,
80888
80751
  matrixWidth: 128,
@@ -80891,8 +80754,8 @@ var Citm2000Tmst = {
80891
80754
  {
80892
80755
  type: "TileMatrixType",
80893
80756
  identifier: "8",
80894
- scaleDenominator: 8530.91833539913,
80895
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80757
+ scaleDenominator: 218391509386217e-8,
80758
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80896
80759
  tileWidth: 256,
80897
80760
  tileHeight: 256,
80898
80761
  matrixWidth: 256,
@@ -80901,8 +80764,8 @@ var Citm2000Tmst = {
80901
80764
  {
80902
80765
  type: "TileMatrixType",
80903
80766
  identifier: "9",
80904
- scaleDenominator: 4265.45916769956,
80905
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80767
+ scaleDenominator: 109195754693108e-8,
80768
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80906
80769
  tileWidth: 256,
80907
80770
  tileHeight: 256,
80908
80771
  matrixWidth: 512,
@@ -80911,8 +80774,8 @@ var Citm2000Tmst = {
80911
80774
  {
80912
80775
  type: "TileMatrixType",
80913
80776
  identifier: "10",
80914
- scaleDenominator: 2132.72958384978,
80915
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80777
+ scaleDenominator: 545978.773465544,
80778
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80916
80779
  tileWidth: 256,
80917
80780
  tileHeight: 256,
80918
80781
  matrixWidth: 1024,
@@ -80921,8 +80784,8 @@ var Citm2000Tmst = {
80921
80784
  {
80922
80785
  type: "TileMatrixType",
80923
80786
  identifier: "11",
80924
- scaleDenominator: 1066.36479192489,
80925
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80787
+ scaleDenominator: 272989.386732772,
80788
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80926
80789
  tileWidth: 256,
80927
80790
  tileHeight: 256,
80928
80791
  matrixWidth: 2048,
@@ -80931,8 +80794,8 @@ var Citm2000Tmst = {
80931
80794
  {
80932
80795
  type: "TileMatrixType",
80933
80796
  identifier: "12",
80934
- scaleDenominator: 533.182395962445,
80935
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80797
+ scaleDenominator: 136494.693366386,
80798
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80936
80799
  tileWidth: 256,
80937
80800
  tileHeight: 256,
80938
80801
  matrixWidth: 4096,
@@ -80941,8 +80804,8 @@ var Citm2000Tmst = {
80941
80804
  {
80942
80805
  type: "TileMatrixType",
80943
80806
  identifier: "13",
80944
- scaleDenominator: 266.591197981222,
80945
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80807
+ scaleDenominator: 68247.346683193,
80808
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80946
80809
  tileWidth: 256,
80947
80810
  tileHeight: 256,
80948
80811
  matrixWidth: 8192,
@@ -80951,8 +80814,8 @@ var Citm2000Tmst = {
80951
80814
  {
80952
80815
  type: "TileMatrixType",
80953
80816
  identifier: "14",
80954
- scaleDenominator: 133.295598990611,
80955
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80817
+ scaleDenominator: 34123.6733415964,
80818
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80956
80819
  tileWidth: 256,
80957
80820
  tileHeight: 256,
80958
80821
  matrixWidth: 16384,
@@ -80961,8 +80824,8 @@ var Citm2000Tmst = {
80961
80824
  {
80962
80825
  type: "TileMatrixType",
80963
80826
  identifier: "15",
80964
- scaleDenominator: 66.6477994953056,
80965
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80827
+ scaleDenominator: 17061.8366707982,
80828
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80966
80829
  tileWidth: 256,
80967
80830
  tileHeight: 256,
80968
80831
  matrixWidth: 32768,
@@ -80971,294 +80834,431 @@ var Citm2000Tmst = {
80971
80834
  {
80972
80835
  type: "TileMatrixType",
80973
80836
  identifier: "16",
80974
- scaleDenominator: 33.3238997476528,
80975
- topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
80837
+ scaleDenominator: 8530.91833539913,
80838
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80976
80839
  tileWidth: 256,
80977
80840
  tileHeight: 256,
80978
80841
  matrixWidth: 65536,
80979
80842
  matrixHeight: 65536
80980
- }
80981
- ],
80982
- $generated: {
80983
- package: "@basemaps/cli",
80984
- version: "v7.14.0-4-g2766010d",
80985
- hash: "2766010d8d2bb8b673f6bcbef2fe2636f2e0f4ea",
80986
- createdAt: "2025-02-10T20:34:46.643Z"
80987
- },
80988
- $options: {
80989
- sourceTileMatrix: "WebMercatorQuad",
80990
- zoomOffset: 8
80991
- }
80992
- };
80993
- var Citm2000Tms = new TileMatrixSet(Citm2000Tmst);
80994
-
80995
- // ../geo/build/tms/google.js
80996
- var GoogleTmst = {
80997
- type: "TileMatrixSetType",
80998
- title: "Google Maps Compatible for the World",
80999
- identifier: "WebMercatorQuad",
81000
- boundingBox: {
81001
- type: "BoundingBoxType",
81002
- crs: "http://www.opengis.net/def/crs/EPSG/0/3857",
81003
- lowerCorner: [-200375083427892e-7, -200375083427892e-7],
81004
- upperCorner: [200375083427892e-7, 200375083427892e-7]
81005
- },
81006
- supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3857",
81007
- wellKnownScaleSet: "https://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible",
81008
- tileMatrix: [
80843
+ },
81009
80844
  {
81010
80845
  type: "TileMatrixType",
81011
- identifier: "0",
81012
- scaleDenominator: 559082264028717e-6,
81013
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
80846
+ identifier: "17",
80847
+ scaleDenominator: 4265.45916769956,
80848
+ topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81014
80849
  tileWidth: 256,
81015
80850
  tileHeight: 256,
81016
- matrixWidth: 1,
81017
- matrixHeight: 1
80851
+ matrixWidth: 131072,
80852
+ matrixHeight: 131072
81018
80853
  },
81019
80854
  {
81020
80855
  type: "TileMatrixType",
81021
- identifier: "1",
81022
- scaleDenominator: 279541132014358e-6,
80856
+ identifier: "18",
80857
+ scaleDenominator: 2132.72958384978,
81023
80858
  topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81024
80859
  tileWidth: 256,
81025
80860
  tileHeight: 256,
81026
- matrixWidth: 2,
81027
- matrixHeight: 2
80861
+ matrixWidth: 262144,
80862
+ matrixHeight: 262144
81028
80863
  },
81029
80864
  {
81030
80865
  type: "TileMatrixType",
81031
- identifier: "2",
81032
- scaleDenominator: 139770566007179e-6,
80866
+ identifier: "19",
80867
+ scaleDenominator: 1066.36479192489,
81033
80868
  topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81034
80869
  tileWidth: 256,
81035
80870
  tileHeight: 256,
81036
- matrixWidth: 4,
81037
- matrixHeight: 4
80871
+ matrixWidth: 524288,
80872
+ matrixHeight: 524288
81038
80873
  },
81039
80874
  {
81040
80875
  type: "TileMatrixType",
81041
- identifier: "3",
81042
- scaleDenominator: 698852830035897e-7,
80876
+ identifier: "20",
80877
+ scaleDenominator: 533.182395962445,
81043
80878
  topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81044
80879
  tileWidth: 256,
81045
80880
  tileHeight: 256,
81046
- matrixWidth: 8,
81047
- matrixHeight: 8
80881
+ matrixWidth: 1048576,
80882
+ matrixHeight: 1048576
81048
80883
  },
81049
80884
  {
81050
80885
  type: "TileMatrixType",
81051
- identifier: "4",
81052
- scaleDenominator: 349426415017948e-7,
80886
+ identifier: "21",
80887
+ scaleDenominator: 266.591197981222,
81053
80888
  topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81054
80889
  tileWidth: 256,
81055
80890
  tileHeight: 256,
81056
- matrixWidth: 16,
81057
- matrixHeight: 16
80891
+ matrixWidth: 2097152,
80892
+ matrixHeight: 2097152
81058
80893
  },
81059
80894
  {
81060
80895
  type: "TileMatrixType",
81061
- identifier: "5",
81062
- scaleDenominator: 174713207508974e-7,
80896
+ identifier: "22",
80897
+ scaleDenominator: 133.295598990611,
81063
80898
  topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81064
80899
  tileWidth: 256,
81065
80900
  tileHeight: 256,
81066
- matrixWidth: 32,
81067
- matrixHeight: 32
80901
+ matrixWidth: 4194304,
80902
+ matrixHeight: 4194304
81068
80903
  },
81069
80904
  {
81070
80905
  type: "TileMatrixType",
81071
- identifier: "6",
81072
- scaleDenominator: 873566037544871e-8,
80906
+ identifier: "23",
80907
+ scaleDenominator: 66.6477994953056,
81073
80908
  topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81074
80909
  tileWidth: 256,
81075
80910
  tileHeight: 256,
81076
- matrixWidth: 64,
81077
- matrixHeight: 64
80911
+ matrixWidth: 8388608,
80912
+ matrixHeight: 8388608
81078
80913
  },
81079
80914
  {
81080
80915
  type: "TileMatrixType",
81081
- identifier: "7",
81082
- scaleDenominator: 436783018772435e-8,
80916
+ identifier: "24",
80917
+ scaleDenominator: 33.3238997476528,
81083
80918
  topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81084
80919
  tileWidth: 256,
81085
80920
  tileHeight: 256,
81086
- matrixWidth: 128,
81087
- matrixHeight: 128
81088
- },
80921
+ matrixWidth: 16777216,
80922
+ matrixHeight: 16777216
80923
+ }
80924
+ ]
80925
+ };
80926
+ var GoogleTms = new TileMatrixSet(GoogleTmst);
80927
+
80928
+ // ../geo/build/proj/projection.loader.js
80929
+ var ProjectionLoader = class {
80930
+ /**
80931
+ * Ensure that a projection EPSG code is avialable for use in Proj4js
80932
+ *
80933
+ * If its not already loaded, lookup definition from spatialreference.org
80934
+ * @param code
80935
+ */
80936
+ static async load(code) {
80937
+ if (Projection.tryGet(code) != null)
80938
+ return Epsg.get(code);
80939
+ const url = `https://spatialreference.org/ref/epsg/${code}/ogcwkt/`;
80940
+ const res = await this._fetch(url);
80941
+ if (!res.ok)
80942
+ throw new Error("Failed to load projection information for:" + code);
80943
+ let epsg = Epsg.tryGet(code);
80944
+ if (epsg == null)
80945
+ epsg = new Epsg(code);
80946
+ const text = await res.text();
80947
+ Projection.define(epsg, text);
80948
+ return epsg;
80949
+ }
80950
+ };
80951
+ Object.defineProperty(ProjectionLoader, "_fetch", {
80952
+ enumerable: true,
80953
+ configurable: true,
80954
+ writable: true,
80955
+ value: fetch
80956
+ });
80957
+
80958
+ // ../geo/build/proj/tile.set.name.js
80959
+ var TileSetName;
80960
+ (function(TileSetName2) {
80961
+ TileSetName2["aerial"] = "aerial";
80962
+ })(TileSetName || (TileSetName = {}));
80963
+
80964
+ // ../geo/build/quad.key.js
80965
+ var CHAR_0 = "0".charCodeAt(0);
80966
+ var CHAR_1 = "1".charCodeAt(0);
80967
+ var CHAR_2 = "2".charCodeAt(0);
80968
+ var CHAR_3 = "3".charCodeAt(0);
80969
+
80970
+ // ../geo/build/simplify.js
80971
+ function getDistance(p1, p2) {
80972
+ const dx = p1[0] - p2[0];
80973
+ const dy = p1[1] - p2[1];
80974
+ return dx * dx + dy * dy;
80975
+ }
80976
+ function getSqSegDist(p, p1, p2) {
80977
+ let x = p1[0];
80978
+ let y = p1[1];
80979
+ let dx = p2[0] - x;
80980
+ let dy = p2[1] - y;
80981
+ if (dx !== 0 || dy !== 0) {
80982
+ const t = ((p[0] - x) * dx + (p[1] - y) * dy) / (dx * dx + dy * dy);
80983
+ if (t > 1) {
80984
+ x = p2[0];
80985
+ y = p2[1];
80986
+ } else if (t > 0) {
80987
+ x += dx * t;
80988
+ y += dy * t;
80989
+ }
80990
+ }
80991
+ dx = p[0] - x;
80992
+ dy = p[1] - y;
80993
+ return dx * dx + dy * dy;
80994
+ }
80995
+ function simplifyRadialDist(points, sqTolerance) {
80996
+ let prevPoint = points[0];
80997
+ let point = points[1];
80998
+ const newPoints = [prevPoint];
80999
+ for (let i = 1, len = points.length; i < len; i++) {
81000
+ point = points[i];
81001
+ if (getDistance(point, prevPoint) > sqTolerance) {
81002
+ newPoints.push(point);
81003
+ prevPoint = point;
81004
+ }
81005
+ }
81006
+ if (prevPoint !== point)
81007
+ newPoints.push(point);
81008
+ return newPoints;
81009
+ }
81010
+ function simplifyDPStep(points, first, last, sqTolerance, simplified) {
81011
+ let maxSqDist = sqTolerance;
81012
+ let index = 0;
81013
+ for (let i = first + 1; i < last; i++) {
81014
+ const sqDist = getSqSegDist(points[i], points[first], points[last]);
81015
+ if (sqDist > maxSqDist) {
81016
+ index = i;
81017
+ maxSqDist = sqDist;
81018
+ }
81019
+ }
81020
+ if (maxSqDist > sqTolerance) {
81021
+ if (index - first > 1)
81022
+ simplifyDPStep(points, first, index, sqTolerance, simplified);
81023
+ simplified.push(points[index]);
81024
+ if (last - index > 1)
81025
+ simplifyDPStep(points, index, last, sqTolerance, simplified);
81026
+ }
81027
+ }
81028
+ function simplifyDouglasPeucker(points, sqTolerance) {
81029
+ const last = points.length - 1;
81030
+ const simplified = [points[0]];
81031
+ simplifyDPStep(points, 0, last, sqTolerance, simplified);
81032
+ simplified.push(points[last]);
81033
+ return simplified;
81034
+ }
81035
+ var Simplify = {
81036
+ points(points, tolerance, highestQuality) {
81037
+ if (points.length <= 2)
81038
+ return points;
81039
+ const sqTolerance = tolerance * tolerance;
81040
+ points = highestQuality ? points : simplifyRadialDist(points, sqTolerance);
81041
+ points = simplifyDouglasPeucker(points, sqTolerance);
81042
+ return points;
81043
+ },
81044
+ multiPolygon(coordinates, tolerance, removeArea = 1e-8) {
81045
+ const output = [];
81046
+ for (let k = 0; k < coordinates.length; k++) {
81047
+ const outPoints = [];
81048
+ for (let l = 0; l < coordinates[k].length; l++) {
81049
+ const point = Simplify.points(coordinates[k][l], tolerance);
81050
+ if (point.length > 2)
81051
+ outPoints.push(point);
81052
+ }
81053
+ if (outPoints.length > 0) {
81054
+ if (removeArea > 0 && Area.polygon(outPoints) < removeArea)
81055
+ continue;
81056
+ output.push(outPoints);
81057
+ }
81058
+ }
81059
+ if (output.length === 0)
81060
+ return null;
81061
+ return output;
81062
+ }
81063
+ };
81064
+
81065
+ // ../geo/build/tms/citm2000.js
81066
+ var Citm2000Tmst = {
81067
+ type: "TileMatrixSetType",
81068
+ title: "Debug tile matrix for EPSG:3793",
81069
+ abstract: "",
81070
+ identifier: "CITM2000Quad",
81071
+ supportedCRS: "https://www.opengis.net/def/crs/EPSG/0/3793",
81072
+ boundingBox: {
81073
+ type: "BoundingBoxType",
81074
+ crs: "https://www.opengis.net/def/crs/EPSG/0/3793",
81075
+ lowerCorner: [5051234111622438e-9, 3.4301543757978342e6],
81076
+ upperCorner: [5207777145550478e-9, 3.5866974097258747e6]
81077
+ },
81078
+ tileMatrix: [
81089
81079
  {
81090
81080
  type: "TileMatrixType",
81091
- identifier: "8",
81081
+ identifier: "0",
81092
81082
  scaleDenominator: 218391509386217e-8,
81093
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81083
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81094
81084
  tileWidth: 256,
81095
81085
  tileHeight: 256,
81096
- matrixWidth: 256,
81097
- matrixHeight: 256
81086
+ matrixWidth: 1,
81087
+ matrixHeight: 1
81098
81088
  },
81099
81089
  {
81100
81090
  type: "TileMatrixType",
81101
- identifier: "9",
81091
+ identifier: "1",
81102
81092
  scaleDenominator: 109195754693108e-8,
81103
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81093
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81104
81094
  tileWidth: 256,
81105
81095
  tileHeight: 256,
81106
- matrixWidth: 512,
81107
- matrixHeight: 512
81096
+ matrixWidth: 2,
81097
+ matrixHeight: 2
81108
81098
  },
81109
81099
  {
81110
81100
  type: "TileMatrixType",
81111
- identifier: "10",
81101
+ identifier: "2",
81112
81102
  scaleDenominator: 545978.773465544,
81113
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81103
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81114
81104
  tileWidth: 256,
81115
81105
  tileHeight: 256,
81116
- matrixWidth: 1024,
81117
- matrixHeight: 1024
81106
+ matrixWidth: 4,
81107
+ matrixHeight: 4
81118
81108
  },
81119
81109
  {
81120
81110
  type: "TileMatrixType",
81121
- identifier: "11",
81111
+ identifier: "3",
81122
81112
  scaleDenominator: 272989.386732772,
81123
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81113
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81124
81114
  tileWidth: 256,
81125
81115
  tileHeight: 256,
81126
- matrixWidth: 2048,
81127
- matrixHeight: 2048
81116
+ matrixWidth: 8,
81117
+ matrixHeight: 8
81128
81118
  },
81129
81119
  {
81130
81120
  type: "TileMatrixType",
81131
- identifier: "12",
81121
+ identifier: "4",
81132
81122
  scaleDenominator: 136494.693366386,
81133
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81123
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81134
81124
  tileWidth: 256,
81135
81125
  tileHeight: 256,
81136
- matrixWidth: 4096,
81137
- matrixHeight: 4096
81126
+ matrixWidth: 16,
81127
+ matrixHeight: 16
81138
81128
  },
81139
81129
  {
81140
81130
  type: "TileMatrixType",
81141
- identifier: "13",
81131
+ identifier: "5",
81142
81132
  scaleDenominator: 68247.346683193,
81143
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81133
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81144
81134
  tileWidth: 256,
81145
81135
  tileHeight: 256,
81146
- matrixWidth: 8192,
81147
- matrixHeight: 8192
81136
+ matrixWidth: 32,
81137
+ matrixHeight: 32
81148
81138
  },
81149
81139
  {
81150
81140
  type: "TileMatrixType",
81151
- identifier: "14",
81141
+ identifier: "6",
81152
81142
  scaleDenominator: 34123.6733415964,
81153
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81143
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81154
81144
  tileWidth: 256,
81155
81145
  tileHeight: 256,
81156
- matrixWidth: 16384,
81157
- matrixHeight: 16384
81146
+ matrixWidth: 64,
81147
+ matrixHeight: 64
81158
81148
  },
81159
81149
  {
81160
81150
  type: "TileMatrixType",
81161
- identifier: "15",
81151
+ identifier: "7",
81162
81152
  scaleDenominator: 17061.8366707982,
81163
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81153
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81164
81154
  tileWidth: 256,
81165
81155
  tileHeight: 256,
81166
- matrixWidth: 32768,
81167
- matrixHeight: 32768
81156
+ matrixWidth: 128,
81157
+ matrixHeight: 128
81168
81158
  },
81169
81159
  {
81170
81160
  type: "TileMatrixType",
81171
- identifier: "16",
81161
+ identifier: "8",
81172
81162
  scaleDenominator: 8530.91833539913,
81173
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81163
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81174
81164
  tileWidth: 256,
81175
81165
  tileHeight: 256,
81176
- matrixWidth: 65536,
81177
- matrixHeight: 65536
81166
+ matrixWidth: 256,
81167
+ matrixHeight: 256
81178
81168
  },
81179
81169
  {
81180
81170
  type: "TileMatrixType",
81181
- identifier: "17",
81171
+ identifier: "9",
81182
81172
  scaleDenominator: 4265.45916769956,
81183
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81173
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81184
81174
  tileWidth: 256,
81185
81175
  tileHeight: 256,
81186
- matrixWidth: 131072,
81187
- matrixHeight: 131072
81176
+ matrixWidth: 512,
81177
+ matrixHeight: 512
81188
81178
  },
81189
81179
  {
81190
81180
  type: "TileMatrixType",
81191
- identifier: "18",
81181
+ identifier: "10",
81192
81182
  scaleDenominator: 2132.72958384978,
81193
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81183
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81194
81184
  tileWidth: 256,
81195
81185
  tileHeight: 256,
81196
- matrixWidth: 262144,
81197
- matrixHeight: 262144
81186
+ matrixWidth: 1024,
81187
+ matrixHeight: 1024
81198
81188
  },
81199
81189
  {
81200
81190
  type: "TileMatrixType",
81201
- identifier: "19",
81191
+ identifier: "11",
81202
81192
  scaleDenominator: 1066.36479192489,
81203
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81193
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81204
81194
  tileWidth: 256,
81205
81195
  tileHeight: 256,
81206
- matrixWidth: 524288,
81207
- matrixHeight: 524288
81196
+ matrixWidth: 2048,
81197
+ matrixHeight: 2048
81208
81198
  },
81209
81199
  {
81210
81200
  type: "TileMatrixType",
81211
- identifier: "20",
81201
+ identifier: "12",
81212
81202
  scaleDenominator: 533.182395962445,
81213
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81203
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81214
81204
  tileWidth: 256,
81215
81205
  tileHeight: 256,
81216
- matrixWidth: 1048576,
81217
- matrixHeight: 1048576
81206
+ matrixWidth: 4096,
81207
+ matrixHeight: 4096
81218
81208
  },
81219
81209
  {
81220
81210
  type: "TileMatrixType",
81221
- identifier: "21",
81211
+ identifier: "13",
81222
81212
  scaleDenominator: 266.591197981222,
81223
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81213
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81224
81214
  tileWidth: 256,
81225
81215
  tileHeight: 256,
81226
- matrixWidth: 2097152,
81227
- matrixHeight: 2097152
81216
+ matrixWidth: 8192,
81217
+ matrixHeight: 8192
81228
81218
  },
81229
81219
  {
81230
81220
  type: "TileMatrixType",
81231
- identifier: "22",
81221
+ identifier: "14",
81232
81222
  scaleDenominator: 133.295598990611,
81233
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81223
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81234
81224
  tileWidth: 256,
81235
81225
  tileHeight: 256,
81236
- matrixWidth: 4194304,
81237
- matrixHeight: 4194304
81226
+ matrixWidth: 16384,
81227
+ matrixHeight: 16384
81238
81228
  },
81239
81229
  {
81240
81230
  type: "TileMatrixType",
81241
- identifier: "23",
81231
+ identifier: "15",
81242
81232
  scaleDenominator: 66.6477994953056,
81243
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81233
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81244
81234
  tileWidth: 256,
81245
81235
  tileHeight: 256,
81246
- matrixWidth: 8388608,
81247
- matrixHeight: 8388608
81236
+ matrixWidth: 32768,
81237
+ matrixHeight: 32768
81248
81238
  },
81249
81239
  {
81250
81240
  type: "TileMatrixType",
81251
- identifier: "24",
81241
+ identifier: "16",
81252
81242
  scaleDenominator: 33.3238997476528,
81253
- topLeftCorner: [-200375083427892e-7, 200375083427892e-7],
81243
+ topLeftCorner: [5207777145550478e-9, 3.4301543757978342e6],
81254
81244
  tileWidth: 256,
81255
81245
  tileHeight: 256,
81256
- matrixWidth: 16777216,
81257
- matrixHeight: 16777216
81246
+ matrixWidth: 65536,
81247
+ matrixHeight: 65536
81258
81248
  }
81259
- ]
81249
+ ],
81250
+ $generated: {
81251
+ package: "@basemaps/cli",
81252
+ version: "v7.14.0-4-g2766010d",
81253
+ hash: "2766010d8d2bb8b673f6bcbef2fe2636f2e0f4ea",
81254
+ createdAt: "2025-02-10T20:34:46.643Z"
81255
+ },
81256
+ $options: {
81257
+ sourceTileMatrix: "WebMercatorQuad",
81258
+ zoomOffset: 8
81259
+ }
81260
81260
  };
81261
- var GoogleTms = new TileMatrixSet(GoogleTmst);
81261
+ var Citm2000Tms = new TileMatrixSet(Citm2000Tmst);
81262
81262
 
81263
81263
  // ../geo/build/tms/nztm2000.js
81264
81264
  var Nztm20002 = __toESM(require_src3(), 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/cli-raster",
3
- "version": "8.2.0",
3
+ "version": "8.3.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -40,10 +40,10 @@
40
40
  "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@basemaps/config": "^8.1.0",
44
- "@basemaps/config-loader": "^8.2.0",
45
- "@basemaps/geo": "^8.0.0",
46
- "@basemaps/shared": "^8.2.0",
43
+ "@basemaps/config": "^8.3.0",
44
+ "@basemaps/config-loader": "^8.3.0",
45
+ "@basemaps/geo": "^8.3.0",
46
+ "@basemaps/shared": "^8.3.0",
47
47
  "@linzjs/geojson": "^8.0.0",
48
48
  "@linzjs/metrics": "^8.0.0",
49
49
  "cmd-ts": "^0.12.1",
@@ -57,5 +57,5 @@
57
57
  "build/",
58
58
  "dist/"
59
59
  ],
60
- "gitHead": "69195be692efa914369fa854d3bae16355dc0dc8"
60
+ "gitHead": "fe8bbf9d0a3ca2f590505924f227a6d9da0ea5a8"
61
61
  }