@npm9912/v-map 0.1.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/LICENSE +21 -0
- package/README.md +185 -0
- package/dist/cjs/_commonjsHelpers-B83fTs8d.js +36 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/cesium-provider-BiFFyAl9.js +2598 -0
- package/dist/cjs/deck-provider-Ctq3Q8a1.js +47824 -0
- package/dist/cjs/geotiff-CEwvF9cG.js +47 -0
- package/dist/cjs/geotiff-source-RaNzzWkC.js +1522 -0
- package/dist/cjs/index-B1oGO1g-.js +10658 -0
- package/dist/cjs/index-B8LHqjyg.js +1765 -0
- package/dist/cjs/index-BIL4VsgP.js +310 -0
- package/dist/cjs/index-Blku2QY8.js +167 -0
- package/dist/cjs/index-CJvvX4yx.js +21 -0
- package/dist/cjs/index-CbVT-Con.js +699 -0
- package/dist/cjs/index-ISOEpMC3.js +20478 -0
- package/dist/cjs/index-JSwBbvGA.js +1621 -0
- package/dist/cjs/index.browser-DQhD8Jwl.js +6873 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/layer-extension-B_olS0rc.js +65 -0
- package/dist/cjs/leaflet-provider-DOqfs7g5.js +1815 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/main-dist-7TykwFci.js +2655 -0
- package/dist/cjs/messages-D7h4m8Tx.js +186 -0
- package/dist/cjs/openlayers-provider-Dfeg6L4n.js +1604 -0
- package/dist/cjs/polygon-layer-B9PrN7vr.js +1300 -0
- package/dist/cjs/scenegraph-layer-DwNoxQdi.js +2530 -0
- package/dist/cjs/styleconfig-CVRqArk-.js +23 -0
- package/dist/cjs/v-map-builder.cjs.entry.js +3786 -0
- package/dist/cjs/v-map-layer-geojson_12.cjs.entry.js +40894 -0
- package/dist/cjs/v-map-layer-helper-iAzxAg9I.js +285 -0
- package/dist/cjs/v-map-layer-terrain-geotiff.cjs.entry.js +258 -0
- package/dist/cjs/v-map-layercontrol.cjs.entry.js +247 -0
- package/dist/cjs/v-map.cjs.js +25 -0
- package/dist/cjs/v-map.v-map-layer-osm.v-map-layergroup-BsXp3BoL.js +582 -0
- package/dist/cjs/v-map_3.cjs.entry.js +12 -0
- package/dist/collection/collection-manifest.json +30 -0
- package/dist/collection/components/v-map/v-map.css +3 -0
- package/dist/collection/components/v-map/v-map.js +467 -0
- package/dist/collection/components/v-map/v-map.test.js +33 -0
- package/dist/collection/components/v-map-builder/v-map-builder.css +1 -0
- package/dist/collection/components/v-map-builder/v-map-builder.js +913 -0
- package/dist/collection/components/v-map-builder/v-map-builder.test.js +56 -0
- package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.js +862 -0
- package/dist/collection/components/v-map-layer-geojson/v-map-layer-geojson.test.js +42 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.css +4 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.js +500 -0
- package/dist/collection/components/v-map-layer-geotiff/v-map-layer-geotiff.test.js +38 -0
- package/dist/collection/components/v-map-layer-google/v-map-layer-google.css +1 -0
- package/dist/collection/components/v-map-layer-google/v-map-layer-google.js +442 -0
- package/dist/collection/components/v-map-layer-osm/error-api.test.js +108 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.css +4 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.js +311 -0
- package/dist/collection/components/v-map-layer-osm/v-map-layer-osm.test.js +36 -0
- package/dist/collection/components/v-map-layer-scatterplot/v-map-layer-scatterplot.css +1 -0
- package/dist/collection/components/v-map-layer-scatterplot/v-map-layer-scatterplot.js +305 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.css +3 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.js +548 -0
- package/dist/collection/components/v-map-layer-terrain/v-map-layer-terrain.test.js +36 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.css +3 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.js +735 -0
- package/dist/collection/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.test.js +42 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.css +3 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.js +449 -0
- package/dist/collection/components/v-map-layer-tile3d/v-map-layer-tile3d.test.js +50 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.css +1 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.js +448 -0
- package/dist/collection/components/v-map-layer-wcs/v-map-layer-wcs.test.js +39 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.css +1 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.js +489 -0
- package/dist/collection/components/v-map-layer-wfs/v-map-layer-wfs.test.js +43 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.css +1 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.js +811 -0
- package/dist/collection/components/v-map-layer-wkt/v-map-layer-wkt.test.js +34 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.css +1 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.js +453 -0
- package/dist/collection/components/v-map-layer-wms/v-map-layer-wms.test.js +36 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.css +1 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.js +331 -0
- package/dist/collection/components/v-map-layer-xyz/v-map-layer-xyz.test.js +28 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.css +74 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.js +277 -0
- package/dist/collection/components/v-map-layercontrol/v-map-layercontrol.test.js +134 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.css +4 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.js +212 -0
- package/dist/collection/components/v-map-layergroup/v-map-layergroup.test.js +39 -0
- package/dist/collection/components/v-map-style/v-map-style.css +38 -0
- package/dist/collection/components/v-map-style/v-map-style.js +492 -0
- package/dist/collection/components/v-map-style/v-map-style.unit.js +62 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/layer/v-map-layer-helper.js +281 -0
- package/dist/collection/layer/v-map-layer-helper.unit.js +234 -0
- package/dist/collection/lib/cesium-loader.js +58 -0
- package/dist/collection/lib/ensure-importmap.js +12 -0
- package/dist/collection/lib/ensure-importmap.unit.js +57 -0
- package/dist/collection/lib/versions.gen.js +6 -0
- package/dist/collection/lib/vstyle.js +8 -0
- package/dist/collection/map-provider/cesium/CesiumGeoTIFFTerrainProvider.js +285 -0
- package/dist/collection/map-provider/cesium/CesiumLayerGroups.js +159 -0
- package/dist/collection/map-provider/cesium/GeoTIFFImageryProvider.js +192 -0
- package/dist/collection/map-provider/cesium/GeoTIFFImageryProvider.test.js +57 -0
- package/dist/collection/map-provider/cesium/cesium-provider.js +1408 -0
- package/dist/collection/map-provider/cesium/i-layer.js +1 -0
- package/dist/collection/map-provider/cesium/layer-manager.js +467 -0
- package/dist/collection/map-provider/deck/DeckGLGeoTIFFLayer.js +483 -0
- package/dist/collection/map-provider/deck/DeckGLGeoTIFFTerrainLayer.js +410 -0
- package/dist/collection/map-provider/deck/LayerGroupWithModel.js +169 -0
- package/dist/collection/map-provider/deck/LayerGroups.js +192 -0
- package/dist/collection/map-provider/deck/LayerModel.js +1 -0
- package/dist/collection/map-provider/deck/RenderableGroup.js +1 -0
- package/dist/collection/map-provider/deck/deck-provider.js +1563 -0
- package/dist/collection/map-provider/geotiff/geotiff-source.js +172 -0
- package/dist/collection/map-provider/geotiff/utils/AABB2D.js +24 -0
- package/dist/collection/map-provider/geotiff/utils/BVHNode2D.js +166 -0
- package/dist/collection/map-provider/geotiff/utils/GeoTIFFTileProcessor.js +484 -0
- package/dist/collection/map-provider/geotiff/utils/Triangle.js +1 -0
- package/dist/collection/map-provider/geotiff/utils/Triangulation.js +321 -0
- package/dist/collection/map-provider/geotiff/utils/colormap-utils.js +190 -0
- package/dist/collection/map-provider/geotiff/utils/normalization-utils.js +122 -0
- package/dist/collection/map-provider/geotiff/utils/sampling-utils.js +108 -0
- package/dist/collection/map-provider/leaflet/GeoTIFFGridLayer.js +147 -0
- package/dist/collection/map-provider/leaflet/WCSGridLayer.js +124 -0
- package/dist/collection/map-provider/leaflet/google-map-tiles-layer.js +352 -0
- package/dist/collection/map-provider/leaflet/leaflet-helpers.js +94 -0
- package/dist/collection/map-provider/leaflet/leaflet-provider.js +1095 -0
- package/dist/collection/map-provider/ol/CustomGeoTiff.js +145 -0
- package/dist/collection/map-provider/ol/openlayers-helper.js +26 -0
- package/dist/collection/map-provider/ol/openlayers-provider.js +1427 -0
- package/dist/collection/map-provider/provider-factory.js +44 -0
- package/dist/collection/map-provider/provider-factory.unit.js +66 -0
- package/dist/collection/testing/browser-test-utils.js +49 -0
- package/dist/collection/testing/e2e-testing.js +122 -0
- package/dist/collection/testing/e2e-utils.js +70 -0
- package/dist/collection/testing/geotiff-test-server.js +100 -0
- package/dist/collection/testing/mocks/geostyler-lyrx-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-mapbox-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-qgis-parser.js +12 -0
- package/dist/collection/testing/mocks/geostyler-sld-parser.js +13 -0
- package/dist/collection/testing/mocks/geostyler-style.js +5 -0
- package/dist/collection/testing/setupTests.browser.js +1 -0
- package/dist/collection/testing/setupTests.stencil.js +20 -0
- package/dist/collection/testing/setupTests.vitest.js +59 -0
- package/dist/collection/testing/stencil-testing-wrapper.js +43 -0
- package/dist/collection/testing/styleMock.js +1 -0
- package/dist/collection/types/color.js +1 -0
- package/dist/collection/types/cssmode.js +1 -0
- package/dist/collection/types/flavour.js +1 -0
- package/dist/collection/types/layerconfig.js +1 -0
- package/dist/collection/types/lonlat.js +1 -0
- package/dist/collection/types/mapinitoptions.js +1 -0
- package/dist/collection/types/mapprovider.js +1 -0
- package/dist/collection/types/provideroptions.js +1 -0
- package/dist/collection/types/styleconfig.js +19 -0
- package/dist/collection/types/styling.js +13 -0
- package/dist/collection/types/styling.unit.js +37 -0
- package/dist/collection/types/vmaplayer.js +1 -0
- package/dist/collection/utils/async-mutex.js +28 -0
- package/dist/collection/utils/diff.js +142 -0
- package/dist/collection/utils/diff.unit.js +59 -0
- package/dist/collection/utils/dom-env.js +43 -0
- package/dist/collection/utils/dom-env.unit.js +92 -0
- package/dist/collection/utils/events.js +8 -0
- package/dist/collection/utils/logger.js +183 -0
- package/dist/collection/utils/logger.unit.js +98 -0
- package/dist/collection/utils/messages.js +12 -0
- package/dist/collection/utils/spatial-utils.js +27 -0
- package/dist/collection/utils/spatial-utils.unit.js +24 -0
- package/dist/components/_commonjsHelpers.js +1 -0
- package/dist/components/cesium-provider.js +1 -0
- package/dist/components/deck-provider.js +1 -0
- package/dist/components/events.js +1 -0
- package/dist/components/geotiff-source.js +1 -0
- package/dist/components/geotiff.js +4 -0
- package/dist/components/index.browser.js +15 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +1 -0
- package/dist/components/index3.js +1 -0
- package/dist/components/index4.js +1 -0
- package/dist/components/index5.js +1 -0
- package/dist/components/index6.js +1 -0
- package/dist/components/index7.js +1 -0
- package/dist/components/index8.js +7 -0
- package/dist/components/layer-extension.js +1 -0
- package/dist/components/leaflet-provider.js +1 -0
- package/dist/components/main-dist.js +1 -0
- package/dist/components/messages.js +1 -0
- package/dist/components/openlayers-provider.js +1 -0
- package/dist/components/polygon-layer.js +1 -0
- package/dist/components/scenegraph-layer.js +1 -0
- package/dist/components/styleconfig.js +1 -0
- package/dist/components/styling.js +1 -0
- package/dist/components/v-map-builder.d.ts +11 -0
- package/dist/components/v-map-builder.js +2 -0
- package/dist/components/v-map-layer-geojson.d.ts +11 -0
- package/dist/components/v-map-layer-geojson.js +1 -0
- package/dist/components/v-map-layer-geojson2.js +1 -0
- package/dist/components/v-map-layer-geotiff.d.ts +11 -0
- package/dist/components/v-map-layer-geotiff.js +1 -0
- package/dist/components/v-map-layer-geotiff2.js +1 -0
- package/dist/components/v-map-layer-google.d.ts +11 -0
- package/dist/components/v-map-layer-google.js +1 -0
- package/dist/components/v-map-layer-google2.js +1 -0
- package/dist/components/v-map-layer-helper.js +1 -0
- package/dist/components/v-map-layer-osm.d.ts +11 -0
- package/dist/components/v-map-layer-osm.js +1 -0
- package/dist/components/v-map-layer-osm2.js +1 -0
- package/dist/components/v-map-layer-scatterplot.d.ts +11 -0
- package/dist/components/v-map-layer-scatterplot.js +1 -0
- package/dist/components/v-map-layer-scatterplot2.js +1 -0
- package/dist/components/v-map-layer-terrain-geotiff.d.ts +11 -0
- package/dist/components/v-map-layer-terrain-geotiff.js +1 -0
- package/dist/components/v-map-layer-terrain.d.ts +11 -0
- package/dist/components/v-map-layer-terrain.js +1 -0
- package/dist/components/v-map-layer-terrain2.js +1 -0
- package/dist/components/v-map-layer-tile3d.d.ts +11 -0
- package/dist/components/v-map-layer-tile3d.js +1 -0
- package/dist/components/v-map-layer-tile3d2.js +1 -0
- package/dist/components/v-map-layer-wcs.d.ts +11 -0
- package/dist/components/v-map-layer-wcs.js +1 -0
- package/dist/components/v-map-layer-wcs2.js +1 -0
- package/dist/components/v-map-layer-wfs.d.ts +11 -0
- package/dist/components/v-map-layer-wfs.js +1 -0
- package/dist/components/v-map-layer-wfs2.js +1 -0
- package/dist/components/v-map-layer-wkt.d.ts +11 -0
- package/dist/components/v-map-layer-wkt.js +1 -0
- package/dist/components/v-map-layer-wkt2.js +1 -0
- package/dist/components/v-map-layer-wms.d.ts +11 -0
- package/dist/components/v-map-layer-wms.js +1 -0
- package/dist/components/v-map-layer-wms2.js +1 -0
- package/dist/components/v-map-layer-xyz.d.ts +11 -0
- package/dist/components/v-map-layer-xyz.js +1 -0
- package/dist/components/v-map-layer-xyz2.js +1 -0
- package/dist/components/v-map-layercontrol.d.ts +11 -0
- package/dist/components/v-map-layercontrol.js +1 -0
- package/dist/components/v-map-layergroup.d.ts +11 -0
- package/dist/components/v-map-layergroup.js +1 -0
- package/dist/components/v-map-layergroup2.js +1 -0
- package/dist/components/v-map-style.d.ts +11 -0
- package/dist/components/v-map-style.js +1 -0
- package/dist/components/v-map-style2.js +10 -0
- package/dist/components/v-map.d.ts +11 -0
- package/dist/components/v-map.js +1 -0
- package/dist/components/v-map2.js +1 -0
- package/dist/esm/_commonjsHelpers-E-ZsRS8r.js +32 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/cesium-provider-BJfAup3w.js +2596 -0
- package/dist/esm/deck-provider-C7U9VDEq.js +47709 -0
- package/dist/esm/geotiff-BEWxTIfH.js +45 -0
- package/dist/esm/geotiff-source-esnDnC-u.js +1516 -0
- package/dist/esm/index-B1zwA4IC.js +685 -0
- package/dist/esm/index-BBpiaTpT.js +165 -0
- package/dist/esm/index-BIEmlzCf.js +1697 -0
- package/dist/esm/index-BUHa4Jj0.js +307 -0
- package/dist/esm/index-DbSdn93t.js +20461 -0
- package/dist/esm/index-RpJarvr_.js +10656 -0
- package/dist/esm/index-jN06TXUp.js +14 -0
- package/dist/esm/index-jzneDarq.js +1613 -0
- package/dist/esm/index.browser-DhQAXuA7.js +6860 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/layer-extension-CZXK5goK.js +63 -0
- package/dist/esm/leaflet-provider-Q41TB6ku.js +1794 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/main-dist-CwnA7_Xn.js +2652 -0
- package/dist/esm/messages-CMKJzsgL.js +180 -0
- package/dist/esm/openlayers-provider-CMsDsQTQ.js +1602 -0
- package/dist/esm/polygon-layer-ByhxGhWC.js +1295 -0
- package/dist/esm/scenegraph-layer-09K_B6DT.js +2526 -0
- package/dist/esm/styleconfig-B-bAcABs.js +21 -0
- package/dist/esm/v-map-builder.entry.js +3784 -0
- package/dist/esm/v-map-layer-geojson_12.entry.js +40881 -0
- package/dist/esm/v-map-layer-helper-Dys44Cgo.js +283 -0
- package/dist/esm/v-map-layer-terrain-geotiff.entry.js +256 -0
- package/dist/esm/v-map-layercontrol.entry.js +245 -0
- package/dist/esm/v-map.js +21 -0
- package/dist/esm/v-map.v-map-layer-osm.v-map-layergroup-B4pFHuSf.js +572 -0
- package/dist/esm/v-map_3.entry.js +4 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/cesium-augment.d.ts +5 -0
- package/dist/types/components/v-map/v-map.d.ts +70 -0
- package/dist/types/components/v-map/v-map.test.d.ts +1 -0
- package/dist/types/components/v-map-builder/v-map-builder.d.ts +48 -0
- package/dist/types/components/v-map-builder/v-map-builder.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-geojson/v-map-layer-geojson.d.ts +129 -0
- package/dist/types/components/v-map-layer-geojson/v-map-layer-geojson.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-geotiff/v-map-layer-geotiff.d.ts +74 -0
- package/dist/types/components/v-map-layer-geotiff/v-map-layer-geotiff.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-google/v-map-layer-google.d.ts +78 -0
- package/dist/types/components/v-map-layer-osm/error-api.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-osm/v-map-layer-osm.d.ts +50 -0
- package/dist/types/components/v-map-layer-osm/v-map-layer-osm.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-scatterplot/v-map-layer-scatterplot.d.ts +54 -0
- package/dist/types/components/v-map-layer-terrain/v-map-layer-terrain.d.ts +74 -0
- package/dist/types/components/v-map-layer-terrain/v-map-layer-terrain.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.d.ts +117 -0
- package/dist/types/components/v-map-layer-terrain-geotiff/v-map-layer-terrain-geotiff.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-tile3d/v-map-layer-tile3d.d.ts +69 -0
- package/dist/types/components/v-map-layer-tile3d/v-map-layer-tile3d.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wcs/v-map-layer-wcs.d.ts +47 -0
- package/dist/types/components/v-map-layer-wcs/v-map-layer-wcs.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wfs/v-map-layer-wfs.d.ts +59 -0
- package/dist/types/components/v-map-layer-wfs/v-map-layer-wfs.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wkt/v-map-layer-wkt.d.ts +132 -0
- package/dist/types/components/v-map-layer-wkt/v-map-layer-wkt.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-wms/v-map-layer-wms.d.ts +76 -0
- package/dist/types/components/v-map-layer-wms/v-map-layer-wms.test.d.ts +1 -0
- package/dist/types/components/v-map-layer-xyz/v-map-layer-xyz.d.ts +59 -0
- package/dist/types/components/v-map-layer-xyz/v-map-layer-xyz.test.d.ts +1 -0
- package/dist/types/components/v-map-layercontrol/v-map-layercontrol.d.ts +44 -0
- package/dist/types/components/v-map-layercontrol/v-map-layercontrol.test.d.ts +1 -0
- package/dist/types/components/v-map-layergroup/v-map-layergroup.d.ts +31 -0
- package/dist/types/components/v-map-layergroup/v-map-layergroup.test.d.ts +1 -0
- package/dist/types/components/v-map-style/v-map-style.d.ts +75 -0
- package/dist/types/components/v-map-style/v-map-style.unit.d.ts +1 -0
- package/dist/types/components.d.ts +2391 -0
- package/dist/types/globals.d.ts +16 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/layer/v-map-layer-helper.d.ts +45 -0
- package/dist/types/layer/v-map-layer-helper.unit.d.ts +1 -0
- package/dist/types/leaflet-augment.d.ts +15 -0
- package/dist/types/lib/cesium-loader.d.ts +3 -0
- package/dist/types/lib/ensure-importmap.d.ts +3 -0
- package/dist/types/lib/ensure-importmap.unit.d.ts +1 -0
- package/dist/types/lib/versions.gen.d.ts +5 -0
- package/dist/types/lib/vstyle.d.ts +44 -0
- package/dist/types/map-provider/cesium/CesiumGeoTIFFTerrainProvider.d.ts +92 -0
- package/dist/types/map-provider/cesium/CesiumLayerGroups.d.ts +64 -0
- package/dist/types/map-provider/cesium/GeoTIFFImageryProvider.d.ts +75 -0
- package/dist/types/map-provider/cesium/GeoTIFFImageryProvider.test.d.ts +1 -0
- package/dist/types/map-provider/cesium/cesium-provider.d.ts +87 -0
- package/dist/types/map-provider/cesium/i-layer.d.ts +11 -0
- package/dist/types/map-provider/cesium/layer-manager.d.ts +31 -0
- package/dist/types/map-provider/deck/DeckGLGeoTIFFLayer.d.ts +91 -0
- package/dist/types/map-provider/deck/DeckGLGeoTIFFTerrainLayer.d.ts +82 -0
- package/dist/types/map-provider/deck/LayerGroupWithModel.d.ts +55 -0
- package/dist/types/map-provider/deck/LayerGroups.d.ts +63 -0
- package/dist/types/map-provider/deck/LayerModel.d.ts +8 -0
- package/dist/types/map-provider/deck/RenderableGroup.d.ts +20 -0
- package/dist/types/map-provider/deck/deck-provider.d.ts +92 -0
- package/dist/types/map-provider/geotiff/geotiff-source.d.ts +30 -0
- package/dist/types/map-provider/geotiff/utils/AABB2D.d.ts +28 -0
- package/dist/types/map-provider/geotiff/utils/BVHNode2D.d.ts +36 -0
- package/dist/types/map-provider/geotiff/utils/GeoTIFFTileProcessor.d.ts +116 -0
- package/dist/types/map-provider/geotiff/utils/Triangle.d.ts +5 -0
- package/dist/types/map-provider/geotiff/utils/Triangulation.d.ts +94 -0
- package/dist/types/map-provider/geotiff/utils/colormap-utils.d.ts +47 -0
- package/dist/types/map-provider/geotiff/utils/normalization-utils.d.ts +39 -0
- package/dist/types/map-provider/geotiff/utils/sampling-utils.d.ts +13 -0
- package/dist/types/map-provider/leaflet/GeoTIFFGridLayer.d.ts +34 -0
- package/dist/types/map-provider/leaflet/WCSGridLayer.d.ts +38 -0
- package/dist/types/map-provider/leaflet/google-map-tiles-layer.d.ts +73 -0
- package/dist/types/map-provider/leaflet/leaflet-helpers.d.ts +6 -0
- package/dist/types/map-provider/leaflet/leaflet-provider.d.ts +73 -0
- package/dist/types/map-provider/ol/CustomGeoTiff.d.ts +14 -0
- package/dist/types/map-provider/ol/openlayers-helper.d.ts +2 -0
- package/dist/types/map-provider/ol/openlayers-provider.d.ts +80 -0
- package/dist/types/map-provider/provider-factory.d.ts +12 -0
- package/dist/types/map-provider/provider-factory.unit.d.ts +1 -0
- package/dist/types/namespaces.d.ts +3 -0
- package/dist/types/ol-augment.d.ts +3 -0
- package/dist/types/ol-override.d.ts +7 -0
- package/dist/types/ol.d.ts +10 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/testing/browser-test-utils.d.ts +6 -0
- package/dist/types/testing/e2e-testing.d.ts +5 -0
- package/dist/types/testing/e2e-utils.d.ts +4 -0
- package/dist/types/testing/geotiff-test-server.d.ts +5 -0
- package/dist/types/testing/mocks/geostyler-lyrx-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-mapbox-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-qgis-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-sld-parser.d.ts +11 -0
- package/dist/types/testing/mocks/geostyler-style.d.ts +5 -0
- package/dist/types/testing/setupTests.browser.d.ts +1 -0
- package/dist/types/testing/setupTests.stencil.d.ts +1 -0
- package/dist/types/testing/setupTests.vitest.d.ts +1 -0
- package/dist/types/testing/stencil-testing-wrapper.d.ts +3 -0
- package/dist/types/types/color.d.ts +1 -0
- package/dist/types/types/cssmode.d.ts +1 -0
- package/dist/types/types/flavour.d.ts +1 -0
- package/dist/types/types/layerconfig.d.ts +207 -0
- package/dist/types/types/lonlat.d.ts +1 -0
- package/dist/types/types/mapinitoptions.d.ts +4 -0
- package/dist/types/types/mapprovider.d.ts +46 -0
- package/dist/types/types/provideroptions.d.ts +8 -0
- package/dist/types/types/styleconfig.d.ts +27 -0
- package/dist/types/types/styling.d.ts +24 -0
- package/dist/types/types/styling.unit.d.ts +1 -0
- package/dist/types/types/vmaplayer.d.ts +10 -0
- package/dist/types/utils/async-mutex.d.ts +7 -0
- package/dist/types/utils/diff.d.ts +64 -0
- package/dist/types/utils/diff.unit.d.ts +1 -0
- package/dist/types/utils/dom-env.d.ts +5 -0
- package/dist/types/utils/dom-env.unit.d.ts +1 -0
- package/dist/types/utils/events.d.ts +29 -0
- package/dist/types/utils/logger.d.ts +47 -0
- package/dist/types/utils/logger.unit.d.ts +1 -0
- package/dist/types/utils/messages.d.ts +12 -0
- package/dist/types/utils/spatial-utils.d.ts +6 -0
- package/dist/types/utils/spatial-utils.unit.d.ts +1 -0
- package/dist/types/versions.d.ts +7 -0
- package/dist/v-map/index.esm.js +0 -0
- package/dist/v-map/p--vVleK-M.js +1 -0
- package/dist/v-map/p-09d10db0.entry.js +1 -0
- package/dist/v-map/p-5eba6058.entry.js +10 -0
- package/dist/v-map/p-6b102336.entry.js +1 -0
- package/dist/v-map/p-B-bAcABs.js +1 -0
- package/dist/v-map/p-BBpiaTpT.js +1 -0
- package/dist/v-map/p-BdijL4Av.js +1 -0
- package/dist/v-map/p-Be3r33VF.js +4 -0
- package/dist/v-map/p-BeFu0ap4.js +1 -0
- package/dist/v-map/p-BxFJezdK.js +1 -0
- package/dist/v-map/p-CMKJzsgL.js +1 -0
- package/dist/v-map/p-CXfA_q8m.js +1 -0
- package/dist/v-map/p-CZqY0yW4.js +1 -0
- package/dist/v-map/p-CafTHT9i.js +1 -0
- package/dist/v-map/p-DCTHyf58.js +1 -0
- package/dist/v-map/p-DQuL1Twl.js +1 -0
- package/dist/v-map/p-DR9McdNX.js +1 -0
- package/dist/v-map/p-Dckgonw8.js +1 -0
- package/dist/v-map/p-DhQAXuA7.js +15 -0
- package/dist/v-map/p-DmICdG34.js +7 -0
- package/dist/v-map/p-DrOQ9V4h.js +1 -0
- package/dist/v-map/p-DvHXtWUg.js +1 -0
- package/dist/v-map/p-E-ZsRS8r.js +1 -0
- package/dist/v-map/p-MyTSFnEk.js +1 -0
- package/dist/v-map/p-RpJarvr_.js +1 -0
- package/dist/v-map/p-WaMDUuAz.js +1 -0
- package/dist/v-map/p-aa410e64.entry.js +2 -0
- package/dist/v-map/p-c21c93fe.entry.js +1 -0
- package/dist/v-map/p-jzneDarq.js +2 -0
- package/dist/v-map/p-uiIP-taz.js +1 -0
- package/dist/v-map/v-map.esm.js +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +193 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t=6378137,i=.0066943799901413165,s=484813681109536e-20,h=Math.PI/2,a=1e-10,e=.017453292519943295,r=57.29577951308232,n=Math.PI/4,o=2*Math.PI,M=3.14159265359,u={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},l={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}},f=/[\s_\-\/\(\)]/g;function _(t,i){if(t[i])return t[i];for(var s,h=Object.keys(t),a=i.toLowerCase().replace(f,""),e=-1;++e<h.length;)if((s=h[e]).toLowerCase().replace(f,"")===a)return t[s]}function c(t){var i,s,h,a={},r=t.split("+").map((function(t){return t.trim()})).filter((function(t){return t})).reduce((function(t,i){var s=i.split("=");return s.push(!0),t[s[0].toLowerCase()]=s[1],t}),{}),n={proj:"projName",datum:"datumCode",rf:function(t){a.rf=parseFloat(t)},lat_0:function(t){a.lat0=t*e},lat_1:function(t){a.lat1=t*e},lat_2:function(t){a.lat2=t*e},lat_ts:function(t){a.lat_ts=t*e},lon_0:function(t){a.long0=t*e},lon_1:function(t){a.long1=t*e},lon_2:function(t){a.long2=t*e},alpha:function(t){a.alpha=parseFloat(t)*e},gamma:function(t){a.rectified_grid_angle=parseFloat(t)*e},lonc:function(t){a.longc=t*e},x_0:function(t){a.x0=parseFloat(t)},y_0:function(t){a.y0=parseFloat(t)},k_0:function(t){a.k0=parseFloat(t)},k:function(t){a.k0=parseFloat(t)},a:function(t){a.a=parseFloat(t)},b:function(t){a.b=parseFloat(t)},r:function(t){a.a=a.b=parseFloat(t)},r_a:function(){a.R_A=!0},zone:function(t){a.zone=parseInt(t,10)},south:function(){a.utmSouth=!0},towgs84:function(t){a.datum_params=t.split(",").map((function(t){return parseFloat(t)}))},to_meter:function(t){a.to_meter=parseFloat(t)},units:function(t){a.units=t;var i=_(l,t);i&&(a.to_meter=i.to_meter)},from_greenwich:function(t){a.from_greenwich=t*e},pm:function(t){var i=_(u,t);a.from_greenwich=(i||parseFloat(t))*e},nadgrids:function(t){"@null"===t?a.datumCode="none":a.nadgrids=t},axis:function(t){var i="ewnsud";3===t.length&&-1!==i.indexOf(t.substr(0,1))&&-1!==i.indexOf(t.substr(1,1))&&-1!==i.indexOf(t.substr(2,1))&&(a.axis=t)},approx:function(){a.approx=!0},over:function(){a.over=!0}};for(i in r)s=r[i],i in n?"function"==typeof(h=n[i])?h(s):a[h]=s:a[i]=s;return"string"==typeof a.datumCode&&"WGS84"!==a.datumCode&&(a.datumCode=a.datumCode.toLowerCase()),a.projStr=t,a}class g{static getId(t){const i=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return i&&i.length>=3?{authority:i[1],code:parseInt(i[2],10)}:null}static convertUnit(t,i="unit"){if(!t||t.length<3)return{type:i,name:"unknown",conversion_factor:null};const s=t[1],h=parseFloat(t[2])||null,a=t.find((t=>Array.isArray(t)&&"ID"===t[0]));return{type:i,name:s,conversion_factor:h,id:a?{authority:a[1],code:parseInt(a[2],10)}:null}}static convertAxis(t){const i=t[1]||"Unknown";let s;const h=i.match(/^\((.)\)$/);if(h){const i=h[1].toUpperCase();if("E"===i)s="east";else if("N"===i)s="north";else if("U"===i)s="up";else{if(!t[2])throw new Error(`Unknown axis abbreviation: ${i}`);s=t[2]}}else s=t[2]||"unknown";const a=t.find((t=>Array.isArray(t)&&"ORDER"===t[0])),e=a?parseInt(a[1],10):null,r=t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])));return{name:i,direction:s,unit:this.convertUnit(r),order:e}}static extractAxes(t){return t.filter((t=>Array.isArray(t)&&"AXIS"===t[0])).map((t=>this.convertAxis(t))).sort(((t,i)=>(t.order||0)-(i.order||0)))}static convert(t,i={}){switch(t[0]){case"PROJCRS":i.type="ProjectedCRS",i.name=t[1],i.base_crs=t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0]))):null,i.conversion=t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"CONVERSION"===t[0]))):null;const s=t.find((t=>Array.isArray(t)&&"CS"===t[0]));s&&(i.coordinate_system={type:s[1],axis:this.extractAxes(t)});const h=t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]));if(h){const t=this.convertUnit(h);i.coordinate_system.unit=t}i.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":i.type="GEODCRS"===t[0]?"GeodeticCRS":"GeographicCRS",i.name=t[1];const a=t.find((t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0])));if(a){const s=this.convert(a);"ENSEMBLE"===a[0]?i.datum_ensemble=s:i.datum=s;const h=t.find((t=>Array.isArray(t)&&"PRIMEM"===t[0]));h&&"Greenwich"!==h[1]&&(s.prime_meridian={name:h[1],longitude:parseFloat(h[2])})}i.coordinate_system={type:"ellipsoidal",axis:this.extractAxes(t)},i.id=this.getId(t);break;case"DATUM":i.type="GeodeticReferenceFrame",i.name=t[1],i.ellipsoid=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]))):null;break;case"ENSEMBLE":i.type="DatumEnsemble",i.name=t[1],i.members=t.filter((t=>Array.isArray(t)&&"MEMBER"===t[0])).map((t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)})));const e=t.find((t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]));e&&(i.accuracy=parseFloat(e[1]));const r=t.find((t=>Array.isArray(t)&&"ELLIPSOID"===t[0]));r&&(i.ellipsoid=this.convert(r)),i.id=this.getId(t);break;case"ELLIPSOID":i.type="Ellipsoid",i.name=t[1],i.semi_major_axis=parseFloat(t[2]),i.inverse_flattening=parseFloat(t[3]),t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]))&&this.convert(t.find((t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])),i);break;case"CONVERSION":i.type="Conversion",i.name=t[1],i.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,i.parameters=t.filter((t=>Array.isArray(t)&&"PARAMETER"===t[0])).map((t=>this.convert(t)));break;case"METHOD":i.type="Method",i.name=t[1],i.id=this.getId(t);break;case"PARAMETER":i.type="Parameter",i.name=t[1],i.value=parseFloat(t[2]),i.unit=this.convertUnit(t.find((t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0])))),i.id=this.getId(t);break;case"BOUNDCRS":i.type="BoundCRS";const n=t.find((t=>Array.isArray(t)&&"SOURCECRS"===t[0]));if(n){const t=n.find((t=>Array.isArray(t)));i.source_crs=t?this.convert(t):null}const o=t.find((t=>Array.isArray(t)&&"TARGETCRS"===t[0]));if(o){const t=o.find((t=>Array.isArray(t)));i.target_crs=t?this.convert(t):null}const M=t.find((t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]));i.transformation=M?this.convert(M):null;break;case"ABRIDGEDTRANSFORMATION":if(i.type="Transformation",i.name=t[1],i.method=t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))?this.convert(t.find((t=>Array.isArray(t)&&"METHOD"===t[0]))):null,i.parameters=t.filter((t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0]))).map((t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0)),7===i.parameters.length){const t=i.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}i.id=this.getId(t);break;case"AXIS":i.coordinate_system||(i.coordinate_system={type:"unspecified",axis:[]}),i.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const u=this.convertUnit(t,"LinearUnit");i.coordinate_system&&i.coordinate_system.axis&&i.coordinate_system.axis.forEach((t=>{t.unit||(t.unit=u)})),u.conversion_factor&&1!==u.conversion_factor&&i.semi_major_axis&&(i.semi_major_axis={value:i.semi_major_axis,unit:u});break;default:i.keyword=t[0]}return i}}class w extends g{static convert(t,i={}){return super.convert(t,i),i.coordinate_system&&"Cartesian"===i.coordinate_system.subtype&&delete i.coordinate_system,i.usage&&delete i.usage,i}}class S extends g{static convert(t,i={}){super.convert(t,i);const s=t.find((t=>Array.isArray(t)&&"CS"===t[0]));s&&(i.coordinate_system={subtype:s[1],axis:this.extractAxes(t)});const h=t.find((t=>Array.isArray(t)&&"USAGE"===t[0]));if(h){const t=h.find((t=>Array.isArray(t)&&"SCOPE"===t[0])),s=h.find((t=>Array.isArray(t)&&"AREA"===t[0])),a=h.find((t=>Array.isArray(t)&&"BBOX"===t[0]));i.usage={},t&&(i.usage.scope=t[1]),s&&(i.usage.area=s[1]),a&&(i.usage.bbox=a.slice(1))}return i}}var E=/\s/,G=/[A-Za-z]/,v=/[A-Za-z84_]/,P=/[,\]]/,d=/[\d\.E\-\+]/;function m(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=1}function N(t,i,s){Array.isArray(i)&&(s.unshift(i),i=null);var h=s.reduce((function(t,i){return p(i,t),t}),i?{}:t);i&&(t[i]=h)}function p(t,i){if(Array.isArray(t)){var s=t.shift();if("PARAMETER"===s&&(s=t.shift()),1===t.length)return Array.isArray(t[0])?(i[s]={},void p(t[0],i[s])):void(i[s]=t[0]);if(t.length)if("TOWGS84"!==s){if("AXIS"===s)return s in i||(i[s]=[]),void i[s].push(t);var h;switch(Array.isArray(s)||(i[s]={}),s){case"UNIT":case"PRIMEM":case"VERT_DATUM":return i[s]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&p(t[2],i[s]));case"SPHEROID":case"ELLIPSOID":return i[s]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&p(t[3],i[s]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void N(i,s,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],N(i,s,t),void(i[s].type=s);default:for(h=-1;++h<t.length;)if(!Array.isArray(t[h]))return p(t,i[s]);return N(i,s,t)}}else i[s]=t;else i[s]=!0}else i[t]=!0}function b(t){return.017453292519943295*t}function A(t){const i=(t.projName||"").toLowerCase().replace(/_/g," ");t.long0||!t.longc||"albers conic equal area"!==i&&"lambert azimuthal equal area"!==i||(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==i&&"polar stereographic (variant b)"!==i?t.lat_ts||!t.lat0||"polar stereographic"!==i&&"polar stereographic (variant a)"!==i||(t.lat_ts=t.lat0,t.lat0=b(t.lat0>0?90:-90),delete t.lat1):(t.lat0=b(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function y(t){let i={units:null,to_meter:void 0};return"string"==typeof t?(i.units=t.toLowerCase(),"metre"===i.units&&(i.units="meter"),"meter"===i.units&&(i.to_meter=1)):t&&t.name&&(i.units=t.name.toLowerCase(),"metre"===i.units&&(i.units="meter"),i.to_meter=t.conversion_factor),i}function I(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function R(t,i){t.ellipsoid.radius?(i.a=t.ellipsoid.radius,i.rf=0):(i.a=I(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?i.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(i.rf=i.a/(i.a-I(t.ellipsoid.semi_minor_axis))))}function C(t,i={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(C(t.source_crs,i),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?i.nadgrids=t.transformation.parameters[0].value:i.datum_params=t.transformation.parameters.map((t=>t.value))),i):(Object.keys(t).forEach((s=>{const h=t[s];if(null!==h)switch(s){case"name":if(i.srsCode)break;i.name=h,i.srsCode=h;break;case"type":"GeographicCRS"===h?i.projName="longlat":"GeodeticCRS"===h?i.projName=t.coordinate_system&&"Cartesian"===t.coordinate_system.subtype?"geocent":"longlat":"ProjectedCRS"===h&&t.conversion&&t.conversion.method&&(i.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":h.ellipsoid&&(i.ellps=h.ellipsoid.name,R(h,i)),h.prime_meridian&&(i.from_greenwich=h.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":i.ellps=h.name,R(h,i);break;case"prime_meridian":i.long0=(h.longitude||0)*Math.PI/180;break;case"coordinate_system":if(h.axis){const t={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},s=h.axis.map((i=>t[i.direction.toLowerCase()]));if(s.every(Boolean)&&(i.axis=s.join(""),2===i.axis.length&&(i.axis+="u")),h.unit){const{units:t,to_meter:s}=y(h.unit);i.units=t,i.to_meter=s}else if(h.axis[0]&&h.axis[0].unit){const{units:t,to_meter:s}=y(h.axis[0].unit);i.units=t,i.to_meter=s}}break;case"id":h.authority&&h.code&&(i.title=h.authority+":"+h.code);break;case"conversion":h.method&&h.method.name&&(i.projName=h.method.name),h.parameters&&h.parameters.forEach((t=>{const s=t.name.toLowerCase().replace(/\s+/g,"_"),h=t.value;i[s]=t.unit&&t.unit.conversion_factor?h*t.unit.conversion_factor:"degree"===t.unit?h*Math.PI/180:h}));break;case"unit":h.name&&(i.units=h.name.toLowerCase(),"metre"===i.units&&(i.units="meter")),h.conversion_factor&&(i.to_meter=h.conversion_factor);break;case"base_crs":C(h,i),i.datumCode=h.id?h.id.authority+"_"+h.id.code:h.name}})),void 0!==i.latitude_of_false_origin&&(i.lat0=i.latitude_of_false_origin),void 0!==i.longitude_of_false_origin&&(i.long0=i.longitude_of_false_origin),void 0!==i.latitude_of_standard_parallel&&(i.lat0=i.latitude_of_standard_parallel,i.lat1=i.latitude_of_standard_parallel),void 0!==i.latitude_of_1st_standard_parallel&&(i.lat1=i.latitude_of_1st_standard_parallel),void 0!==i.latitude_of_2nd_standard_parallel&&(i.lat2=i.latitude_of_2nd_standard_parallel),void 0!==i.latitude_of_projection_centre&&(i.lat0=i.latitude_of_projection_centre),void 0!==i.longitude_of_projection_centre&&(i.longc=i.longitude_of_projection_centre),void 0!==i.easting_at_false_origin&&(i.x0=i.easting_at_false_origin),void 0!==i.northing_at_false_origin&&(i.y0=i.northing_at_false_origin),void 0!==i.latitude_of_natural_origin&&(i.lat0=i.latitude_of_natural_origin),void 0!==i.longitude_of_natural_origin&&(i.long0=i.longitude_of_natural_origin),void 0!==i.longitude_of_origin&&(i.long0=i.longitude_of_origin),void 0!==i.false_easting&&(i.x0=i.false_easting),i.easting_at_projection_centre&&(i.x0=i.easting_at_projection_centre),void 0!==i.false_northing&&(i.y0=i.false_northing),i.northing_at_projection_centre&&(i.y0=i.northing_at_projection_centre),void 0!==i.standard_parallel_1&&(i.lat1=i.standard_parallel_1),void 0!==i.standard_parallel_2&&(i.lat2=i.standard_parallel_2),void 0!==i.scale_factor_at_natural_origin&&(i.k0=i.scale_factor_at_natural_origin),void 0!==i.scale_factor_at_projection_centre&&(i.k0=i.scale_factor_at_projection_centre),void 0!==i.scale_factor_on_pseudo_standard_parallel&&(i.k0=i.scale_factor_on_pseudo_standard_parallel),void 0!==i.azimuth&&(i.alpha=i.azimuth),void 0!==i.azimuth_at_projection_centre&&(i.alpha=i.azimuth_at_projection_centre),i.angle_from_rectified_to_skew_grid&&(i.rectified_grid_angle=i.angle_from_rectified_to_skew_grid),A(i),i):t}m.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;E.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case 1:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},m.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(P.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},m.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=1)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=1,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},m.prototype.number=function(t){if(!d.test(t)){if(P.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},m.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},m.prototype.keyword=function(t){if(v.test(t))this.word+=t;else{if("["===t){var i=[];return i.push(this.word),this.level++,null===this.root?this.root=i:this.currentObject.push(i),this.stack.push(this.currentObject),this.currentObject=i,void(this.state=1)}if(!P.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},m.prototype.neutral=function(t){if(G.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(d.test(t))return this.word=t,void(this.state=3);if(!P.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},m.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};var k=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function O(t){for(var i=Object.keys(t),s=0,h=i.length;s<h;++s){var a=i[s];-1!==k.indexOf(a)&&T(t[a]),"object"==typeof t[a]&&O(t[a])}}function T(t){if(t.AUTHORITY){var i=Object.keys(t.AUTHORITY)[0];i&&i in t.AUTHORITY&&(t.title=i+":"+t.AUTHORITY[i])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):t.projName="object"==typeof t.PROJECTION?Object.keys(t.PROJECTION)[0]:t.PROJECTION,t.AXIS){for(var s="",h=0,a=t.AXIS.length;h<a;++h){var e=[t.AXIS[h][0].toLowerCase(),t.AXIS[h][1].toLowerCase()];-1!==e[0].indexOf("north")||("y"===e[0]||"lat"===e[0])&&"north"===e[1]?s+="n":-1!==e[0].indexOf("south")||("y"===e[0]||"lat"===e[0])&&"south"===e[1]?s+="s":-1!==e[0].indexOf("east")||("x"===e[0]||"lon"===e[0])&&"east"===e[1]?s+="e":-1===e[0].indexOf("west")&&("x"!==e[0]&&"lon"!==e[0]||"west"!==e[1])||(s+="w")}2===s.length&&(s+="u"),3===s.length&&(t.axis=s)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var r=t.GEOGCS;function n(i){return i*(t.to_meter||1)}"GEOGCS"===t.type&&(r=t),r&&(t.datumCode=r.DATUM?r.DATUM.name.toLowerCase():r.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),r.DATUM&&r.DATUM.SPHEROID&&(t.ellps=r.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=r.DATUM.SPHEROID.a,t.rf=parseFloat(r.DATUM.SPHEROID.rf)),r.DATUM&&r.DATUM.TOWGS84&&(t.datum_params=r.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=b(t.rectified_grid_angle)),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",b],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",b],["x0","false_easting",n],["y0","false_northing",n],["long0","central_meridian",b],["lat0","latitude_of_origin",b],["lat0","standard_parallel_1",b],["lat1","standard_parallel_1",b],["lat2","standard_parallel_2",b],["azimuth","Azimuth"],["alpha","azimuth",b],["srsCode","name"]].forEach((function(i){return function(t,i){var s=i[0],h=i[1];!(s in t)&&h in t&&(t[s]=t[h],3===i.length&&(t[s]=i[2](t[s])))}(t,i)})),A(t)}function F(t){if("object"==typeof t)return C(t);const i=function(t){const i=t.toUpperCase();return i.includes("PROJCRS")||i.includes("GEOGCRS")||i.includes("BOUNDCRS")||i.includes("VERTCRS")||i.includes("LENGTHUNIT")||i.includes("ANGLEUNIT")||i.includes("SCALEUNIT")?"WKT2":(i.includes("PROJCS")||i.includes("GEOGCS")||i.includes("LOCAL_CS")||i.includes("VERT_CS")||i.includes("UNIT"),"WKT1")}(t);var s=new m(t).output();if("WKT2"===i)return C(function(t){const i=function(t){return t.find((t=>Array.isArray(t)&&"USAGE"===t[0]))?"2019":(t.find((t=>Array.isArray(t)&&"CS"===t[0])),"2015")}(t);return("2019"===i?S:w).convert(t)}(s));var h=s[0],a={};return p(s,a),O(a),a[h]}function L(t){var i=this;if(2===arguments.length){var s=arguments[1];"string"==typeof s?L[t]="+"===s.charAt(0)?c(arguments[1]):F(arguments[1]):s&&"object"==typeof s&&!("projName"in s)?L[t]=F(arguments[1]):(L[t]=s,s||delete L[t])}else if(1===arguments.length){if(Array.isArray(t))return t.map((function(t){return Array.isArray(t)?L.apply(i,t):L(t)}));if("string"==typeof t){if(t in L)return L[t]}else"EPSG"in t?L["EPSG:"+t.EPSG]=t:"ESRI"in t?L["ESRI:"+t.ESRI]=t:"IAU2000"in t?L["IAU2000:"+t.IAU2000]=t:console.log(t);return}}!function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var i=1;i<=60;++i)t("EPSG:"+(32600+i),"+proj=utm +zone="+i+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+i),"+proj=utm +zone="+i+" +south +datum=WGS84 +units=m");t("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),t("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}(L);var D=["3857","900913","3785","102113"];function x(t,i){var s,h;if(t=t||{},!i)return t;for(h in i)void 0!==(s=i[h])&&(t[h]=s);return t}function U(t,i,s){var h=t*i;return s/Math.sqrt(1-h*h)}function j(t){return t<0?-1:1}function z(t,i){return i||Math.abs(t)<=M?t:t-j(t)*o}function W(t,i,s){var a=t*s;return a=Math.pow((1-a)/(1+a),.5*t),Math.tan(.5*(h-i))/a}function q(t,i){for(var s,a,e=.5*t,r=h-2*Math.atan(i),n=0;n<=15;n++)if(s=t*Math.sin(r),r+=a=h-2*Math.atan(i*Math.pow((1-s)/(1+s),e))-r,Math.abs(a)<=1e-10)return r;return-9999}function H(t){return t}var B=["longlat","identity"],V=[{init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.k0=this.sphere?Math.cos(this.lat_ts):U(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k0=this.k?this.k:1)},forward:function(t){var i,s,e=t.x,o=t.y;if(o*r>90&&o*r<-90&&e*r>180&&e*r<-180)return null;if(Math.abs(Math.abs(o)-h)<=a)return null;if(this.sphere)i=this.x0+this.a*this.k0*z(e-this.long0,this.over),s=this.y0+this.a*this.k0*Math.log(Math.tan(n+.5*o));else{var M=Math.sin(o),u=W(this.e,o,M);i=this.x0+this.a*this.k0*z(e-this.long0,this.over),s=this.y0-this.a*this.k0*Math.log(u)}return t.x=i,t.y=s,t},inverse:function(t){var i,s,a=t.x-this.x0,e=t.y-this.y0;if(this.sphere)s=h-2*Math.atan(Math.exp(-e/(this.a*this.k0)));else{var r=Math.exp(-e/(this.a*this.k0));if(-9999===(s=q(this.e,r)))return null}return i=z(this.long0+a/(this.a*this.k0),this.over),t.x=i,t.y=s,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]},{init:function(){},forward:H,inverse:H,names:B}],K={},J=[];function Q(t,i){var s=J.length;return t.names?(J[s]=t,t.names.forEach((function(t){K[t.toLowerCase()]=s})),this):(console.log(i),!0)}function Z(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}var X={start:function(){V.forEach(Q)},add:Q,get:function(t){if(!t)return!1;var i=t.toLowerCase();return void 0!==K[i]&&J[K[i]]||(i=Z(i))in K&&J[K[i]]?J[K[i]]:void 0}},Y={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}};const $=Y.WGS84;var tt={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"},EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-0.395026,0.330772,-1.876073,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243648,-1.158828,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,6.681627,-31.611492,-19.848161,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-0.008393,0.000749,-0.010276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"},EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,0.02579,0.00965,0.01166,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"0.06155,-0.01087,-0.04019,0.039492,0.032722,0.032898,-0.009994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.309248,0.324822,0.497299,5.689063"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"},ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"372.87,149.23,585.29"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"},EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"},EPSG_10328:{towgs84:"0,0,0"},EPSG_9782:{towgs84:"0,0,0"},EPSG_9777:{towgs84:"0,0,0"},EPSG_10690:{towgs84:"0,0,0"},EPSG_10639:{towgs84:"0,0,0"},EPSG_10739:{towgs84:"0,0,0"},EPSG_7686:{towgs84:"0,0,0"},EPSG_8900:{towgs84:"0,0,0"},EPSG_5886:{towgs84:"0,0,0"},EPSG_7683:{towgs84:"0,0,0"},EPSG_6668:{towgs84:"0,0,0"},EPSG_20046:{towgs84:"0,0,0"},EPSG_10299:{towgs84:"0,0,0"},EPSG_10310:{towgs84:"0,0,0"},EPSG_10475:{towgs84:"0,0,0"},EPSG_4742:{towgs84:"0,0,0"},EPSG_10671:{towgs84:"0,0,0"},EPSG_10762:{towgs84:"0,0,0"},EPSG_10725:{towgs84:"0,0,0"},EPSG_10791:{towgs84:"0,0,0"},EPSG_10800:{towgs84:"0,0,0"},EPSG_10305:{towgs84:"0,0,0"},EPSG_10941:{towgs84:"0,0,0"},EPSG_10968:{towgs84:"0,0,0"},EPSG_10875:{towgs84:"0,0,0"},EPSG_6318:{towgs84:"0,0,0"},EPSG_10910:{towgs84:"0,0,0"}};for(var it in tt){var st=tt[it];st.datumName&&(tt[st.datumName]=st)}var ht={};async function at(t,i){for(var s=[],h=await i.getImageCount(),a=h-1;a>=0;a--){var e=await i.getImage(a),r=await e.readRasters(),n=[e.getWidth(),e.getHeight()],o=e.getBoundingBox().map(rt),M=[e.fileDirectory.ModelPixelScale[0],e.fileDirectory.ModelPixelScale[1]].map(rt),u=o[0]+(n[0]-1)*M[0],l=o[3]-(n[1]-1)*M[1],f=r[0],_=r[1],c=[];for(let t=n[1]-1;t>=0;t--)for(let i=n[0]-1;i>=0;i--){var g=t*n[0]+i;c.push([-nt(_[g]),nt(f[g])])}s.push({del:M,lim:n,ll:[-u,l],cvs:c})}var w={header:{nSubgrids:h},subgrids:s};return ht[t]=w,w}function et(t){if(0===t.length)return null;var i="@"===t[0];return i&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!i,grid:null,isNull:!0}:{name:t,mandatory:!i,grid:ht[t]||null,isNull:!1}}function rt(t){return t*Math.PI/180}function nt(t){return t/3600*Math.PI/180}function ot(t,i,s){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(i,s)))}function Mt(t){return t.map((function(t){return[nt(t.longitudeShift),nt(t.latitudeShift)]}))}function ut(t,i,s){return{name:ot(t,i+8,i+16).trim(),parent:ot(t,i+24,i+24+8).trim(),lowerLatitude:t.getFloat64(i+72,s),upperLatitude:t.getFloat64(i+88,s),lowerLongitude:t.getFloat64(i+104,s),upperLongitude:t.getFloat64(i+120,s),latitudeInterval:t.getFloat64(i+136,s),longitudeInterval:t.getFloat64(i+152,s),gridNodeCount:t.getInt32(i+168,s)}}function lt(t,i,s,h,a){var e=i+176,r=16;!1===a&&(r=8);for(var n=[],o=0;o<s.gridNodeCount;o++){var M={latitudeShift:t.getFloat32(e+o*r,h),longitudeShift:t.getFloat32(e+o*r+4,h)};!1!==a&&(M.latitudeAccuracy=t.getFloat32(e+o*r+8,h),M.longitudeAccuracy=t.getFloat32(e+o*r+12,h)),n.push(M)}return n}function ft(t,i){if(!(this instanceof ft))return new ft(t);this.forward=null,this.inverse=null,this.init=null,this.names=null,i=i||function(t){if(t)throw t};var h=function(t){let i;if(function(t){return"string"==typeof t}(t))if(function(t){return t in L}(t))i=L[t];else if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){i=F(t);var s=function(t){var i=_(t,"extension");if(i)return _(i,"proj4")}(i);s&&(i=c(s))}else(function(t){return"+"===t[0]})(t)&&(i=c(t));else i="projName"in t?t:F(t);return i&&function(t){if(t.title)return 0===t.title.toLowerCase().indexOf("epsg:")&&D.indexOf(t.title.substr(5))>-1;var i=_(t,"authority");if(i){var s=_(i,"epsg");return s&&D.indexOf(s)>-1}}(i)?L["EPSG:3857"]:i}(t);if("object"==typeof h){var e=ft.projections.get(h.projName);if(e){if(h.datumCode&&"none"!==h.datumCode){var r=_(tt,h.datumCode);r&&(h.datum_params=h.datum_params||(r.towgs84?r.towgs84.split(","):null),h.ellps=r.ellipse,h.datumName=r.datumName?r.datumName:h.datumCode)}h.k0=h.k0||1,h.axis=h.axis||"enu",h.ellps=h.ellps||"wgs84",h.lat1=h.lat1||h.lat0;var n,o,M,u,l,f,g=function(t,i,s,h,e){if(!t){var r=_(Y,h);r||(r=$),t=r.a,i=r.b,s=r.rf}return s&&!i&&(i=(1-1/s)*t),(0===s||Math.abs(t-i)<a)&&(e=!0,i=t),{a:t,b:i,rf:s,sphere:e}}(h.a,h.b,h.rf,h.ellps,h.sphere),w=(l=((M=(n=g.a)*n)-(u=(o=g.b)*o))/M,f=0,h.R_A?(M=(n*=1-l*(.16666666666666666+l*(.04722222222222222+.022156084656084655*l)))*n,l=0):f=Math.sqrt(l),{es:l,e:f,ep2:(M-u)/u}),S=function(t){return void 0===t?null:t.split(",").map(et)}(h.nadgrids),E=h.datum||function(t,i,h,a,e,r,n){var o={};return o.datum_type=void 0===t||"none"===t?5:4,i&&(o.datum_params=i.map(parseFloat),0===o.datum_params[0]&&0===o.datum_params[1]&&0===o.datum_params[2]||(o.datum_type=1),o.datum_params.length>3&&(0===o.datum_params[3]&&0===o.datum_params[4]&&0===o.datum_params[5]&&0===o.datum_params[6]||(o.datum_type=2,o.datum_params[3]*=s,o.datum_params[4]*=s,o.datum_params[5]*=s,o.datum_params[6]=o.datum_params[6]/1e6+1))),n&&(o.datum_type=3,o.grids=n),o.a=h,o.b=a,o.es=e,o.ep2=r,o}(h.datumCode,h.datum_params,g.a,g.b,w.es,w.ep2,S);x(this,h),x(this,e),this.a=g.a,this.b=g.b,this.rf=g.rf,this.sphere=g.sphere,this.es=w.es,this.e=w.e,this.ep2=w.ep2,this.datum=E,"init"in this&&"function"==typeof this.init&&this.init(),i(null,this)}else i("Could not get projection name from: "+t)}else i("Could not parse to valid json: "+t)}function _t(t,i,s){var a,e,r,n=t.x,o=t.y,M=t.z?t.z:0;if(o<-h&&o>-1.001*h)o=-h;else if(o>h&&o<1.001*h)o=h;else{if(o<-h)return{x:-1/0,y:-1/0,z:t.z};if(o>h)return{x:1/0,y:1/0,z:t.z}}return n>Math.PI&&(n-=2*Math.PI),e=Math.sin(o),r=Math.cos(o),{x:((a=s/Math.sqrt(1-i*(e*e)))+M)*r*Math.cos(n),y:(a+M)*r*Math.sin(n),z:(a*(1-i)+M)*e}}function ct(t,i,s,h){var a,e,r,n,o,M,u,l,f,_,c,g,w,S,E,G=t.x,v=t.y,P=t.z?t.z:0;if(a=Math.sqrt(G*G+v*v),e=Math.sqrt(G*G+v*v+P*P),a/s<1e-12){if(S=0,e/s<1e-12)return E=-h,{x:t.x,y:t.y,z:t.z}}else S=Math.atan2(v,G);r=P/e,l=(n=a/e)*(1-i)*(o=1/Math.sqrt(1-i*(2-i)*n*n)),f=r*o,w=0;do{w++,M=i*(u=s/Math.sqrt(1-i*f*f))/(u+(E=a*l+P*f-u*(1-i*f*f))),g=(c=r*(o=1/Math.sqrt(1-M*(2-M)*n*n)))*l-(_=n*(1-M)*o)*f,l=_,f=c}while(g*g>1e-24&&w<30);return{x:S,y:Math.atan(c/Math.abs(_)),z:E}}function gt(t){return 1===t||2===t}function wt(t,i,s){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var h={x:-s.x,y:s.y},a={x:Number.NaN,y:Number.NaN},e=[];t:for(var n=0;n<t.grids.length;n++){var o=t.grids[n];if(e.push(o.name),o.isNull){a=h;break}if(null!==o.grid)for(var M=o.grid.subgrids,u=0,l=M.length;u<l;u++){var f=M[u],_=(Math.abs(f.del[1])+Math.abs(f.del[0]))/1e4;if(!(f.ll[1]-_>h.y||f.ll[0]-_>h.x||f.ll[1]+(f.lim[1]-1)*f.del[1]+_<h.y||f.ll[0]+(f.lim[0]-1)*f.del[0]+_<h.x||(a=St(h,i,f),isNaN(a.x))))break t}else if(o.mandatory)return console.log("Unable to find mandatory grid '"+o.name+"'"),-1}return isNaN(a.x)?(console.log("Failed to find a grid shift table for location '"+-h.x*r+" "+h.y*r+" tried: '"+e+"'"),-1):(s.x=-a.x,s.y=a.y,0)}function St(t,i,s){var h={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return h;var a={x:t.x,y:t.y};a.x-=s.ll[0],a.y-=s.ll[1],a.x=z(a.x-Math.PI)+Math.PI;var e=Et(a,s);if(i){if(isNaN(e.x))return h;e.x=a.x-e.x,e.y=a.y-e.y;var r,n,o=9;do{if(n=Et(e,s),isNaN(n.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}e.x+=(r={x:a.x-(n.x+e.x),y:a.y-(n.y+e.y)}).x,e.y+=r.y}while(o--&&Math.abs(r.x)>1e-12&&Math.abs(r.y)>1e-12);if(o<0)return console.log("Inverse grid shift iterator failed to converge."),h;h.x=z(e.x+s.ll[0]),h.y=e.y+s.ll[1]}else isNaN(e.x)||(h.x=t.x+e.x,h.y=t.y+e.y);return h}function Et(t,i){var s,h={x:t.x/i.del[0],y:t.y/i.del[1]},a=Math.floor(h.x),e=Math.floor(h.y),r=h.x-1*a,n=h.y-1*e,o={x:Number.NaN,y:Number.NaN};if(a<0||a>=i.lim[0])return o;if(e<0||e>=i.lim[1])return o;var M=i.cvs[s=e*i.lim[0]+a][0],u=i.cvs[s][1];s++;var l=i.cvs[s][0],f=i.cvs[s][1],_=i.cvs[s+=i.lim[0]][0],c=i.cvs[s][1];s--;var g=i.cvs[s][1],w=r*n,S=r*(1-n),E=(1-r)*(1-n),G=(1-r)*n;return o.x=E*M+S*l+G*i.cvs[s][0]+w*_,o.y=E*u+S*f+G*g+w*c,o}function Gt(t,i,s){var h,a,e,r=s.x,n=s.y,o=s.z||0,M={};for(e=0;e<3;e++)if(!i||2!==e||void 0!==s.z)switch(0===e?(h=r,a=-1!=="ew".indexOf(t.axis[e])?"x":"y"):1===e?(h=n,a=-1!=="ns".indexOf(t.axis[e])?"y":"x"):(h=o,a="z"),t.axis[e]){case"e":case"n":M[a]=h;break;case"w":case"s":M[a]=-h;break;case"u":void 0!==s[a]&&(M.z=h);break;case"d":void 0!==s[a]&&(M.z=-h);break;default:return null}return M}function vt(t){var i={x:t[0],y:t[1]};return t.length>2&&(i.z=t[2]),t.length>3&&(i.m=t[3]),i}function Pt(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function dt(s,h,a,n){var o,M=void 0!==(a=Array.isArray(a)?vt(a):{x:a.x,y:a.y,z:a.z,m:a.m}).z;if(function(t){Pt(t.x),Pt(t.y)}(a),s.datum&&h.datum&&function(t,i){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==i.datumCode||(1===i.datum.datum_type||2===i.datum.datum_type||3===i.datum.datum_type)&&"WGS84"!==t.datumCode}(s,h)&&(a=dt(s,o=new ft("WGS84"),a,n),s=o),n&&"enu"!==s.axis&&(a=Gt(s,!1,a)),"longlat"===s.projName)a={x:a.x*e,y:a.y*e,z:a.z||0};else if(s.to_meter&&(a={x:a.x*s.to_meter,y:a.y*s.to_meter,z:a.z||0}),!(a=s.inverse(a)))return;if(s.from_greenwich&&(a.x+=s.from_greenwich),a=function(s,h,a){if(function(t,i){return t.datum_type===i.datum_type&&!(t.a!==i.a||Math.abs(t.es-i.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]:2!==t.datum_type||t.datum_params[0]===i.datum_params[0]&&t.datum_params[1]===i.datum_params[1]&&t.datum_params[2]===i.datum_params[2]&&t.datum_params[3]===i.datum_params[3]&&t.datum_params[4]===i.datum_params[4]&&t.datum_params[5]===i.datum_params[5]&&t.datum_params[6]===i.datum_params[6])}(s,h))return a;if(5===s.datum_type||5===h.datum_type)return a;var e=s.a,r=s.es;if(3===s.datum_type){if(0!==wt(s,!1,a))return;e=t,r=i}var n=h.a,o=h.b,M=h.es;return 3===h.datum_type&&(n=t,o=6356752.314,M=i),r!==M||e!==n||gt(s.datum_type)||gt(h.datum_type)?(a=_t(a,r,e),gt(s.datum_type)&&(a=function(t,i,s){if(1===i)return{x:t.x+s[0],y:t.y+s[1],z:t.z+s[2]};if(2===i){var h=s[3],a=s[4],e=s[5],r=s[6];return{x:r*(t.x-e*t.y+a*t.z)+s[0],y:r*(e*t.x+t.y-h*t.z)+s[1],z:r*(-a*t.x+h*t.y+t.z)+s[2]}}}(a,s.datum_type,s.datum_params)),gt(h.datum_type)&&(a=function(t,i,s){if(1===i)return{x:t.x-s[0],y:t.y-s[1],z:t.z-s[2]};if(2===i){var h=s[3],a=s[4],e=s[5],r=s[6],n=(t.x-s[0])/r,o=(t.y-s[1])/r,M=(t.z-s[2])/r;return{x:n+e*o-a*M,y:-e*n+o+h*M,z:a*n-h*o+M}}}(a,h.datum_type,h.datum_params)),a=ct(a,M,n,o),3!==h.datum_type||0===wt(h,!0,a)?a:void 0):a}(s.datum,h.datum,a))return h.from_greenwich&&(a={x:a.x-h.from_greenwich,y:a.y,z:a.z||0}),"longlat"===h.projName?a={x:a.x*r,y:a.y*r,z:a.z||0}:(a=h.forward(a),h.to_meter&&(a={x:a.x/h.to_meter,y:a.y/h.to_meter,z:a.z||0})),n&&"enu"!==h.axis?Gt(h,!0,a):(a&&!M&&delete a.z,a)}(ft.projections=X).start();var mt=ft("WGS84");function Nt(t,i,s,h){var a,e,r;return Array.isArray(s)?(a=dt(t,i,s,h)||{x:NaN,y:NaN},s.length>2?void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name?"number"==typeof a.z?[a.x,a.y,a.z].concat(s.slice(3)):[a.x,a.y,s[2]].concat(s.slice(3)):[a.x,a.y].concat(s.slice(2)):[a.x,a.y]):(e=dt(t,i,s,h),2===(r=Object.keys(s)).length||r.forEach((function(h){if(void 0!==t.name&&"geocent"===t.name||void 0!==i.name&&"geocent"===i.name){if("x"===h||"y"===h||"z"===h)return}else if("x"===h||"y"===h)return;e[h]=s[h]})),e)}function pt(t){return t instanceof ft?t:"object"==typeof t&&"oProj"in t?t.oProj:ft(t)}var bt="AJSAJS",At="AFAFAF",yt=65,It=73,Rt=79,Ct={forward:kt,inverse:function(t){var i=Lt(xt(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat,i.lon,i.lat]:[i.left,i.bottom,i.right,i.top]},toPoint:Ot};function kt(t,i){return i=i||5,function(t,i){var s,h,a,e,r,n,o,M,u,l,f,_="00000"+t.easting,c="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(u=t.easting,l=t.northing,f=Dt(t.zoneNumber),s=Math.floor(u/1e5),h=Math.floor(l/1e5)%20,e=bt.charCodeAt(a=f-1),r=At.charCodeAt(a),M=!1,(n=e+s-1)>90&&(n=n-90+yt-1,M=!0),(n===It||e<It&&n>It||(n>It||e<It)&&M)&&n++,(n===Rt||e<Rt&&n>Rt||(n>Rt||e<Rt)&&M)&&++n===It&&n++,n>90&&(n=n-90+yt-1),(o=r+h)>86?(o=o-86+yt-1,M=!0):M=!1,(o===It||r<It&&o>It||(o>It||r<It)&&M)&&o++,(o===Rt||r<Rt&&o>Rt||(o>Rt||r<Rt)&&M)&&++o===It&&o++,o>86&&(o=o-86+yt-1),String.fromCharCode(n)+String.fromCharCode(o))+_.substr(_.length-5,i)+c.substr(c.length-5,i)}(function(t){var i,s,h,a,e,r,n,o=t.lat,M=t.lon,u=6378137,l=.00669438,f=.9996,_=Tt(o),c=Tt(M);n=Math.floor((M+180)/6)+1,180===M&&(n=60),o>=56&&o<64&&M>=3&&M<12&&(n=32),o>=72&&o<84&&(M>=0&&M<9?n=31:M>=9&&M<21?n=33:M>=21&&M<33?n=35:M>=33&&M<42&&(n=37)),r=Tt(6*(n-1)-180+3),i=.006739496752268451,s=u/Math.sqrt(1-l*Math.sin(_)*Math.sin(_)),h=Math.tan(_)*Math.tan(_),a=i*Math.cos(_)*Math.cos(_);var g,w,S=f*s*((e=Math.cos(_)*(c-r))+(1-h+a)*e*e*e/6+(5-18*h+h*h+72*a-58*i)*e*e*e*e*e/120)+5e5,E=f*(u*(.9983242984503243*_-.002514607064228144*Math.sin(2*_)+2639046602129982e-21*Math.sin(4*_)-3.418046101696858e-9*Math.sin(6*_))+s*Math.tan(_)*(e*e/2+(5-h+9*a+4*a*a)*e*e*e*e/24+(61-58*h+h*h+600*a-2.2240339282485886)*e*e*e*e*e*e/720));return o<0&&(E+=1e7),{northing:Math.round(E),easting:Math.round(S),zoneNumber:n,zoneLetter:(g=o,w="Z",84>=g&&g>=72?w="X":72>g&&g>=64?w="W":64>g&&g>=56?w="V":56>g&&g>=48?w="U":48>g&&g>=40?w="T":40>g&&g>=32?w="S":32>g&&g>=24?w="R":24>g&&g>=16?w="Q":16>g&&g>=8?w="P":8>g&&g>=0?w="N":0>g&&g>=-8?w="M":-8>g&&g>=-16?w="L":-16>g&&g>=-24?w="K":-24>g&&g>=-32?w="J":-32>g&&g>=-40?w="H":-40>g&&g>=-48?w="G":-48>g&&g>=-56?w="F":-56>g&&g>=-64?w="E":-64>g&&g>=-72?w="D":-72>g&&g>=-80&&(w="C"),w)}}({lat:t[1],lon:t[0]}),i)}function Ot(t){var i=Lt(xt(t.toUpperCase()));return i.lat&&i.lon?[i.lon,i.lat]:[(i.left+i.right)/2,(i.top+i.bottom)/2]}function Tt(t){return t*(Math.PI/180)}function Ft(t){return t/Math.PI*180}function Lt(t){var i=t.northing,s=t.easting,h=t.zoneLetter,a=t.zoneNumber;if(a<0||a>60)return null;var e,r,n,o,M,u,l,f,_,c=.9996,g=6378137,w=.00669438,S=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),E=s-5e5,G=i;h<"N"&&(G-=1e7),l=6*(a-1)-180+3,e=.006739496752268451,_=(f=G/c/6367449.145945056)+(3*S/2-27*S*S*S/32)*Math.sin(2*f)+(21*S*S/16-55*S*S*S*S/32)*Math.sin(4*f)+151*S*S*S/96*Math.sin(6*f),r=g/Math.sqrt(1-w*Math.sin(_)*Math.sin(_)),n=Math.tan(_)*Math.tan(_),o=e*Math.cos(_)*Math.cos(_),M=.99330562*g/Math.pow(1-w*Math.sin(_)*Math.sin(_),1.5),u=E/(r*c);var v=_-r*Math.tan(_)/M*(u*u/2-(5+3*n+10*o-4*o*o-9*e)*u*u*u*u/24+(61+90*n+298*o+45*n*n-1.6983531815716497-3*o*o)*u*u*u*u*u*u/720);v=Ft(v);var P,d=(u-(1+2*n+o)*u*u*u/6+(5-2*o+28*n-3*o*o+8*e+24*n*n)*u*u*u*u*u/120)/Math.cos(_);if(d=l+Ft(d),t.accuracy){var m=Lt({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});P={top:m.lat,right:m.lon,bottom:v,left:d}}else P={lat:v,lon:d};return P}function Dt(t){var i=t%6;return 0===i&&(i=6),i}function xt(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var i,s=t.length,h=null,a="",e=0;!/[A-Z]/.test(i=t.charAt(e));){if(e>=2)throw"MGRSPoint bad conversion from: "+t;a+=i,e++}var r=parseInt(a,10);if(0===e||e+3>s)throw"MGRSPoint bad conversion from: "+t;var n=t.charAt(e++);if(n<="A"||"B"===n||"Y"===n||n>="Z"||"I"===n||"O"===n)throw"MGRSPoint zone letter "+n+" not handled: "+t;h=t.substring(e,e+=2);for(var o=Dt(r),M=function(t,i){for(var s=bt.charCodeAt(i-1),h=1e5,a=!1;s!==t.charCodeAt(0);){if(++s===It&&s++,s===Rt&&s++,s>90){if(a)throw"Bad character: "+t;s=yt,a=!0}h+=1e5}return h}(h.charAt(0),o),u=function(t,i){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var s=At.charCodeAt(i-1),h=0,a=!1;s!==t.charCodeAt(0);){if(++s===It&&s++,s===Rt&&s++,s>86){if(a)throw"Bad character: "+t;s=yt,a=!0}h+=1e5}return h}(h.charAt(1),o);u<Ut(n);)u+=2e6;var l=s-e;if(l%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var f,_,c,g=l/2,w=0,S=0;return g>0&&(f=1e5/Math.pow(10,g),_=t.substring(e,e+g),w=parseFloat(_)*f,c=t.substring(e+g),S=parseFloat(c)*f),{easting:w+M,northing:S+u,zoneLetter:n,zoneNumber:r,accuracy:f}}function Ut(t){var i;switch(t){case"C":i=11e5;break;case"D":i=2e6;break;case"E":i=28e5;break;case"F":i=37e5;break;case"G":i=46e5;break;case"H":i=55e5;break;case"J":i=64e5;break;case"K":i=73e5;break;case"L":i=82e5;break;case"M":i=91e5;break;case"N":i=0;break;case"P":i=8e5;break;case"Q":i=17e5;break;case"R":i=26e5;break;case"S":i=35e5;break;case"T":i=44e5;break;case"U":i=53e5;break;case"V":i=62e5;break;case"W":i=7e6;break;case"X":i=79e5;break;default:i=-1}if(i>=0)return i;throw"Invalid zone letter: "+t}function jt(t,i,s){if(!(this instanceof jt))return new jt(t,i,s);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===i){var h=t.split(",");this.x=parseFloat(h[0]),this.y=parseFloat(h[1]),this.z=parseFloat(h[2])||0}else this.x=t,this.y=i,this.z=s||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}jt.fromMGRS=function(t){return new jt(Ot(t))},jt.prototype.toMGRS=function(t){return kt([this.x,this.y],t)};var zt=.046875,Wt=.01953125,qt=.01068115234375;function Ht(t){var i=[];i[0]=1-t*(.25+t*(zt+t*(Wt+t*qt))),i[1]=t*(.75-t*(zt+t*(Wt+t*qt)));var s=t*t;return i[2]=s*(.46875-t*(.013020833333333334+.007120768229166667*t)),i[3]=(s*=t)*(.3645833333333333-.005696614583333333*t),i[4]=s*t*.3076171875,i}function Bt(t,i,s,h){return h[0]*t-(s*=i)*(h[1]+(i*=i)*(h[2]+i*(h[3]+i*h[4])))}function Vt(t,i,s){for(var h=1/(1-i),e=t,r=20;r;--r){var n=Math.sin(e),o=1-i*n*n;if(e-=o=(Bt(e,n,Math.cos(e),s)-t)*(o*Math.sqrt(o))*h,Math.abs(o)<a)return e}return e}var Kt={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=Ht(this.es),this.ml0=Bt(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var i,s,h,e=t.y,r=z(t.x-this.long0,this.over),n=Math.sin(e),o=Math.cos(e);if(this.es){var M=o*r,u=Math.pow(M,2),l=this.ep2*Math.pow(o,2),f=Math.pow(l,2),_=Math.abs(o)>a?Math.tan(e):0,c=Math.pow(_,2),g=Math.pow(c,2);i=1-this.es*Math.pow(n,2),M/=Math.sqrt(i);var w=Bt(e,n,o,this.en);s=this.a*(this.k0*M*(1+u/6*(1-c+l+u/20*(5-18*c+g+14*l-58*c*l+u/42*(61+179*g-g*c-479*c)))))+this.x0,h=this.a*(this.k0*(w-this.ml0+n*r*M/2*(1+u/12*(5-c+9*l+4*f+u/30*(61+g-58*c+270*l-330*c*l+u/56*(1385+543*g-g*c-3111*c))))))+this.y0}else{var S=o*Math.sin(r);if(Math.abs(Math.abs(S)-1)<a)return 93;if(s=.5*this.a*this.k0*Math.log((1+S)/(1-S))+this.x0,h=o*Math.cos(r)/Math.sqrt(1-Math.pow(S,2)),(S=Math.abs(h))>=1){if(S-1>a)return 93;h=0}else h=Math.acos(h);e<0&&(h=-h),h=this.a*this.k0*(h-this.lat0)+this.y0}return t.x=s,t.y=h,t},inverse:function(t){var i,s,e,r,n=1/this.a*(t.x-this.x0),o=1/this.a*(t.y-this.y0);if(this.es)if(s=Vt(i=this.ml0+o/this.k0,this.es,this.en),Math.abs(s)<h){var M=Math.sin(s),u=Math.cos(s),l=Math.abs(u)>a?Math.tan(s):0,f=this.ep2*Math.pow(u,2),_=Math.pow(f,2),c=Math.pow(l,2),g=Math.pow(c,2);i=1-this.es*Math.pow(M,2);var w=n*Math.sqrt(i)/this.k0,S=Math.pow(w,2);e=s-(i*=l)*S/(1-this.es)*.5*(1-S/12*(5+3*c-9*f*c+f-4*_-S/30*(61+90*c-252*f*c+45*g+46*f-S/56*(1385+3633*c+4095*g+1574*g*c)))),r=z(this.long0+w*(1-S/6*(1+2*c+f-S/20*(5+28*c+24*g+8*f*c+6*f-S/42*(61+662*c+1320*g+720*g*c))))/u,this.over)}else e=h*j(o),r=0;else{var E=Math.exp(n/this.k0),G=.5*(E-1/E),v=Math.cos(this.lat0+o/this.k0);i=Math.sqrt((1-Math.pow(v,2))/(1+Math.pow(G,2))),e=Math.asin(i),o<0&&(e=-e),r=0===G&&0===v?0:z(Math.atan2(G,v)+this.long0,this.over)}return t.x=r,t.y=e,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Jt(t){var i=Math.exp(t);return(i-1/i)/2}function Qt(t,i){t=Math.abs(t),i=Math.abs(i);var s=Math.max(t,i),h=Math.min(t,i)/(s||1);return s*Math.sqrt(1+Math.pow(h,2))}function Zt(t,i){for(var s,h=2*Math.cos(2*i),a=t.length-1,e=t[a],r=0;--a>=0;)s=h*e-r+t[a],r=e,e=s;return i+s*Math.sin(2*i)}function Xt(t,i,s){for(var h,a,e=Math.sin(i),r=Math.cos(i),n=Jt(s),o=function(t){var i=Math.exp(t);return(i+1/i)/2}(s),M=2*r*o,u=-2*e*n,l=t.length-1,f=t[l],_=0,c=0,g=0;--l>=0;)h=c,a=_,f=M*(c=f)-h-u*(_=g)+t[l],g=u*c-a+M*_;return[(M=e*o)*f-(u=r*n)*g,M*g+u*f]}var Yt={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Kt.init.apply(this),this.forward=Kt.forward,this.inverse=Kt.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),i=t/(2-t),s=i;this.cgb[0]=i*(2+i*(-2/3+i*(i*(116/45+i*(26/45+i*(-2854/675)))-2))),this.cbg[0]=i*(i*(2/3+i*(4/3+i*(-82/45+i*(32/45+i*(4642/4725)))))-2),this.cgb[1]=(s*=i)*(7/3+i*(i*(-227/45+i*(2704/315+i*(2323/945)))-1.6)),this.cbg[1]=s*(5/3+i*(-16/15+i*(-13/9+i*(904/315+i*(-1522/945))))),this.cgb[2]=(s*=i)*(56/15+i*(-136/35+i*(-1262/105+i*(73814/2835)))),this.cbg[2]=s*(-26/15+i*(34/21+i*(1.6+i*(-12686/2835)))),this.cgb[3]=(s*=i)*(4279/630+i*(-332/35+i*(-399572/14175))),this.cbg[3]=s*(1237/630+i*(i*(-24832/14175)-2.4)),this.cgb[4]=(s*=i)*(4174/315+i*(-144838/6237)),this.cbg[4]=s*(-734/315+i*(109598/31185)),this.cgb[5]=(s*=i)*(601676/22275),this.cbg[5]=s*(444337/155925),s=Math.pow(i,2),this.Qn=this.k0/(1+i)*(1+s*(1/4+s*(1/64+s/256))),this.utg[0]=i*(i*(2/3+i*(-37/96+i*(1/360+i*(81/512+i*(-96199/604800)))))-.5),this.gtu[0]=i*(.5+i*(-2/3+i*(5/16+i*(41/180+i*(-127/288+i*(7891/37800)))))),this.utg[1]=s*(-1/48+i*(-1/15+i*(437/1440+i*(-46/105+i*(1118711/3870720))))),this.gtu[1]=s*(13/48+i*(i*(557/1440+i*(281/630+i*(-1983433/1935360)))-.6)),this.utg[2]=(s*=i)*(-17/480+i*(37/840+i*(209/4480+i*(-5569/90720)))),this.gtu[2]=s*(61/240+i*(-103/140+i*(15061/26880+i*(167603/181440)))),this.utg[3]=(s*=i)*(-4397/161280+i*(11/504+i*(830251/7257600))),this.gtu[3]=s*(49561/161280+i*(-179/168+i*(6601661/7257600))),this.utg[4]=(s*=i)*(-4583/161280+i*(108847/3991680)),this.gtu[4]=s*(34729/80640+i*(-3418889/1995840)),this.utg[5]=(s*=i)*(-20648693/638668800),this.gtu[5]=.6650675310896665*s;var h=Zt(this.cbg,this.lat0);this.Zb=-this.Qn*(h+function(t,i){for(var s,h=2*Math.cos(i),a=t.length-1,e=t[a],r=0;--a>=0;)s=h*e-r+t[a],r=e,e=s;return Math.sin(i)*s}(this.gtu,2*h))},forward:function(t){var i=z(t.x-this.long0,this.over),s=t.y;s=Zt(this.cbg,s);var h=Math.sin(s),a=Math.cos(s),e=Math.sin(i),r=Math.cos(i);s=Math.atan2(h,r*a),i=Math.atan2(e*a,Qt(h,a*r)),i=function(t){var i=Math.abs(t);return i=function(t){var i=1+t,s=i-1;return 0===s?t:t*Math.log(i)/s}(i*(1+i/(Qt(1,i)+1))),t<0?-i:i}(Math.tan(i));var n,o,M=Xt(this.gtu,2*s,2*i);return s+=M[0],i+=M[1],Math.abs(i)<=2.623395162778?(n=this.a*(this.Qn*i)+this.x0,o=this.a*(this.Qn*s+this.Zb)+this.y0):(n=1/0,o=1/0),t.x=n,t.y=o,t},inverse:function(t){var i,s,h=1/this.a*(t.x-this.x0),a=1/this.a*(t.y-this.y0);if(a=(a-this.Zb)/this.Qn,h/=this.Qn,Math.abs(h)<=2.623395162778){var e=Xt(this.utg,2*a,2*h);a+=e[0],h+=e[1],h=Math.atan(Jt(h));var r=Math.sin(a),n=Math.cos(a),o=Math.sin(h),M=Math.cos(h);a=Math.atan2(r*M,Qt(o,M*n)),i=z((h=Math.atan2(o,M*n))+this.long0,this.over),s=Zt(this.cgb,a)}else i=1/0,s=1/0;return t.x=i,t.y=s,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]},$t={init:function(){var t=function(t,i){if(void 0===t){if((t=Math.floor(30*(z(i)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*e,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Yt.init.apply(this),this.forward=Yt.forward,this.inverse=Yt.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function ti(t,i){return Math.pow((1-t)/(1+t),i)}var ii={init:function(){var t=Math.sin(this.lat0),i=Math.cos(this.lat0);i*=i,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*i*i/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+n)/(Math.pow(Math.tan(.5*this.lat0+n),this.C)*ti(this.e*t,this.ratexp))},forward:function(t){var i=t.x,s=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*s+n),this.C)*ti(this.e*Math.sin(s),this.ratexp))-h,t.x=this.C*i,t},inverse:function(t){for(var i=t.x/this.C,s=t.y,a=Math.pow(Math.tan(.5*s+n)/this.K,1/this.C),e=20;e>0&&(s=2*Math.atan(a*ti(this.e*Math.sin(t.y),-.5*this.e))-h,!(Math.abs(s-t.y)<1e-14));--e)t.y=s;return e?(t.x=i,t.y=s,t):null}},si={init:function(){ii.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var i,s,h,a;return t.x=z(t.x-this.long0,this.over),ii.forward.apply(this,[t]),i=Math.sin(t.y),s=Math.cos(t.y),h=Math.cos(t.x),t.x=(a=this.k0*this.R2/(1+this.sinc0*i+this.cosc0*s*h))*s*Math.sin(t.x),t.y=a*(this.cosc0*i-this.sinc0*s*h),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var i,s,h,a,e;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,e=Qt(t.x,t.y)){var r=2*Math.atan2(e,this.R2);i=Math.sin(r),s=Math.cos(r),a=Math.asin(s*this.sinc0+t.y*i*this.cosc0/e),h=Math.atan2(t.x*i,e*this.cosc0*s-t.y*this.sinc0*i)}else a=this.phic0,h=0;return t.x=h,t.y=a,ii.inverse.apply(this,[t]),t.x=z(t.x+this.long0,this.over),t},names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function hi(t,i,s){return i*=s,Math.tan(.5*(h+t))*Math.pow((1-i)/(1+i),.5*s)}var ai={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=a&&(this.k0=.5*(1+j(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=a&&(this.con=this.lat0>0?1:-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=a&&Math.abs(Math.cos(this.lat_ts))>a&&(this.k0=.5*this.cons*U(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/W(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=U(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(hi(this.lat0,this.sinlat0,this.e))-h,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var i,s,e,r,n,o,M=t.x,u=t.y,l=Math.sin(u),f=Math.cos(u),_=z(M-this.long0,this.over);return Math.abs(Math.abs(M-this.long0)-Math.PI)<=a&&Math.abs(u+this.lat0)<=a?(t.x=NaN,t.y=NaN,t):this.sphere?(i=2*this.k0/(1+this.sinlat0*l+this.coslat0*f*Math.cos(_)),t.x=this.a*i*f*Math.sin(_)+this.x0,t.y=this.a*i*(this.coslat0*l-this.sinlat0*f*Math.cos(_))+this.y0,t):(s=2*Math.atan(hi(u,l,this.e))-h,r=Math.cos(s),e=Math.sin(s),Math.abs(this.coslat0)<=a?(n=W(this.e,u*this.con,this.con*l),t.x=this.x0+(o=2*this.a*this.k0*n/this.cons)*Math.sin(M-this.long0),t.y=this.y0-this.con*o*Math.cos(M-this.long0),t):(Math.abs(this.sinlat0)<a?(i=2*this.a*this.k0/(1+r*Math.cos(_)),t.y=i*e):(i=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*e+this.cosX0*r*Math.cos(_))),t.y=i*(this.cosX0*e-this.sinX0*r*Math.cos(_))+this.y0),t.x=i*r*Math.sin(_)+this.x0,t))},inverse:function(t){var i,s,e,r;t.x-=this.x0,t.y-=this.y0;var n=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var o=2*Math.atan(n/(2*this.a*this.k0));return i=this.long0,s=this.lat0,n<=a?(t.x=i,t.y=s,t):(s=Math.asin(Math.cos(o)*this.sinlat0+t.y*Math.sin(o)*this.coslat0/n),i=Math.abs(this.coslat0)<a?z(this.lat0>0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y),this.over):z(this.long0+Math.atan2(t.x*Math.sin(o),n*this.coslat0*Math.cos(o)-t.y*this.sinlat0*Math.sin(o)),this.over),t.x=i,t.y=s,t)}if(Math.abs(this.coslat0)<=a){if(n<=a)return s=this.lat0,t.x=i=this.long0,t.y=s,t;t.x*=this.con,t.y*=this.con,s=this.con*q(this.e,n*this.cons/(2*this.a*this.k0)),i=this.con*z(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else e=2*Math.atan(n*this.cosX0/(2*this.a*this.k0*this.ms1)),i=this.long0,n<=a?r=this.X0:(r=Math.asin(Math.cos(e)*this.sinX0+t.y*Math.sin(e)*this.cosX0/n),i=z(this.long0+Math.atan2(t.x*Math.sin(e),n*this.cosX0*Math.cos(e)-t.y*this.sinX0*Math.sin(e)),this.over)),s=-1*q(this.e,Math.tan(.5*(h+r)));return t.x=i,t.y=s,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:hi},ei={init:function(){var t=this.lat0;this.lambda0=this.long0;var i=Math.sin(t),s=this.a,h=1/this.rf,a=2*h-Math.pow(h,2),e=this.e=Math.sqrt(a);this.R=this.k0*s*Math.sqrt(1-a)/(1-a*Math.pow(i,2)),this.alpha=Math.sqrt(1+a/(1-a)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(i/this.alpha);var r=Math.log(Math.tan(Math.PI/4+this.b0/2)),n=Math.log(Math.tan(Math.PI/4+t/2)),o=Math.log((1+e*i)/(1-e*i));this.K=r-this.alpha*n+this.alpha*e/2*o},forward:function(t){var i=Math.log(Math.tan(Math.PI/4-t.y/2)),s=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),h=2*(Math.atan(Math.exp(-this.alpha*(i+s)+this.K))-Math.PI/4),a=this.alpha*(t.x-this.lambda0),e=Math.atan(Math.sin(a)/(Math.sin(this.b0)*Math.tan(h)+Math.cos(this.b0)*Math.cos(a))),r=Math.asin(Math.cos(this.b0)*Math.sin(h)-Math.sin(this.b0)*Math.cos(h)*Math.cos(a));return t.y=this.R/2*Math.log((1+Math.sin(r))/(1-Math.sin(r)))+this.y0,t.x=this.R*e+this.x0,t},inverse:function(t){for(var i=(t.x-this.x0)/this.R,s=2*(Math.atan(Math.exp((t.y-this.y0)/this.R))-Math.PI/4),h=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(i)),a=Math.atan(Math.sin(i)/(Math.cos(this.b0)*Math.cos(i)-Math.sin(this.b0)*Math.tan(s))),e=this.lambda0+a/this.alpha,r=0,n=h,o=-1e3,M=0;Math.abs(n-o)>1e-7;){if(++M>20)return;r=1/this.alpha*(Math.log(Math.tan(Math.PI/4+h/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(n))/2)),o=n,n=2*Math.atan(Math.exp(r))-Math.PI/2}return t.x=e,t.y=n,t},names:["somerc"]},ri=1e-7,ni={init:function(){var t,i,s,e,r,M,u,l,f,_,c,g,w,S,E=0,G=0,v=0,P=0,d=0,m=0,N=0;this.no_off=(w=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],S="object"==typeof(g=this).projName?Object.keys(g.projName)[0]:g.projName,"no_uoff"in g||"no_off"in g||-1!==w.indexOf(S)||-1!==w.indexOf(Z(S))),this.no_rot="no_rot"in this;var p=!1;"alpha"in this&&(p=!0);var b=!1;if("rectified_grid_angle"in this&&(b=!0),p&&(N=this.alpha),b&&(E=this.rectified_grid_angle),p||b)G=this.longc;else if(v=this.long1,d=this.lat1,P=this.long2,m=this.lat2,Math.abs(d-m)<=ri||(t=Math.abs(d))<=ri||Math.abs(t-h)<=ri||Math.abs(Math.abs(this.lat0)-h)<=ri||Math.abs(Math.abs(m)-h)<=ri)throw new Error;var A=1-this.es;i=Math.sqrt(A),Math.abs(this.lat0)>a?(l=Math.sin(this.lat0),s=Math.cos(this.lat0),t=1-this.es*l*l,this.B=s*s,this.B=Math.sqrt(1+this.es*this.B*this.B/A),this.A=this.B*this.k0*i/t,(r=(e=this.B*i/(s*Math.sqrt(t)))*e-1)<=0?r=0:(r=Math.sqrt(r),this.lat0<0&&(r=-r)),this.E=r+=e,this.E*=Math.pow(W(this.e,this.lat0,l),this.B)):(this.B=1/i,this.A=this.k0,this.E=e=r=1),p||b?(p?(c=Math.asin(Math.sin(N)/e),b||(E=N)):(c=E,N=Math.asin(e*Math.sin(c))),this.lam0=G-Math.asin(.5*(r-1/r)*Math.tan(c))/this.B):(M=Math.pow(W(this.e,d,Math.sin(d)),this.B),u=Math.pow(W(this.e,m,Math.sin(m)),this.B),r=this.E/M,f=(u-M)/(u+M),_=((_=this.E*this.E)-u*M)/(_+u*M),(t=v-P)<-Math.PI?P-=o:t>Math.PI&&(P+=o),this.lam0=z(.5*(v+P)-Math.atan(_*Math.tan(.5*this.B*(v-P))/f)/this.B,this.over),c=Math.atan(2*Math.sin(this.B*z(v-this.lam0,this.over))/(r-1/r)),E=N=Math.asin(e*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(E),this.cosrot=Math.cos(E),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(e*e-1)/Math.cos(N))),this.lat0<0&&(this.u_0=-this.u_0)),r=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(n-r)),this.v_pole_s=this.ArB*Math.log(Math.tan(n+r))},forward:function(t){var i,s,e,r,n,o,M,u,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-h)>a){if(i=.5*((n=this.E/Math.pow(W(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/n)),s=.5*(n+o),r=Math.sin(this.B*t.x),e=(i*this.singam-r*this.cosgam)/s,Math.abs(Math.abs(e)-1)<a)throw new Error;u=.5*this.ArB*Math.log((1-e)/(1+e)),o=Math.cos(this.B*t.x),M=Math.abs(o)<ri?this.A*t.x:this.ArB*Math.atan2(i*this.cosgam+r*this.singam,o)}else u=t.y>0?this.v_pole_n:this.v_pole_s,M=this.ArB*t.y;return this.no_rot?(l.x=M,l.y=u):(l.x=u*this.cosrot+(M-=this.u_0)*this.sinrot,l.y=M*this.cosrot-u*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,l},inverse:function(t){var i,s,e,r,n,o,M,u={};if(t.x=1/this.a*(t.x-this.x0),t.y=1/this.a*(t.y-this.y0),this.no_rot?(s=t.y,i=t.x):(s=t.x*this.cosrot-t.y*this.sinrot,i=t.y*this.cosrot+t.x*this.sinrot+this.u_0),r=.5*((e=Math.exp(-this.BrA*s))-1/e),n=.5*(e+1/e),M=((o=Math.sin(this.BrA*i))*this.cosgam+r*this.singam)/n,Math.abs(Math.abs(M)-1)<a)u.x=0,u.y=M<0?-h:h;else{if(u.y=this.E/Math.sqrt((1+M)/(1-M)),u.y=q(this.e,Math.pow(u.y,1/this.B)),u.y===1/0)throw new Error;u.x=-this.rB*Math.atan2(r*this.cosgam-o*this.singam,Math.cos(this.BrA*i))}return u.x+=this.lam0,u},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},oi={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<a)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var i=Math.sin(this.lat1),s=Math.cos(this.lat1),e=U(this.e,i,s),r=W(this.e,this.lat1,i),n=Math.sin(this.lat2),o=Math.cos(this.lat2),M=U(this.e,n,o),u=W(this.e,this.lat2,n),l=Math.abs(Math.abs(this.lat0)-h)<a?0:W(this.e,this.lat0,Math.sin(this.lat0));this.ns=Math.abs(this.lat1-this.lat2)>a?Math.log(e/M)/Math.log(r/u):i,isNaN(this.ns)&&(this.ns=i),this.f0=e/(this.ns*Math.pow(r,this.ns)),this.rh=this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var i=t.x,s=t.y;Math.abs(2*Math.abs(s)-Math.PI)<=a&&(s=j(s)*(h-2e-10));var e,r,n=Math.abs(Math.abs(s)-h);if(n>a)e=W(this.e,s,Math.sin(s)),r=this.a*this.f0*Math.pow(e,this.ns);else{if((n=s*this.ns)<=0)return null;r=0}var o=this.ns*z(i-this.long0,this.over);return t.x=this.k0*(r*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-r*Math.cos(o))+this.y0,t},inverse:function(t){var i,s,a,e,r,n=(t.x-this.x0)/this.k0,o=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(i=Math.sqrt(n*n+o*o),s=1):(i=-Math.sqrt(n*n+o*o),s=-1);var M=0;if(0!==i&&(M=Math.atan2(s*n,s*o)),0!==i||this.ns>0){if(s=1/this.ns,a=Math.pow(i/(this.a*this.f0),s),-9999===(e=q(this.e,a)))return null}else e=-h;return r=z(M/this.ns+this.long0,this.over),t.x=r,t.y=e,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},Mi={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var i,s,h,a,e,r,n,o=t.y,M=z(t.x-this.long0,this.over);return i=Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.alfa*this.e/2),s=2*(Math.atan(this.k*Math.pow(Math.tan(o/2+this.s45),this.alfa)/i)-this.s45),h=-M*this.alfa,a=Math.asin(Math.cos(this.ad)*Math.sin(s)+Math.sin(this.ad)*Math.cos(s)*Math.cos(h)),e=Math.asin(Math.cos(s)*Math.sin(h)/Math.cos(a)),r=this.n*e,n=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(a/2+this.s45),this.n),t.y=n*Math.cos(r)/1,t.x=n*Math.sin(r)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var i,s,h,a,e,r,n,o=t.x;t.x=t.y,t.y=o,this.czech||(t.y*=-1,t.x*=-1),e=Math.sqrt(t.x*t.x+t.y*t.y),a=Math.atan2(t.y,t.x)/Math.sin(this.s0),h=2*(Math.atan(Math.pow(this.ro0/e,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),i=Math.asin(Math.cos(this.ad)*Math.sin(h)-Math.sin(this.ad)*Math.cos(h)*Math.cos(a)),s=Math.asin(Math.cos(h)*Math.sin(a)/Math.cos(i)),t.x=this.long0-s/this.alfa,r=i,n=0;var M=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(i/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(r))/(1-this.e*Math.sin(r)),this.e/2))-this.s45),Math.abs(r-t.y)<1e-10&&(n=1),r=t.y,M+=1}while(0===n&&M<15);return M>=15?null:t},names:["Krovak","Krovak Modified","Krovak (North Orientated)","Krovak Modified (North Orientated)","krovak"]};function ui(t,i,s,h,a){return t*a-i*Math.sin(2*a)+s*Math.sin(4*a)-h*Math.sin(6*a)}function li(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function fi(t){return.375*t*(1+.25*t*(1+.46875*t))}function _i(t){return.05859375*t*t*(1+.75*t)}function ci(t){return t*t*t*(35/3072)}function gi(t,i,s){var h=i*s;return t/Math.sqrt(1-h*h)}function wi(t){return Math.abs(t)<h?t:t-j(t)*Math.PI}function Si(t,i,s,h,a){var e,r;e=t/i;for(var n=0;n<15;n++)if(e+=r=(t-(i*e-s*Math.sin(2*e)+h*Math.sin(4*e)-a*Math.sin(6*e)))/(i-2*s*Math.cos(2*e)+4*h*Math.cos(4*e)-6*a*Math.cos(6*e)),Math.abs(r)<=1e-10)return e;return NaN}var Ei={init:function(){this.sphere||(this.e0=li(this.es),this.e1=fi(this.es),this.e2=_i(this.es),this.e3=ci(this.es),this.ml0=this.a*ui(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var i,s,h=t.x,a=t.y;if(h=z(h-this.long0,this.over),this.sphere)i=this.a*Math.asin(Math.cos(a)*Math.sin(h)),s=this.a*(Math.atan2(Math.tan(a),Math.cos(h))-this.lat0);else{var e=Math.sin(a),r=Math.cos(a),n=gi(this.a,this.e,e),o=Math.tan(a)*Math.tan(a),M=h*Math.cos(a),u=M*M,l=this.es*r*r/(1-this.es);i=n*M*(1-u*o*(1/6-(8-o+8*l)*u/120)),s=this.a*ui(this.e0,this.e1,this.e2,this.e3,a)-this.ml0+n*e/r*u*(.5+(5-o+6*l)*u/24)}return t.x=i+this.x0,t.y=s+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,s,e=t.x/this.a,r=t.y/this.a;if(this.sphere){var n=r+this.lat0;i=Math.asin(Math.sin(n)*Math.cos(e)),s=Math.atan2(Math.tan(e),Math.cos(n))}else{var o=Si(this.ml0/this.a+r,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-h)<=a)return t.x=this.long0,t.y=h,r<0&&(t.y*=-1),t;var M=gi(this.a,this.e,Math.sin(o)),u=M*M*M/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(o),2),f=e*this.a/M,_=f*f;i=o-M*Math.tan(o)/u*f*f*(.5-(1+3*l)*f*f/24),s=f*(1-_*(l/3+(1+3*l)*l*_/15))/Math.cos(o)}return t.x=z(s+this.long0,this.over),t.y=wi(i),t},names:["Cassini","Cassini_Soldner","cass"]};function Gi(t,i){var s;return t>1e-7?(1-t*t)*(i/(1-(s=t*i)*s)-.5/t*Math.log((1-s)/(1+s))):2*i}var vi={init:function(){var t,i=Math.abs(this.lat0);if(this.mode=Math.abs(i-h)<a?this.lat0<0?1:2:Math.abs(i)<a?3:4,this.es>0)switch(this.qp=Gi(this.e,1),this.mmf=.5/(1-this.es),this.apa=function(t){var i,s=[];return s[0]=.3333333333333333*t,s[0]+=.17222222222222222*(i=t*t),s[1]=.06388888888888888*i,s[0]+=.10257936507936508*(i*=t),s[1]+=.0664021164021164*i,s[2]=.016415012942191543*i,s}(this.es),this.mode){case 2:case 1:this.dd=1;break;case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=Gi(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var i,s,e,r,o,M,u,l,f,_,c=t.x,g=t.y;if(c=z(c-this.long0,this.over),this.sphere){if(o=Math.sin(g),_=Math.cos(g),e=Math.cos(c),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((s=this.mode===this.EQUIT?1+_*e:1+this.sinph0*o+this.cosph0*_*e)<=a)return null;i=(s=Math.sqrt(2/s))*_*Math.sin(c),s*=this.mode===this.EQUIT?o:this.cosph0*o-this.sinph0*_*e}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(e=-e),Math.abs(g+this.lat0)<a)return null;s=n-.5*g,i=(s=2*(this.mode===this.S_POLE?Math.cos(s):Math.sin(s)))*Math.sin(c),s*=e}}else{switch(u=0,l=0,f=0,e=Math.cos(c),r=Math.sin(c),o=Math.sin(g),M=Gi(this.e,o),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(u=M/this.qp,l=Math.sqrt(1-u*u)),this.mode){case this.OBLIQ:f=1+this.sinb1*u+this.cosb1*l*e;break;case this.EQUIT:f=1+l*e;break;case this.N_POLE:f=h+g,M=this.qp-M;break;case this.S_POLE:f=g-h,M=this.qp+M}if(Math.abs(f)<a)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:f=Math.sqrt(2/f),s=this.mode===this.OBLIQ?this.ymf*f*(this.cosb1*u-this.sinb1*l*e):(f=Math.sqrt(2/(1+l*e)))*u*this.ymf,i=this.xmf*f*l*r;break;case this.N_POLE:case this.S_POLE:M>=0?(i=(f=Math.sqrt(M))*r,s=e*(this.mode===this.S_POLE?f:-f)):i=s=0}}return t.x=this.a*i+this.x0,t.y=this.a*s+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i,s,e,r,n,o,M,u,l,f,_=t.x/this.a,c=t.y/this.a;if(this.sphere){var g,w=0,S=0;if((s=.5*(g=Math.sqrt(_*_+c*c)))>1)return null;switch(s=2*Math.asin(s),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(S=Math.sin(s),w=Math.cos(s)),this.mode){case this.EQUIT:s=Math.abs(g)<=a?0:Math.asin(c*S/g),_*=S,c=w*g;break;case this.OBLIQ:s=Math.abs(g)<=a?this.lat0:Math.asin(w*this.sinph0+c*S*this.cosph0/g),_*=S*this.cosph0,c=(w-Math.sin(s)*this.sinph0)*g;break;case this.N_POLE:c=-c,s=h-s;break;case this.S_POLE:s-=h}i=0!==c||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(_,c):0}else{if(M=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(_/=this.dd,c*=this.dd,(o=Math.sqrt(_*_+c*c))<a)return t.x=this.long0,t.y=this.lat0,t;r=2*Math.asin(.5*o/this.rq),e=Math.cos(r),_*=r=Math.sin(r),this.mode===this.OBLIQ?(n=this.qp*(M=e*this.sinb1+c*r*this.cosb1/o),c=o*this.cosb1*e-c*this.sinb1*r):(n=this.qp*(M=c*r/o),c=o*e)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(c=-c),!(n=_*_+c*c))return t.x=this.long0,t.y=this.lat0,t;M=1-n/this.qp,this.mode===this.S_POLE&&(M=-M)}i=Math.atan2(_,c),f=(u=Math.asin(M))+u,s=u+(l=this.apa)[0]*Math.sin(f)+l[1]*Math.sin(f+f)+l[2]*Math.sin(f+f+f)}return t.x=z(this.long0+i,this.over),t.y=s,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Pi(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}var di={init:function(){Math.abs(this.lat1+this.lat2)<a||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=U(this.e3,this.sin_po,this.cos_po),this.qs1=Gi(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=U(this.e3,this.sin_po,this.cos_po),this.qs2=Gi(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Gi(this.e3,this.sin_po),this.ns0=Math.abs(this.lat1-this.lat2)>a?(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var i=t.x,s=t.y;this.sin_phi=Math.sin(s),this.cos_phi=Math.cos(s);var h=Gi(this.e3,this.sin_phi),a=this.a*Math.sqrt(this.c-this.ns0*h)/this.ns0,e=this.ns0*z(i-this.long0,this.over),r=a*Math.sin(e)+this.x0,n=this.rh-a*Math.cos(e)+this.y0;return t.x=r,t.y=n,t},inverse:function(t){var i,s,h,a,e;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),s=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),s=-1),h=0,0!==i&&(h=Math.atan2(s*t.x,s*t.y)),s=i*this.ns0/this.a,e=this.sphere?Math.asin((this.c-s*s)/(2*this.ns0)):this.phi1z(this.e3,(this.c-s*s)/this.ns0),a=z(h/this.ns0+this.long0,this.over),t.x=a,t.y=e,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,i){var s,h,e,r,n=Pi(.5*i);if(t<a)return n;for(var o=t*t,M=1;M<=25;M++)if(n+=r=.5*(e=1-(h=t*(s=Math.sin(n)))*h)*e/Math.cos(n)*(i/(1-o)-s/e+.5/t*Math.log((1-h)/(1+h))),Math.abs(r)<=1e-7)return n;return null}},mi={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var i,s,h,e,r,n,o,M=t.y;return h=z(t.x-this.long0,this.over),i=Math.sin(M),s=Math.cos(M),e=Math.cos(h),(r=this.sin_p14*i+this.cos_p14*s*e)>0||Math.abs(r)<=a?(n=this.x0+1*this.a*s*Math.sin(h)/r,o=this.y0+1*this.a*(this.cos_p14*i-this.sin_p14*s*e)/r):(n=this.x0+this.infinity_dist*s*Math.sin(h),o=this.y0+this.infinity_dist*(this.cos_p14*i-this.sin_p14*s*e)),t.x=n,t.y=o,t},inverse:function(t){var i,s,h,a,e,r;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(i=Math.sqrt(t.x*t.x+t.y*t.y))?(a=Math.atan2(i,this.rc),s=Math.sin(a),r=Pi((h=Math.cos(a))*this.sin_p14+t.y*s*this.cos_p14/i),e=Math.atan2(t.x*s,i*this.cos_p14*h-t.y*this.sin_p14*s),e=z(this.long0+e,this.over)):(r=this.phic0,e=0),t.x=e,t.y=r,t},names:["gnom"]},Ni={init:function(){this.sphere||(this.k0=U(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var i,s,h=t.y,a=z(t.x-this.long0,this.over);if(this.sphere)i=this.x0+this.a*a*Math.cos(this.lat_ts),s=this.y0+this.a*Math.sin(h)/Math.cos(this.lat_ts);else{var e=Gi(this.e,Math.sin(h));i=this.x0+this.a*this.k0*a,s=this.y0+this.a*e*.5/this.k0}return t.x=i,t.y=s,t},inverse:function(t){var i,s;return t.x-=this.x0,t.y-=this.y0,this.sphere?(i=z(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over),s=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(s=function(t,i){var s=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(i)-s)<1e-6)return i<0?-1*h:h;for(var a,e,r,n,o=Math.asin(.5*i),M=0;M<30;M++)if(e=Math.sin(o),r=Math.cos(o),n=t*e,o+=a=Math.pow(1-n*n,2)/(2*r)*(i/(1-t*t)-e/(1-n*n)+.5/t*Math.log((1-n)/(1+n))),Math.abs(a)<=1e-10)return o;return NaN}(this.e,2*t.y*this.k0/this.a),i=z(this.long0+t.x/(this.a*this.k0),this.over)),t.x=i,t.y=s,t},names:["cea"]},pi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var i=t.y,s=z(t.x-this.long0,this.over),h=wi(i-this.lat0);return t.x=this.x0+this.a*s*this.rc,t.y=this.y0+this.a*h,t},inverse:function(t){var i=t.y;return t.x=z(this.long0+(t.x-this.x0)/(this.a*this.rc),this.over),t.y=wi(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]},bi={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=li(this.es),this.e1=fi(this.es),this.e2=_i(this.es),this.e3=ci(this.es),this.ml0=this.a*ui(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var i,s,h,e=t.y,r=z(t.x-this.long0,this.over);if(h=r*Math.sin(e),this.sphere)Math.abs(e)<=a?(i=this.a*r,s=-1*this.a*this.lat0):(i=this.a*Math.sin(h)/Math.tan(e),s=this.a*(wi(e-this.lat0)+(1-Math.cos(h))/Math.tan(e)));else if(Math.abs(e)<=a)i=this.a*r,s=-1*this.ml0;else{var n=gi(this.a,this.e,Math.sin(e))/Math.tan(e);i=n*Math.sin(h),s=this.a*ui(this.e0,this.e1,this.e2,this.e3,e)-this.ml0+n*(1-Math.cos(h))}return t.x=i+this.x0,t.y=s+this.y0,t},inverse:function(t){var i,s,h,e,r,n,o,M,u;if(h=t.x-this.x0,e=t.y-this.y0,this.sphere)if(Math.abs(e+this.a*this.lat0)<=a)i=z(h/this.a+this.long0,this.over),s=0;else{var l;for(o=h*h/this.a/this.a+(n=this.lat0+e/this.a)*n,M=n,r=20;r;--r)if(M+=u=-1*(n*(M*(l=Math.tan(M))+1)-M-.5*(M*M+o)*l)/((M-n)/l-1),Math.abs(u)<=a){s=M;break}i=z(this.long0+Math.asin(h*Math.tan(M)/this.a)/Math.sin(s),this.over)}else if(Math.abs(e+this.ml0)<=a)s=0,i=z(this.long0+h/this.a,this.over);else{var f,_,c,g,w;for(o=h*h/this.a/this.a+(n=(this.ml0+e)/this.a)*n,M=n,r=20;r;--r)if(w=this.e*Math.sin(M),f=Math.sqrt(1-w*w)*Math.tan(M),_=this.a*ui(this.e0,this.e1,this.e2,this.e3,M),c=this.e0-2*this.e1*Math.cos(2*M)+4*this.e2*Math.cos(4*M)-6*this.e3*Math.cos(6*M),M-=u=(n*(f*(g=_/this.a)+1)-g-.5*f*(g*g+o))/(this.es*Math.sin(2*M)*(g*g+o-2*n*g)/(4*f)+(n-g)*(f*c-2/Math.sin(2*M))-c),Math.abs(u)<=a){s=M;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(s),2))*Math.tan(s),i=z(this.long0+Math.asin(h*f/this.a)/Math.sin(s),this.over)}return t.x=i,t.y=s,t},names:["Polyconic","American_Polyconic","poly"]},Ai={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var i,h=(t.y-this.lat0)/s*1e-5,a=t.x-this.long0,e=1,r=0;for(i=1;i<=10;i++)r+=this.A[i]*(e*=h);var n,o=r,M=a,u=1,l=0,f=0,_=0;for(i=1;i<=6;i++)n=l*o+u*M,f=f+this.B_re[i]*(u=u*o-l*M)-this.B_im[i]*(l=n),_=_+this.B_im[i]*u+this.B_re[i]*l;return t.x=_*this.a+this.x0,t.y=f*this.a+this.y0,t},inverse:function(t){var i,h,a=(t.y-this.y0)/this.a,e=(t.x-this.x0)/this.a,r=1,n=0,o=0,M=0;for(i=1;i<=6;i++)h=n*a+r*e,o=o+this.C_re[i]*(r=r*a-n*e)-this.C_im[i]*(n=h),M=M+this.C_im[i]*r+this.C_re[i]*n;for(var u=0;u<this.iterations;u++){var l,f=o,_=M,c=a,g=e;for(i=2;i<=6;i++)l=_*o+f*M,c+=(i-1)*(this.B_re[i]*(f=f*o-_*M)-this.B_im[i]*(_=l)),g+=(i-1)*(this.B_im[i]*f+this.B_re[i]*_);f=1,_=0;var w=this.B_re[1],S=this.B_im[1];for(i=2;i<=6;i++)l=_*o+f*M,w+=i*(this.B_re[i]*(f=f*o-_*M)-this.B_im[i]*(_=l)),S+=i*(this.B_im[i]*f+this.B_re[i]*_);var E=w*w+S*S;o=(c*w+g*S)/E,M=(g*w-c*S)/E}var G=o,v=M,P=1,d=0;for(i=1;i<=9;i++)d+=this.D[i]*(P*=G);var m=this.lat0+d*s*1e5;return t.x=this.long0+v,t.y=m,t},names:["New_Zealand_Map_Grid","nzmg"]},yi={init:function(){},forward:function(t){var i=t.y,s=z(t.x-this.long0,this.over),h=this.x0+this.a*s,a=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=h,t.y=a,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var i=z(this.long0+t.x/this.a,this.over),s=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=i,t.y=s,t},names:["Miller_Cylindrical","mill"]},Ii={init:function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=Ht(this.es)},forward:function(t){var i,s,h=t.x,e=t.y;if(h=z(h-this.long0,this.over),this.sphere){if(this.m)for(var r=this.n*Math.sin(e),n=20;n;--n){var o=(this.m*e+Math.sin(e)-r)/(this.m+Math.cos(e));if(e-=o,Math.abs(o)<a)break}else e=1!==this.n?Math.asin(this.n*Math.sin(e)):e;i=this.a*this.C_x*h*(this.m+Math.cos(e)),s=this.a*this.C_y*e}else{var M=Math.sin(e),u=Math.cos(e);s=this.a*Bt(e,M,u,this.en),i=this.a*h*u/Math.sqrt(1-this.es*M*M)}return t.x=i,t.y=s,t},inverse:function(t){var i,s,e;return t.x-=this.x0,s=t.x/this.a,t.y-=this.y0,i=t.y/this.a,this.sphere?(i/=this.C_y,s/=this.C_x*(this.m+Math.cos(i)),this.m?i=Pi((this.m*i+Math.sin(i))/this.n):1!==this.n&&(i=Pi(Math.sin(i)/this.n)),s=z(s+this.long0,this.over),i=wi(i)):(i=Vt(t.y/this.a,this.es,this.en),(e=Math.abs(i))<h?(e=Math.sin(i),s=z(this.long0+t.x*Math.sqrt(1-this.es*e*e)/(this.a*Math.cos(i)),this.over)):e-a<h&&(s=this.long0)),t.x=s,t.y=i,t},names:["Sinusoidal","sinu"]},Ri={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){for(var i=t.y,s=z(t.x-this.long0,this.over),h=i,e=Math.PI*Math.sin(i);;){var r=-(h+Math.sin(h)-e)/(1+Math.cos(h));if(h+=r,Math.abs(r)<a)break}h/=2,Math.PI/2-Math.abs(i)<a&&(s=0);var n=.900316316158*this.a*s*Math.cos(h)+this.x0,o=1.4142135623731*this.a*Math.sin(h)+this.y0;return t.x=n,t.y=o,t},inverse:function(t){var i,s;t.x-=this.x0,t.y-=this.y0,s=t.y/(1.4142135623731*this.a),Math.abs(s)>.999999999999&&(s=.999999999999),i=Math.asin(s);var h=z(this.long0+t.x/(.900316316158*this.a*Math.cos(i)),this.over);h<-Math.PI&&(h=-Math.PI),h>Math.PI&&(h=Math.PI),s=(2*i+Math.sin(2*i))/Math.PI,Math.abs(s)>1&&(s=1);var a=Math.asin(s);return t.x=h,t.y=a,t},names:["Mollweide","moll"]},Ci={init:function(){Math.abs(this.lat1+this.lat2)<a||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=li(this.es),this.e1=fi(this.es),this.e2=_i(this.es),this.e3=ci(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=U(this.e,this.sin_phi,this.cos_phi),this.ml1=ui(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<a?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=U(this.e,this.sin_phi,this.cos_phi),this.ml2=ui(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=ui(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var i,s=t.x,h=t.y;if(this.sphere)i=this.a*(this.g-h);else{var a=ui(this.e0,this.e1,this.e2,this.e3,h);i=this.a*(this.g-a)}var e=this.ns*z(s-this.long0,this.over),r=this.x0+i*Math.sin(e),n=this.y0+this.rh-i*Math.cos(e);return t.x=r,t.y=n,t},inverse:function(t){var i,s,h,a;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(s=Math.sqrt(t.x*t.x+t.y*t.y),i=1):(s=-Math.sqrt(t.x*t.x+t.y*t.y),i=-1);var e=0;return 0!==s&&(e=Math.atan2(i*t.x,i*t.y)),this.sphere?(a=z(this.long0+e/this.ns,this.over),h=wi(this.g-s/this.a),t.x=a,t.y=h,t):(h=Si(this.g-s/this.a,this.e0,this.e1,this.e2,this.e3),a=z(this.long0+e/this.ns,this.over),t.x=a,t.y=h,t)},names:["Equidistant_Conic","eqdc"]},ki={init:function(){this.R=this.a},forward:function(t){var i,s,e=t.y,r=z(t.x-this.long0,this.over);Math.abs(e)<=a&&(i=this.x0+this.R*r,s=this.y0);var n=Pi(2*Math.abs(e/Math.PI));(Math.abs(r)<=a||Math.abs(Math.abs(e)-h)<=a)&&(i=this.x0,s=e>=0?this.y0+Math.PI*this.R*Math.tan(.5*n):this.y0+Math.PI*this.R*-Math.tan(.5*n));var o=.5*Math.abs(Math.PI/r-r/Math.PI),M=o*o,u=Math.sin(n),l=Math.cos(n),f=l/(u+l-1),_=f*(2/u-1),c=_*_,g=Math.PI*this.R*(o*(f-c)+Math.sqrt(M*(f-c)*(f-c)-(c+M)*(f*f-c)))/(c+M);r<0&&(g=-g),i=this.x0+g;var w=M+f;return g=Math.PI*this.R*(_*w-o*Math.sqrt((c+M)*(M+1)-w*w))/(c+M),s=e>=0?this.y0+g:this.y0-g,t.x=i,t.y=s,t},inverse:function(t){var i,s,h,e,r,n,o,M,u,l,f,_;return t.x-=this.x0,t.y-=this.y0,f=Math.PI*this.R,r=(h=t.x/f)*h+(e=t.y/f)*e,f=3*(e*e/(M=-2*(n=-Math.abs(e)*(1+r))+1+2*e*e+r*r)+(2*(o=n-2*e*e+h*h)*o*o/M/M/M-9*n*o/M/M)/27)/(u=(n-o*o/3/M)/M)/(l=2*Math.sqrt(-u/3)),Math.abs(f)>1&&(f=f>=0?1:-1),_=Math.acos(f)/3,s=t.y>=0?(-l*Math.cos(_+Math.PI/3)-o/3/M)*Math.PI:-(-l*Math.cos(_+Math.PI/3)-o/3/M)*Math.PI,i=Math.abs(h)<a?this.long0:z(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(h*h-e*e)+r*r))/2/h,this.over),t.x=i,t.y=s,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]},Oi={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var i,s,e,r,n,o,M,u,l,f,_,c=t.x,g=t.y,w=Math.sin(t.y),S=Math.cos(t.y),E=z(c-this.long0,this.over);return this.sphere?Math.abs(this.sin_p12-1)<=a?(t.x=this.x0+this.a*(h-g)*Math.sin(E),t.y=this.y0-this.a*(h-g)*Math.cos(E),t):Math.abs(this.sin_p12+1)<=a?(t.x=this.x0+this.a*(h+g)*Math.sin(E),t.y=this.y0+this.a*(h+g)*Math.cos(E),t):(l=this.sin_p12*w+this.cos_p12*S*Math.cos(E),u=(M=Math.acos(l))?M/Math.sin(M):1,t.x=this.x0+this.a*u*S*Math.sin(E),t.y=this.y0+this.a*u*(this.cos_p12*w-this.sin_p12*S*Math.cos(E)),t):(i=li(this.es),s=fi(this.es),e=_i(this.es),r=ci(this.es),Math.abs(this.sin_p12-1)<=a?(n=this.a*ui(i,s,e,r,h),o=this.a*ui(i,s,e,r,g),t.x=this.x0+(n-o)*Math.sin(E),t.y=this.y0-(n-o)*Math.cos(E),t):Math.abs(this.sin_p12+1)<=a?(n=this.a*ui(i,s,e,r,h),o=this.a*ui(i,s,e,r,g),t.x=this.x0+(n+o)*Math.sin(E),t.y=this.y0+(n+o)*Math.cos(E),t):Math.abs(c)<a&&Math.abs(g-this.lat0)<a?(t.x=t.y=0,t):(f=function(t,i,s,h,a,e){const r=h-i,n=Math.atan((1-e)*Math.tan(t)),o=Math.atan((1-e)*Math.tan(s)),M=Math.sin(n),u=Math.cos(n),l=Math.sin(o),f=Math.cos(o);let _,c,g,w,S,E,G,v,P,d,m,N,p,b,A,y=r,I=100;do{if(c=Math.sin(y),g=Math.cos(y),w=Math.sqrt(f*c*(f*c)+(u*l-M*f*g)*(u*l-M*f*g)),0===w)return{azi1:0,s12:0};S=M*l+u*f*g,E=Math.atan2(w,S),G=u*f*c/w,v=1-G*G,P=0!==v?S-2*M*l/v:0,d=e/16*v*(4+e*(4-3*v)),_=y,y=r+(1-d)*e*G*(E+d*w*(P+d*S*(2*P*P-1)))}while(Math.abs(y-_)>1e-12&&--I>0);return 0===I?{azi1:NaN,s12:NaN}:(m=v*(a*a-a*(1-e)*(a*(1-e)))/(a*(1-e)*(a*(1-e))),N=1+m/16384*(4096+m*(m*(320-175*m)-768)),p=m/1024*(256+m*(m*(74-47*m)-128)),b=p*w*(P+p/4*(S*(2*P*P-1)-p/6*P*(4*w*w-3)*(4*P*P-3))),A=a*(1-e)*N*(E-b),{azi1:Math.atan2(f*c,u*l-M*f*g),s12:A})}(this.lat0,this.long0,g,c,this.a,this.f),_=f.azi1,t.x=f.s12*Math.sin(_),t.y=f.s12*Math.cos(_),t))},inverse:function(t){var i,s,e,r,n,o,M,u,l,f,_,c,g,w,S;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((i=Math.sqrt(t.x*t.x+t.y*t.y))>2*h*this.a)return;return s=i/this.a,e=Math.sin(s),r=Math.cos(s),n=this.long0,Math.abs(i)<=a?o=this.lat0:(o=Pi(r*this.sin_p12+t.y*e*this.cos_p12/i),M=Math.abs(this.lat0)-h,n=Math.abs(M)<=a?z(this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y),this.over):z(this.long0+Math.atan2(t.x*e,i*this.cos_p12*r-t.y*this.sin_p12*e),this.over)),t.x=n,t.y=o,t}return u=li(this.es),l=fi(this.es),f=_i(this.es),_=ci(this.es),Math.abs(this.sin_p12-1)<=a?(o=Si(((c=this.a*ui(u,l,f,_,h))-(i=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,u,l,f,_),n=z(this.long0+Math.atan2(t.x,-1*t.y),this.over),t.x=n,t.y=o,t):Math.abs(this.sin_p12+1)<=a?(c=this.a*ui(u,l,f,_,h),o=Si(((i=Math.sqrt(t.x*t.x+t.y*t.y))-c)/this.a,u,l,f,_),n=z(this.long0+Math.atan2(t.x,t.y),this.over),t.x=n,t.y=o,t):(g=Math.atan2(t.x,t.y),w=Math.sqrt(t.x*t.x+t.y*t.y),S=function(t,i,s,h,a,e){const r=Math.atan((1-e)*Math.tan(t)),n=Math.sin(r),o=Math.cos(r),M=Math.sin(s),u=Math.cos(s),l=Math.atan2(n,o*u),f=o*M,_=1-f*f,c=_*(a*a-a*(1-e)*(a*(1-e)))/(a*(1-e)*(a*(1-e))),g=1+c/16384*(4096+c*(c*(320-175*c)-768)),w=c/1024*(256+c*(c*(74-47*c)-128));let S,E,G,v,P,d=h/(a*(1-e)*g),m=100;do{E=Math.cos(2*l+d),G=Math.sin(d),v=Math.cos(d),P=w*G*(E+w/4*(v*(2*E*E-1)-w/6*E*(4*G*G-3)*(4*E*E-3))),S=d,d=h/(a*(1-e)*g)+P}while(Math.abs(d-S)>1e-12&&--m>0);if(0===m)return{lat2:NaN,lon2:NaN};const N=n*G-o*v*u,p=e/16*_*(4+e*(4-3*_));return{lat2:Math.atan2(n*v+o*G*u,(1-e)*Math.sqrt(f*f+N*N)),lon2:i+(Math.atan2(G*M,o*v-n*G*u)-(1-p)*e*f*(d+p*G*(E+p*v*(2*E*E-1))))}}(this.lat0,this.long0,g,w,this.a,this.f),t.x=S.lon2,t.y=S.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]},Ti={init:function(){this.sin_p14=Math.sin(this.lat0||0),this.cos_p14=Math.cos(this.lat0||0)},forward:function(t){var i,s,h,e,r,n,o,M=t.y;return h=z(t.x-(this.long0||0),this.over),i=Math.sin(M),s=Math.cos(M),e=Math.cos(h),((r=this.sin_p14*i+this.cos_p14*s*e)>0||Math.abs(r)<=a)&&(n=1*this.a*s*Math.sin(h),o=(this.y0||0)+1*this.a*(this.cos_p14*i-this.sin_p14*s*e)),t.x=n,t.y=o,t},inverse:function(t){var i,s,e,r,n,o,M,u,l;return t.x-=this.x0||0,t.y-=this.y0||0,s=Pi((i=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),e=Math.sin(s),r=Math.cos(s),l=this.lat0||0,o=u=this.long0||0,Math.abs(i)<=a?(M=l,t.x=o,t.y=M,t):(M=Pi(r*this.sin_p14+t.y*e*this.cos_p14/i),n=Math.abs(l)-h,Math.abs(n)<=a?(o=z(l>=0?u+Math.atan2(t.x,-t.y):u-Math.atan2(-t.x,t.y),this.over),t.x=o,t.y=M,t):(o=z(u+Math.atan2(t.x*e,i*this.cos_p14*r-t.y*this.sin_p14*e),this.over),t.x=o,t.y=M,t))},names:["ortho"]};function Fi(t,i,s,e){var r;return t<a?(e.value=1,r=0):(r=Math.atan2(i,s),Math.abs(r)<=n?e.value=1:r>n&&r<=h+n?(e.value=2,r-=h):r>h+n||r<=-(h+n)?(e.value=3,r=r>=0?r-M:r+M):(e.value=4,r+=h)),r}function Li(t,i){var s=t+i;return s<-M?s+=o:s>+M&&(s-=o),s}var Di={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.face=this.lat0>=h-n/2?5:this.lat0<=-(h-n/2)?6:Math.abs(this.long0)<=n?1:Math.abs(this.long0)<=h+n?this.long0>0?2:4:3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var i,s,a,e,r,o,u={x:0,y:0},l={value:0};if(t.x-=this.long0,i=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,s=t.x,5===this.face)e=h-i,s>=n&&s<=h+n?(l.value=1,a=s-h):s>h+n||s<=-(h+n)?(l.value=2,a=s>0?s-M:s+M):s>-(h+n)&&s<=-n?(l.value=3,a=s+h):(l.value=4,a=s);else if(6===this.face)e=h+i,s>=n&&s<=h+n?(l.value=1,a=-s+h):s<n&&s>=-n?(l.value=2,a=-s):s<-n&&s>=-(h+n)?(l.value=3,a=-s-h):(l.value=4,a=s>0?-s+M:-s-M);else{var f,_,c,g,w,S;2===this.face?s=Li(s,+h):3===this.face?s=Li(s,+M):4===this.face&&(s=Li(s,-h)),g=Math.sin(i),w=Math.cos(i),S=Math.sin(s),f=w*Math.cos(s),_=w*S,c=g,1===this.face?a=Fi(e=Math.acos(f),c,_,l):2===this.face?a=Fi(e=Math.acos(_),c,-f,l):3===this.face?a=Fi(e=Math.acos(-f),c,-_,l):4===this.face?a=Fi(e=Math.acos(-_),c,f,l):(e=a=0,l.value=1)}return o=Math.atan(12/M*(a+Math.acos(Math.sin(a)*Math.cos(n))-h)),r=Math.sqrt((1-Math.cos(e))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(a))))),2===l.value?o+=h:3===l.value?o+=M:4===l.value&&(o+=1.5*M),u.x=r*Math.cos(o),u.y=r*Math.sin(o),u.x=u.x*this.a+this.x0,u.y=u.y*this.a+this.y0,t.x=u.x,t.y=u.y,t},inverse:function(t){var i,s,a,e,r,n,o,u,l,f,_,c,g={lam:0,phi:0},w={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,s=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),i=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?w.value=1:t.y>=0&&t.y>=Math.abs(t.x)?(w.value=2,i-=h):t.x<0&&-t.x>=Math.abs(t.y)?(w.value=3,i=i<0?i+M:i-M):(w.value=4,i+=h),l=M/12*Math.tan(i),r=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),n=Math.atan(r),(o=1-(a=Math.cos(i))*a*(e=Math.tan(s))*e*(1-Math.cos(Math.atan(1/Math.cos(n)))))<-1?o=-1:o>1&&(o=1),5===this.face)u=Math.acos(o),g.phi=h-u,g.lam=1===w.value?n+h:2===w.value?n<0?n+M:n-M:3===w.value?n-h:n;else if(6===this.face)u=Math.acos(o),g.phi=u-h,g.lam=1===w.value?-n+h:2===w.value?-n:3===w.value?-n-h:n<0?-n-M:-n+M;else{var S,E,G;l=(S=o)*S,E=(l+=(G=l>=1?0:Math.sqrt(1-l)*Math.sin(n))*G)>=1?0:Math.sqrt(1-l),2===w.value?(l=E,E=-G,G=l):3===w.value?(E=-E,G=-G):4===w.value&&(l=E,E=G,G=-l),2===this.face?(l=S,S=-E,E=l):3===this.face?(S=-S,E=-E):4===this.face&&(l=S,S=E,E=-l),g.phi=Math.acos(-G)-h,g.lam=Math.atan2(E,S),2===this.face?g.lam=Li(g.lam,-h):3===this.face?g.lam=Li(g.lam,-M):4===this.face&&(g.lam=Li(g.lam,+h))}return 0!==this.es&&(f=g.phi<0?1:0,_=Math.tan(g.phi),c=this.b/Math.sqrt(_*_+this.one_minus_f_squared),g.phi=Math.atan(Math.sqrt(this.a*this.a-c*c)/(this.one_minus_f*c)),f&&(g.phi=-g.phi)),g.lam+=this.long0,t.x=g.lam,t.y=g.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]},xi=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],Ui=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],ji=.8487,zi=1.3523,Wi=r/5,qi=1/Wi,Hi=function(t,i){return t[0]+i*(t[1]+i*(t[2]+i*t[3]))},Bi={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var i=z(t.x-this.long0,this.over),s=Math.abs(t.y),h=Math.floor(s*Wi);h<0?h=0:h>=18&&(h=17);var a={x:Hi(xi[h],s=r*(s-qi*h))*i,y:Hi(Ui[h],s)};return t.y<0&&(a.y=-a.y),a.x=a.x*this.a*ji+this.x0,a.y=a.y*this.a*zi+this.y0,a},inverse:function(t){var i={x:(t.x-this.x0)/(this.a*ji),y:Math.abs(t.y-this.y0)/(this.a*zi)};if(i.y>=1)i.x/=xi[18][0],i.y=t.y<0?-h:h;else{var s=Math.floor(18*i.y);for(s<0?s=0:s>=18&&(s=17);;)if(Ui[s][0]>i.y)--s;else{if(!(Ui[s+1][0]<=i.y))break;++s}var a=Ui[s],r=5*(i.y-a[0])/(Ui[s+1][0]-a[0]);r=function(t,i,s,h){for(var a=i;h;--h){var e=t(a);if(a-=e,Math.abs(e)<1e-10)break}return a}((function(t){return(Hi(a,t)-i.y)/function(t,i){return t[1]+i*(2*t[2]+3*i*t[3])}(a,t)}),r,0,100),i.x/=Hi(xi[s],r),i.y=(5*s+r)*e,t.y<0&&(i.y=-i.y)}return i.x=z(i.x+this.long0,this.over),i},names:["Robinson","robin"]},Vi={init:function(){this.name="geocent"},forward:function(t){return _t(t,this.es,this.a)},inverse:function(t){return ct(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]},Ki={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}},Ji={init:function(){if(Object.keys(Ki).forEach(function(t){if(void 0===this[t])this[t]=Ki[t].def;else{if(Ki[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);Ki[t].num&&(this[t]=parseFloat(this[t]))}Ki[t].degrees&&(this[t]=this[t]*e)}.bind(this)),Math.abs(Math.abs(this.lat0)-h)<a?this.mode=this.lat0<0?1:0:Math.abs(this.lat0)<a?this.mode=2:(this.mode=3,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,i=this.azi;this.cg=Math.cos(i),this.sg=Math.sin(i),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var i,s,h,a,e=Math.sin(t.y),r=Math.cos(t.y),n=Math.cos(t.x);switch(this.mode){case 3:s=this.sinph0*e+this.cosph0*r*n;break;case 2:s=r*n;break;case 1:s=-e;break;case 0:s=e}switch(i=(s=this.pn1/(this.p-s))*r*Math.sin(t.x),this.mode){case 3:s*=this.cosph0*e-this.sinph0*r*n;break;case 2:s*=e;break;case 0:s*=-r*n;break;case 1:s*=r*n}return i=(i*this.cg-s*this.sg)*this.cw*(a=1/((h=s*this.cg+i*this.sg)*this.sw*this.h1+this.cw)),s=h*a,t.x=i*this.a,t.y=s*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var i,s,h,e={x:t.x,y:t.y};t.x=(i=this.pn1*t.x*(h=1/(this.pn1-t.y*this.sw)))*this.cg+(s=this.pn1*t.y*this.cw*h)*this.sg,t.y=s*this.cg-i*this.sg;var r=Qt(t.x,t.y);if(Math.abs(r)<a)e.x=0,e.y=t.y;else{var n,o;switch(o=1-r*r*this.pfact,o=(this.p-Math.sqrt(o))/(this.pn1/r+r/this.pn1),n=Math.sqrt(1-o*o),this.mode){case 3:e.y=Math.asin(n*this.sinph0+t.y*o*this.cosph0/r),t.y=(n-this.sinph0*Math.sin(e.y))*r,t.x*=o*this.cosph0;break;case 2:e.y=Math.asin(t.y*o/r),t.y=n*r,t.x*=o;break;case 0:e.y=Math.asin(n),t.y=-t.y;break;case 1:e.y=-Math.asin(n)}e.x=Math.atan2(t.x,t.y)}return t.x=e.x+this.long0,t.y=e.y,t},names:["Tilted_Perspective","tpers"]},Qi={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,i=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=i,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var i,s,h,a,e=t.x,r=t.y;if(e-=this.long0,"ellipse"===this.shape){r=Math.atan(this.radius_p2*Math.tan(r));var n=this.radius_p/Qt(this.radius_p*Math.cos(r),Math.sin(r));if(s=n*Math.cos(e)*Math.cos(r),h=n*Math.sin(e)*Math.cos(r),a=n*Math.sin(r),(this.radius_g-s)*s-h*h-a*a*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;i=this.radius_g-s,this.flip_axis?(t.x=this.radius_g_1*Math.atan(h/Qt(a,i)),t.y=this.radius_g_1*Math.atan(a/i)):(t.x=this.radius_g_1*Math.atan(h/i),t.y=this.radius_g_1*Math.atan(a/Qt(h,i)))}else"sphere"===this.shape&&(i=Math.cos(r),s=Math.cos(e)*i,h=Math.sin(e)*i,a=Math.sin(r),i=this.radius_g-s,this.flip_axis?(t.x=this.radius_g_1*Math.atan(h/Qt(a,i)),t.y=this.radius_g_1*Math.atan(a/i)):(t.x=this.radius_g_1*Math.atan(h/i),t.y=this.radius_g_1*Math.atan(a/Qt(h,i))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var i,s,h,a,e=-1,r=0,n=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(n=Math.tan(t.y/this.radius_g_1),r=Math.tan(t.x/this.radius_g_1)*Qt(1,n)):(r=Math.tan(t.x/this.radius_g_1),n=Math.tan(t.y/this.radius_g_1)*Qt(1,r));var o=n/this.radius_p;if((h=(s=2*this.radius_g*e)*s-4*(i=r*r+o*o+e*e)*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;a=(-s-Math.sqrt(h))/(2*i),e=this.radius_g+a*e,r*=a,n*=a,t.x=Math.atan2(r,e),t.y=Math.atan(n*Math.cos(t.x)/e),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(n=Math.tan(t.y/this.radius_g_1),r=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+n*n)):(r=Math.tan(t.x/this.radius_g_1),n=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+r*r)),(h=(s=2*this.radius_g*e)*s-4*(i=r*r+n*n+e*e)*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;a=(-s-Math.sqrt(h))/(2*i),e=this.radius_g+a*e,r*=a,n*=a,t.x=Math.atan2(r,e),t.y=Math.atan(n*Math.cos(t.x)/e)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]},Zi=1.340264,Xi=-.081106,Yi=893e-6,$i=.003796,ts=Math.sqrt(3)/2,is={init:function(){this.es=0,this.long0=void 0!==this.long0?this.long0:0,this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0},forward:function(t){var i=z(t.x-this.long0,this.over),s=Math.asin(ts*Math.sin(t.y)),h=s*s,a=h*h*h;return t.x=i*Math.cos(s)/(ts*(Zi+3*Xi*h+a*(7*Yi+9*$i*h))),t.y=s*(Zi+Xi*h+a*(Yi+$i*h)),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a;var i,s,h,a,e=t.y;for(a=0;a<12&&(e-=h=(e*(Zi+Xi*(i=e*e)+(s=i*i*i)*(Yi+$i*i))-t.y)/(Zi+3*Xi*i+s*(7*Yi+9*$i*i)),!(Math.abs(h)<1e-9));++a);return t.x=ts*t.x*(Zi+3*Xi*(i=e*e)+(s=i*i*i)*(7*Yi+9*$i*i))/Math.cos(e),t.y=Math.asin(Math.sin(e)/ts),t.x=z(t.x+this.long0,this.over),t},names:["eqearth","Equal Earth","Equal_Earth"]},ss=1e-10;function hs(t){var i,s,h,a=z(t.x-(this.long0||0),this.over),e=t.y;return i=this.am1+this.m1-Bt(e,s=Math.sin(e),h=Math.cos(e),this.en),s=h*a/(i*Math.sqrt(1-this.es*s*s)),t.x=i*Math.sin(s),t.y=this.am1-i*Math.cos(s),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function as(t){var i,s,a,e;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,s=Qt(t.x,t.y=this.am1-t.y),e=Vt(this.am1+this.m1-s,this.es,this.en),(i=Math.abs(e))<h)i=Math.sin(e),a=s*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*i*i)/Math.cos(e);else{if(!(Math.abs(i-h)<=ss))throw new Error;a=0}return t.x=z(a+(this.long0||0),this.over),t.y=wi(e),t}function es(t){var i,s,h=z(t.x-(this.long0||0),this.over),a=t.y;return s=this.cphi1+this.phi1-a,Math.abs(s)>ss?(t.x=s*Math.sin(i=h*Math.cos(a)/s),t.y=this.cphi1-s*Math.cos(i)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function rs(t){var i,s;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var a=Qt(t.x,t.y=this.cphi1-t.y);if(s=this.cphi1+this.phi1-a,Math.abs(s)>h)throw new Error;return i=Math.abs(Math.abs(s)-h)<=ss?0:a*Math.atan2(t.x,t.y)/Math.cos(s),t.x=z(i+(this.long0||0),this.over),t.y=wi(s),t}var ns={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<ss)throw new Error;this.es?(this.en=Ht(this.es),this.m1=Bt(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=as,this.forward=hs):(this.cphi1=Math.abs(this.phi1)+ss>=h?0:1/Math.tan(this.phi1),this.inverse=rs,this.forward=es)},names:["bonne","Bonne (Werner lat_1=90)"]};const os={OBLIQUE:{forward:function(t,i){let{x:s,y:h}=i;s+=t.long0;const a=Math.cos(s),e=Math.sin(h),n=Math.cos(h);i.x=z(Math.atan2(n*Math.sin(s),t.sphip*n*a+t.cphip*e)+t.lamp),i.y=Math.asin(t.sphip*e-t.cphip*n*a);const o=t.obliqueProjection.forward(i);return t.isIdentity&&(o.x*=r,o.y*=r),o},inverse:function(t,i){t.isIdentity&&(i.x*=e,i.y*=e);const s=t.obliqueProjection.inverse(i);let{x:h,y:a}=s;if(h<Number.MAX_VALUE){h-=t.lamp;const s=Math.cos(h),e=Math.sin(a),r=Math.cos(a);i.x=Math.atan2(r*Math.sin(h),t.sphip*r*s-t.cphip*e),i.y=Math.asin(t.sphip*e+t.cphip*r*s)}return i.x=z(i.x+t.long0),i}},TRANSVERSE:{forward:function(t,i){let{x:s,y:h}=i;s+=t.long0;const a=Math.cos(h),e=Math.cos(s);i.x=z(Math.atan2(a*Math.sin(s),Math.sin(h))+t.lamp),i.y=Math.asin(-1*a*e);const n=t.obliqueProjection.forward(i);return t.isIdentity&&(n.x*=r,n.y*=r),n},inverse:function(t,i){t.isIdentity&&(i.x*=e,i.y*=e);const s=t.obliqueProjection.inverse(i);let{x:h,y:a}=s;if(h<Number.MAX_VALUE){const s=Math.cos(a);h-=t.lamp,i.x=Math.atan2(s*Math.sin(h),-1*Math.sin(a)),i.y=Math.asin(s*Math.cos(h))}return i.x=z(i.x+t.long0),i}}},Ms={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}};var us={init:function(){if(this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.title=this.title||"General Oblique Transformation",this.isIdentity=B.includes(this.o_proj),!this.o_proj)throw new Error("Missing parameter: o_proj");if("ob_tran"===this.o_proj)throw new Error("Invalid value for o_proj: "+this.o_proj);const t=ft(this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim());if(!t)throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);let i;t.long0=0,this.obliqueProjection=t;const s=Object.keys(Ms),r=t=>{if(void 0===this[t])return;const i=parseFloat(this[t])*e;if(isNaN(i))throw new Error("Invalid value for "+t+": "+this[t]);return i};for(let t=0;t<s.length;t++){const h=Ms[s[t]],a=Object.entries(h);if(a.some((([t])=>void 0!==this[t]))){i=h;for(let t=0;t<a.length;t++){const[i,s]=a[t],h=r(i);if(void 0===h)throw new Error("Missing parameter: "+i+".");this[s]=h}break}}if(!i)throw new Error("No valid parameters provided for ob_tran projection.");const{lamp:n,phip:o}=function(t,i){let s,e;if(i===Ms.ROTATE){let i=t.oLongC,r=t.oLatC,n=t.oAlpha;if(Math.abs(Math.abs(r)-h)<=a)throw new Error("Invalid value for o_lat_c: "+t.o_lat_c+" should be < 90°");e=i+Math.atan2(-1*Math.cos(n),-1*Math.sin(n)*Math.sin(r)),s=Math.asin(Math.cos(r)*Math.sin(n))}else if(i===Ms.NEW_POLE)e=t.oLongP,s=t.oLatP;else{let i=t.oLong1,r=t.oLat1,n=t.oLong2,o=t.oLat2,M=Math.abs(r);if(Math.abs(r)>h-a)throw new Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°");if(Math.abs(o)>h-a)throw new Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°");if(Math.abs(r-o)<a)throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");if(M<a)throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");e=Math.atan2(Math.cos(r)*Math.sin(o)*Math.cos(i)-Math.sin(r)*Math.cos(o)*Math.cos(n),Math.sin(r)*Math.cos(o)*Math.sin(n)-Math.cos(r)*Math.sin(o)*Math.sin(i)),s=Math.atan(-1*Math.cos(e-i)/Math.tan(r))}return{lamp:e,phip:s}}(this,i);this.lamp=n,Math.abs(o)>a?(this.cphip=Math.cos(o),this.sphip=Math.sin(o),this.projectionType=os.OBLIQUE):this.projectionType=os.TRANSVERSE},forward:function(t){return this.projectionType.forward(this,t)},inverse:function(t){return this.projectionType.inverse(this,t)},names:["General Oblique Transformation","General_Oblique_Transformation","ob_tran"]};const ls=Object.assign((function(t,i,s){var h,a,e,r=!1;return void 0===i?(a=pt(t),h=mt,r=!0):(void 0!==i.x||Array.isArray(i))&&(s=i,a=pt(t),h=mt,r=!0),h||(h=pt(t)),a||(a=pt(i)),s?Nt(h,a,s):(e={forward:function(t,i){return Nt(h,a,t,i)},inverse:function(t,i){return Nt(a,h,t,i)}},r&&(e.oProj=a),e)}),{defaultDatum:"WGS84",Proj:ft,WGS84:new ft("WGS84"),Point:jt,toPoint:vt,defs:L,nadgrid:function(t,i,s){return i instanceof ArrayBuffer?function(t,i,s){var h=!0;void 0!==s&&!1===s.includeErrorFields&&(h=!1);var a=new DataView(i),e=function(t){var i=t.getInt32(8,!1);return 11!==i&&(11!==(i=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(a),r=function(t,i){return{nFields:t.getInt32(8,i),nSubgridFields:t.getInt32(24,i),nSubgrids:t.getInt32(40,i),shiftType:ot(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,i),fromSemiMinorAxis:t.getFloat64(136,i),toSemiMajorAxis:t.getFloat64(152,i),toSemiMinorAxis:t.getFloat64(168,i)}}(a,e),n=function(t,i,s,h){for(var a=176,e=[],r=0;r<i.nSubgrids;r++){var n=ut(t,a,s),o=lt(t,a,n,s,h),M=Math.round(1+(n.upperLongitude-n.lowerLongitude)/n.longitudeInterval),u=Math.round(1+(n.upperLatitude-n.lowerLatitude)/n.latitudeInterval);e.push({ll:[nt(n.lowerLongitude),nt(n.lowerLatitude)],del:[nt(n.longitudeInterval),nt(n.latitudeInterval)],lim:[M,u],count:n.gridNodeCount,cvs:Mt(o)});var l=16;!1===h&&(l=8),a+=176+n.gridNodeCount*l}return e}(a,r,e,h),o={header:r,subgrids:n};return ht[t]=o,o}(t,i,s):{ready:at(t,i)}},transform:dt,mgrs:Ct,version:"__VERSION__"});!function(t){t.Proj.projections.add(Kt),t.Proj.projections.add(Yt),t.Proj.projections.add($t),t.Proj.projections.add(si),t.Proj.projections.add(ai),t.Proj.projections.add(ei),t.Proj.projections.add(ni),t.Proj.projections.add(oi),t.Proj.projections.add(Mi),t.Proj.projections.add(Ei),t.Proj.projections.add(vi),t.Proj.projections.add(di),t.Proj.projections.add(mi),t.Proj.projections.add(Ni),t.Proj.projections.add(pi),t.Proj.projections.add(bi),t.Proj.projections.add(Ai),t.Proj.projections.add(yi),t.Proj.projections.add(Ii),t.Proj.projections.add(Ri),t.Proj.projections.add(Ci),t.Proj.projections.add(ki),t.Proj.projections.add(Oi),t.Proj.projections.add(Ti),t.Proj.projections.add(Di),t.Proj.projections.add(Bi),t.Proj.projections.add(Vi),t.Proj.projections.add(Ji),t.Proj.projections.add(Qi),t.Proj.projections.add(is),t.Proj.projections.add(ns),t.Proj.projections.add(us)}(ls);export{ls as default}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as n}from"./_commonjsHelpers.js";function r(n,r){return r.forEach((function(r){r&&"string"!=typeof r&&!Array.isArray(r)&&Object.keys(r).forEach((function(t){if("default"!==t&&!(t in n)){var e=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(n,t,e.get?e:{enumerable:!0,get:function(){return r[t]}})}}))})),Object.freeze(n)}var t,e={exports:{}},u=function(){if(t)return e.exports;t=1,e.exports=u,e.exports.parse=u,e.exports.stringify=function n(r){function t(n){return n.join(" ")}function e(n){return n.map(t).join(", ")}function u(n){return n.map(e).map(i).join(", ")}function i(n){return"("+n+")"}switch("Feature"===r.type&&(r=r.geometry),r.type){case"Point":return"POINT ("+t(r.coordinates)+")";case"LineString":return"LINESTRING ("+e(r.coordinates)+")";case"Polygon":return"POLYGON ("+u(r.coordinates)+")";case"MultiPoint":return"MULTIPOINT ("+e(r.coordinates)+")";case"MultiPolygon":return"MULTIPOLYGON ("+r.coordinates.map(u).map(i).join(", ")+")";case"MultiLineString":return"MULTILINESTRING ("+u(r.coordinates)+")";case"GeometryCollection":return"GEOMETRYCOLLECTION ("+r.geometries.map(n).join(", ")+")";default:throw new Error("stringify requires a valid GeoJSON Feature or geometry object as input")}};var n=/[-+]?([0-9]*\.[0-9]+|[0-9]+)([eE][-+]?[0-9]+)?/,r=new RegExp("^"+n.source+"(\\s"+n.source+"){1,}");function u(n){var t,e=n.split(";"),u=e.pop(),i=(e.shift()||"").split("=").pop(),l=0;function o(n){var r=u.substring(l).match(n);return r?(l+=r[0].length,r[0]):null}function a(){o(/^\s*/)}function f(){a();for(var n,t=0,e=[],u=[e],i=e;n=o(/^(\()/)||o(/^(\))/)||o(/^(,)/)||o(r);){if("("===n)u.push(i),u[u.length-1].push(i=[]),t++;else if(")"===n){if(0===i.length)return null;if(!(i=u.pop()))return null;if(0==--t)break}else if(","===n)u[u.length-1].push(i=[]);else{if(n.split(/\s/g).some(isNaN))return null;Array.prototype.push.apply(i,n.split(/\s/g).map(parseFloat))}a()}return 0!==t?null:e}function c(){for(var n,t,e=[];t=o(r)||o(/^(,)/);)","===t?(e.push(n),n=[]):t.split(/\s/g).some(isNaN)||(n||(n=[]),Array.prototype.push.apply(n,t.split(/\s/g).map(parseFloat))),a();return n?(e.push(n),e.length?e:null):null}return(t=function n(){return function(){if(!o(/^(point(\sz)?)/i))return null;if(a(),!o(/^(\()/))return null;var n=c();return n?(a(),o(/^(\))/)?{type:"Point",coordinates:n[0]}:null):null}()||function(){if(!o(/^(linestring(\sz)?)/i))return null;if(a(),!o(/^(\()/))return null;var n=c();return n&&o(/^(\))/)?{type:"LineString",coordinates:n}:null}()||function(){if(!o(/^(polygon(\sz)?)/i))return null;a();var n=f();return n?{type:"Polygon",coordinates:n}:null}()||function(){if(!o(/^(multipoint)/i))return null;a();var n=u.substring(u.indexOf("(")+1,u.length-1).replace(/\(/g,"").replace(/\)/g,"");u="MULTIPOINT ("+n+")";var r=f();return r?(a(),{type:"MultiPoint",coordinates:r}):null}()||function(){if(!o(/^(multilinestring)/i))return null;a();var n=f();return n?(a(),{type:"MultiLineString",coordinates:n}):null}()||function(){if(!o(/^(multipolygon)/i))return null;a();var n=f();return n?{type:"MultiPolygon",coordinates:n}:null}()||function(){var r,t=[];if(!o(/^(geometrycollection)/i))return null;if(a(),!o(/^(\()/))return null;for(;r=n();)t.push(r),a(),o(/^(,)/),a();return o(/^(\))/)?{type:"GeometryCollection",geometries:t}:null}()}())&&i.match(/\d+/)&&(t.crs={type:"name",properties:{name:"urn:ogc:def:crs:EPSG::"+i}}),t}return e.exports}(),i=r({__proto__:null,default:n(u)},[u]);export{i,u as w}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as t}from"./polygon-layer.js";export{A as ArcLayer,P as PointCloudLayer,a as PolygonLayer}from"./polygon-layer.js";import{G as n,u as o,L as i,p as r,c as s,a as l,U as c,M as u}from"./deck-provider.js";export{B as BitmapLayer,e as GeoJsonLayer,I as IconLayer,P as PathLayer,b as ScatterplotLayer,f as SolidPolygonLayer,T as TextLayer,g as _MultiIconLayer,h as _TextBackgroundLayer}from"./deck-provider.js";class d extends n{constructor(e={}){const{id:t=o("cube-geometry"),indices:n=!0}=e;super(n?{...e,id:t,topology:"triangle-list",indices:{size:1,value:p},attributes:{...S,...e.attributes}}:{...e,id:t,topology:"triangle-list",indices:void 0,attributes:{...C,...e.attributes}})}}const p=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),v=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),_=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),w=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),m=new Float32Array([1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,-1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,1,1,1,1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,-1,1,-1,1,1,1,-1,1,1,-1,-1,1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1]),y=new Float32Array([1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,1,0,1,1,0,0,1,1,0,1,0,0,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,1,0,0]),x=new Float32Array([1,0,1,1,0,0,1,1,0,0,0,1,1,0,0,1,1,0,1,1,0,0,0,1,1,1,1,1,1,0,1,1,1,0,0,1,1,1,0,1,1,1,1,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,0,1,0,1,0,1,0,1,1,1,1,1,0,1,0,0,1,1,0,1,1,1,0,1,0,1,0,0,0,1,0,0,1,1,0,1,0,1,1,1,1,1,0,1,1,1,0,0,1,1,0,0,1,1,1,0,1,1,1,1,1,1,1,0,0,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,0,1,0,1,0,1]),S={POSITION:{size:3,value:v},NORMAL:{size:3,value:_},TEXCOORD_0:{size:2,value:w}},C={POSITION:{size:3,value:m},TEXCOORD_0:{size:2,value:y},COLOR_0:{size:3,value:x}},L="uniform lineUniforms {\n float widthScale;\n float widthMinPixels;\n float widthMaxPixels;\n float useShortestPath;\n highp int widthUnits;\n} line;\n",z={name:"line",source:"struct LineUniforms {\n widthScale: f32,\n widthMinPixels: f32,\n widthMaxPixels: f32,\n useShortestPath: f32,\n widthUnits: i32,\n};\n\n@group(0) @binding(1)\nvar<uniform> line: LineUniforms;\n",vs:L,fs:L,uniformTypes:{widthScale:"f32",widthMinPixels:"f32",widthMaxPixels:"f32",useShortestPath:"f32",widthUnits:"i32"}},O={getSourcePosition:{type:"accessor",value:e=>e.sourcePosition},getTargetPosition:{type:"accessor",value:e=>e.targetPosition},getColor:{type:"accessor",value:[0,0,0,255]},getWidth:{type:"accessor",value:1},widthUnits:"pixels",widthScale:{type:"number",value:1,min:0},widthMinPixels:{type:"number",value:0,min:0},widthMaxPixels:{type:"number",value:Number.MAX_SAFE_INTEGER,min:0}};class M extends i{getBounds(){return this.getAttributeManager()?.getBounds(["instanceSourcePositions","instanceTargetPositions"])}getShaders(){return super.getShaders({vs:"#version 300 es\n#define SHADER_NAME line-layer-vertex-shader\nin vec3 positions;\nin vec3 instanceSourcePositions;\nin vec3 instanceTargetPositions;\nin vec3 instanceSourcePositions64Low;\nin vec3 instanceTargetPositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin float instanceWidths;\nout vec4 vColor;\nout vec2 uv;\nvec2 getExtrusionOffset(vec2 line_clipspace, float offset_direction, float width) {\nvec2 dir_screenspace = normalize(line_clipspace * project.viewportSize);\ndir_screenspace = vec2(-dir_screenspace.y, dir_screenspace.x);\nreturn dir_screenspace * offset_direction * width / 2.0;\n}\nvec3 splitLine(vec3 a, vec3 b, float x) {\nfloat t = (x - a.x) / (b.x - a.x);\nreturn vec3(x, mix(a.yz, b.yz, t));\n}\nvoid main(void) {\ngeometry.worldPosition = instanceSourcePositions;\ngeometry.worldPositionAlt = instanceTargetPositions;\nvec3 source_world = instanceSourcePositions;\nvec3 target_world = instanceTargetPositions;\nvec3 source_world_64low = instanceSourcePositions64Low;\nvec3 target_world_64low = instanceTargetPositions64Low;\nif (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {\nsource_world.x = mod(source_world.x + 180., 360.0) - 180.;\ntarget_world.x = mod(target_world.x + 180., 360.0) - 180.;\nfloat deltaLng = target_world.x - source_world.x;\nif (deltaLng * line.useShortestPath > 180.) {\nsource_world.x += 360. * line.useShortestPath;\nsource_world = splitLine(source_world, target_world, 180. * line.useShortestPath);\nsource_world_64low = vec3(0.0);\n} else if (deltaLng * line.useShortestPath < -180.) {\ntarget_world.x += 360. * line.useShortestPath;\ntarget_world = splitLine(source_world, target_world, 180. * line.useShortestPath);\ntarget_world_64low = vec3(0.0);\n} else if (line.useShortestPath < 0.) {\ngl_Position = vec4(0.);\nreturn;\n}\n}\nvec4 source_commonspace;\nvec4 target_commonspace;\nvec4 source = project_position_to_clipspace(source_world, source_world_64low, vec3(0.), source_commonspace);\nvec4 target = project_position_to_clipspace(target_world, target_world_64low, vec3(0.), target_commonspace);\nfloat segmentIndex = positions.x;\nvec4 p = mix(source, target, segmentIndex);\ngeometry.position = mix(source_commonspace, target_commonspace, segmentIndex);\nuv = positions.xy;\ngeometry.uv = uv;\ngeometry.pickingColor = instancePickingColors;\nfloat widthPixels = clamp(\nproject_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),\nline.widthMinPixels, line.widthMaxPixels\n);\nvec3 offset = vec3(\ngetExtrusionOffset(target.xy - source.xy, positions.y, widthPixels),\n0.0);\nDECKGL_FILTER_SIZE(offset, geometry);\nDECKGL_FILTER_GL_POSITION(p, geometry);\ngl_Position = p + vec4(project_pixel_size_to_clipspace(offset.xy), 0.0, 0.0);\nvColor = vec4(instanceColors.rgb, instanceColors.a * layer.opacity);\nDECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\n#define SHADER_NAME line-layer-fragment-shader\nprecision highp float;\nin vec4 vColor;\nin vec2 uv;\nout vec4 fragColor;\nvoid main(void) {\ngeometry.uv = uv;\nfragColor = vColor;\nDECKGL_FILTER_COLOR(fragColor, geometry);\n}\n",source:'// ---------- Helper Structures & Functions ----------\n\n// Placeholder filter functions.\nfn deckgl_filter_size(offset: vec3<f32>, geometry: Geometry) -> vec3<f32> {\n return offset;\n}\nfn deckgl_filter_gl_position(p: vec4<f32>, geometry: Geometry) -> vec4<f32> {\n return p;\n}\nfn deckgl_filter_color(color: vec4<f32>, geometry: Geometry) -> vec4<f32> {\n return color;\n}\n\n// Compute an extrusion offset given a line direction (in clipspace),\n// an offset direction (-1 or 1), and a width in pixels.\n// Assumes a uniform "project" with a viewportSize field is available.\nfn getExtrusionOffset(line_clipspace: vec2<f32>, offset_direction: f32, width: f32) -> vec2<f32> {\n // project.viewportSize should be provided as a uniform (not shown here)\n let dir_screenspace = normalize(line_clipspace * project.viewportSize);\n // Rotate by 90°: (x,y) becomes (-y,x)\n let rotated = vec2<f32>(-dir_screenspace.y, dir_screenspace.x);\n return rotated * offset_direction * width / 2.0;\n}\n\n// Splits the line between two points at a given x coordinate.\n// Interpolates the y and z components.\nfn splitLine(a: vec3<f32>, b: vec3<f32>, x: f32) -> vec3<f32> {\n let t: f32 = (x - a.x) / (b.x - a.x);\n return vec3<f32>(x, a.yz + t * (b.yz - a.yz));\n}\n\n// ---------- Uniforms & Global Structures ----------\n\n// Uniforms for line, color, and project are assumed to be defined elsewhere.\n// For example:\n//\n// @group(0) @binding(0)\n// var<uniform> line: LineUniform;\n//\n// struct ColorUniform {\n// opacity: f32,\n// };\n// @group(0) @binding(1)\n// var<uniform> color: ColorUniform;\n//\n// struct ProjectUniform {\n// viewportSize: vec2<f32>,\n// };\n// @group(0) @binding(2)\n// var<uniform> project: ProjectUniform;\n\n\n\n// ---------- Vertex Output Structure ----------\n\nstruct Varyings {\n @builtin(position) gl_Position: vec4<f32>,\n @location(0) vColor: vec4<f32>,\n @location(1) uv: vec2<f32>,\n};\n\n// ---------- Vertex Shader Entry Point ----------\n\n@vertex\nfn vertexMain(\n @location(0) positions: vec3<f32>,\n @location(1) instanceSourcePositions: vec3<f32>,\n @location(2) instanceTargetPositions: vec3<f32>,\n @location(3) instanceSourcePositions64Low: vec3<f32>,\n @location(4) instanceTargetPositions64Low: vec3<f32>,\n @location(5) instanceColors: vec4<f32>,\n @location(6) instancePickingColors: vec3<f32>,\n @location(7) instanceWidths: f32\n) -> Varyings {\n var geometry: Geometry;\n geometry.worldPosition = instanceSourcePositions;\n geometry.worldPositionAlt = instanceTargetPositions;\n\n var source_world: vec3<f32> = instanceSourcePositions;\n var target_world: vec3<f32> = instanceTargetPositions;\n var source_world_64low: vec3<f32> = instanceSourcePositions64Low;\n var target_world_64low: vec3<f32> = instanceTargetPositions64Low;\n\n // Apply shortest-path adjustments if needed.\n if (line.useShortestPath > 0.5 || line.useShortestPath < -0.5) {\n source_world.x = (source_world.x + 180.0 % 360.0) - 180.0;\n target_world.x = (target_world.x + 180.0 % 360.0) - 180.0;\n let deltaLng: f32 = target_world.x - source_world.x;\n\n if (deltaLng * line.useShortestPath > 180.0) {\n source_world.x = source_world.x + 360.0 * line.useShortestPath;\n source_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);\n source_world_64low = vec3<f32>(0.0, 0.0, 0.0);\n } else if (deltaLng * line.useShortestPath < -180.0) {\n target_world.x = target_world.x + 360.0 * line.useShortestPath;\n target_world = splitLine(source_world, target_world, 180.0 * line.useShortestPath);\n target_world_64low = vec3<f32>(0.0, 0.0, 0.0);\n } else if (line.useShortestPath < 0.0) {\n var abortOut: Varyings;\n abortOut.gl_Position = vec4<f32>(0.0);\n abortOut.vColor = vec4<f32>(0.0);\n abortOut.uv = vec2<f32>(0.0);\n return abortOut;\n }\n }\n\n // Project Pos and target positions to clip space.\n let sourceResult = project_position_to_clipspace_and_commonspace(source_world, source_world_64low, vec3<f32>(0.0));\n let targetResult = project_position_to_clipspace_and_commonspace(target_world, target_world_64low, vec3<f32>(0.0));\n let sourcePos: vec4<f32> = sourceResult.clipPosition;\n let targetPos: vec4<f32> = targetResult.clipPosition;\n let source_commonspace: vec4<f32> = sourceResult.commonPosition;\n let target_commonspace: vec4<f32> = targetResult.commonPosition;\n\n // Interpolate along the line segment.\n let segmentIndex: f32 = positions.x;\n let p: vec4<f32> = sourcePos + segmentIndex * (targetPos - sourcePos);\n geometry.position = source_commonspace + segmentIndex * (target_commonspace - source_commonspace);\n let uv: vec2<f32> = positions.xy;\n geometry.uv = uv;\n geometry.pickingColor = instancePickingColors;\n\n // Determine width in pixels.\n let widthPixels: f32 = clamp(\n project_unit_size_to_pixel(instanceWidths * line.widthScale, line.widthUnits),\n line.widthMinPixels, line.widthMaxPixels\n );\n\n // Compute extrusion offset.\n let extrusion: vec2<f32> = getExtrusionOffset(targetPos.xy - sourcePos.xy, positions.y, widthPixels);\n let offset: vec3<f32> = vec3<f32>(extrusion, 0.0);\n\n // Apply deck.gl filter functions.\n let filteredOffset = deckgl_filter_size(offset, geometry);\n let filteredP = deckgl_filter_gl_position(p, geometry);\n\n let clipOffset: vec2<f32> = project_pixel_size_to_clipspace(filteredOffset.xy);\n let finalPosition: vec4<f32> = filteredP + vec4<f32>(clipOffset, 0.0, 0.0);\n\n // Compute color.\n var vColor: vec4<f32> = vec4<f32>(instanceColors.rgb, instanceColors.a * color.opacity);\n // vColor = deckgl_filter_color(vColor, geometry);\n\n var output: Varyings;\n output.gl_Position = finalPosition;\n output.vColor = vColor;\n output.uv = uv;\n return output;\n}\n\n@fragment\nfn fragmentMain(\n @location(0) vColor: vec4<f32>,\n @location(1) uv: vec2<f32>\n) -> @location(0) vec4<f32> {\n // Create and initialize geometry with the provided uv.\n var geometry: Geometry;\n geometry.uv = uv;\n\n // Start with the input color.\n var fragColor: vec4<f32> = vColor;\n\n // Apply the deck.gl filter to the color.\n fragColor = deckgl_filter_color(fragColor, geometry);\n\n // Apply premultiplied alpha as required by transparent canvas\n fragColor = deckgl_premultiplied_alpha(fragColor);\n\n return fragColor;\n}\n',modules:[r,s,l,z]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({instanceSourcePositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getSourcePosition"},instanceTargetPositions:{size:3,type:"float64",fp64:this.use64bitPositions(),transition:!0,accessor:"getTargetPosition"},instanceColors:{size:this.props.colorFormat.length,type:"unorm8",transition:!0,accessor:"getColor",defaultValue:[0,0,0,255]},instanceWidths:{size:1,transition:!0,accessor:"getWidth",defaultValue:1}})}updateState(e){super.updateState(e),e.changeFlags.extensionsChanged&&(this.state.model?.destroy(),this.state.model=this._getModel(),this.getAttributeManager().invalidateAll())}draw({}){const{widthUnits:e,widthScale:t,widthMinPixels:n,widthMaxPixels:o,wrapLongitude:i}=this.props,r=this.state.model,s={widthUnits:c[e],widthScale:t,widthMinPixels:n,widthMaxPixels:o,useShortestPath:i?1:0};r.shaderInputs.setProps({line:s}),r.draw(this.context.renderPass),i&&(r.shaderInputs.setProps({line:{...s,useShortestPath:-1}}),r.draw(this.context.renderPass))}_getModel(){const e="webgpu"===this.context.device.type?{depthWriteEnabled:!0,depthCompare:"less-equal"}:void 0;return new u(this.context.device,{...this.getShaders(),id:this.props.id,bufferLayout:this.getAttributeManager().getBufferLayouts(),geometry:new n({topology:"triangle-strip",attributes:{positions:{size:3,value:new Float32Array([0,-1,0,0,1,0,1,-1,0,1,1,0])}}}),parameters:e,isInstanced:!0})}}M.layerName="LineLayer",M.defaultProps=O;class U extends t{_updateGeometry(){const e=new d;this.state.fillModel.setGeometry(e)}draw({}){const{elevationScale:e,extruded:t,offset:n,coverage:o,cellSize:i,angle:r,radiusUnits:s}=this.props,a=this.state.fillModel;a.shaderInputs.setProps({column:{radius:i/2,radiusUnits:c[s],angle:r,offset:n,extruded:t,stroked:!1,coverage:o,elevationScale:e,edgeDistance:1,isStroke:!1,widthUnits:0,widthScale:0,widthMinPixels:0,widthMaxPixels:0}}),a.draw(this.context.renderPass)}}U.layerName="GridCellLayer",U.defaultProps={cellSize:{type:"number",min:0,value:1e3},offset:{type:"array",value:[1,1]}};export{t as ColumnLayer,U as GridCellLayer,M as LineLayer}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as t,q as s,s as o,t as r,v as e,w as n,x as h,V as u,y as m,z as g,A as f,D as P,E as M,F as v,H as w,J as b,K as x,N as y,O as S,Q as z,R as Z,M as R,G as O,u as _,X as A,Y as X,Z as D,_ as V,$ as E,a0 as F,a1 as I,a2 as T,a3 as $,a4 as B,a5 as N,a6 as q,a7 as Y,a8 as G,a9 as H,aa as J,ab as W,ac as K,ad as Q,ae as tt}from"./deck-provider.js";export{aj as AmbientLight,ao as Attribute,ap as AttributeManager,C as CompositeLayer,am as Deck,aq as DeckRenderer,L as Layer,an as LayerManager,ai as LightingEffect,au as MapController,at as MapView,ah as OPERATION,av as TRANSITION_EVENTS,ay as Tesselator,U as UNIT,af as VERSION,aH as Widget,aI as _Component,aJ as _ComponentState,ak as _LayersPass,al as _PickLayersPass,aF as _applyStyles,aE as _compareProps,aB as _count,d as _deepEqual,az as _fillArray,aA as _flatten,aC as _memoize,aD as _mergeShaders,aG as _removeStyles,aw as assert,c as color,l as createIterable,ax as fp64LowPart,ag as getShaderAssembler,i as gouraudMaterial,j as log,k as phongMaterial,a as picking,ar as project,p as project32,as as shadow}from"./deck-provider.js";export{L as LayerExtension}from"./layer-extension.js";const st=1e-6;class ot{constructor({phi:t=0,theta:s=0,radius:o=1,bearing:i,pitch:r,altitude:e,radiusScale:n=6371e3}={}){this.phi=t,this.theta=s,this.radius=o||e||1,this.radiusScale=n||1,void 0!==i&&(this.bearing=i),void 0!==r&&(this.pitch=r),this.check()}toString(){return this.formatString(t)}formatString({printTypes:t=!1}){const o=s;return`${t?"Spherical":""}[rho:${o(this.radius)},theta:${o(this.theta)},phi:${o(this.phi)}]`}equals(t){return o(this.radius,t.radius)&&o(this.theta,t.theta)&&o(this.phi,t.phi)}exactEquals(t){return this.radius===t.radius&&this.theta===t.theta&&this.phi===t.phi}get bearing(){return 180-r(this.phi)}set bearing(t){this.phi=Math.PI-e(t)}get pitch(){return r(this.theta)}set pitch(t){this.theta=e(t)}get longitude(){return r(this.phi)}get latitude(){return r(this.theta)}get lng(){return r(this.phi)}get lat(){return r(this.theta)}get z(){return(this.radius-1)*this.radiusScale}set(t,s,o){return this.radius=t,this.phi=s,this.theta=o,this.check()}clone(){return(new ot).copy(this)}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this.check()}fromLngLatZ([t,s,o]){return this.radius=1+o/this.radiusScale,this.phi=e(s),this.theta=e(t),this.check()}fromVector3(t){return this.radius=n(t),this.radius>0&&(this.theta=Math.atan2(t[0],t[1]),this.phi=Math.acos(h(t[2]/this.radius,-1,1))),this.check()}toVector3(){return new u(0,0,this.radius).rotateX({radians:this.theta}).rotateZ({radians:this.phi})}makeSafe(){return this.phi=Math.max(st,Math.min(Math.PI-st,this.phi)),this}check(){if(!(Number.isFinite(this.phi)&&Number.isFinite(this.theta)&&this.radius>0))throw new Error("SphericalCoordinates: some fields set to invalid numbers");return this}}const it=["longitude","latitude","zoom"],rt={curve:1.414,speed:1.2};function et(t,s,o){const i=(o=Object.assign({},rt,o)).curve,r=t.zoom,e=[t.longitude,t.latitude],n=x(r),a=[s.longitude,s.latitude],h=x(s.zoom-r),c=M(e),u=M(a),l=v([],u,c),p=Math.max(t.width,t.height),d=p/h,m=b(l)*n,g=Math.max(m,.01),f=i*i,P=(d*d-p*p+f*f*g*g)/(2*p*f*g),w=(d*d-p*p-f*f*g*g)/(2*d*f*g),y=Math.log(Math.sqrt(P*P+1)-P),S=Math.log(Math.sqrt(w*w+1)-w);return{startZoom:r,startCenterXY:c,uDelta:l,w0:p,u1:m,S:(S-y)/i,rho:i,rho2:f,r0:y,r1:S}}const nt=[255,255,255],ht=1,ct=[1,0,0],ut=[0,0,1];let lt=0;class pt{constructor(t={}){this.type="point";const{color:s=nt}=t,{intensity:o=ht}=t,{position:i=ut}=t;this.id=t.id||"point-"+lt++,this.color=s,this.intensity=o,this.type="point",this.position=i,this.attenuation=function(t){return t.attenuation?t.attenuation:ct}(t),this.projectedLight={...this}}getProjectedLight({layer:t}){const{projectedLight:s}=this,o=t.context.viewport,{coordinateSystem:i,coordinateOrigin:r}=t.props,e=y(this.position,{viewport:o,coordinateSystem:i,coordinateOrigin:r,fromCoordinateSystem:o.isGeospatial?S.LNGLAT:S.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return s.color=this.color,s.intensity=this.intensity,s.position=e,s}}class dt extends pt{getProjectedLight({layer:t}){const{projectedLight:s}=this,o=t.context.viewport,{coordinateSystem:i,coordinateOrigin:r,modelMatrix:e}=t.props,{cameraPosition:n}=z({viewport:o,modelMatrix:e,coordinateSystem:i,coordinateOrigin:r});return s.color=this.color,s.intensity=this.intensity,s.position=n,s}}const mt=Math.PI/180,gt=23.4397*mt;function ft(t,s,o){const{azimuth:i,altitude:r}=function(t,s,o){const i=mt*-o,r=mt*s,e=function(t){return function(t){return("number"==typeof t?t:t.getTime())/864e5-.5+2440588}(t)-2451545}(t),n=function(t){const s=function(t){const s=t;return s+mt*(1.9148*Math.sin(s)+.02*Math.sin(2*s)+3e-4*Math.sin(3*s))+102.9372*mt+Math.PI}(mt*(357.5291+.98560028*t));return{declination:Mt(s,0),rightAscension:Pt(s,0)}}(e),a=function(t,s){return mt*(280.147+360.9856235*t)-s}(e,i)-n.rightAscension;return{azimuth:vt(a,r,n.declination),altitude:wt(a,r,n.declination)}}(t,s,o);return[Math.sin(i)*Math.cos(r),Math.cos(i)*Math.cos(r),-Math.sin(r)]}function Pt(t,s){const o=t;return Math.atan2(Math.sin(o)*Math.cos(gt)-Math.tan(s)*Math.sin(gt),Math.cos(o))}function Mt(t,s){const o=t;return Math.asin(Math.sin(s)*Math.cos(gt)+Math.cos(s)*Math.sin(gt)*Math.sin(o))}function vt(t,s,o){const i=t,r=s,e=o;return Math.atan2(Math.sin(i),Math.cos(i)*Math.sin(r)-Math.tan(e)*Math.cos(r))}function wt(t,s,o){const i=t,r=s,e=o;return Math.asin(Math.sin(r)*Math.sin(e)+Math.cos(r)*Math.cos(e)*Math.cos(i))}class bt extends Z{constructor(t){super(t),this.timestamp=t.timestamp}getProjectedLight({layer:t}){const{viewport:s}=t.context;if(s.resolution&&s.resolution>0){const[t,s,o]=ft(this.timestamp,0,0);this.direction=[t,-o,s]}else{const{latitude:t,longitude:o}=s;this.direction=ft(this.timestamp,t,o)}return this}}const xt=[-1,-1,1,-1,-1,1,1,1];class yt extends R{constructor(t,s){const o=xt.map((t=>-1===t?0:t));s.source&&(s={...s,source:`struct VertexInputs {\n @location(0) clipSpacePosition: vec2<f32>,\n @location(1) texCoord: vec2<f32>,\n @location(2) coordinate: vec2<f32> \n}\n\nstruct FragmentInputs {\n @builtin(position) Position : vec4<f32>,\n @location(0) position : vec2<f32>,\n @location(1) coordinate : vec2<f32>,\n @location(2) uv : vec2<f32>\n};\n\n@vertex\nfn vertexMain(inputs: VertexInputs) -> FragmentInputs {\n var outputs: FragmentInputs;\n outputs.Position = vec4(inputs.clipSpacePosition, 0., 1.);\n outputs.position = inputs.clipSpacePosition;\n outputs.coordinate = inputs.coordinate;\n outputs.uv = inputs.texCoord;\n return outputs;\n}\n\n${s.source}`}),super(t,{id:s.id||_("clip-space"),...s,vs:"#version 300 es\nin vec2 clipSpacePositions;\nin vec2 texCoords;\nin vec2 coordinates;\n\nout vec2 position;\nout vec2 coordinate;\nout vec2 uv;\n\nvoid main(void) {\n gl_Position = vec4(clipSpacePositions, 0., 1.);\n position = clipSpacePositions;\n coordinate = coordinates;\n uv = texCoords;\n}\n",vertexCount:4,geometry:new O({topology:"triangle-strip",vertexCount:4,attributes:{clipSpacePositions:{size:2,value:new Float32Array(xt)},texCoords:{size:2,value:new Float32Array(o)},coordinates:{size:2,value:new Float32Array(o)}}})})}}const St={name:"screen",fs:"uniform screenUniforms {\n vec2 texSize;\n} screen;\n",uniformTypes:{texSize:"vec2<f32>"}};class zt extends A{constructor(t,s){super(t,s);const{module:o,fs:i,id:r}=s;this.model=new yt(t,{id:r,fs:i,modules:[o,St],parameters:{depthWriteEnabled:!1,depthCompare:"always",depthBias:0,blend:!0,blendColorSrcFactor:"one",blendColorDstFactor:"one-minus-src-alpha",blendAlphaSrcFactor:"one",blendAlphaDstFactor:"one-minus-src-alpha",blendColorOperation:"add",blendAlphaOperation:"add"}})}render(t){this._renderPass(this.device,t)}delete(){this.model.destroy(),this.model=null}_renderPass(t,s){const{clearCanvas:o,inputBuffer:i,outputBuffer:r}=s,e=[i.width,i.height];this.model.shaderInputs.setProps({screen:{texSrc:i.colorAttachments[0],texSize:e},...s.moduleProps});const n=this.device.beginRenderPass({framebuffer:r,parameters:{viewport:[0,0,...e]},clearColor:!!o&&[0,0,0,0],clearDepth:1,clearStencil:!1});this.model.draw(n),n.end()}}class Ct{constructor(t,s){this.id=`${t.name}-pass`,this.props=s,X(t),this.module=t}setup({device:t}){this.passes=function(t,s,o){return s.passes.map(((i,r)=>{const e=function(t,s){return s.filter?Rt("string"==typeof s.filter?s.filter:`${t.name}_filterColor_ext`):s.sampler?Ot("string"==typeof s.sampler?s.sampler:`${t.name}_sampleColor`):""}(s,i);return new zt(t,{id:`${o}-${r}`,module:s,fs:e})}))}(t,this.module,this.id)}setProps(t){this.props=t}preRender(){}postRender(t){const s=this.passes,{target:o}=t;let i=t.inputBuffer,r=t.swapBuffer;for(let e=0;e<s.length;e++){const n=void 0!==o&&e===s.length-1;n&&(r=o);const a=!n||Boolean(t.clearCanvas),h={};h[this.module.name]={...this.props,...this.module.passes[e].uniforms},s[e].render({clearCanvas:a,inputBuffer:i,outputBuffer:r,moduleProps:h});const c=r;r=i,i=c}return i}cleanup(){if(this.passes){for(const t of this.passes)t.delete();this.passes=void 0}}}const Zt="#version 300 es\nuniform sampler2D texSrc;\n\nin vec2 position;\nin vec2 coordinate;\nin vec2 uv;\n\nout vec4 fragColor;\n",Rt=t=>`${Zt}\nvoid main() {\n fragColor = texture(texSrc, coordinate);\n fragColor = ${t}(fragColor, screen.texSize, coordinate);\n}\n`,Ot=t=>`${Zt}\nvoid main() {\n fragColor = ${t}(texSrc, screen.texSize, coordinate);\n}\n`,_t=Math.PI/180;function Lt({height:t,focalDistance:s,orbitAxis:o,rotationX:i,rotationOrbit:r,zoom:e}){const n="Z"===o?[0,0,1]:[0,1,0],a="Z"===o?[0,-s,0]:[0,0,s],h=(new F).lookAt({eye:a,up:n});h.rotateX(i*_t),"Z"===o?h.rotateZ(r*_t):h.rotateY(r*_t);const c=Math.pow(2,e)/t;return h.scale(c),h}class At extends D{constructor(t){const{height:s,projectionMatrix:o,fovy:i=50,orbitAxis:r="Z",target:e=[0,0,0],rotationX:n=0,rotationOrbit:a=0,zoom:h=0}=t,c=o?o[5]/2:V(i);super({...t,longitude:void 0,viewMatrix:Lt({height:s||1,focalDistance:c,orbitAxis:r,rotationX:n,rotationOrbit:a,zoom:h}),fovy:i,focalDistance:c,position:e,zoom:h}),this.target=e,this.orbitAxis=r,this.rotationX=n,this.rotationOrbit=a,this.fovy=i,this.projectedCenter=this.project(this.center)}unproject(t,{topLeft:s=!0}={}){const[o,i,r=this.projectedCenter[2]]=t,e=s?i:this.height-i,[n,a,h]=E([o,e,r],this.pixelUnprojectionMatrix);return[n,a,h]}panByPosition(t,s,o){const i=this.project(t);return{target:this.unproject([this.width/2+i[0]-s[0],this.height/2+i[1]-s[1],this.projectedCenter[2]])}}}At.displayName="OrbitViewport";const Xt=(new F).lookAt({eye:[0,0,1]});function Dt({width:t,height:s,near:o,far:i,padding:r}){let e=-t/2,n=t/2,a=-s/2,c=s/2;if(r){const{left:o=0,right:i=0,top:u=0,bottom:l=0}=r,p=h((o+t-i)/2,0,t)-t/2,d=h((u+s-l)/2,0,s)-s/2;e-=p,n-=p,a+=d,c+=d}return(new F).ortho({left:e,right:n,bottom:a,top:c,near:o,far:i})}class Vt extends D{constructor(t){const{width:s,height:o,near:i=.1,far:r=1e3,zoom:e=0,target:n=[0,0,0],padding:a=null,flipY:h=!0}=t,c=t.zoomX??(Array.isArray(e)?e[0]:e),u=t.zoomY??(Array.isArray(e)?e[1]:e),l=Math.min(c,u),p=Math.pow(2,l);let d;if(c!==u){const t=Math.pow(2,c),s=Math.pow(2,u);d={unitsPerMeter:[t/p,s/p,1],metersPerUnit:[p/t,p/s,1]}}super({...t,longitude:void 0,position:n,viewMatrix:Xt.clone().scale([p,p*(h?-1:1),p]),projectionMatrix:Dt({width:s||1,height:o||1,padding:a,near:i,far:r}),zoom:l,distanceScales:d}),this.target=n,this.zoomX=c,this.zoomY=u,this.flipY=h}projectFlat([t,s]){const{unitsPerMeter:o}=this.distanceScales;return[t*o[0],s*o[1]]}unprojectFlat([t,s]){const{metersPerUnit:o}=this.distanceScales;return[t*o[0],s*o[1]]}panByPosition(t,s,o){const i=E(s,this.pixelUnprojectionMatrix),r=this.projectFlat(t),e=f([],r,I([],i)),n=f([],this.center,e);return{target:this.unprojectFlat(n)}}}Vt.displayName="OrthographicViewport";class jt extends D{constructor(t){const{longitude:s,latitude:o,modelMatrix:i,bearing:r=0,pitch:e=0,up:n=[0,0,1]}=t,a=new ot({bearing:r,pitch:-90===e?1e-4:90+e}).toVector3().normalize(),h=i?new F(i).transformAsVector(a):a,c=Number.isFinite(o)?T({latitude:o}):0,u=Math.pow(2,c),l=(new F).lookAt({eye:[0,0,0],center:h,up:n}).scale(u);super({...t,zoom:c,viewMatrix:l}),this.latitude=o,this.longitude=s,this.pitch=e,this.bearing=r,this.up=n}}jt.displayName="FirstPersonViewport";class Et extends N{constructor(t){const{width:s,height:o,position:i=[0,0,0],bearing:r=0,pitch:e=0,longitude:n=null,latitude:a=null,maxPitch:h=90,minPitch:c=-90,startRotatePos:u,startBearing:l,startPitch:p,startZoomPosition:d,startPanPos:m,startPanPosition:g}=t;super({width:s,height:o,position:i,bearing:r,pitch:e,longitude:n,latitude:a,maxPitch:h,minPitch:c},{startRotatePos:u,startBearing:l,startPitch:p,startZoomPosition:d,startPanPos:m,startPanPosition:g}),this.makeViewport=t.makeViewport}panStart({pos:t}){const{position:s}=this.getViewportProps();return this._getUpdatedState({startPanPos:t,startPanPosition:s})}pan({pos:t}){if(!t)return this;const{startPanPos:s=[0,0],startPanPosition:o=[0,0]}=this.getState(),{width:i,height:r,bearing:e,pitch:n}=this.getViewportProps(),a=500*(t[0]-s[0])/i,h=500*(t[1]-s[1])/r,c=new ot({bearing:e,pitch:n}),l=new ot({bearing:e,pitch:-90}),p=c.toVector3().normalize(),d=l.toVector3().cross(p).normalize();return this._getUpdatedState({position:new u(o).add(d.scale(a)).add(p.scale(h))})}panEnd(){return this._getUpdatedState({startPanPos:null,startPanPosition:null})}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startBearing:this.getViewportProps().bearing,startPitch:this.getViewportProps().pitch})}rotate({pos:t,deltaAngleX:s=0,deltaAngleY:o=0}){const{startRotatePos:i,startBearing:r,startPitch:e}=this.getState(),{width:n,height:a}=this.getViewportProps();if(!i||void 0===r||void 0===e)return this;let h;return h=t?{bearing:r-(t[0]-i[0])/n*180,pitch:e-(t[1]-i[1])/a*90}:{bearing:r-s,pitch:e-o},this._getUpdatedState(h)}rotateEnd(){return this._getUpdatedState({startRotatePos:null,startBearing:null,startPitch:null})}zoomStart(){return this._getUpdatedState({startZoomPosition:this.getViewportProps().position})}zoom({pos:t,scale:s}){const o=this.getViewportProps(),i=this.getState().startZoomPosition||o.position,r=this.makeViewport(o),{projectionMatrix:e,width:n}=r,a=2*Math.atan(1/e[0])*(t[0]/n-.5),h=this.getDirection(!0);return this._move(h.rotateZ({radians:-a}),20*Math.log2(s),i)}zoomEnd(){return this._getUpdatedState({startZoomPosition:null})}moveLeft(t=20){const s=this.getDirection(!0);return this._move(s.rotateZ({radians:Math.PI/2}),t)}moveRight(t=20){const s=this.getDirection(!0);return this._move(s.rotateZ({radians:-Math.PI/2}),t)}moveUp(t=20){const s=this.getDirection(!0);return this._move(s,t)}moveDown(t=20){const s=this.getDirection(!0);return this._move(s.negate(),t)}rotateLeft(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing-t})}rotateRight(t=15){return this._getUpdatedState({bearing:this.getViewportProps().bearing+t})}rotateUp(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch+t})}rotateDown(t=10){return this._getUpdatedState({pitch:this.getViewportProps().pitch-t})}zoomIn(t=20){return this._move(new u(0,0,1),t)}zoomOut(t=20){return this._move(new u(0,0,-1),t)}shortestPathFrom(t){const s=t.getViewportProps(),o={...this.getViewportProps()},{bearing:i,longitude:r}=o;return Math.abs(i-s.bearing)>180&&(o.bearing=i<0?i+360:i-360),null!==r&&null!==s.longitude&&Math.abs(r-s.longitude)>180&&(o.longitude=r<0?r+360:r-360),o}_move(t,s,o=this.getViewportProps().position){const i=t.scale(s);return this._getUpdatedState({position:new u(o).add(i)})}getDirection(t=!1){return new ot({bearing:this.getViewportProps().bearing,pitch:t?90:90+this.getViewportProps().pitch}).toVector3().normalize()}_getUpdatedState(t){return new Et({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...t})}applyConstraints(t){const{pitch:s,maxPitch:o,minPitch:i,longitude:r,bearing:e}=t;return t.pitch=h(s,i,o),null!==r&&(r<-180||r>180)&&(t.longitude=q(r+180,360)-180),(e<-180||e>180)&&(t.bearing=q(e+180,360)-180),t}}class Ft extends ${constructor(){super(...arguments),this.ControllerState=Et,this.transition={transitionDuration:300,transitionInterpolator:new B(["position","pitch","bearing"])}}}class It extends Y{constructor(t={}){super(t)}getViewportType(){return jt}get ControllerType(){return Ft}}It.displayName="FirstPersonView";class Tt extends N{constructor(t){const{width:s,height:o,rotationX:i=0,rotationOrbit:r=0,target:e=[0,0,0],zoom:n=0,minRotationX:a=-90,maxRotationX:h=90,minZoom:c=-1/0,maxZoom:u=1/0,startPanPosition:l,startRotatePos:p,startRotationX:d,startRotationOrbit:m,startZoomPosition:g,startZoom:f}=t;super({width:s,height:o,rotationX:i,rotationOrbit:r,target:e,zoom:n,minRotationX:a,maxRotationX:h,minZoom:c,maxZoom:u},{startPanPosition:l,startRotatePos:p,startRotationX:d,startRotationOrbit:m,startZoomPosition:g,startZoom:f}),this.makeViewport=t.makeViewport}panStart({pos:t}){return this._getUpdatedState({startPanPosition:this._unproject(t)})}pan({pos:t,startPosition:s}){const o=this.getState().startPanPosition||s;if(!o)return this;const i=this.makeViewport(this.getViewportProps()).panByPosition(o,t);return this._getUpdatedState(i)}panEnd(){return this._getUpdatedState({startPanPosition:null})}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startRotationX:this.getViewportProps().rotationX,startRotationOrbit:this.getViewportProps().rotationOrbit})}rotate({pos:t,deltaAngleX:s=0,deltaAngleY:o=0}){const{startRotatePos:i,startRotationX:r,startRotationOrbit:e}=this.getState(),{width:n,height:a}=this.getViewportProps();if(!i||void 0===r||void 0===e)return this;let h;if(t){let s=(t[0]-i[0])/n;(r<-90||r>90)&&(s*=-1),h={rotationX:r+(t[1]-i[1])/a*180,rotationOrbit:e+180*s}}else h={rotationX:r+o,rotationOrbit:e+s};return this._getUpdatedState(h)}rotateEnd(){return this._getUpdatedState({startRotationX:null,startRotationOrbit:null})}shortestPathFrom(t){const s=t.getViewportProps(),o={...this.getViewportProps()},{rotationOrbit:i}=o;return Math.abs(i-s.rotationOrbit)>180&&(o.rotationOrbit=i<0?i+360:i-360),o}zoomStart({pos:t}){return this._getUpdatedState({startZoomPosition:this._unproject(t),startZoom:this.getViewportProps().zoom})}zoom({pos:t,startPos:s,scale:o}){let{startZoom:i,startZoomPosition:r}=this.getState();if(r||(i=this.getViewportProps().zoom,r=this._unproject(s||t)),!r)return this;const e=this._calculateNewZoom({scale:o,startZoom:i}),n=this.makeViewport({...this.getViewportProps(),zoom:e});return this._getUpdatedState({zoom:e,...n.panByPosition(r,t)})}zoomEnd(){return this._getUpdatedState({startZoomPosition:null,startZoom:null})}zoomIn(t=2){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:t})})}zoomOut(t=2){return this._getUpdatedState({zoom:this._calculateNewZoom({scale:1/t})})}moveLeft(t=50){return this._panFromCenter([-t,0])}moveRight(t=50){return this._panFromCenter([t,0])}moveUp(t=50){return this._panFromCenter([0,-t])}moveDown(t=50){return this._panFromCenter([0,t])}rotateLeft(t=15){return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit-t})}rotateRight(t=15){return this._getUpdatedState({rotationOrbit:this.getViewportProps().rotationOrbit+t})}rotateUp(t=10){return this._getUpdatedState({rotationX:this.getViewportProps().rotationX-t})}rotateDown(t=10){return this._getUpdatedState({rotationX:this.getViewportProps().rotationX+t})}_project(t){return this.makeViewport(this.getViewportProps()).project(t)}_unproject(t){return this.makeViewport(this.getViewportProps()).unproject(t)}_calculateNewZoom({scale:t,startZoom:s}){const{maxZoom:o,minZoom:i}=this.getViewportProps();void 0===s&&(s=this.getViewportProps().zoom);const r=s+Math.log2(t);return h(r,i,o)}_panFromCenter(t){const{target:s}=this.getViewportProps(),o=this._project(s);return this.pan({startPosition:s,pos:[o[0]+t[0],o[1]+t[1]]})}_getUpdatedState(t){return new this.constructor({makeViewport:this.makeViewport,...this.getViewportProps(),...this.getState(),...t})}applyConstraints(t){const{maxZoom:s,minZoom:o,zoom:i,maxRotationX:r,minRotationX:e,rotationOrbit:n}=t;return t.zoom=Array.isArray(i)?[h(i[0],o,s),h(i[1],o,s)]:h(i,o,s),t.rotationX=h(t.rotationX,e,r),(n<-180||n>180)&&(t.rotationOrbit=q(n+180,360)-180),t}}class $t extends ${constructor(){super(...arguments),this.ControllerState=Tt,this.transition={transitionDuration:300,transitionInterpolator:new B({transitionProps:{compare:["target","zoom","rotationX","rotationOrbit"],required:["target","zoom"]}})}}}class kt extends Y{constructor(t={}){super(t),this.props.orbitAxis=t.orbitAxis||"Z"}getViewportType(){return At}get ControllerType(){return $t}}kt.displayName="OrbitView";class Bt extends Tt{constructor(t){super(t),this.zoomAxis=t.zoomAxis||"all"}_calculateNewZoom({scale:t,startZoom:s}){const{maxZoom:o,minZoom:i}=this.getViewportProps();void 0===s&&(s=this.getViewportProps().zoom);let r=Math.log2(t);if(Array.isArray(s)){let[t,e]=s;switch(this.zoomAxis){case"X":t=h(t+r,i,o);break;case"Y":e=h(e+r,i,o);break;default:let s=Math.min(t+r,e+r);s<i&&(r+=i-s),s=Math.max(t+r,e+r),s>o&&(r+=o-s),t+=r,e+=r}return[t,e]}return h(s+r,i,o)}}class Nt extends ${constructor(){super(...arguments),this.ControllerState=Bt,this.transition={transitionDuration:300,transitionInterpolator:new B(["target","zoom"])},this.dragMode="pan"}_onPanRotate(){return!1}}class Ut extends Y{constructor(t={}){super(t)}getViewportType(){return Vt}get ControllerType(){return Nt}}Ut.displayName="OrthographicView";class qt extends G{constructor(t){const{startPanPos:s,...o}=t;super(o),void 0!==s&&(this._state.startPanPos=s)}panStart({pos:t}){const{latitude:s,longitude:o,zoom:i}=this.getViewportProps();return this._getUpdatedState({startPanLngLat:[o,s],startPanPos:t,startZoom:i})}pan({pos:t,startPos:s}){const o=this.getState(),i=o.startPanLngLat||this._unproject(s);if(!i)return this;const r=o.startZoom??this.getViewportProps().zoom,e=o.startPanPos||s,n=[i[0],i[1],r],a=this.makeViewport(this.getViewportProps()).panByPosition(n,t,e);return this._getUpdatedState(a)}panEnd(){return this._getUpdatedState({startPanLngLat:null,startPanPos:null,startZoom:null})}zoom({scale:t}){const s=(this.getState().startZoom||this.getViewportProps().zoom)+Math.log2(t);return this._getUpdatedState({zoom:s})}applyConstraints(t){const{longitude:s,latitude:o,maxZoom:i,minZoom:r,zoom:e}=t,n=J(0),a=J(o)-n;return t.zoom=h(e,r+a,i+a),(s<-180||s>180)&&(t.longitude=q(s+180,360)-180),t.latitude=h(o,-H,H),t}}class Yt extends ${constructor(){super(...arguments),this.ControllerState=qt,this.transition={transitionDuration:300,transitionInterpolator:new B(["longitude","latitude","zoom"])},this.dragMode="pan"}setProps(t){super.setProps(t),this.dragRotate=!1,this.touchRotate=!1}}class Gt extends Y{constructor(t={}){super(t)}getViewportType(t){return t.zoom>12?W:K}get ControllerType(){return Yt}}Gt.displayName="GlobeView";const Ht={bearing:0,pitch:0,position:[0,0,0]},Jt={speed:1.2,curve:1.414};class Wt extends Q{constructor(t={}){super({compare:["longitude","latitude","zoom","bearing","pitch","position"],extract:["width","height","longitude","latitude","zoom","bearing","pitch","position"],required:["width","height","latitude","longitude","zoom"]}),this.opts={...Jt,...t}}interpolateProps(t,s,o){const i=function(t,s,o,i){const{startZoom:r,startCenterXY:e,uDelta:n,w0:a,u1:h,S:c,rho:u,rho2:l,r0:p}=et(t,s,i);if(h<.01){const i={};for(const r of it)i[r]=m(t[r],s[r],o);return i}const d=o*c,M=Math.cosh(p)/Math.cosh(p+u*d),v=a*((Math.cosh(p)*Math.tanh(p+u*d)-Math.sinh(p))/l)/h,b=r+w(1/M),x=g([],n,v);f(x,x,e);const y=P(x);return{longitude:y[0],latitude:y[1],zoom:b}}(t,s,o,this.opts);for(const r in Ht)i[r]=tt(t[r]||Ht[r],s[r]||Ht[r],o);return i}getDuration(t,s){let{transitionDuration:o}=s;return"auto"===o&&(o=function(t,s,o){const i={...rt,...o},{screenSpeed:r,speed:e,maxDuration:n}=i,{S:a,rho:h}=et(t,s,i),c=1e3*a;let u;return u=Number.isFinite(r)?c/(r/h):c/e,Number.isFinite(n)&&u>n?0:u}(t,s,this.opts)),o}}export{S as COORDINATE_SYSTEM,$ as Controller,Z as DirectionalLight,Ft as FirstPersonController,It as FirstPersonView,jt as FirstPersonViewport,Wt as FlyToInterpolator,B as LinearInterpolator,$t as OrbitController,kt as OrbitView,At as OrbitViewport,Nt as OrthographicController,Ut as OrthographicView,Vt as OrthographicViewport,pt as PointLight,Ct as PostProcessEffect,Q as TransitionInterpolator,Y as View,D as Viewport,W as WebMercatorViewport,dt as _CameraLight,Yt as _GlobeController,Gt as _GlobeView,K as _GlobeViewport,bt as _SunLight}
|