@basemaps/lambda-tiler 6.28.1 → 6.31.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.
- package/CHANGELOG.md +61 -0
- package/build/__tests__/config.data.d.ts +6 -0
- package/build/__tests__/config.data.d.ts.map +1 -0
- package/build/__tests__/config.data.js +81 -0
- package/build/__tests__/config.data.js.map +1 -0
- package/build/__tests__/index.test.js +4 -3
- package/build/__tests__/index.test.js.map +1 -0
- package/build/__tests__/route.test.js +1 -0
- package/build/__tests__/route.test.js.map +1 -0
- package/build/__tests__/tiff.cache.test.js +1 -0
- package/build/__tests__/tiff.cache.test.js.map +1 -0
- package/build/__tests__/tile.cache.key.test.js +1 -0
- package/build/__tests__/tile.cache.key.test.js.map +1 -0
- package/build/__tests__/tile.set.cache.test.js +2 -53
- package/build/__tests__/tile.set.cache.test.js.map +1 -0
- package/build/__tests__/tile.set.test.js +1 -0
- package/build/__tests__/tile.set.test.js.map +1 -0
- package/build/__tests__/tile.style.json.test.js +1 -0
- package/build/__tests__/tile.style.json.test.js.map +1 -0
- package/build/__tests__/wmts.capability.test.d.ts +1 -1
- package/build/__tests__/wmts.capability.test.d.ts.map +1 -1
- package/build/__tests__/wmts.capability.test.js +286 -125
- package/build/__tests__/wmts.capability.test.js.map +1 -0
- package/build/__tests__/xyz.test.js +6 -37
- package/build/__tests__/xyz.test.js.map +1 -0
- package/build/__tests__/xyz.util.d.ts +0 -2
- package/build/__tests__/xyz.util.d.ts.map +1 -1
- package/build/__tests__/xyz.util.js +7 -30
- package/build/__tests__/xyz.util.js.map +1 -0
- package/build/api.key.js +1 -0
- package/build/api.key.js.map +1 -0
- package/build/cli/dump.js +1 -0
- package/build/cli/dump.js.map +1 -0
- package/build/cli/tile.set.local.js +1 -0
- package/build/cli/tile.set.local.js.map +1 -0
- package/build/cotar.cache.d.ts +25 -0
- package/build/cotar.cache.d.ts.map +1 -0
- package/build/cotar.cache.js +50 -0
- package/build/cotar.cache.js.map +1 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +34 -33
- package/build/index.js.map +1 -0
- package/build/router.js +1 -0
- package/build/router.js.map +1 -0
- package/build/routes/__tests__/attribution.test.js +9 -8
- package/build/routes/__tests__/attribution.test.js.map +1 -0
- package/build/routes/__tests__/fonts.test.d.ts +2 -0
- package/build/routes/__tests__/fonts.test.d.ts.map +1 -0
- package/build/routes/__tests__/fonts.test.js +68 -0
- package/build/routes/__tests__/fonts.test.js.map +1 -0
- package/build/routes/__tests__/health.test.js +1 -0
- package/build/routes/__tests__/health.test.js.map +1 -0
- package/build/routes/__tests__/imagery.test.js +1 -0
- package/build/routes/__tests__/imagery.test.js.map +1 -0
- package/build/routes/__tests__/memory.fs.d.ts +18 -0
- package/build/routes/__tests__/memory.fs.d.ts.map +1 -0
- package/build/routes/__tests__/memory.fs.js +74 -0
- package/build/routes/__tests__/memory.fs.js.map +1 -0
- package/build/routes/__tests__/sprites.test.d.ts +2 -0
- package/build/routes/__tests__/sprites.test.d.ts.map +1 -0
- package/build/routes/__tests__/sprites.test.js +56 -0
- package/build/routes/__tests__/sprites.test.js.map +1 -0
- package/build/routes/__tests__/wmts.test.js +59 -10
- package/build/routes/__tests__/wmts.test.js.map +1 -0
- package/build/routes/api.d.ts +0 -1
- package/build/routes/api.d.ts.map +1 -1
- package/build/routes/api.js +1 -3
- package/build/routes/api.js.map +1 -0
- package/build/routes/attribution.d.ts +2 -2
- package/build/routes/attribution.d.ts.map +1 -1
- package/build/routes/attribution.js +16 -19
- package/build/routes/attribution.js.map +1 -0
- package/build/routes/esri/rest.js +1 -0
- package/build/routes/esri/rest.js.map +1 -0
- package/build/routes/fonts.d.ts +13 -0
- package/build/routes/fonts.d.ts.map +1 -0
- package/build/routes/fonts.js +58 -0
- package/build/routes/fonts.js.map +1 -0
- package/build/routes/health.js +1 -0
- package/build/routes/health.js.map +1 -0
- package/build/routes/imagery.d.ts +8 -1
- package/build/routes/imagery.d.ts.map +1 -1
- package/build/routes/imagery.js +6 -7
- package/build/routes/imagery.js.map +1 -0
- package/build/routes/response.js +1 -0
- package/build/routes/response.js.map +1 -0
- package/build/routes/sprites.d.ts +9 -0
- package/build/routes/sprites.d.ts.map +1 -0
- package/build/routes/sprites.js +36 -0
- package/build/routes/sprites.js.map +1 -0
- package/build/routes/tile.etag.js +1 -0
- package/build/routes/tile.etag.js.map +1 -0
- package/build/routes/tile.js +1 -0
- package/build/routes/tile.js.map +1 -0
- package/build/routes/tile.json.d.ts.map +1 -1
- package/build/routes/tile.json.js +2 -2
- package/build/routes/tile.json.js.map +1 -0
- package/build/routes/tile.style.json.js +1 -0
- package/build/routes/tile.style.json.js.map +1 -0
- package/build/routes/tile.wmts.d.ts.map +1 -1
- package/build/routes/tile.wmts.js +19 -23
- package/build/routes/tile.wmts.js.map +1 -0
- package/build/routes/tile.xyz.js +1 -0
- package/build/routes/tile.xyz.js.map +1 -0
- package/build/source.tracer.js +1 -0
- package/build/source.tracer.js.map +1 -0
- package/build/tiff.cache.js +1 -0
- package/build/tiff.cache.js.map +1 -0
- package/build/tile.set.cache.d.ts +0 -1
- package/build/tile.set.cache.d.ts.map +1 -1
- package/build/tile.set.cache.js +1 -29
- package/build/tile.set.cache.js.map +1 -0
- package/build/tile.set.js +1 -0
- package/build/tile.set.js.map +1 -0
- package/build/tile.set.raster.d.ts.map +1 -1
- package/build/tile.set.raster.js +6 -3
- package/build/tile.set.raster.js.map +1 -0
- package/build/tile.set.vector.d.ts +0 -7
- package/build/tile.set.vector.d.ts.map +1 -1
- package/build/tile.set.vector.js +3 -20
- package/build/tile.set.vector.js.map +1 -0
- package/build/validate.js +1 -0
- package/build/validate.js.map +1 -0
- package/build/wmts.capability.d.ts +26 -12
- package/build/wmts.capability.d.ts.map +1 -1
- package/build/wmts.capability.js +156 -55
- package/build/wmts.capability.js.map +1 -0
- package/dist/index.js +197 -0
- package/dist/node_modules/.package-lock.json +488 -0
- package/dist/node_modules/base64-js/LICENSE +21 -0
- package/dist/node_modules/base64-js/README.md +34 -0
- package/dist/node_modules/base64-js/base64js.min.js +1 -0
- package/dist/node_modules/base64-js/index.d.ts +3 -0
- package/dist/node_modules/base64-js/index.js +150 -0
- package/dist/node_modules/base64-js/package.json +47 -0
- package/dist/node_modules/bl/.travis.yml +17 -0
- package/dist/node_modules/bl/BufferList.js +396 -0
- package/dist/node_modules/bl/LICENSE.md +13 -0
- package/dist/node_modules/bl/README.md +247 -0
- package/dist/node_modules/bl/bl.js +84 -0
- package/dist/node_modules/bl/package.json +37 -0
- package/dist/node_modules/bl/test/convert.js +21 -0
- package/dist/node_modules/bl/test/indexOf.js +492 -0
- package/dist/node_modules/bl/test/isBufferList.js +32 -0
- package/dist/node_modules/bl/test/test.js +869 -0
- package/dist/node_modules/buffer/AUTHORS.md +70 -0
- package/dist/node_modules/buffer/LICENSE +21 -0
- package/dist/node_modules/buffer/README.md +410 -0
- package/dist/node_modules/buffer/index.d.ts +186 -0
- package/dist/node_modules/buffer/index.js +1817 -0
- package/dist/node_modules/buffer/package.json +96 -0
- package/dist/node_modules/chownr/LICENSE +15 -0
- package/dist/node_modules/chownr/README.md +3 -0
- package/dist/node_modules/chownr/chownr.js +167 -0
- package/dist/node_modules/chownr/package.json +29 -0
- package/dist/node_modules/color/LICENSE +21 -0
- package/dist/node_modules/color/README.md +123 -0
- package/dist/node_modules/color/index.js +496 -0
- package/dist/node_modules/color/package.json +47 -0
- package/dist/node_modules/color-convert/CHANGELOG.md +54 -0
- package/dist/node_modules/color-convert/LICENSE +21 -0
- package/dist/node_modules/color-convert/README.md +68 -0
- package/dist/node_modules/color-convert/conversions.js +839 -0
- package/dist/node_modules/color-convert/index.js +81 -0
- package/dist/node_modules/color-convert/package.json +48 -0
- package/dist/node_modules/color-convert/route.js +97 -0
- package/dist/node_modules/color-name/LICENSE +8 -0
- package/dist/node_modules/color-name/README.md +11 -0
- package/dist/node_modules/color-name/index.js +152 -0
- package/dist/node_modules/color-name/package.json +28 -0
- package/dist/node_modules/color-string/LICENSE +21 -0
- package/dist/node_modules/color-string/README.md +62 -0
- package/dist/node_modules/color-string/index.js +242 -0
- package/dist/node_modules/color-string/package.json +39 -0
- package/dist/node_modules/decompress-response/index.d.ts +22 -0
- package/dist/node_modules/decompress-response/index.js +58 -0
- package/dist/node_modules/decompress-response/license +9 -0
- package/dist/node_modules/decompress-response/package.json +56 -0
- package/dist/node_modules/decompress-response/readme.md +48 -0
- package/dist/node_modules/deep-extend/CHANGELOG.md +46 -0
- package/dist/node_modules/deep-extend/LICENSE +20 -0
- package/dist/node_modules/deep-extend/README.md +91 -0
- package/dist/node_modules/deep-extend/index.js +1 -0
- package/dist/node_modules/deep-extend/lib/deep-extend.js +150 -0
- package/dist/node_modules/deep-extend/package.json +62 -0
- package/dist/node_modules/detect-libc/LICENSE +201 -0
- package/dist/node_modules/detect-libc/README.md +160 -0
- package/dist/node_modules/detect-libc/index.d.ts +11 -0
- package/dist/node_modules/detect-libc/lib/detect-libc.js +178 -0
- package/dist/node_modules/detect-libc/lib/process.js +16 -0
- package/dist/node_modules/detect-libc/package.json +36 -0
- package/dist/node_modules/end-of-stream/LICENSE +21 -0
- package/dist/node_modules/end-of-stream/README.md +54 -0
- package/dist/node_modules/end-of-stream/index.js +94 -0
- package/dist/node_modules/end-of-stream/package.json +37 -0
- package/dist/node_modules/expand-template/.travis.yml +6 -0
- package/dist/node_modules/expand-template/LICENSE +21 -0
- package/dist/node_modules/expand-template/README.md +43 -0
- package/dist/node_modules/expand-template/index.js +26 -0
- package/dist/node_modules/expand-template/package.json +29 -0
- package/dist/node_modules/expand-template/test.js +67 -0
- package/dist/node_modules/fs-constants/LICENSE +21 -0
- package/dist/node_modules/fs-constants/README.md +26 -0
- package/dist/node_modules/fs-constants/browser.js +1 -0
- package/dist/node_modules/fs-constants/index.js +1 -0
- package/dist/node_modules/fs-constants/package.json +19 -0
- package/dist/node_modules/github-from-package/.travis.yml +4 -0
- package/dist/node_modules/github-from-package/LICENSE +18 -0
- package/dist/node_modules/github-from-package/example/package.json +8 -0
- package/dist/node_modules/github-from-package/example/url.js +3 -0
- package/dist/node_modules/github-from-package/index.js +17 -0
- package/dist/node_modules/github-from-package/package.json +30 -0
- package/dist/node_modules/github-from-package/readme.markdown +53 -0
- package/dist/node_modules/github-from-package/test/a.json +8 -0
- package/dist/node_modules/github-from-package/test/b.json +5 -0
- package/dist/node_modules/github-from-package/test/c.json +5 -0
- package/dist/node_modules/github-from-package/test/d.json +7 -0
- package/dist/node_modules/github-from-package/test/e.json +5 -0
- package/dist/node_modules/github-from-package/test/url.js +19 -0
- package/dist/node_modules/ieee754/LICENSE +11 -0
- package/dist/node_modules/ieee754/README.md +51 -0
- package/dist/node_modules/ieee754/index.d.ts +10 -0
- package/dist/node_modules/ieee754/index.js +85 -0
- package/dist/node_modules/ieee754/package.json +52 -0
- package/dist/node_modules/inherits/LICENSE +16 -0
- package/dist/node_modules/inherits/README.md +42 -0
- package/dist/node_modules/inherits/inherits.js +9 -0
- package/dist/node_modules/inherits/inherits_browser.js +27 -0
- package/dist/node_modules/inherits/package.json +29 -0
- package/dist/node_modules/ini/LICENSE +15 -0
- package/dist/node_modules/ini/README.md +102 -0
- package/dist/node_modules/ini/ini.js +206 -0
- package/dist/node_modules/ini/package.json +33 -0
- package/dist/node_modules/is-arrayish/LICENSE +21 -0
- package/dist/node_modules/is-arrayish/README.md +16 -0
- package/dist/node_modules/is-arrayish/index.js +9 -0
- package/dist/node_modules/is-arrayish/package.json +45 -0
- package/dist/node_modules/is-arrayish/yarn-error.log +1443 -0
- package/dist/node_modules/lru-cache/LICENSE +15 -0
- package/dist/node_modules/lru-cache/README.md +166 -0
- package/dist/node_modules/lru-cache/index.js +334 -0
- package/dist/node_modules/lru-cache/package.json +34 -0
- package/dist/node_modules/mimic-response/index.d.ts +17 -0
- package/dist/node_modules/mimic-response/index.js +77 -0
- package/dist/node_modules/mimic-response/license +9 -0
- package/dist/node_modules/mimic-response/package.json +42 -0
- package/dist/node_modules/mimic-response/readme.md +78 -0
- package/dist/node_modules/minimist/.travis.yml +8 -0
- package/dist/node_modules/minimist/LICENSE +18 -0
- package/dist/node_modules/minimist/example/parse.js +2 -0
- package/dist/node_modules/minimist/index.js +249 -0
- package/dist/node_modules/minimist/package.json +45 -0
- package/dist/node_modules/minimist/readme.markdown +98 -0
- package/dist/node_modules/minimist/test/all_bool.js +32 -0
- package/dist/node_modules/minimist/test/bool.js +178 -0
- package/dist/node_modules/minimist/test/dash.js +31 -0
- package/dist/node_modules/minimist/test/default_bool.js +35 -0
- package/dist/node_modules/minimist/test/dotted.js +22 -0
- package/dist/node_modules/minimist/test/kv_short.js +16 -0
- package/dist/node_modules/minimist/test/long.js +31 -0
- package/dist/node_modules/minimist/test/num.js +36 -0
- package/dist/node_modules/minimist/test/parse.js +197 -0
- package/dist/node_modules/minimist/test/parse_modified.js +9 -0
- package/dist/node_modules/minimist/test/proto.js +60 -0
- package/dist/node_modules/minimist/test/short.js +67 -0
- package/dist/node_modules/minimist/test/stop_early.js +15 -0
- package/dist/node_modules/minimist/test/unknown.js +102 -0
- package/dist/node_modules/minimist/test/whitespace.js +8 -0
- package/dist/node_modules/mkdirp-classic/LICENSE +21 -0
- package/dist/node_modules/mkdirp-classic/README.md +18 -0
- package/dist/node_modules/mkdirp-classic/index.js +98 -0
- package/dist/node_modules/mkdirp-classic/package.json +18 -0
- package/dist/node_modules/napi-build-utils/LICENSE +21 -0
- package/dist/node_modules/napi-build-utils/README.md +48 -0
- package/dist/node_modules/napi-build-utils/index.js +213 -0
- package/dist/node_modules/napi-build-utils/index.md +81 -0
- package/dist/node_modules/napi-build-utils/package.json +41 -0
- package/dist/node_modules/node-abi/.circleci/config.yml +63 -0
- package/dist/node_modules/node-abi/.github/workflows/update-abi.yml +41 -0
- package/dist/node_modules/node-abi/.releaserc.json +9 -0
- package/dist/node_modules/node-abi/CODE_OF_CONDUCT.md +73 -0
- package/dist/node_modules/node-abi/CONTRIBUTING.md +62 -0
- package/dist/node_modules/node-abi/LICENSE +21 -0
- package/dist/node_modules/node-abi/README.md +50 -0
- package/dist/node_modules/node-abi/abi_registry.json +210 -0
- package/dist/node_modules/node-abi/index.js +179 -0
- package/dist/node_modules/node-abi/package.json +39 -0
- package/dist/node_modules/node-abi/scripts/update-abi-registry.js +119 -0
- package/dist/node_modules/node-abi/test/index.js +166 -0
- package/dist/node_modules/node-addon-api/LICENSE.md +13 -0
- package/dist/node_modules/node-addon-api/README.md +293 -0
- package/dist/node_modules/node-addon-api/common.gypi +21 -0
- package/dist/node_modules/node-addon-api/except.gypi +25 -0
- package/dist/node_modules/node-addon-api/index.js +11 -0
- package/dist/node_modules/node-addon-api/napi-inl.deprecated.h +192 -0
- package/dist/node_modules/node-addon-api/napi-inl.h +6259 -0
- package/dist/node_modules/node-addon-api/napi.h +3003 -0
- package/dist/node_modules/node-addon-api/node_api.gyp +9 -0
- package/dist/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/dist/node_modules/node-addon-api/nothing.c +0 -0
- package/dist/node_modules/node-addon-api/package-support.json +21 -0
- package/dist/node_modules/node-addon-api/package.json +415 -0
- package/dist/node_modules/node-addon-api/tools/README.md +73 -0
- package/dist/node_modules/node-addon-api/tools/check-napi.js +100 -0
- package/dist/node_modules/node-addon-api/tools/clang-format.js +71 -0
- package/dist/node_modules/node-addon-api/tools/conversion.js +309 -0
- package/dist/node_modules/node-addon-api/tools/eslint-format.js +71 -0
- package/dist/node_modules/once/LICENSE +15 -0
- package/dist/node_modules/once/README.md +79 -0
- package/dist/node_modules/once/once.js +42 -0
- package/dist/node_modules/once/package.json +33 -0
- package/dist/node_modules/prebuild-install/CHANGELOG.md +116 -0
- package/dist/node_modules/prebuild-install/CONTRIBUTING.md +6 -0
- package/dist/node_modules/prebuild-install/LICENSE +21 -0
- package/dist/node_modules/prebuild-install/README.md +163 -0
- package/dist/node_modules/prebuild-install/asset.js +44 -0
- package/dist/node_modules/prebuild-install/bin.js +78 -0
- package/dist/node_modules/prebuild-install/download.js +142 -0
- package/dist/node_modules/prebuild-install/error.js +14 -0
- package/dist/node_modules/prebuild-install/help.txt +16 -0
- package/dist/node_modules/prebuild-install/index.js +1 -0
- package/dist/node_modules/prebuild-install/log.js +33 -0
- package/dist/node_modules/prebuild-install/package.json +67 -0
- package/dist/node_modules/prebuild-install/proxy.js +35 -0
- package/dist/node_modules/prebuild-install/rc.js +64 -0
- package/dist/node_modules/prebuild-install/util.js +143 -0
- package/dist/node_modules/pump/.travis.yml +5 -0
- package/dist/node_modules/pump/LICENSE +21 -0
- package/dist/node_modules/pump/README.md +65 -0
- package/dist/node_modules/pump/index.js +82 -0
- package/dist/node_modules/pump/package.json +24 -0
- package/dist/node_modules/pump/test-browser.js +66 -0
- package/dist/node_modules/pump/test-node.js +53 -0
- package/dist/node_modules/rc/LICENSE.APACHE2 +15 -0
- package/dist/node_modules/rc/LICENSE.BSD +26 -0
- package/dist/node_modules/rc/LICENSE.MIT +24 -0
- package/dist/node_modules/rc/README.md +227 -0
- package/dist/node_modules/rc/browser.js +7 -0
- package/dist/node_modules/rc/cli.js +4 -0
- package/dist/node_modules/rc/index.js +53 -0
- package/dist/node_modules/rc/lib/utils.js +104 -0
- package/dist/node_modules/rc/package.json +29 -0
- package/dist/node_modules/rc/test/ini.js +16 -0
- package/dist/node_modules/rc/test/nested-env-vars.js +50 -0
- package/dist/node_modules/rc/test/test.js +59 -0
- package/dist/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/dist/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/dist/node_modules/readable-stream/LICENSE +47 -0
- package/dist/node_modules/readable-stream/README.md +106 -0
- package/dist/node_modules/readable-stream/errors-browser.js +127 -0
- package/dist/node_modules/readable-stream/errors.js +116 -0
- package/dist/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/dist/node_modules/readable-stream/lib/_stream_duplex.js +139 -0
- package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +39 -0
- package/dist/node_modules/readable-stream/lib/_stream_readable.js +1124 -0
- package/dist/node_modules/readable-stream/lib/_stream_transform.js +201 -0
- package/dist/node_modules/readable-stream/lib/_stream_writable.js +697 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +207 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +210 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +105 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +104 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/from.js +64 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +97 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/state.js +27 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/dist/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/dist/node_modules/readable-stream/package.json +68 -0
- package/dist/node_modules/readable-stream/readable-browser.js +9 -0
- package/dist/node_modules/readable-stream/readable.js +16 -0
- package/dist/node_modules/safe-buffer/LICENSE +21 -0
- package/dist/node_modules/safe-buffer/README.md +584 -0
- package/dist/node_modules/safe-buffer/index.d.ts +187 -0
- package/dist/node_modules/safe-buffer/index.js +65 -0
- package/dist/node_modules/safe-buffer/package.json +51 -0
- package/dist/node_modules/semver/LICENSE +15 -0
- package/dist/node_modules/semver/README.md +568 -0
- package/dist/node_modules/semver/bin/semver.js +183 -0
- package/dist/node_modules/semver/classes/comparator.js +136 -0
- package/dist/node_modules/semver/classes/index.js +5 -0
- package/dist/node_modules/semver/classes/range.js +519 -0
- package/dist/node_modules/semver/classes/semver.js +287 -0
- package/dist/node_modules/semver/functions/clean.js +6 -0
- package/dist/node_modules/semver/functions/cmp.js +52 -0
- package/dist/node_modules/semver/functions/coerce.js +52 -0
- package/dist/node_modules/semver/functions/compare-build.js +7 -0
- package/dist/node_modules/semver/functions/compare-loose.js +3 -0
- package/dist/node_modules/semver/functions/compare.js +5 -0
- package/dist/node_modules/semver/functions/diff.js +23 -0
- package/dist/node_modules/semver/functions/eq.js +3 -0
- package/dist/node_modules/semver/functions/gt.js +3 -0
- package/dist/node_modules/semver/functions/gte.js +3 -0
- package/dist/node_modules/semver/functions/inc.js +18 -0
- package/dist/node_modules/semver/functions/lt.js +3 -0
- package/dist/node_modules/semver/functions/lte.js +3 -0
- package/dist/node_modules/semver/functions/major.js +3 -0
- package/dist/node_modules/semver/functions/minor.js +3 -0
- package/dist/node_modules/semver/functions/neq.js +3 -0
- package/dist/node_modules/semver/functions/parse.js +33 -0
- package/dist/node_modules/semver/functions/patch.js +3 -0
- package/dist/node_modules/semver/functions/prerelease.js +6 -0
- package/dist/node_modules/semver/functions/rcompare.js +3 -0
- package/dist/node_modules/semver/functions/rsort.js +3 -0
- package/dist/node_modules/semver/functions/satisfies.js +10 -0
- package/dist/node_modules/semver/functions/sort.js +3 -0
- package/dist/node_modules/semver/functions/valid.js +6 -0
- package/dist/node_modules/semver/index.js +48 -0
- package/dist/node_modules/semver/internal/constants.js +17 -0
- package/dist/node_modules/semver/internal/debug.js +9 -0
- package/dist/node_modules/semver/internal/identifiers.js +23 -0
- package/dist/node_modules/semver/internal/parse-options.js +11 -0
- package/dist/node_modules/semver/internal/re.js +182 -0
- package/dist/node_modules/semver/package.json +75 -0
- package/dist/node_modules/semver/preload.js +2 -0
- package/dist/node_modules/semver/range.bnf +16 -0
- package/dist/node_modules/semver/ranges/gtr.js +4 -0
- package/dist/node_modules/semver/ranges/intersects.js +7 -0
- package/dist/node_modules/semver/ranges/ltr.js +4 -0
- package/dist/node_modules/semver/ranges/max-satisfying.js +25 -0
- package/dist/node_modules/semver/ranges/min-satisfying.js +24 -0
- package/dist/node_modules/semver/ranges/min-version.js +61 -0
- package/dist/node_modules/semver/ranges/outside.js +80 -0
- package/dist/node_modules/semver/ranges/simplify.js +47 -0
- package/dist/node_modules/semver/ranges/subset.js +244 -0
- package/dist/node_modules/semver/ranges/to-comparators.js +8 -0
- package/dist/node_modules/semver/ranges/valid.js +11 -0
- package/dist/node_modules/sharp/LICENSE +191 -0
- package/dist/node_modules/sharp/README.md +117 -0
- package/dist/node_modules/sharp/binding.gyp +233 -0
- package/dist/node_modules/sharp/build/Release/sharp-linux-x64.node +0 -0
- package/dist/node_modules/sharp/install/can-compile.js +11 -0
- package/dist/node_modules/sharp/install/dll-copy.js +37 -0
- package/dist/node_modules/sharp/install/libvips.js +215 -0
- package/dist/node_modules/sharp/lib/agent.js +40 -0
- package/dist/node_modules/sharp/lib/channel.js +171 -0
- package/dist/node_modules/sharp/lib/colour.js +180 -0
- package/dist/node_modules/sharp/lib/composite.js +193 -0
- package/dist/node_modules/sharp/lib/constructor.js +386 -0
- package/dist/node_modules/sharp/lib/index.js +13 -0
- package/dist/node_modules/sharp/lib/input.js +507 -0
- package/dist/node_modules/sharp/lib/is.js +143 -0
- package/dist/node_modules/sharp/lib/libvips.js +136 -0
- package/dist/node_modules/sharp/lib/operation.js +803 -0
- package/dist/node_modules/sharp/lib/output.js +1231 -0
- package/dist/node_modules/sharp/lib/platform.js +27 -0
- package/dist/node_modules/sharp/lib/resize.js +473 -0
- package/dist/node_modules/sharp/lib/sharp.js +35 -0
- package/dist/node_modules/sharp/lib/utility.js +211 -0
- package/dist/node_modules/sharp/package.json +196 -0
- package/dist/node_modules/sharp/src/common.cc +966 -0
- package/dist/node_modules/sharp/src/common.h +352 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/VConnection.cpp +152 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/VError.cpp +50 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/VImage.cpp +1523 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/VInterpolate.cpp +63 -0
- package/dist/node_modules/sharp/src/libvips/cplusplus/vips-operators.cpp +3738 -0
- package/dist/node_modules/sharp/src/metadata.cc +291 -0
- package/dist/node_modules/sharp/src/metadata.h +92 -0
- package/dist/node_modules/sharp/src/operations.cc +412 -0
- package/dist/node_modules/sharp/src/operations.h +126 -0
- package/dist/node_modules/sharp/src/pipeline.cc +1624 -0
- package/dist/node_modules/sharp/src/pipeline.h +349 -0
- package/dist/node_modules/sharp/src/sharp.cc +52 -0
- package/dist/node_modules/sharp/src/stats.cc +193 -0
- package/dist/node_modules/sharp/src/stats.h +70 -0
- package/dist/node_modules/sharp/src/utilities.cc +243 -0
- package/dist/node_modules/sharp/src/utilities.h +29 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/THIRD-PARTY-NOTICES.md +43 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/lib/libvips-cpp.so.42 +0 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/platform.json +1 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/versions.json +31 -0
- package/dist/node_modules/simple-concat/.travis.yml +3 -0
- package/dist/node_modules/simple-concat/LICENSE +20 -0
- package/dist/node_modules/simple-concat/README.md +44 -0
- package/dist/node_modules/simple-concat/index.js +15 -0
- package/dist/node_modules/simple-concat/package.json +47 -0
- package/dist/node_modules/simple-concat/test/basic.js +41 -0
- package/dist/node_modules/simple-get/.github/dependabot.yml +15 -0
- package/dist/node_modules/simple-get/.github/workflows/ci.yml +23 -0
- package/dist/node_modules/simple-get/LICENSE +20 -0
- package/dist/node_modules/simple-get/README.md +333 -0
- package/dist/node_modules/simple-get/index.js +108 -0
- package/dist/node_modules/simple-get/package.json +67 -0
- package/dist/node_modules/simple-swizzle/LICENSE +21 -0
- package/dist/node_modules/simple-swizzle/README.md +39 -0
- package/dist/node_modules/simple-swizzle/index.js +29 -0
- package/dist/node_modules/simple-swizzle/package.json +36 -0
- package/dist/node_modules/string_decoder/LICENSE +48 -0
- package/dist/node_modules/string_decoder/README.md +47 -0
- package/dist/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/dist/node_modules/string_decoder/package.json +34 -0
- package/dist/node_modules/strip-json-comments/index.js +70 -0
- package/dist/node_modules/strip-json-comments/license +21 -0
- package/dist/node_modules/strip-json-comments/package.json +42 -0
- package/dist/node_modules/strip-json-comments/readme.md +64 -0
- package/dist/node_modules/tar-fs/.travis.yml +6 -0
- package/dist/node_modules/tar-fs/LICENSE +21 -0
- package/dist/node_modules/tar-fs/README.md +165 -0
- package/dist/node_modules/tar-fs/index.js +351 -0
- package/dist/node_modules/tar-fs/package.json +41 -0
- package/dist/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
- package/dist/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/dist/node_modules/tar-fs/test/index.js +346 -0
- package/dist/node_modules/tar-stream/LICENSE +21 -0
- package/dist/node_modules/tar-stream/README.md +168 -0
- package/dist/node_modules/tar-stream/extract.js +257 -0
- package/dist/node_modules/tar-stream/headers.js +295 -0
- package/dist/node_modules/tar-stream/index.js +2 -0
- package/dist/node_modules/tar-stream/pack.js +255 -0
- package/dist/node_modules/tar-stream/package.json +58 -0
- package/dist/node_modules/tar-stream/sandbox.js +11 -0
- package/dist/node_modules/tunnel-agent/LICENSE +55 -0
- package/dist/node_modules/tunnel-agent/README.md +4 -0
- package/dist/node_modules/tunnel-agent/index.js +244 -0
- package/dist/node_modules/tunnel-agent/package.json +22 -0
- package/dist/node_modules/util-deprecate/History.md +16 -0
- package/dist/node_modules/util-deprecate/LICENSE +24 -0
- package/dist/node_modules/util-deprecate/README.md +53 -0
- package/dist/node_modules/util-deprecate/browser.js +67 -0
- package/dist/node_modules/util-deprecate/node.js +6 -0
- package/dist/node_modules/util-deprecate/package.json +27 -0
- package/dist/node_modules/wrappy/LICENSE +15 -0
- package/dist/node_modules/wrappy/README.md +36 -0
- package/dist/node_modules/wrappy/package.json +29 -0
- package/dist/node_modules/wrappy/wrappy.js +33 -0
- package/dist/node_modules/yallist/LICENSE +15 -0
- package/dist/node_modules/yallist/README.md +204 -0
- package/dist/node_modules/yallist/iterator.js +8 -0
- package/dist/node_modules/yallist/package.json +29 -0
- package/dist/node_modules/yallist/yallist.js +426 -0
- package/dist/package-lock.json +830 -0
- package/dist/package.json +39 -0
- package/dist/static/expected_tile_2193_153_255_z7.png +0 -0
- package/dist/static/expected_tile_NZTM2000Quad_30_33_z6.png +0 -0
- package/dist/static/expected_tile_WebMercatorQuad_252_156_z8.png +0 -0
- package/package.json +13 -13
- package/scripts/create.deployment.package.mjs +1 -1
- package/src/__tests__/config.data.ts +82 -0
- package/src/__tests__/index.test.ts +3 -3
- package/src/__tests__/tile.set.cache.test.ts +1 -67
- package/src/__tests__/wmts.capability.test.ts +312 -139
- package/src/__tests__/xyz.test.ts +5 -49
- package/src/__tests__/xyz.util.ts +6 -32
- package/src/cotar.cache.ts +54 -0
- package/src/index.ts +36 -32
- package/src/routes/__tests__/attribution.test.ts +8 -9
- package/src/routes/__tests__/fonts.test.ts +80 -0
- package/src/routes/__tests__/memory.fs.ts +77 -0
- package/src/routes/__tests__/sprites.test.ts +64 -0
- package/src/routes/__tests__/wmts.test.ts +75 -15
- package/src/routes/api.ts +0 -4
- package/src/routes/attribution.ts +12 -18
- package/src/routes/fonts.ts +62 -0
- package/src/routes/imagery.ts +9 -7
- package/src/routes/sprites.ts +41 -0
- package/src/routes/tile.json.ts +1 -2
- package/src/routes/tile.wmts.ts +20 -22
- package/src/tile.set.cache.ts +1 -28
- package/src/tile.set.raster.ts +4 -2
- package/src/tile.set.vector.ts +3 -21
- package/src/wmts.capability.ts +169 -67
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ConfigImagery } from '@basemaps/config';
|
|
2
|
+
import { GoogleTms, ImageFormat, Nztm2000QuadTms } from '@basemaps/geo';
|
|
3
|
+
import { V, VNodeElement } from '@basemaps/shared';
|
|
3
4
|
import { roundNumbersInString } from '@basemaps/test/build/rounding.js';
|
|
4
|
-
import { createHash } from 'crypto';
|
|
5
5
|
import o from 'ospec';
|
|
6
6
|
import { WmtsCapabilities } from '../wmts.capability.js';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import 'source-map-support/register.js';
|
|
7
|
+
import { Imagery2193, Imagery3857, Provider, TileSetAerial } from './config.data.js';
|
|
10
8
|
|
|
11
9
|
function tags(node: VNodeElement | null | undefined, tag: string): VNodeElement[] {
|
|
12
10
|
if (node == null) return [];
|
|
@@ -18,16 +16,21 @@ function listTag(node: VNodeElement | null | undefined, tag: string): string[] {
|
|
|
18
16
|
|
|
19
17
|
o.spec('WmtsCapabilities', () => {
|
|
20
18
|
const apiKey = 'secret1234';
|
|
21
|
-
|
|
22
|
-
const
|
|
19
|
+
|
|
20
|
+
const allImagery = new Map();
|
|
21
|
+
allImagery.set(Imagery2193.id, Imagery2193);
|
|
22
|
+
allImagery.set(Imagery3857.id, Imagery3857);
|
|
23
23
|
|
|
24
24
|
o('should output the requested formats', () => {
|
|
25
25
|
const wmts = new WmtsCapabilities({
|
|
26
26
|
httpBase: 'https://basemaps.test',
|
|
27
27
|
provider: Provider,
|
|
28
|
-
|
|
28
|
+
tileMatrix: [GoogleTms],
|
|
29
|
+
tileSet: TileSetAerial,
|
|
30
|
+
imagery: allImagery,
|
|
29
31
|
apiKey,
|
|
30
32
|
formats: [ImageFormat.Avif],
|
|
33
|
+
isIndividualLayers: false,
|
|
31
34
|
}).toVNode();
|
|
32
35
|
|
|
33
36
|
const urls = tags(wmts, 'ResourceURL');
|
|
@@ -38,12 +41,106 @@ o.spec('WmtsCapabilities', () => {
|
|
|
38
41
|
);
|
|
39
42
|
});
|
|
40
43
|
|
|
44
|
+
o('should be seting encoding to utf-8', () => {
|
|
45
|
+
const xml = new WmtsCapabilities({
|
|
46
|
+
httpBase: 'https://basemaps.test',
|
|
47
|
+
provider: Provider,
|
|
48
|
+
tileMatrix: [GoogleTms],
|
|
49
|
+
tileSet: TileSetAerial,
|
|
50
|
+
imagery: allImagery,
|
|
51
|
+
apiKey,
|
|
52
|
+
formats: [ImageFormat.Avif],
|
|
53
|
+
isIndividualLayers: false,
|
|
54
|
+
}).toXml();
|
|
55
|
+
|
|
56
|
+
o(xml.split('\n')[0]).deepEquals('<?xml version="1.0" encoding="utf-8"?>');
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
o('should support unicorns and rainbows', () => {
|
|
60
|
+
const tileSet = { ...TileSetAerial };
|
|
61
|
+
tileSet.name = '🦄_🌈_2022_0-5m';
|
|
62
|
+
tileSet.title = '🦄 🌈 Imagery (2022)';
|
|
63
|
+
tileSet.description = '🦄 🌈 Description';
|
|
64
|
+
const wmts = new WmtsCapabilities({
|
|
65
|
+
httpBase: 'https://basemaps.test',
|
|
66
|
+
provider: Provider,
|
|
67
|
+
tileMatrix: [GoogleTms],
|
|
68
|
+
tileSet,
|
|
69
|
+
imagery: allImagery,
|
|
70
|
+
apiKey,
|
|
71
|
+
formats: [ImageFormat.Avif],
|
|
72
|
+
isIndividualLayers: false,
|
|
73
|
+
}).toVNode();
|
|
74
|
+
|
|
75
|
+
const urls = tags(wmts, 'ResourceURL');
|
|
76
|
+
o(urls.length).equals(1);
|
|
77
|
+
o(urls[0].attrs.template).equals(
|
|
78
|
+
'https://basemaps.test/v1/tiles/🦄-🌈-2022-0.5m/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.avif?api=secret1234',
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const layer = tags(wmts, 'Layer')[0];
|
|
82
|
+
|
|
83
|
+
const title = layer.find('ows:Title')?.toString();
|
|
84
|
+
o(title).equals('<ows:Title>🦄 🌈 Imagery (2022)</ows:Title>');
|
|
85
|
+
|
|
86
|
+
const abstract = layer.find('ows:Abstract')?.toString();
|
|
87
|
+
o(abstract).equals('<ows:Abstract>🦄 🌈 Description</ows:Abstract>');
|
|
88
|
+
|
|
89
|
+
const identifier = layer.find('ows:Identifier')?.toString();
|
|
90
|
+
o(identifier).equals('<ows:Identifier>🦄-🌈-2022-0.5m</ows:Identifier>');
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
o('should sort the sub imagery layers', () => {
|
|
94
|
+
const imageryA = { ...Imagery3857 };
|
|
95
|
+
imageryA.id = 'im_a';
|
|
96
|
+
imageryA.name = 'aaaa';
|
|
97
|
+
imageryA.title = 'aaaa';
|
|
98
|
+
|
|
99
|
+
const imageryB = { ...Imagery3857 };
|
|
100
|
+
imageryB.id = 'im_b';
|
|
101
|
+
imageryB.name = 'bbbb';
|
|
102
|
+
imageryB.title = 'bbbb';
|
|
103
|
+
|
|
104
|
+
const imagery = new Map();
|
|
105
|
+
imagery.set(Imagery3857.id, Imagery3857);
|
|
106
|
+
imagery.set(imageryB.id, imageryB);
|
|
107
|
+
imagery.set(imageryA.id, imageryA);
|
|
108
|
+
const tileSet = {
|
|
109
|
+
...TileSetAerial,
|
|
110
|
+
layers: [
|
|
111
|
+
...TileSetAerial.layers,
|
|
112
|
+
{ [3857]: imageryB.id, title: imageryB.title, name: imageryB.name },
|
|
113
|
+
{ [3857]: imageryA.id, title: imageryA.title, name: imageryA.name },
|
|
114
|
+
],
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const wmts = new WmtsCapabilities({
|
|
118
|
+
httpBase: 'https://basemaps.test',
|
|
119
|
+
provider: Provider,
|
|
120
|
+
tileMatrix: [GoogleTms],
|
|
121
|
+
tileSet,
|
|
122
|
+
imagery,
|
|
123
|
+
apiKey,
|
|
124
|
+
isIndividualLayers: true,
|
|
125
|
+
}).toVNode();
|
|
126
|
+
|
|
127
|
+
const layers = tags(wmts, 'Layer').map((c) => c.find('ows:Title')?.textContent);
|
|
128
|
+
|
|
129
|
+
// The base layer "Aerial Imagery" should always be first then all sub layers after
|
|
130
|
+
o(layers).deepEquals(['Aerial Imagery', 'aaaa', 'bbbb', 'Ōtorohanga 0.1m Urban Aerial Photos (2021)']);
|
|
131
|
+
});
|
|
132
|
+
|
|
41
133
|
o('should build capability xml for tileset and projection', () => {
|
|
134
|
+
const imagery = new Map();
|
|
135
|
+
imagery.set(Imagery3857.id, Imagery3857);
|
|
42
136
|
const wmts = new WmtsCapabilities({
|
|
43
137
|
httpBase: 'https://basemaps.test',
|
|
44
138
|
provider: Provider,
|
|
45
|
-
|
|
139
|
+
tileMatrix: [GoogleTms],
|
|
140
|
+
tileSet: TileSetAerial,
|
|
141
|
+
imagery,
|
|
46
142
|
apiKey,
|
|
143
|
+
isIndividualLayers: false,
|
|
47
144
|
});
|
|
48
145
|
|
|
49
146
|
const raw = wmts.toVNode();
|
|
@@ -53,10 +150,10 @@ o.spec('WmtsCapabilities', () => {
|
|
|
53
150
|
o(serviceId?.find('ows:Title')?.textContent).equals('the title');
|
|
54
151
|
|
|
55
152
|
o(raw.find('TileMatrixSetLink')?.toString()).deepEquals(
|
|
56
|
-
V('TileMatrixSetLink', [V('TileMatrixSet', '
|
|
153
|
+
V('TileMatrixSetLink', [V('TileMatrixSet', 'WebMercatorQuad')]).toString(),
|
|
57
154
|
);
|
|
58
155
|
|
|
59
|
-
const layer = raw
|
|
156
|
+
const layer = raw.find('Contents', 'Layer');
|
|
60
157
|
|
|
61
158
|
o(listTag(layer, 'Format')).deepEquals([
|
|
62
159
|
V('Format', 'image/jpeg').toString(),
|
|
@@ -64,41 +161,47 @@ o.spec('WmtsCapabilities', () => {
|
|
|
64
161
|
V('Format', 'image/png').toString(),
|
|
65
162
|
]);
|
|
66
163
|
|
|
67
|
-
o(listTag(layer, 'ows:BoundingBox')).deepEquals([
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
164
|
+
o(listTag(layer, 'ows:BoundingBox').map((s) => roundNumbersInString(s, 4))).deepEquals([
|
|
165
|
+
'<ows:BoundingBox crs="urn:ogc:def:crs:EPSG::3857">\n' +
|
|
166
|
+
' <ows:LowerCorner>19457809.9203 -4609458.5537</ows:LowerCorner>\n' +
|
|
167
|
+
' <ows:UpperCorner>19509787.0995 -4578883.7424</ows:UpperCorner>\n' +
|
|
168
|
+
'</ows:BoundingBox>',
|
|
72
169
|
]);
|
|
73
170
|
|
|
74
171
|
o(listTag(layer, 'ows:WGS84BoundingBox').map((s) => roundNumbersInString(s, 4))).deepEquals([
|
|
75
172
|
'<ows:WGS84BoundingBox crs="urn:ogc:def:crs:OGC:2:84">\n' +
|
|
76
|
-
' <ows:LowerCorner
|
|
77
|
-
' <ows:UpperCorner>
|
|
173
|
+
' <ows:LowerCorner>174.7925 -38.2123</ows:LowerCorner>\n' +
|
|
174
|
+
' <ows:UpperCorner>175.2594 -37.9962</ows:UpperCorner>\n' +
|
|
78
175
|
'</ows:WGS84BoundingBox>',
|
|
79
176
|
]);
|
|
80
177
|
|
|
81
|
-
o(layer?.find('ows:Abstract')?.textContent).equals('aerial:description');
|
|
82
|
-
o(layer?.find('ows:Title')?.textContent).equals('aerial:title');
|
|
83
178
|
o(layer?.find('ows:Identifier')?.textContent).equals('aerial');
|
|
179
|
+
o(layer?.find('ows:Title')?.textContent).equals('Aerial Imagery');
|
|
180
|
+
o(layer?.find('ows:Abstract')?.textContent).equals('aerial__description');
|
|
84
181
|
|
|
85
182
|
o(layer?.find('Style')?.toString()).equals(
|
|
86
183
|
V('Style', { isDefault: 'true' }, [V('ows:Title', 'Default Style'), V('ows:Identifier', 'default')]).toString(),
|
|
87
184
|
);
|
|
185
|
+
});
|
|
88
186
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
187
|
+
o('should include output the correct TileMatrix', () => {
|
|
188
|
+
const raw = new WmtsCapabilities({
|
|
189
|
+
httpBase: 'https://basemaps.test',
|
|
190
|
+
provider: Provider,
|
|
191
|
+
tileMatrix: [GoogleTms],
|
|
192
|
+
tileSet: TileSetAerial,
|
|
193
|
+
imagery: allImagery,
|
|
194
|
+
apiKey,
|
|
195
|
+
isIndividualLayers: false,
|
|
196
|
+
}).toVNode();
|
|
197
|
+
const layer = raw.find('Contents', 'Layer');
|
|
95
198
|
|
|
96
|
-
o(layer?.find('TileMatrixSetLink', 'TileMatrixSet')?.textContent).equals('
|
|
199
|
+
o(layer?.find('TileMatrixSetLink', 'TileMatrixSet')?.textContent).equals('WebMercatorQuad');
|
|
97
200
|
|
|
98
201
|
const matrix = tags(raw, 'TileMatrixSet')[1];
|
|
99
202
|
const matrixId = raw?.find('Contents', 'TileMatrixSet', 'ows:Identifier') ?? null;
|
|
100
203
|
o(matrix.find('ows:Identifier')).equals(matrixId);
|
|
101
|
-
o(matrixId?.textContent).equals('
|
|
204
|
+
o(matrixId?.textContent).equals('WebMercatorQuad');
|
|
102
205
|
|
|
103
206
|
o(matrix.find('ows:SupportedCRS')?.textContent).deepEquals('urn:ogc:def:crs:EPSG::3857');
|
|
104
207
|
o(matrix.find('WellKnownScaleSet')?.textContent).deepEquals(
|
|
@@ -123,46 +226,62 @@ o.spec('WmtsCapabilities', () => {
|
|
|
123
226
|
|
|
124
227
|
compareMatrix(tileMatrices[0], '0', 1, 559082264.028717);
|
|
125
228
|
compareMatrix(tileMatrices[10], '10', 1024, 545978.773465544);
|
|
126
|
-
|
|
127
|
-
const xml = new WmtsCapabilities({
|
|
128
|
-
httpBase: 'https://basemaps.test',
|
|
129
|
-
provider: Provider,
|
|
130
|
-
layers: [tileSet],
|
|
131
|
-
apiKey,
|
|
132
|
-
}).toXml();
|
|
133
|
-
|
|
134
|
-
o(xml).deepEquals('<?xml version="1.0"?>\n' + raw?.toString());
|
|
135
|
-
|
|
136
|
-
o(createHash('sha256').update(Buffer.from(xml)).digest('base64')).equals(
|
|
137
|
-
'beknYyMt8v74vK4p84AS3c1OnBSJ+ZE0kan+mMVQS1A=',
|
|
138
|
-
);
|
|
139
229
|
});
|
|
140
230
|
|
|
141
|
-
o('should
|
|
231
|
+
o('should output individual imagery sets', () => {
|
|
232
|
+
const imagery = new Map<string, ConfigImagery>();
|
|
233
|
+
imagery.set(Imagery3857.id, Imagery3857);
|
|
234
|
+
imagery.set(Imagery2193.id, Imagery2193);
|
|
142
235
|
const raw = new WmtsCapabilities({
|
|
143
236
|
httpBase: 'https://basemaps.test',
|
|
144
237
|
provider: Provider,
|
|
145
|
-
|
|
238
|
+
tileMatrix: [GoogleTms],
|
|
239
|
+
tileSet: TileSetAerial,
|
|
240
|
+
imagery: imagery,
|
|
241
|
+
formats: [ImageFormat.Png],
|
|
242
|
+
isIndividualLayers: true,
|
|
146
243
|
}).toVNode();
|
|
147
244
|
|
|
148
245
|
const tms = raw?.find('TileMatrixSet', 'ows:Identifier');
|
|
149
246
|
|
|
150
|
-
o(tms?.textContent).equals('
|
|
247
|
+
o(tms?.textContent).equals('WebMercatorQuad');
|
|
151
248
|
|
|
152
249
|
const urls = Array.from(raw ? raw.tags('ResourceURL') : []);
|
|
153
|
-
o(urls.length).equals(
|
|
154
|
-
o(urls[
|
|
250
|
+
o(urls.length).equals(2);
|
|
251
|
+
o(urls[0].toString()).deepEquals(
|
|
252
|
+
'<ResourceURL format="image/png" resourceType="tile" ' +
|
|
253
|
+
'template="https://basemaps.test/v1/tiles/aerial/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.png" />',
|
|
254
|
+
);
|
|
255
|
+
o(urls[1].toString()).deepEquals(
|
|
155
256
|
'<ResourceURL format="image/png" resourceType="tile" ' +
|
|
156
|
-
'template="https://basemaps.test/v1/tiles/
|
|
257
|
+
'template="https://basemaps.test/v1/tiles/ōtorohanga-urban-2021-0.1m/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.png" />',
|
|
157
258
|
);
|
|
259
|
+
|
|
260
|
+
const layers = [...raw.tags('Layer')];
|
|
261
|
+
|
|
262
|
+
o(layers.length).equals(2);
|
|
263
|
+
o(layers[0].find('ows:Title')?.textContent).equals('Aerial Imagery');
|
|
264
|
+
|
|
265
|
+
o(layers[1].find('ows:Title')?.textContent).equals('Ōtorohanga 0.1m Urban Aerial Photos (2021)');
|
|
266
|
+
o(layers[1].find('ows:Identifier')?.textContent).equals('ōtorohanga-urban-2021-0.1m');
|
|
267
|
+
o(layers[1].find('ows:Keywords', 'ows:Keyword')?.textContent).equals('Urban Aerial Photos');
|
|
158
268
|
});
|
|
159
269
|
|
|
160
270
|
o('should support multiple projections', () => {
|
|
161
|
-
const
|
|
162
|
-
|
|
163
|
-
|
|
271
|
+
const imagery = new Map<string, ConfigImagery>();
|
|
272
|
+
imagery.set(Imagery3857.id, Imagery3857);
|
|
273
|
+
imagery.set(Imagery2193.id, Imagery2193);
|
|
274
|
+
const raw = new WmtsCapabilities({
|
|
275
|
+
httpBase: 'https://basemaps.test',
|
|
276
|
+
provider: Provider,
|
|
277
|
+
tileMatrix: [GoogleTms, Nztm2000QuadTms],
|
|
278
|
+
tileSet: TileSetAerial,
|
|
279
|
+
imagery: imagery,
|
|
280
|
+
formats: [ImageFormat.Png],
|
|
281
|
+
isIndividualLayers: false,
|
|
282
|
+
}).toVNode();
|
|
164
283
|
|
|
165
|
-
const layers = tags(
|
|
284
|
+
const layers = tags(raw, 'Layer');
|
|
166
285
|
o(layers.length).equals(1);
|
|
167
286
|
const layer = layers[0];
|
|
168
287
|
|
|
@@ -171,126 +290,180 @@ o.spec('WmtsCapabilities', () => {
|
|
|
171
290
|
'ows:Title',
|
|
172
291
|
'ows:Abstract',
|
|
173
292
|
'ows:Identifier',
|
|
293
|
+
'ows:Keywords',
|
|
174
294
|
'ows:BoundingBox',
|
|
175
295
|
'ows:BoundingBox',
|
|
176
296
|
'ows:WGS84BoundingBox',
|
|
177
297
|
'Style',
|
|
178
298
|
'Format',
|
|
179
|
-
'Format',
|
|
180
|
-
'Format',
|
|
181
299
|
'TileMatrixSetLink',
|
|
182
300
|
'TileMatrixSetLink',
|
|
183
301
|
'ResourceURL',
|
|
184
|
-
'ResourceURL',
|
|
185
|
-
'ResourceURL',
|
|
186
302
|
]);
|
|
187
303
|
|
|
304
|
+
o(layer.find('ows:Title')?.textContent).equals('Aerial Imagery');
|
|
305
|
+
o(layer.find('ows:Keywords')?.toString()).equals(
|
|
306
|
+
'<ows:Keywords>\n <ows:Keyword>Basemap</ows:Keyword>\n</ows:Keywords>',
|
|
307
|
+
);
|
|
308
|
+
o(layer.find('ows:Identifier')?.textContent).equals('aerial');
|
|
309
|
+
|
|
188
310
|
const sets = tags(layer, 'TileMatrixSet');
|
|
189
311
|
|
|
190
312
|
o(sets.length).equals(2);
|
|
191
|
-
o(sets[0].toString()).equals('<TileMatrixSet>
|
|
192
|
-
o(sets[1].toString()).equals('<TileMatrixSet>
|
|
193
|
-
|
|
194
|
-
const
|
|
195
|
-
o(
|
|
196
|
-
|
|
197
|
-
o(
|
|
198
|
-
|
|
313
|
+
o(sets[0].toString()).equals('<TileMatrixSet>WebMercatorQuad</TileMatrixSet>');
|
|
314
|
+
o(sets[1].toString()).equals('<TileMatrixSet>NZTM2000Quad</TileMatrixSet>');
|
|
315
|
+
|
|
316
|
+
const boundingBoxes = tags(layer, 'ows:BoundingBox');
|
|
317
|
+
o(boundingBoxes.length).equals(2);
|
|
318
|
+
o(boundingBoxes[0].attrs.crs).equals('urn:ogc:def:crs:EPSG::3857');
|
|
319
|
+
o(boundingBoxes[0].children.map((c) => c.textContent)).deepEquals([
|
|
320
|
+
'19457809.9203 -4609458.5537',
|
|
321
|
+
'19509787.0995 -4578883.7424',
|
|
322
|
+
]);
|
|
323
|
+
o(boundingBoxes[1].attrs.crs).equals('urn:ogc:def:crs:EPSG::2193');
|
|
324
|
+
o(boundingBoxes[1].children.map((c) => c.textContent)).deepEquals([
|
|
325
|
+
'5766358.9964 1757351.3045',
|
|
326
|
+
'5793264.8304 1798321.5516',
|
|
327
|
+
]);
|
|
199
328
|
|
|
200
|
-
|
|
201
|
-
o(
|
|
329
|
+
const wgs84 = layer.find('ows:WGS84BoundingBox');
|
|
330
|
+
o(wgs84?.attrs.crs).equals('urn:ogc:def:crs:OGC:2:84');
|
|
331
|
+
o(wgs84?.children.map((c) => c.textContent)).deepEquals(['174.79248 -38.212288', '175.259399 -37.996163']);
|
|
202
332
|
});
|
|
203
333
|
|
|
204
|
-
o('should
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
334
|
+
o('should only output imagery if exists', () => {
|
|
335
|
+
const imagery = new Map<string, ConfigImagery>();
|
|
336
|
+
const raw = new WmtsCapabilities({
|
|
337
|
+
httpBase: 'https://basemaps.test',
|
|
338
|
+
provider: Provider,
|
|
339
|
+
tileMatrix: [Nztm2000QuadTms],
|
|
340
|
+
tileSet: TileSetAerial,
|
|
341
|
+
imagery: imagery,
|
|
342
|
+
formats: [ImageFormat.Png],
|
|
343
|
+
isIndividualLayers: true,
|
|
344
|
+
}).toVNode();
|
|
212
345
|
|
|
213
|
-
|
|
214
|
-
o(layers
|
|
346
|
+
const layers = tags(raw, 'Layer');
|
|
347
|
+
o(layers.length).equals(1);
|
|
215
348
|
|
|
216
|
-
|
|
217
|
-
|
|
349
|
+
imagery.set(Imagery3857.id, Imagery3857);
|
|
350
|
+
const rawB = new WmtsCapabilities({
|
|
351
|
+
httpBase: 'https://basemaps.test',
|
|
352
|
+
provider: Provider,
|
|
353
|
+
tileMatrix: [Nztm2000QuadTms],
|
|
354
|
+
tileSet: TileSetAerial,
|
|
355
|
+
imagery: imagery,
|
|
356
|
+
formats: [ImageFormat.Png],
|
|
357
|
+
isIndividualLayers: true,
|
|
358
|
+
}).toVNode();
|
|
359
|
+
|
|
360
|
+
const layersB = tags(rawB, 'Layer');
|
|
361
|
+
o(layersB.length).equals(1);
|
|
218
362
|
});
|
|
219
363
|
|
|
220
|
-
o('should
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
364
|
+
o('should cover the entire WebMercatorBounds', () => {
|
|
365
|
+
const halfSize = GoogleTms.extent.width / 2;
|
|
366
|
+
// Create two fake imagery sets one covers tile z1 x0 y0 another covers tile z1 x1 y1
|
|
367
|
+
// so the entire bounding box should be tile z0 x0 y0 or the full extent
|
|
368
|
+
const imagery = new Map();
|
|
369
|
+
const imageTopLeft = { ...Imagery3857, id: 'im_top_left', name: 'top_left' };
|
|
370
|
+
imageTopLeft.bounds = { x: -halfSize, y: 0, width: halfSize, height: halfSize };
|
|
371
|
+
imagery.set(imageTopLeft.id, imageTopLeft);
|
|
372
|
+
|
|
373
|
+
const imageBottomRight = { ...Imagery3857, id: 'im_bottom_right', name: 'bottom_right' };
|
|
374
|
+
imageBottomRight.bounds = { x: 0, y: -halfSize, width: halfSize, height: halfSize };
|
|
375
|
+
imagery.set(imageBottomRight.id, imageBottomRight);
|
|
376
|
+
|
|
377
|
+
const tileSet = { ...TileSetAerial };
|
|
378
|
+
tileSet.layers = [
|
|
379
|
+
{ 3857: imageTopLeft.id, name: 'a_top_left' },
|
|
380
|
+
{ 3857: imageBottomRight.id, name: 'b_bottom_right' },
|
|
232
381
|
];
|
|
233
|
-
const nodes = new WmtsCapabilities({ httpBase: 'basemaps.test', provider: Provider, layers: ts }).toVNode();
|
|
234
|
-
const layers = tags(nodes, 'Layer');
|
|
235
382
|
|
|
236
|
-
|
|
383
|
+
const raw = new WmtsCapabilities({
|
|
384
|
+
httpBase: 'https://basemaps.test',
|
|
385
|
+
provider: Provider,
|
|
386
|
+
tileMatrix: [GoogleTms],
|
|
387
|
+
tileSet,
|
|
388
|
+
imagery,
|
|
389
|
+
formats: [ImageFormat.Png],
|
|
390
|
+
isIndividualLayers: true,
|
|
391
|
+
}).toVNode();
|
|
237
392
|
|
|
238
|
-
const
|
|
239
|
-
|
|
393
|
+
const boundingBox = tags(raw, 'ows:WGS84BoundingBox').map((c) =>
|
|
394
|
+
c
|
|
395
|
+
.toString()
|
|
396
|
+
.split('\n')
|
|
397
|
+
.map((c) => c.trim()),
|
|
398
|
+
);
|
|
399
|
+
o(boundingBox[0][1]).deepEquals('<ows:LowerCorner>-180 -85.051129</ows:LowerCorner>');
|
|
400
|
+
o(boundingBox[0][2]).equals('<ows:UpperCorner>180 85.051129</ows:UpperCorner>');
|
|
401
|
+
|
|
402
|
+
o(boundingBox[1][1]).deepEquals('<ows:LowerCorner>-180 0</ows:LowerCorner>');
|
|
403
|
+
o(boundingBox[1][2]).equals('<ows:UpperCorner>0 85.051129</ows:UpperCorner>');
|
|
240
404
|
|
|
241
|
-
|
|
242
|
-
o(
|
|
243
|
-
const secondTitle = layers[1].children[0].textContent;
|
|
244
|
-
o(secondTitle).equals('west-coast_rural_2016-17_0-3m');
|
|
405
|
+
o(boundingBox[2][1]).deepEquals('<ows:LowerCorner>0 -85.051129</ows:LowerCorner>');
|
|
406
|
+
o(boundingBox[2][2]).equals('<ows:UpperCorner>180 0</ows:UpperCorner>');
|
|
245
407
|
});
|
|
246
408
|
|
|
247
|
-
o('should
|
|
248
|
-
const
|
|
249
|
-
new FakeTileSet(TileSetName.aerial, Nztm2000Tms, TileSetName.aerial),
|
|
250
|
-
new FakeTileSet('01F75X9G7FQ3XMWPJFR9AMQFJ0', Nztm2000Tms, '01F75X9G7FQ3XMWPJFR9AMQFJ0'),
|
|
251
|
-
new FakeTileSet('01E7PJFR9AMQFJ05X9G7FQ3XMW', GoogleTms, '01E7PJFR9AMQFJ05X9G7FQ3XMW'),
|
|
252
|
-
new FakeTileSet('01E7PJFR9AMQFJ05X9G7FQ3XMW', Nztm2000QuadTms, '01E7PJFR9AMQFJ05X9G7FQ3XMW'),
|
|
253
|
-
];
|
|
254
|
-
ts[1].extentOverride = new Bounds(1, 2, 2, 2);
|
|
409
|
+
o('should work when crossing anti meridian', () => {
|
|
410
|
+
const halfSize = GoogleTms.extent.width / 2;
|
|
255
411
|
|
|
256
|
-
|
|
257
|
-
|
|
412
|
+
const imagery = new Map();
|
|
413
|
+
// This image covers z1 x1.5 y1 to z1 x0.5 y1
|
|
414
|
+
// which cross the AM and covers half the width of two tiles
|
|
415
|
+
const imageBottomRight = { ...Imagery3857, id: 'im_bottom_right', name: 'bottom_right' };
|
|
416
|
+
imageBottomRight.bounds = { x: halfSize / 2, y: -halfSize, width: halfSize, height: halfSize };
|
|
417
|
+
imagery.set(imageBottomRight.id, imageBottomRight);
|
|
258
418
|
|
|
259
|
-
const
|
|
419
|
+
const tileSet = { ...TileSetAerial };
|
|
420
|
+
tileSet.layers = [{ 3857: imageBottomRight.id, name: 'b_bottom_right' }];
|
|
260
421
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
422
|
+
const raw = new WmtsCapabilities({
|
|
423
|
+
httpBase: 'https://basemaps.test',
|
|
424
|
+
provider: Provider,
|
|
425
|
+
tileMatrix: [GoogleTms],
|
|
426
|
+
tileSet,
|
|
427
|
+
imagery,
|
|
428
|
+
formats: [ImageFormat.Png],
|
|
429
|
+
isIndividualLayers: true,
|
|
430
|
+
}).toVNode();
|
|
265
431
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
432
|
+
const boundingBox = tags(raw, 'ows:WGS84BoundingBox').map((c) =>
|
|
433
|
+
roundNumbersInString(c.toString(), 4)
|
|
434
|
+
.split('\n')
|
|
435
|
+
.map((c) => c.trim()),
|
|
436
|
+
);
|
|
437
|
+
o(boundingBox[0][1]).deepEquals('<ows:LowerCorner>-180 -85.0511</ows:LowerCorner>');
|
|
438
|
+
o(boundingBox[0][2]).equals('<ows:UpperCorner>180 0</ows:UpperCorner>');
|
|
270
439
|
|
|
271
|
-
|
|
272
|
-
o(
|
|
440
|
+
o(boundingBox[1][1]).deepEquals('<ows:LowerCorner>-180 -85.0511</ows:LowerCorner>');
|
|
441
|
+
o(boundingBox[1][2]).equals('<ows:UpperCorner>180 0</ows:UpperCorner>');
|
|
442
|
+
});
|
|
273
443
|
|
|
274
|
-
|
|
275
|
-
|
|
444
|
+
o('should work with NZTM2000Quad', () => {
|
|
445
|
+
const wmts = new WmtsCapabilities({ tileMatrix: [] } as any);
|
|
276
446
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
o(
|
|
280
|
-
|
|
281
|
-
' <ows:LowerCorner>2 1</ows:LowerCorner>\n' +
|
|
282
|
-
' <ows:UpperCorner>4 3</ows:UpperCorner>\n' +
|
|
283
|
-
'</ows:BoundingBox>',
|
|
284
|
-
);
|
|
447
|
+
// Full NZTM200Quad coverage
|
|
448
|
+
const bbox = wmts.buildWgs84BoundingBox(Nztm2000QuadTms, []);
|
|
449
|
+
o(bbox.children[0].textContent).equals('-180 -49.929855');
|
|
450
|
+
o(bbox.children[1].textContent).equals('180 2.938603');
|
|
285
451
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
452
|
+
// Full NZTM200Quad coverage at z1
|
|
453
|
+
const bboxB = wmts.buildWgs84BoundingBox(Nztm2000QuadTms, [
|
|
454
|
+
Nztm2000QuadTms.tileToSourceBounds({ z: 1, x: 0, y: 0 }),
|
|
455
|
+
Nztm2000QuadTms.tileToSourceBounds({ z: 1, x: 1, y: 1 }),
|
|
456
|
+
]);
|
|
457
|
+
o(bboxB.children[0].textContent).equals('-180 -49.929855');
|
|
458
|
+
o(bboxB.children[1].textContent).equals('180 2.938603');
|
|
459
|
+
|
|
460
|
+
// Full NZTM200Quad coverage at z5
|
|
461
|
+
const tileCount = Nztm2000QuadTms.zooms[5].matrixWidth;
|
|
462
|
+
const bboxC = wmts.buildWgs84BoundingBox(Nztm2000QuadTms, [
|
|
463
|
+
Nztm2000QuadTms.tileToSourceBounds({ z: 5, x: 0, y: 0 }),
|
|
464
|
+
Nztm2000QuadTms.tileToSourceBounds({ z: 5, x: tileCount - 1, y: tileCount - 1 }),
|
|
465
|
+
]);
|
|
466
|
+
o(bboxC.children[0].textContent).equals('-180 -49.929855');
|
|
467
|
+
o(bboxC.children[1].textContent).equals('180 2.938603');
|
|
295
468
|
});
|
|
296
469
|
});
|