@arcgis/core 5.1.0-next.101 → 5.1.0-next.103
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/applications/Components/imageryUtils.d.ts +22 -1
- package/applications/Components/imageryUtils.js +1 -1
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/Pixel.js +1 -1
- package/arcade/Voxel.js +1 -1
- package/arcade/arcade.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/debug.js +1 -1
- package/arcade/deepClone.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/date.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/fieldStats.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geometry.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/arcade/functions/stats.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/functions/track.js +1 -1
- package/arcade/geometry/constructors.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/geometry/operators.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcgisGlobal.d.ts +1449 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{92e7067960549733f8e6.js → 037b36d415ae27e987f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{58579c53be1a44bd08d2.js → 054ae729e7cefa2c7778.js} +1 -1
- package/assets/esri/core/workers/chunks/069459519477bb3dc91b.js +1 -0
- package/assets/esri/core/workers/chunks/{4301cb9670fa7c907460.js → 0881929a4a457f94f317.js} +1 -1
- package/assets/esri/core/workers/chunks/{abdf146b35e179b5b245.js → 0cb8bc6dbbbe3b212712.js} +1 -1
- package/assets/esri/core/workers/chunks/{b811d62284be95f4beb6.js → 0cc74bc3772be51cabc1.js} +1 -1
- package/assets/esri/core/workers/chunks/{0630ce1975c91ae362d9.js → 0e9804ece1fd2d59751b.js} +1 -1
- package/assets/esri/core/workers/chunks/{545c38789267e3487dbd.js → 10491b5b106bc5ad0b2b.js} +1 -1
- package/assets/esri/core/workers/chunks/12053c1213465d07d2f6.js +1 -0
- package/assets/esri/core/workers/chunks/{ca6c128940ddbebcaaab.js → 14b7b55c42af65ffa024.js} +1 -1
- package/assets/esri/core/workers/chunks/{702e8468836863abd81b.js → 15fa8b5b472131aaa68e.js} +1 -1
- package/assets/esri/core/workers/chunks/{852f4cd514008fee5a55.js → 176e676879666f784599.js} +1 -1
- package/assets/esri/core/workers/chunks/18201119828664373165.js +1 -0
- package/assets/esri/core/workers/chunks/1a3426276dc82a8a80f2.js +1 -0
- package/assets/esri/core/workers/chunks/{ce3e51c799a80648e46d.js → 1c0e8808d14d8e6dde2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{bafe489e54f34d1841e6.js → 1c83e61fd9a4f8fc8372.js} +1 -1
- package/assets/esri/core/workers/chunks/1cb0c4fc315bbc2bd00b.js +1 -0
- package/assets/esri/core/workers/chunks/{5afee66e182f79a0fc46.js → 1ff61d8a8ea060e78b83.js} +1 -1
- package/assets/esri/core/workers/chunks/{19a9a555365a8363d34b.js → 23119a1b1310b7dab2aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{031ea31bbdb7f1be791e.js → 276cb6a1cdd26d0e1444.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdb7851e98e8d2ba48d3.js → 286bf3be9f524bde9529.js} +1 -1
- package/assets/esri/core/workers/chunks/{53bf9b0c2b8da12820ea.js → 29b00d07d3e1d095c590.js} +2 -2
- package/assets/esri/core/workers/chunks/{9d8e7839772029d83c93.js → 29bbc0d6d847b065d10e.js} +1 -1
- package/assets/esri/core/workers/chunks/{156efa014b6edd9ccce9.js → 2a5f6a8d282f2c391591.js} +1 -1
- package/assets/esri/core/workers/chunks/{15a65aa6969c1b383ce2.js → 2f903bd3a2611e7f0946.js} +1 -1
- package/assets/esri/core/workers/chunks/{b803e7b0d489bb628d72.js → 2f925a424b60b4a5e8e5.js} +1 -1
- package/assets/esri/core/workers/chunks/30e191d36aa95823c018.js +1 -0
- package/assets/esri/core/workers/chunks/{4b19acf8bde5b2e80692.js → 313a89b334e3518d30a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{390717f079def83a0d9c.js → 31a8bc25aa1441c70caa.js} +1 -1
- package/assets/esri/core/workers/chunks/31c01885ee6d70a2bde2.js +1 -0
- package/assets/esri/core/workers/chunks/3292b3883f203637b5a7.js +1 -0
- package/assets/esri/core/workers/chunks/{9bb2251ba58932f85d13.js → 33329f5d88e60b4ec568.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f9117d589de7caaa02d.js → 35bbd63319d8aa9f31cc.js} +1 -1
- package/assets/esri/core/workers/chunks/35fdd62277fd06468a29.js +2 -0
- package/assets/esri/core/workers/chunks/{3996149146dd1eca7cc5.js → 38d7430d2370b69334d7.js} +1 -1
- package/assets/esri/core/workers/chunks/3aebbed6d4fd1b993a35.js +1 -0
- package/assets/esri/core/workers/chunks/3f1d533efe4300d19e6a.js +1 -0
- package/assets/esri/core/workers/chunks/{7db09c5bf024242becfa.js → 40caf5e09e4382d81104.js} +5 -5
- package/assets/esri/core/workers/chunks/4213aa844900fcf95287.js +1 -0
- package/assets/esri/core/workers/chunks/{bc6a809a965355eb425f.js → 44636ef119c6a576470b.js} +1 -1
- package/assets/esri/core/workers/chunks/453c9e8d438d061e1736.js +1 -0
- package/assets/esri/core/workers/chunks/479e34b0abc10499bd3a.js +1 -0
- package/assets/esri/core/workers/chunks/{54dad475dc806a38c287.js → 48440a071a37590846ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{38b1d2ffcc318ac0119d.js → 48fcc10768d93e95a04e.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa9ab152ea785b5e97e0.js → 4a41f98210f1da3b5041.js} +1 -1
- package/assets/esri/core/workers/chunks/4a65bc9091d7ea7e80df.js +1 -0
- package/assets/esri/core/workers/chunks/4cdf80e2e60501dd4756.js +1 -0
- package/assets/esri/core/workers/chunks/51edfe21d4c6ee22c83d.js +1 -0
- package/assets/esri/core/workers/chunks/52219561c144e5cb4442.js +1 -0
- package/assets/esri/core/workers/chunks/{312036c89a6a09bb06c2.js → 5570d47533efab56c732.js} +1 -1
- package/assets/esri/core/workers/chunks/{5abe34bb0110694f7b42.js → 566c36032b456ec5b5d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{34207774bc371e95ba3c.js → 56b6b68d9459b1edea43.js} +1 -1
- package/assets/esri/core/workers/chunks/593772bd8b19ac664b29.js +1 -0
- package/assets/esri/core/workers/chunks/{10ce083b38ccfa88f766.js → 594e1f633527749d92d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad329226c8b579d0964c.js → 5a6523c903b11dea77d4.js} +1 -1
- package/assets/esri/core/workers/chunks/5c44638670e40e092ce3.js +1 -0
- package/assets/esri/core/workers/chunks/{af8bc56cf1404afc3028.js → 5d60253ea3d247cdb3d1.js} +1 -1
- package/assets/esri/core/workers/chunks/5dc86a3a40d16b576bb5.js +1 -0
- package/assets/esri/core/workers/chunks/601edefd8da4eb2eda28.js +1 -0
- package/assets/esri/core/workers/chunks/6182d39e2095d4460b88.js +1 -0
- package/assets/esri/core/workers/chunks/{c798a40418e7ff38042a.js → 63513e706fe55a1def15.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8d338665fe00494c826.js → 660713adb5a845dfa2ef.js} +1 -1
- package/assets/esri/core/workers/chunks/694f9571e2723d3d4b02.js +1 -0
- package/assets/esri/core/workers/chunks/69ad5930ff6040c6c561.js +1 -0
- package/assets/esri/core/workers/chunks/{f563dd6cace047108b3c.js → 6b5d2df9123dfe7e00b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5217d676749bca59d90f.js → 6c79e8e840c1d027fbb2.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ce845c990bb4d701362.js → 6ca81e34854ce7ec6f6e.js} +1 -1
- package/assets/esri/core/workers/chunks/{11a99ee68409a641810e.js → 6f02681bcaa9bef501fc.js} +1 -1
- package/assets/esri/core/workers/chunks/77ac243d4dcd901c2eec.js +1 -0
- package/assets/esri/core/workers/chunks/78af4b7a379c40f497a7.js +1 -0
- package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 79b64a52ff57c40c7800.js} +1 -1
- package/assets/esri/core/workers/chunks/{475409026288f0981ce2.js → 7b3642195d6d3ea9b830.js} +1 -1
- package/assets/esri/core/workers/chunks/{82b2acc6f181927de89c.js → 7bc746ea17f4e336e0b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{19fcc74d34cbbaa56a41.js → 7c86099ed17f420b0489.js} +1 -1
- package/assets/esri/core/workers/chunks/{00a25dd4b057cc9f2a7e.js → 7d571845292b1b7769c2.js} +1 -1
- package/assets/esri/core/workers/chunks/7dafe608c224b9d48ffa.js +1 -0
- package/assets/esri/core/workers/chunks/7e203e947846d40f897e.js +1 -0
- package/assets/esri/core/workers/chunks/855bf811cd79b97c169a.js +1 -0
- package/assets/esri/core/workers/chunks/{7601278ebced0c0c31cf.js → 85bba0db8a7a5fc1be44.js} +1 -1
- package/assets/esri/core/workers/chunks/{a318cf6bb900e0ee268c.js → 881234f25c7814de8753.js} +1 -1
- package/assets/esri/core/workers/chunks/895114ccd2603830960f.js +1 -0
- package/assets/esri/core/workers/chunks/8a68884d40f6f6de1d12.js +1 -0
- package/assets/esri/core/workers/chunks/{0d81409721d29d8bc276.js → 8a7682071941c35f05c1.js} +1 -1
- package/assets/esri/core/workers/chunks/8aac1155b8ac071cd2ad.js +1 -0
- package/assets/esri/core/workers/chunks/{3e2953ea62817e75d840.js → 8cbaaea72f4ca2f023be.js} +1 -1
- package/assets/esri/core/workers/chunks/{7bb17d0ab1cc2b89c035.js → 8e986167d4a393ee41ea.js} +1 -1
- package/assets/esri/core/workers/chunks/8fdd57e2a0af647f1e3e.js +1 -0
- package/assets/esri/core/workers/chunks/92db9a6d273ae2862883.js +1 -0
- package/assets/esri/core/workers/chunks/{9b23d999db902d25ba58.js → 9373daa677dc767d7cf0.js} +1 -1
- package/assets/esri/core/workers/chunks/{40ffb1aa17cbfae17b23.js → 9542ef3f6c2bc7c14d85.js} +1 -1
- package/assets/esri/core/workers/chunks/{657268b3fde6da2dd735.js → 95798e3de3419fdda6ac.js} +1 -1
- package/assets/esri/core/workers/chunks/{aad02c7417648d881129.js → 958617c3a9854ea04e06.js} +1 -1
- package/assets/esri/core/workers/chunks/{a28124bba6b43efd74cc.js → 95df6d2ebacc43ac5fa3.js} +1 -1
- package/assets/esri/core/workers/chunks/{f618ee43581e8de6ad0c.js → 970e91de5dfbbc247afb.js} +1 -1
- package/assets/esri/core/workers/chunks/978b7d10054e17161145.js +1 -0
- package/assets/esri/core/workers/chunks/{8a48a6760c33ed50b650.js → 98b4408e12684e37b395.js} +1 -1
- package/assets/esri/core/workers/chunks/9d70247d820085a2c190.js +1 -0
- package/assets/esri/core/workers/chunks/9da2f2b67837b491cfa3.js +1 -0
- package/assets/esri/core/workers/chunks/{edee616b6f1b5be8fd39.js → a0296e6d6c37b861c5fb.js} +1 -1
- package/assets/esri/core/workers/chunks/{c19e3f6027b6526de359.js → a02ebdcb802d128c8eee.js} +1 -1
- package/assets/esri/core/workers/chunks/a0aaf14c8f9a007d88ac.js +1 -0
- package/assets/esri/core/workers/chunks/{1523883460874c352e36.js → a29cd1f5c7bb4f6a5a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf826787ab8d4b27ad80.js → a53a3e5548fef65a2710.js} +1 -1
- package/assets/esri/core/workers/chunks/{91f9e0e3662d4bf9f163.js → a913a1c83a667ed0e711.js} +1 -1
- package/assets/esri/core/workers/chunks/{359465b9726edcc70c83.js → a9c9c00432ee41ec91ba.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3a28c4887f802e8d96d.js → aa55923ca939a0d4606c.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3b086eb9aa8c7d09048.js → aea8e0577fb48d5c9577.js} +1 -1
- package/assets/esri/core/workers/chunks/af45110f07e4b5162bae.js +1 -0
- package/assets/esri/core/workers/chunks/{76589434d573111a8fb4.js → b09ae8eb5e97fb27382f.js} +1 -1
- package/assets/esri/core/workers/chunks/b0c647af49c9d563b852.js +1 -0
- package/assets/esri/core/workers/chunks/{a320998f18922a35899f.js → b32a13972cb3de652339.js} +1 -1
- package/assets/esri/core/workers/chunks/b432a5a829e309837db6.js +1 -0
- package/assets/esri/core/workers/chunks/{9103eb0b9078019d3a26.js → b5d0898406c7d6e6a717.js} +1 -1
- package/assets/esri/core/workers/chunks/b640651c7d86cfe654bf.js +1 -0
- package/assets/esri/core/workers/chunks/{503439246250d9e1cbd5.js → b75e090a7e935ff870a3.js} +1 -1
- package/assets/esri/core/workers/chunks/{c321bcda8e8893577948.js → b8dda9e55caba0e2b4c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{59a64d72eed8c40c63cf.js → bacf0c9d5d3e084dea61.js} +1 -1
- package/assets/esri/core/workers/chunks/{48a0e7a32ebd44045c8f.js → bb04aff0b4947408592c.js} +1 -1
- package/assets/esri/core/workers/chunks/{17de1c251242b692cf45.js → bff0c4094c14cb97b18f.js} +1 -1
- package/assets/esri/core/workers/chunks/{47dd2bfecc5c4b5f10f0.js → c0d7e4afbad0b20e2502.js} +1 -1
- package/assets/esri/core/workers/chunks/c13c532fe38ddc5d7ca6.js +1 -0
- package/assets/esri/core/workers/chunks/{cc62e5095e328bed3e01.js → c1ffb879e0283fb2815f.js} +1 -1
- package/assets/esri/core/workers/chunks/{22fa4aa2b76573bafe21.js → c476f4979048e558baa7.js} +89 -76
- package/assets/esri/core/workers/chunks/c8b96104641cb4afd4df.js +1 -0
- package/assets/esri/core/workers/chunks/{4faaf61d20e20fcf6c18.js → c91d4f1b42cfe474df52.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ae2408ac075b974e887.js → cb26966cc205bd338c76.js} +1 -1
- package/assets/esri/core/workers/chunks/{c452c74ba9de218c3e57.js → cb3004998eff7c60930e.js} +1 -1
- package/assets/esri/core/workers/chunks/cc48354c54358777e996.js +1 -0
- package/assets/esri/core/workers/chunks/{b1b8a7c00ec4d998ab84.js → cc8d55d1830d7542c3f5.js} +1 -1
- package/assets/esri/core/workers/chunks/ce0c7070eeb723a718e7.js +1 -0
- package/assets/esri/core/workers/chunks/ce3b5b83237cf37ff523.js +1 -0
- package/assets/esri/core/workers/chunks/cf3c0bee919bb509cd4f.js +1 -0
- package/assets/esri/core/workers/chunks/cf9b0ba30a75c030ca92.js +1 -0
- package/assets/esri/core/workers/chunks/d00b9c1fd0865bf8f317.js +1 -0
- package/assets/esri/core/workers/chunks/{9a29b7f9e6281ee40c37.js → d4749eb8a47869477037.js} +1 -1
- package/assets/esri/core/workers/chunks/d5423df247be82fa085a.js +1 -0
- package/assets/esri/core/workers/chunks/d610f517fb3c6cb24365.js +1 -0
- package/assets/esri/core/workers/chunks/{47656ec12401e53f4bd3.js → d9d716bfd0aab30b6caf.js} +1 -1
- package/assets/esri/core/workers/chunks/da4f7d7099ba88f31f45.js +1 -0
- package/assets/esri/core/workers/chunks/dbb1ac41fd5da4fd849b.js +1 -0
- package/assets/esri/core/workers/chunks/{176dd195f77b98cb0b0f.js → dd58bc675b85b4d90afa.js} +1 -1
- package/assets/esri/core/workers/chunks/e2bb95d601789bbda73b.js +1 -0
- package/assets/esri/core/workers/chunks/{f018ad451ee072253a1e.js → e4b2120d7ee1c998b1fc.js} +1 -1
- package/assets/esri/core/workers/chunks/e4c350dc65aae121171d.js +1 -0
- package/assets/esri/core/workers/chunks/e8518bd3596543b387f8.js +1 -0
- package/assets/esri/core/workers/chunks/{f948e4a80a7dbda70f2e.js → e973cab79ec2541cb81b.js} +1 -1
- package/assets/esri/core/workers/chunks/{7d6299ab7b0db23ab961.js → eb1d6614eeac6d26bb9c.js} +1 -1
- package/assets/esri/core/workers/chunks/f1bb426400dac02880f1.js +1 -0
- package/assets/esri/core/workers/chunks/{ffcd4fca7f67e1f943f1.js → f239a8ecad8b692d5eaa.js} +1 -1
- package/assets/esri/core/workers/chunks/{de11ebcea2b8f9dfe65d.js → f3161c47a572194f6017.js} +1 -1
- package/assets/esri/core/workers/chunks/{f66262f8582909157f01.js → f37be7e517f0892014e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{99f726f05cf80b0330ed.js → f3a9100518b044e79501.js} +1 -1
- package/assets/esri/core/workers/chunks/f3f984c62311c20a9db8.js +1 -0
- package/assets/esri/core/workers/chunks/f5bd0a4f82df5e942b70.js +1 -0
- package/assets/esri/core/workers/chunks/{85e65ced3312bf9cf162.js → f7e386ece75afb6e4be5.js} +1 -1
- package/assets/esri/core/workers/chunks/f8b884b529064df4a30a.js +1 -0
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +125 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -1
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ar.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bg.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_bs.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ca.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_cs.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_da.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_de.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_el.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_es.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_et.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fi.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_fr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_he.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_hu.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_id.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_it.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ja.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ko.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lt.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_lv.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_nl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_no.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-BR.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_pt-PT.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ro.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_ru.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sk.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sl.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_sv.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_th.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_tr.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_uk.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_vi.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-CN.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-HK.json +1 -1
- package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer_zh-TW.json +1 -1
- package/chunks/AtmosphereCompositing.glsl.js +1 -1
- package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
- package/chunks/Centroid-DZi-eb9F.js +1 -1
- package/chunks/Clouds.glsl.js +1 -1
- package/chunks/Compositing.glsl.js +1 -1
- package/chunks/CutFillComposition.glsl.js +1 -1
- package/chunks/CutFillDepth.glsl.js +1 -1
- package/chunks/CutFillMask.glsl.js +1 -1
- package/chunks/CutFillReduction.glsl.js +1 -1
- package/chunks/CutFillTargetDepth.glsl.js +1 -1
- package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/FlatGeometry.js +1 -1
- package/chunks/FocusAreaColor.glsl.js +1 -1
- package/chunks/FocusAreaMask.glsl.js +1 -1
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +1 -1
- package/chunks/GaussianSplatShadow.glsl.js +1 -1
- package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
- package/chunks/GeodeticUtils.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/GeometryCleaner-BEJM7I4l.js +1 -1
- package/chunks/GlobalIllumination.glsl.js +1 -1
- package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
- package/chunks/GlobalIlluminationUpscale.glsl.js +80 -65
- package/chunks/GlowBlur.glsl.js +1 -1
- package/chunks/GlowComposition.glsl.js +1 -1
- package/chunks/HazeCompositing.glsl.js +1 -1
- package/chunks/HighlightBlur.glsl.js +1 -1
- package/chunks/HighlightDownsample.glsl.js +1 -1
- package/chunks/Magnifier.glsl.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/NoiseTextureAtlas.glsl.js +1 -1
- package/chunks/OITBlend.glsl.js +2 -2
- package/chunks/OITBlendEmission.glsl.js +1 -1
- package/chunks/OITDimOpaque.glsl.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCrosses.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDensify.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorIntegrate.js +1 -1
- package/chunks/OperatorIntersects.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorOverlaps.js +1 -1
- package/chunks/OperatorProject.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorShapePreservingDensify.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/OperatorTouches.js +1 -1
- package/chunks/OperatorWithin.js +1 -1
- package/chunks/OverlayCompositing.glsl.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/RasterColorizer.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +1 -1
- package/chunks/ShadowCastVisualize.glsl.js +2 -2
- package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
- package/chunks/SimpleAtmosphere.glsl.js +1 -1
- package/chunks/SpatialReference.js +1 -1
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Texture.glsl.js +1 -1
- package/chunks/Transformation2D.js +1 -1
- package/chunks/Viewshed.glsl.js +1 -1
- package/chunks/aiServices.js +1 -1
- package/chunks/arcade.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/boundedPlane.js +1 -1
- package/chunks/constants.js +1 -1
- package/chunks/containsOperator.js +1 -1
- package/chunks/disjointOperator.js +1 -1
- package/chunks/distanceOperator.js +1 -1
- package/chunks/equalsOperator.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/chunks/pe.js +1 -1
- package/chunks/persistableUrlUtils.js +1 -1
- package/chunks/relateOperator.js +1 -1
- package/chunks/symmetricDifferenceOperator.js +1 -1
- package/chunks/unionOperator.js +1 -1
- package/chunks/vec2.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vec4.js +1 -1
- package/config.js +1 -1
- package/core/accessorSupport/decorators/persistable.js +1 -1
- package/effects/FocusArea.js +1 -1
- package/form/elements/inputs/MultipleChoiceInput.d.ts +5 -5
- package/form/elements/inputs/MultipleChoiceInput.js +1 -1
- package/geometry/coordinateFormatter.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/geodeticUtils.js +1 -1
- package/geometry/operators/gx/operatorAffineTransform.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDensify.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
- package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorProject.js +1 -1
- package/geometry/operators/gx/operatorProximityGeodesic.js +1 -1
- package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSinglePartToMultiPart.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/geographicTransformationUtils.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/operators/support/projectionTransformation.js +1 -1
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/MeshTexture.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/geometry/support/buffer/math/vec3.js +1 -1
- package/geometry/support/buffer/math/vec4.js +1 -1
- package/geometry/support/buffer/utils/vec2.js +1 -1
- package/geometry/support/coordinateSystem.js +1 -1
- package/geometry/support/meshUtils/extent.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/geometry/support/meshUtils/projection.js +1 -1
- package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/geometry/support/vcsData.js +1 -1
- package/interfaces.d.ts +3 -0
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +29 -39
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/OrientedImageryLayer.d.ts +233 -0
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/VideoLayer.d.ts +35 -9
- package/layers/VideoLayer.js +1 -1
- package/layers/catalog/CatalogFootprintLayer.d.ts +147 -0
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/cypherUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.d.ts +12 -0
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/datasets/ImageAuxRaster.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/functions/rasterProjectionHelper.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +87 -9
- package/layers/support/FeatureReductionCluster.d.ts +87 -9
- package/layers/support/FieldConfiguration.d.ts +1 -1
- package/layers/support/ImageElement.js +1 -1
- package/layers/support/ParquetFilesData.js +1 -1
- package/layers/support/SceneFilter.js +1 -1
- package/layers/support/Sublayer.d.ts +25 -0
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.d.ts +147 -0
- package/layers/support/TelemetryData.d.ts +5 -0
- package/layers/support/TelemetryData.js +1 -1
- package/layers/support/TelemetryDisplay.d.ts +10 -2
- package/layers/support/TelemetryDisplay.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/layers/video/types.d.ts +8 -1
- package/layers/video/videoUtils.js +1 -1
- package/linkChart/LinkChartProperties.js +1 -1
- package/linkChart/utils.js +1 -1
- package/package.json +2 -2
- package/portal/PortalItem.js +1 -1
- package/portal/jsonTypes.d.ts +7 -0
- package/renderers/UniqueValueRenderer.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/print.js +1 -1
- package/rest/support/PrintParameters.d.ts +8 -1
- package/rest/support/PrintParameters.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/persistableUrlUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/urlUtils.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/third-party-notices.txt +188 -0
- package/views/2d/ViewStateManager.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/surface.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/focusAreaUtils.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/i3s/meshUtils.js +1 -1
- package/views/3d/state/ScreenSizePerspective.js +1 -1
- package/views/3d/support/ViewSlice.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
- package/views/3d/terrain/RasterTile.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js +3 -5
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/Clouds.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColor.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/fog/FogTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsampleTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaque.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITDimOpaqueTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMask.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillReduction.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillReductionTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CutFillTargetDepthTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
- package/views/Viewport2DBaseMixin.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.js +1 -1
- package/widgets/Attachments.d.ts +0 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +8 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/attachmentUtils.js +2 -0
- package/widgets/BatchAttributeForm/css.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/templates/RelationshipElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/types.d.ts +7 -0
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
- package/widgets/BuildingExplorer/BuildingLevelPicker/constants.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.d.ts +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features.d.ts +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/types.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/Popup.d.ts +2 -24
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/TableList/support/tableListUtils.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +9 -0
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
- package/widgets/support/ContingentValuesManager.js +1 -1
- package/widgets/support/forms/formUtils.js +1 -1
- package/assets/esri/core/workers/chunks/09630888267cde87654f.js +0 -1
- package/assets/esri/core/workers/chunks/0d9d33f29124d464a4cb.js +0 -1
- package/assets/esri/core/workers/chunks/0e333f1bce992508b68a.js +0 -1
- package/assets/esri/core/workers/chunks/0fa207c68dfd7ddee160.js +0 -1
- package/assets/esri/core/workers/chunks/13838b6c045425e73cf8.js +0 -1
- package/assets/esri/core/workers/chunks/177472a6a9beb1590934.js +0 -1
- package/assets/esri/core/workers/chunks/1d0f9f147bfa00b38d48.js +0 -1
- package/assets/esri/core/workers/chunks/1d54b71c43d9d6a5f713.js +0 -1
- package/assets/esri/core/workers/chunks/1f6b7626f333809837ef.js +0 -1
- package/assets/esri/core/workers/chunks/24646a1176ce34039155.js +0 -1
- package/assets/esri/core/workers/chunks/268ed861c882740c805b.js +0 -1
- package/assets/esri/core/workers/chunks/2b52c1c01cf568ba01fb.js +0 -1
- package/assets/esri/core/workers/chunks/3116a1c2b67a296ba86e.js +0 -1
- package/assets/esri/core/workers/chunks/32c17c299c7622ae0d71.js +0 -1
- package/assets/esri/core/workers/chunks/34f79355145c8e4c59dd.js +0 -1
- package/assets/esri/core/workers/chunks/3be111488365768fd917.js +0 -1
- package/assets/esri/core/workers/chunks/3f0483cbcd893acf240c.js +0 -1
- package/assets/esri/core/workers/chunks/40d251b6b42a41d68bd2.js +0 -1
- package/assets/esri/core/workers/chunks/43cc82373be791b7cb4c.js +0 -1
- package/assets/esri/core/workers/chunks/4a23b27bfbcfa08fd9a7.js +0 -1
- package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +0 -1
- package/assets/esri/core/workers/chunks/598271956c46e21e5c09.js +0 -1
- package/assets/esri/core/workers/chunks/5b07f3253403fe25ce5b.js +0 -1
- package/assets/esri/core/workers/chunks/5b6f2bfdcdd207d8ae42.js +0 -1
- package/assets/esri/core/workers/chunks/5c7ba4b8a9ec2e2e02b5.js +0 -1
- package/assets/esri/core/workers/chunks/60915a3708a34da1977e.js +0 -1
- package/assets/esri/core/workers/chunks/61c523dd9d8027922465.js +0 -1
- package/assets/esri/core/workers/chunks/65520a443e3811255bea.js +0 -1
- package/assets/esri/core/workers/chunks/671826fe25105aedcce4.js +0 -1
- package/assets/esri/core/workers/chunks/6b79c254897ece95b7a3.js +0 -1
- package/assets/esri/core/workers/chunks/6c35583707f5c339ee99.js +0 -1
- package/assets/esri/core/workers/chunks/6cb467a9517f024be72f.js +0 -1
- package/assets/esri/core/workers/chunks/71119398ec91f1b209d7.js +0 -1
- package/assets/esri/core/workers/chunks/8ac8ef856ed9592c433b.js +0 -1
- package/assets/esri/core/workers/chunks/8fedb32055ac7f771419.js +0 -1
- package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +0 -1
- package/assets/esri/core/workers/chunks/9c11e1fe785e1385fdb1.js +0 -1
- package/assets/esri/core/workers/chunks/a567d001fcfa1f1cdeea.js +0 -1
- package/assets/esri/core/workers/chunks/a58662698c69190a12d8.js +0 -2
- package/assets/esri/core/workers/chunks/afdc6fc453157528cf9b.js +0 -1
- package/assets/esri/core/workers/chunks/b5ced451d331ca1ffb68.js +0 -1
- package/assets/esri/core/workers/chunks/b7f5d51ac26f37837b3b.js +0 -1
- package/assets/esri/core/workers/chunks/ba7fe21a78ea37a02b7c.js +0 -1
- package/assets/esri/core/workers/chunks/bb3ab2453ccde2f2611c.js +0 -1
- package/assets/esri/core/workers/chunks/beba9f2213d8a850ddb6.js +0 -1
- package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +0 -1
- package/assets/esri/core/workers/chunks/c9461568e1002ebac534.js +0 -1
- package/assets/esri/core/workers/chunks/d30790c69724258dab2b.js +0 -1
- package/assets/esri/core/workers/chunks/d35c475f004367e333eb.js +0 -1
- package/assets/esri/core/workers/chunks/d8c4fb66c733ab2f66d3.js +0 -1
- package/assets/esri/core/workers/chunks/d95ffd990b3a7df69e1e.js +0 -1
- package/assets/esri/core/workers/chunks/dd6efa0afe879bd11a2e.js +0 -1
- package/assets/esri/core/workers/chunks/dec51409372764e7093d.js +0 -1
- package/assets/esri/core/workers/chunks/e133840540abf20262a4.js +0 -1
- package/assets/esri/core/workers/chunks/e63e24101e7e92c62d98.js +0 -1
- package/assets/esri/core/workers/chunks/e785f76c1a75cb1d1e1f.js +0 -1
- package/assets/esri/core/workers/chunks/f27397379c6c88bc6ef4.js +0 -1
- package/assets/esri/core/workers/chunks/f53805c7a84203305b2c.js +0 -1
- package/assets/esri/core/workers/chunks/f60292d97bcdbf19165b.js +0 -1
- package/assets/esri/core/workers/chunks/f6ebec8d2248c719b89f.js +0 -1
- package/assets/esri/core/workers/chunks/fd2afff07aaac8203c18.js +0 -1
- package/assets/esri/core/workers/chunks/ff7708aaa2de720e3a47.js +0 -1
- /package/assets/esri/core/workers/chunks/{53bf9b0c2b8da12820ea.js.LICENSE.txt → 29b00d07d3e1d095c590.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{a58662698c69190a12d8.js.LICENSE.txt → 35fdd62277fd06468a29.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{clone as i}from"../../core/lang.js";import{hasSameOrigin as r,getHost as o,changeHost as s}from"../../core/urlUtils.js";import{property as n,subclass as p}from"../../core/accessorSupport/decorators.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import{idToName as d}from"../../core/accessorSupport/PropertyOrigin.js";import a from"../../geometry/Extent.js";import u from"../../geometry/HeightModelInfo.js";import c from"../../geometry/SpatialReference.js";import{elevationInfo as y,maxScale as f,minScale as m}from"../support/commonProperties.js";import h from"../support/EditFieldsInfo.js";import{FeatureIndex as v}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as g,hasCurrentUser as I,isLayerCacheStale as F,supportsQueryOnly as S,readGlobalIdField as b,readObjectIdField as j,readVersion as E}from"../support/featureLayerUtils.js";import U from"../support/GeometryFieldsInfo.js";import x from"../support/LayerFloorInfo.js";import{isPreferredUrlApplicable as O,getPreferredUrl as M,applyPreferredHostToPortalItem as D,getPreferredHost as T}from"../support/layerUtils.js";import{urlProperty as w,normalizeParsedUrlObject as C}from"../support/multiLayerServiceUtils.js";import H from"../support/Relationship.js";import{getFeatureLayerCapabilities as R}from"../support/serviceCapabilitiesUtils.js";import B from"../support/Subtype.js";import{hasTypeKeyword as A,typeKeyword as Q}from"../../portal/support/portalItemUtils.js";import{timeZoneProperty as P}from"../../time/timeZoneUtils.js";import{reader as q}from"../../core/accessorSupport/decorators/reader.js";const G=G=>{const V=G;let Z=class extends V{constructor(){super(...arguments),this.cacheMaxAge=0,this.capabilities=null,this.copyright=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(v)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=c.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.uniqueIdFields=null,this.url=null,this.version=void 0,this._isUrlHostModified=!1,this._isUrlHostModificationEnabled=!1}getFieldDomain(e,t){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:r}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(r.supportsUpdateByOthers&&r.supportsUpdateByAnonymous&&r.supportsDeleteByOthers&&r.supportsDeleteByAnonymous))return"load"}if(I(this.serviceDefinitionExpression)||I(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if(F(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return R(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=i(e),{operations:r,editing:o}=t;return S(this)?(this.userHasUpdateItemPrivileges&&(r.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(r.supportsAdd=r.supportsDelete=r.supportsEditing=r.supportsQuery=r.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&r.supportsEditing&&(r.supportsAdd=r.supportsDelete=r.supportsUpdate=o.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}readGlobalIdFieldFromService(e,t){return b(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||S(this))return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return S(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return j(t)}get parsedUrl(){return C(this)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}readVersion(e,t){return E(t)}get isUrlHostModified(){const{loaded:e,url:t,_isUrlHostModified:i}=this;if(i)return!0;if(!e||!t)return!1;if(this.originIdOf("url")<7)return!1;const o=this.sourceJSON?.preferredHost;if(!o)return!1;if(!r(t,`https://${o}`,!0))return!1;for(let s=6;s>=3;s--){const e=this.getAtOrigin("url",d(s));if(e)return!r(t,e,!0)}return!1}applyPreferredHost(e){const{url:t,portalItem:i}=this;if(!t||!O(i))return;const r=M();r&&this._isUrlHostModificationEnabled&&(this._set("url",r),this._isUrlHostModified=!0,i&&D(i,T()))}applyHostFromPortalItem(){const{url:e,portalItem:t}=this;if(!e||7===this.originIdOf("url")||!t?.url||!O(t)||!A(t,Q.HOSTED_SERVICE)||r(e,t.url,!0)||!this._isUrlHostModificationEnabled)return;const i=o(t.url);this._set("url",s(e,i)),this._isUrlHostModified=!0}};return e([n({readOnly:!0})],Z.prototype,"authenticationTriggerEvent",null),e([n({readOnly:!0,json:{read:e=>e/60}})],Z.prototype,"cacheMaxAge",void 0),e([n({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","standardMaxRecordCountNoGeometry","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],Z.prototype,"capabilities",void 0),e([q("service","capabilities")],Z.prototype,"readCapabilitiesFromService",null),e([n({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],Z.prototype,"copyright",void 0),e([n(P("dateFieldsTimeReference"))],Z.prototype,"dateFieldsTimeZone",void 0),e([n({type:Boolean})],Z.prototype,"datesInUnknownTimezone",void 0),e([n({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Z.prototype,"definitionExpression",void 0),e([n({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],Z.prototype,"displayField",void 0),e([n({readOnly:!0,type:h})],Z.prototype,"editFieldsInfo",void 0),e([n({readOnly:!0})],Z.prototype,"editingInfo",void 0),e([q("editingInfo")],Z.prototype,"readEditingInfo",null),e([n({readOnly:!0})],Z.prototype,"effectiveCapabilities",null),e([n()],Z.prototype,"effectiveEditingEnabled",null),e([n((()=>{const e=i(y),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],Z.prototype,"elevationInfo",void 0),e([n()],Z.prototype,"fieldsIndex",void 0),e([n({type:x,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:l}}})],Z.prototype,"floorInfo",void 0),e([n({type:a,json:{origins:{service:{read:{source:"extent"}}}}})],Z.prototype,"fullExtent",void 0),e([n()],Z.prototype,"gdbVersion",void 0),e([n({readOnly:!0,type:U,json:{read:{source:"geometryProperties"}}})],Z.prototype,"geometryFieldsInfo",void 0),e([n({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:g.read}}}})],Z.prototype,"geometryType",void 0),e([n({type:String})],Z.prototype,"globalIdField",void 0),e([q("service","globalIdField",["globalIdField","fields"])],Z.prototype,"readGlobalIdFieldFromService",null),e([n({readOnly:!0})],Z.prototype,"hasFullEditingRestrictions",null),e([n({type:Boolean,json:{origins:{service:{read:!0}}}})],Z.prototype,"hasM",void 0),e([n({readOnly:!0})],Z.prototype,"hasUpdateItemRestrictions",null),e([n({type:Boolean,json:{origins:{service:{read:!0}}}})],Z.prototype,"hasZ",void 0),e([n({readOnly:!0,type:u})],Z.prototype,"heightModelInfo",void 0),e([n({type:Date})],Z.prototype,"historicMoment",void 0),e([n({type:t.ofType(v),readOnly:!0})],Z.prototype,"indexes",void 0),e([n({readOnly:!0})],Z.prototype,"isTable",void 0),e([q("service","isTable",["type"])],Z.prototype,"readIsTableFromService",null),e([n({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],Z.prototype,"layerId",void 0),e([n(f)],Z.prototype,"maxScale",void 0),e([q("service","maxScale",["maxScale","effectiveMaxScale"])],Z.prototype,"readMaxScale",null),e([n(m)],Z.prototype,"minScale",void 0),e([q("service","minScale",["minScale","effectiveMinScale"])],Z.prototype,"readMinScale",null),e([n({type:String})],Z.prototype,"objectIdField",void 0),e([q("service","objectIdField",["objectIdField","fields"])],Z.prototype,"readObjectIdFieldFromService",null),e([n({readOnly:!0})],Z.prototype,"parsedUrl",null),e([n(P("preferredTimeReference"))],Z.prototype,"preferredTimeZone",void 0),e([n({type:[H],readOnly:!0})],Z.prototype,"relationships",void 0),e([n({type:Boolean})],Z.prototype,"returnM",void 0),e([n({type:Boolean})],Z.prototype,"returnZ",void 0),e([n({readOnly:!0,json:{write:!1}})],Z.prototype,"serverGens",void 0),e([n({readOnly:!0})],Z.prototype,"serviceDefinitionExpression",void 0),e([q("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],Z.prototype,"readServiceDefinitionExpression",null),e([n({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Z.prototype,"serviceItemId",void 0),e([n()],Z.prototype,"sourceJSON",void 0),e([n({type:c,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],Z.prototype,"spatialReference",void 0),e([n({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],Z.prototype,"subtypeField",void 0),e([n({type:[B],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Z.prototype,"subtypes",void 0),e([n({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],Z.prototype,"trackIdField",void 0),e([n({type:[String]})],Z.prototype,"uniqueIdFields",void 0),e([q("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],Z.prototype,"readUniqueIdFields",null),e([n(w({nonStandardUrlAllowed:!0}))],Z.prototype,"url",void 0),e([n({json:{origins:{service:{read:!0}},read:!1}})],Z.prototype,"version",void 0),e([q("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],Z.prototype,"readVersion",null),e([n({readOnly:!0})],Z.prototype,"isUrlHostModified",null),Z=e([p("esri.layers.mixins.FeatureLayerBase")],Z),Z};export{G as FeatureLayerBase};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{clone as i}from"../../core/lang.js";import{hasSameOrigin as r,getHost as o,changeHost as s}from"../../core/urlUtils.js";import{property as n,subclass as p}from"../../core/accessorSupport/decorators.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import{idToName as d}from"../../core/accessorSupport/PropertyOrigin.js";import a from"../../geometry/Extent.js";import u from"../../geometry/HeightModelInfo.js";import c from"../../geometry/SpatialReference.js";import{elevationInfo as y,maxScale as f,minScale as m}from"../support/commonProperties.js";import h from"../support/EditFieldsInfo.js";import{FeatureIndex as v}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as g,hasCurrentUser as I,isLayerCacheStale as F,supportsQueryOnly as S,readGlobalIdField as b,readObjectIdField as j,readVersion as E}from"../support/featureLayerUtils.js";import U from"../support/GeometryFieldsInfo.js";import x from"../support/LayerFloorInfo.js";import{isPreferredUrlApplicable as O,getPreferredUrl as M,applyPreferredHostToPortalItem as D,getPreferredHost as T}from"../support/layerUtils.js";import{urlProperty as w,normalizeParsedUrlObject as C}from"../support/multiLayerServiceUtils.js";import H from"../support/Relationship.js";import{getFeatureLayerCapabilities as R}from"../support/serviceCapabilitiesUtils.js";import B from"../support/Subtype.js";import{hasTypeKeyword as A,typeKeyword as q}from"../../portal/support/portalItemUtils.js";import{timeZoneProperty as Q}from"../../time/timeZoneUtils.js";import{reader as P}from"../../core/accessorSupport/decorators/reader.js";const G=G=>{const V=G;let Z=class extends V{constructor(){super(...arguments),this.cacheMaxAge=0,this.capabilities=null,this.copyright=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.fieldsIndex=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(v)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=c.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.uniqueIdFields=null,this.url=null,this.version=void 0,this._isUrlHostModified=!1,this._isUrlHostModificationEnabled=!1}getFieldDomain(e,t){throw new Error("Not implemented")}getField(e){return this.fieldsIndex.get(e)}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:i,editing:r}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(i.supportsEditing&&!(r.supportsUpdateByOthers&&r.supportsUpdateByAnonymous&&r.supportsDeleteByOthers&&r.supportsDeleteByAnonymous))return"load"}if(I(this.serviceDefinitionExpression)||I(this.definitionExpression))return"load";if(this.userHasUpdateItemPrivileges){if(F(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return R(t,this.url)}readEditingInfo(e,t){const{editingInfo:i}=t;return i?{lastEditDate:null!=i.lastEditDate?new Date(i.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=i(e),{operations:r,editing:o}=t;return S(this)?(this.userHasUpdateItemPrivileges&&(r.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(r.supportsAdd=r.supportsDelete=r.supportsEditing=r.supportsQuery=r.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&r.supportsEditing&&(r.supportsAdd=r.supportsDelete=r.supportsUpdate=o.supportsGeometryUpdate=!0),t)}get effectiveEditingEnabled(){return!1}get effectiveUniqueIdFields(){return this.uniqueIdFields?[...this.uniqueIdFields]:[this.objectIdField]}readGlobalIdFieldFromService(e,t){return b(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||S(this))return!1;const{operations:t,editing:i}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&i.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:i}=e;return S(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&i.supportsDeleteByOthers&&i.supportsGeometryUpdate&&i.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return j(t)}get parsedUrl(){return C(this)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}readUniqueIdFields(e,t){return t.uniqueIdInfo?.OIDFieldContainsHashValue?t.uniqueIdInfo.fields:null}readVersion(e,t){return E(t)}get isUrlHostModified(){const{loaded:e,url:t,_isUrlHostModified:i}=this;if(i)return!0;if(!e||!t)return!1;if(this.originIdOf("url")<7)return!1;const o=this.sourceJSON?.preferredHost;if(!o)return!1;if(!r(t,`https://${o}`,!0))return!1;for(let s=6;s>=3;s--){const e=this.getAtOrigin("url",d(s));if(e)return!r(t,e,!0)}return!1}applyPreferredHost(e){const{url:t,portalItem:i}=this;if(!t||!O(i))return;const r=M();r&&this._isUrlHostModificationEnabled&&(this._set("url",r),this._isUrlHostModified=!0,i&&D(i,T()))}applyHostFromPortalItem(){const{url:e,portalItem:t}=this;if(!e||7===this.originIdOf("url")||!t?.url||!O(t)||!A(t,q.HOSTED_SERVICE)||r(e,t.url,!0)||!this._isUrlHostModificationEnabled)return;const i=o(t.url);this._set("url",s(e,i)),this._isUrlHostModified=!0}};return e([n({readOnly:!0})],Z.prototype,"authenticationTriggerEvent",null),e([n({readOnly:!0,json:{read:e=>e/60}})],Z.prototype,"cacheMaxAge",void 0),e([n({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","isDataBranchVersioned","isDataVersioned","maxRecordCount","maxRecordCountFactor","maxUniqueIDCount","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","standardMaxRecordCountNoGeometry","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],Z.prototype,"capabilities",void 0),e([P("service","capabilities")],Z.prototype,"readCapabilitiesFromService",null),e([n({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],Z.prototype,"copyright",void 0),e([n(Q("dateFieldsTimeReference"))],Z.prototype,"dateFieldsTimeZone",void 0),e([n({type:Boolean})],Z.prototype,"datesInUnknownTimezone",void 0),e([n({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Z.prototype,"definitionExpression",void 0),e([n({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],Z.prototype,"displayField",void 0),e([n({readOnly:!0,type:h})],Z.prototype,"editFieldsInfo",void 0),e([n({readOnly:!0})],Z.prototype,"editingInfo",void 0),e([P("editingInfo")],Z.prototype,"readEditingInfo",null),e([n({readOnly:!0})],Z.prototype,"effectiveCapabilities",null),e([n()],Z.prototype,"effectiveEditingEnabled",null),e([n({readOnly:!0,type:[String]})],Z.prototype,"effectiveUniqueIdFields",null),e([n((()=>{const e=i(y),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],Z.prototype,"elevationInfo",void 0),e([n()],Z.prototype,"fieldsIndex",void 0),e([n({type:x,json:{name:"layerDefinition.floorInfo",write:{layerContainerTypes:l}}})],Z.prototype,"floorInfo",void 0),e([n({type:a,json:{origins:{service:{read:{source:"extent"}}}}})],Z.prototype,"fullExtent",void 0),e([n()],Z.prototype,"gdbVersion",void 0),e([n({readOnly:!0,type:U,json:{read:{source:"geometryProperties"}}})],Z.prototype,"geometryFieldsInfo",void 0),e([n({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:g.read}}}})],Z.prototype,"geometryType",void 0),e([n({type:String})],Z.prototype,"globalIdField",void 0),e([P("service","globalIdField",["globalIdField","fields"])],Z.prototype,"readGlobalIdFieldFromService",null),e([n({readOnly:!0})],Z.prototype,"hasFullEditingRestrictions",null),e([n({type:Boolean,json:{origins:{service:{read:!0}}}})],Z.prototype,"hasM",void 0),e([n({readOnly:!0})],Z.prototype,"hasUpdateItemRestrictions",null),e([n({type:Boolean,json:{origins:{service:{read:!0}}}})],Z.prototype,"hasZ",void 0),e([n({readOnly:!0,type:u})],Z.prototype,"heightModelInfo",void 0),e([n({type:Date})],Z.prototype,"historicMoment",void 0),e([n({type:t.ofType(v),readOnly:!0})],Z.prototype,"indexes",void 0),e([n({readOnly:!0})],Z.prototype,"isTable",void 0),e([P("service","isTable",["type"])],Z.prototype,"readIsTableFromService",null),e([n({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],Z.prototype,"layerId",void 0),e([n(f)],Z.prototype,"maxScale",void 0),e([P("service","maxScale",["maxScale","effectiveMaxScale"])],Z.prototype,"readMaxScale",null),e([n(m)],Z.prototype,"minScale",void 0),e([P("service","minScale",["minScale","effectiveMinScale"])],Z.prototype,"readMinScale",null),e([n({type:String})],Z.prototype,"objectIdField",void 0),e([P("service","objectIdField",["objectIdField","fields"])],Z.prototype,"readObjectIdFieldFromService",null),e([n({readOnly:!0})],Z.prototype,"parsedUrl",null),e([n(Q("preferredTimeReference"))],Z.prototype,"preferredTimeZone",void 0),e([n({type:[H],readOnly:!0})],Z.prototype,"relationships",void 0),e([n({type:Boolean})],Z.prototype,"returnM",void 0),e([n({type:Boolean})],Z.prototype,"returnZ",void 0),e([n({readOnly:!0,json:{write:!1}})],Z.prototype,"serverGens",void 0),e([n({readOnly:!0})],Z.prototype,"serviceDefinitionExpression",void 0),e([P("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],Z.prototype,"readServiceDefinitionExpression",null),e([n({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Z.prototype,"serviceItemId",void 0),e([n()],Z.prototype,"sourceJSON",void 0),e([n({type:c,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],Z.prototype,"spatialReference",void 0),e([n({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],Z.prototype,"subtypeField",void 0),e([n({type:[B],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Z.prototype,"subtypes",void 0),e([n({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],Z.prototype,"trackIdField",void 0),e([n({type:[String]})],Z.prototype,"uniqueIdFields",void 0),e([P("service","uniqueIdFields",["uniqueIdInfo.OIDFieldContainsHashValue","uniqueIdInfo.fields"])],Z.prototype,"readUniqueIdFields",null),e([n(w({nonStandardUrlAllowed:!0}))],Z.prototype,"url",void 0),e([n({json:{origins:{service:{read:!0}},read:!1}})],Z.prototype,"version",void 0),e([P("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],Z.prototype,"readVersion",null),e([n({readOnly:!0})],Z.prototype,"isUrlHostModified",null),Z=e([p("esri.layers.mixins.FeatureLayerBase")],Z),Z};export{G as FeatureLayerBase};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../../../core/Error.js";import{rad2deg as n,deg2rad as a}from"../../../core/mathUtils.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as i,fromValues as o}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as r,zeros as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as s}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{transpose as l,multiply as f}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{invertOrIdentity as u,mul as h}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{scale as m,sub as p,add as g}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{isSerializable as v}from"../../../core/support/jsonUtils.js";import M from"../../../geometry/Point.js";import{projectAsync as d}from"../../../geometry/projectionUtils.js";import{earth as x}from"../../../geometry/support/Ellipsoid.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{a as y}from"../../../chunks/vec3.js";import{ConstantElevation as b,isConstantElevation as j,isElevationSource as O}from"../core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as z}from"../core/utils.js";import{getElevationSampler as P}from"./updateElevationUtils.js";import{isNumber as R}from"../../../support/guards.js";import{defaultImageSphereSize as F}from"../../../widgets/PanoramicViewer/constants.js";function E(t,n,a){const[e,o,r,c]=n,[s,l,f,m]=a;S(e,o,r,c);const p=S(s,l,f,m),g=H(e,o,r,c),v=H(s,l,f,m),M=u(i(),g),d=h(i(),M,v),[x,w,y,b]=D(t,d);return[x/b,w/b,p?0:y/b]}function S(t,n,a,e){return 0===t[2]&&0===n[2]&&0===a[2]&&0===e[2]&&(t[2]=n[2]=a[2]=e[2]=1,!0)}function V(t){return 0===t?1:t}function D(t,n){const[a,e,i]=t,o=[0,0,0,0];return o[0]=a*n[0]+e*n[1]+i*n[2]+n[3],o[1]=a*n[4]+e*n[5]+i*n[6]+n[7],o[2]=a*n[8]+e*n[9]+i*n[10]+n[11],o[3]=V(a*n[12]+e*n[13]+i*n[14]+n[15]),o}function H(t,n,a,e){const r=I(s([...e,1]),u(new Array(16),o(t[0],n[0],a[0],0,t[1],n[1],a[1],0,t[2],n[2],a[2],0,1,1,1,1))),c=r[0],l=r[1],f=r[2],h=i();return h[0]=c*t[0],h[1]=l*n[0],h[2]=f*a[0],h[3]=0,h[4]=c*t[1],h[5]=l*n[1],h[6]=f*a[1],h[7]=0,h[8]=c*t[2],h[9]=l*n[2],h[10]=f*a[2],h[11]=0,h[12]=c,h[13]=l,h[14]=f,h[15]=1,h}function L(t,n,a,e,i=c()){return i[0]=t[0]+n[0]*a,i[1]=t[1]+n[1]*a,i[2]=t[2]+n[2]*(a/e),i}function N(t,n,a){const e=c();return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*(n/a),e}function A(t,n){const[a,e,i]=t,o=c();return o[0]=a*n[0]+e*n[3]+i*n[6],o[1]=a*n[1]+e*n[4]+i*n[7],o[2]=a*n[2]+e*n[5]+i*n[8],o}function I(t,n){const[a,e,i,o]=t,r=new Array(4);return r[0]=a*n[0]+e*n[1]+i*n[2]+o*n[3],r[1]=a*n[4]+e*n[5]+i*n[6]+o*n[7],r[2]=a*n[8]+e*n[9]+i*n[10]+o*n[11],r[3]=a*n[12]+e*n[13]+i*n[14]+o*n[15],r}function Y(n,i,o,r=!0){if(!Number.isFinite(n))throw new t("InvalidRotationAngle","Please specify a valid angle for rotation");const c=o*(r?a(n):n),s=Math.cos(c),l=Math.sin(c),f=e();switch(i){case 0:f[4]=s,f[5]=-l,f[7]=l,f[8]=s;break;case 1:f[0]=s,f[2]=l,f[6]=-l,f[8]=s;break;case 2:f[0]=s,f[1]=-l,f[3]=l,f[4]=s;break;default:throw new t("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return f}const k={HPR:[[2,-1],[0,1],[2,-1]],OPK:[[0,1],[1,1],[2,1]],YPR:[[0,-1],[1,-1],[2,-1]]};function q(n,a,i=!0){if(3!==n?.length||3!==a?.length)throw new t("InvalidRotationAngles","Please specify three angles with config for rotation");const o=e();for(let t=0;t<3;t++){const[e,r]=a[t],c=Y(n[t],e,r,i);f(o,c,o)}return o}function U(t,n=!0){return q(t,k.OPK,n)}function C(t,n=!0){return q(t,k.HPR,n)}function K(t,n,e){const i=Math.sin(a(e)),o=Math.cos(a(e)),r=[[t,0],[t,n],[0,n]];r.forEach((t,n)=>{r[n]=[o*t[0]-i*t[1],i*t[0]+o*t[1]]});const c={xmin:Math.min(0,r[0][0],r[1][0],r[2][0]),xmax:Math.max(0,r[0][0],r[1][0],r[2][0]),ymin:Math.min(0,r[0][1],r[1][1],r[2][1]),ymax:Math.max(0,r[0][1],r[1][1],r[2][1])};return{hfov:Math.abs(c.xmax-c.xmin),vfov:Math.abs(c.ymax-c.ymin)}}function T(t,e){const i=Number(t[0]),o=Number(t[1]),r=Number(t[2]),[c,s,l,f]=e,u=a(c),h=a(s),m=l/Math.sqrt(1-f*Math.sin(u)**2),p=i/m,g=o/m,v=r/m,M=Math.cos(u)-Math.sin(u)*g+Math.cos(u)*v,d=Math.sin(u)+Math.cos(u)*g+Math.sin(u)*v,x=Math.sqrt(M**2+p**2),w=f*m*Math.sin(u),y=(t,n=5)=>{if(0===n)return t;const a=y(t,n-1);return Math.atan(d/x-(w-f*(l/Math.sqrt(1-f*Math.sin(a)**2))*Math.sin(a))/(m*x))},b=y(u),j=Math.atan(i/(m*M))+h,O=n(b);return[n(j),O,i/(Math.cos(b)*Math.sin(j-h))-l/Math.sqrt(1-f*Math.sin(b)**2)]}function W(t,n,a){const e=360/n,i=180/a;return{heading:(t.x-n/2)*e,pitch:90-(t.y-a/2)*i}}function X(t,n,a,e,i=F/2){const{heading:o,pitch:r}=G(t,i),c=e?Rt(o,r,e):[o,r];return{heading:o,pitch:r,...Z(c[0],c[1],n,a)}}function Z(t,n,a,e){const i=t%360;return{x:a/2+(i<-180?i+360:i>180?i-360:i)/(360/a),y:e-n/(180/e)}}function G(t,a){const e=n(Math.acos(-t.z/a));return{heading:n(Math.atan2(t.x,t.y)),pitch:e}}function J(t,n){return[Math.sin(a(t))*Math.sin(a(n)),Math.cos(a(t))*Math.sin(a(n)),Math.cos(a(180-n))]}function $(t,n,a,e=F/2){const i=a?Rt(t,n,a,!0):[t,n];return m(r(),J(i[0],i[1]),e)}function B(t,n,a,e,i=F/2){const{heading:o,pitch:r}=W(t,n,a);return $(o,r,e,i)}async function Q(t,a,e){const i=await d(a,t.spatialReference,e);let o=n(Math.atan2(i.y-t.y,i.x-t.x));return o=o>=0&&o<=90?90-o:o>90&&o<=180?360-o+90:90+Math.abs(o),o}function _(t,n,a){const e=Math.cos(a),i=Math.sin(a),o=[1,0,0,1,0,0],r=o[0]*e+o[2]*i,c=o[1]*e+o[3]*i,s=-o[0]*i+o[2]*e,l=-o[1]*i+o[3]*e;o[0]=r,o[1]=c,o[2]=s,o[3]=l;return[t*o[0]+n*o[2]+o[4],t*o[1]+n*o[3]+o[5]]}const tt=t=>t.toArray(),nt=(...t)=>t.some(t=>t);function at(t,n){if(nt(0===t.length,t.some(({x:t,y:n})=>nt(null==t,null==n)),!n.hasZ))throw new Error("Input pixels must have x, y and camera location must have z value")}function et(t,n){if(t.some(t=>null==t.z)||null==n.z)throw new Error("Input points and camera location must have z value")}function it(t){if(9!==t?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix")}function ot(t,n){return w(n)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/x.radius))):1}const rt=t=>n=>new M({x:n[0],y:n[1],z:n[2],spatialReference:t}),ct=t=>null!=t&&"queryExtent"in t;function st(t,n,a,e){return[[-n,-n],[+n,-n],[+n,+n],[-n,+n]].map(([n,i])=>E(y(c(),a,[n,i,0]),e,t))}function lt({a0:t,a1:n,a2:a,b0:e,b1:i,b2:o},r,c,s){const l=[t??r/2-.5,n,a??0,e??c/2-.5,i??0,o].map(ft);return null!=s&&ut(l)?{affines:l,focalLength:s}:{affines:[r/2-.5,1,0,c/2-.5,0,-1]}}function ft(t,n){if(null==t)return null;const a=parseFloat(`${t}`);return isNaN(a)?null:a}function ut(t){return null!=t[1]&&null!=t[5]}function ht(t,n,a){const{cameraHeight:e,cameraPitch:i,cameraRoll:o,elevation:r,farDistance:c,horizontalFieldOfView:s,location:l,verticalFieldOfView:f}=zt(t,t.location.spatialReference),u=r??(l.z??0)-e;return{...gt(t,n,a),averageElevation:u,cameraPitch:i,cameraRoll:o??0,farDistance:c,horizontalFieldOfView:s,verticalFieldOfView:f}}function mt(t,n,a,e){return jt(e)?U([e.omega,e.phi,e.kappa]):Ot(e)?C([e.heading,e.pitch,e.roll]):C([t,n,a??0])}function pt(t,n,a){const{cameraHeading:e,cameraHeight:i,farDistance:o,horizontalFieldOfView:r,location:c,verticalFieldOfView:s}=zt(t,t.location.spatialReference),l=(c.z??0)-i;let f=-e,u=0,h=0;if(t?.matrix){const{matrix:n}=t;[u,h,f]=Pt(n)}return{averageElevation:l,cameraLocation:c,cameraHeading:e,farDistance:o,horizontalFieldOfView:r,imageHeight:a,imageWidth:n,verticalFieldOfView:s,horizonYaw:f,horizonPitch:u,horizonRoll:h}}function gt(t,n,a){const{a0:e,a1:i,a2:o,b0:r,b1:c,b2:s,cameraHeading:l,cameraOrientation:f,cameraPitch:u,cameraRoll:h,focalLength:m,horizontalFieldOfView:p,location:g,matrix:v,principalX:M,principalY:d,radial:x,tangential:w,verticalFieldOfView:y}=t,{affines:b,focalLength:j}=lt({a0:e,a1:i,a2:o,b0:r,b1:c,b2:s},n,a,m),O=v??mt(l,u,h,f),z=null!=M&&null!=d?[M,d]:void 0;return{affineTransformations:f?.affineTransformations??b,cameraLocation:g.clone(),focalLength:f?.focalLength??j,horizontalFieldOfView:p,imageHeight:a,imageWidth:n,principalOffsetPoint:f?.principalOffsetPoint??z,radialDistortionCoefficients:f?.radialDistortionCoefficients??x,rotationMatrix:O,tangentialDistortionCoefficients:f?.tangentialDistortionCoefficients??w,verticalFieldOfView:y}}const vt=t=>null!=t&&"elevationSample"in t&&null!=t.elevationSample,Mt=t=>O(t?.elevationSource)&&null!=t?.extent,dt=t=>j(t?.elevationSource),xt=async(t,n,a,e,i)=>{const o=z(t),r=n-a/o;return dt(e)?(e.elevationSource=new b({constantElevation:e.elevationSource.constantElevation/o}),e):vt(e)?e:Mt(e)?{elevationSample:await P({...v(e.elevationSource)?e.elevationSource.toJSON():e.elevationSource,extent:e.extent},i),elevationSource:new b({constantElevation:r})}:{averageGroundElevation:r,spatialReference:t}},wt=t=>R(t?.heading)&&R(t?.pitch),yt=(t,n)=>[[-t,-n],[t,-n],[t,n],[-t,n]];function bt(t){const{cameraLocation:n,farDistance:i,horizontalFieldOfView:o,rotationMatrix:r,scalingFactor:s,verticalFieldOfView:f}=t,u=e();l(u,r);const h=2*Math.tan(a(f)/2)*i*s,m=2*Math.tan(a(o)/2)*i*s,v=A([0,0,-1],u),M=L([n.x,n.y,n.z],v,t.farDistance*s,s),d=A([0,1,0],u),x=A([1,0,0],u),w=N(d,h/2,s),y=N(x,m/2,s),b=p(c(),w,y),j=g(c(),w,y);return[g(c(),M,b),g(c(),M,j),p(c(),M,b),p(c(),M,j)]}const jt=t=>2===t?.type,Ot=t=>1===t?.type;function zt(t,n,a=!0){const e=z(n),i=a?t.clone():t;return i.cameraHeight/=e,i.farDistance/=e,i.nearDistance/=e,j(i.elevationSource)&&(i.elevationSource.constantElevation/=e),i}function Pt(t){return[n(Math.asin(-t[6])),n(Math.atan(t[7]/t[8])),n(Math.atan2(t[3],t[0]))]}function Rt(t,n,a,e=!1){return Ft(J(t,n),a,e)}function Ft(t,a,i=!1){const o=i?l(e(),q(a,k.YPR)):q(a,k.YPR),r=t[0]*o[0]+t[1]*o[1]+t[2]*o[2],c=t[0]*o[3]+t[1]*o[4]+t[2]*o[5],s=t[0]*o[6]+t[1]*o[7]+t[2]*o[8],f=n(Math.acos(-s));return[n(Math.atan2(r,c)),f]}export{Rt as adjustHorizonAngles,Ft as adjustHorizonAnglesVec3,bt as computeFarplaneVertices,K as computeHFOVAndVFOV,st as computeNewReferenceCoordinates,$ as convertHeadingPitchToSphereVertex,Z as convertOrientationToPixelLocation,B as convertPixelLocationToSphereVertex,W as convertPixelToHeadingPitch,G as convertSphereVertexToOrientation,X as convertSphereVertexToPixelLocation,zt as convertToSRUnits,J as createMeshSpaceVector,q as createRotationMatrix,C as createRotationMatrixFromHPR,U as createRotationMatrixFromOPK,Pt as extractHorizonAngles,lt as getAffinesAndFocalLength,pt as getImageToWorldPanoramicProperties,ht as getImageToWorldProperties,Q as getInitialAngle,xt as getUpdateElevationProps,ot as getWebMercatorScalingFactor,gt as getWorldToImageProperties,wt as hasAngles,Ot as hasHeadingPitchRoll,jt as hasOmegaPhiKappa,ct as isElevationSampler,vt as isUpdateElevationWithElevationSampler,Mt as isUpdateElevationWithElevationSource,dt as isUpdateUsingConstantElevation,ut as isValidAffines,H as linearEquationSolve,T as ltpToGeographic,nt as or,tt as pointToArray,E as projectiveTransform,yt as reducerFn,_ as rotatePixel,L as scaleAndAddWithFactor,N as scaleWithFactor,A as transformMat3,I as transformMat4,at as validatePixelsToTransform,et as validatePointsToTransform,it as validateRotationMatrix,rt as vecToPoint};
|
|
2
|
+
import t from"../../../core/Error.js";import{rad2deg as n,deg2rad as a}from"../../../core/mathUtils.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as i,fromValues as o}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as r,zeros as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as s}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{transpose as l,multiply as f}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{invertOrIdentity as u,mul as h}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{scale as m,sub as p,add as g}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{isSerializable as v}from"../../../core/support/jsonUtils.js";import M from"../../../geometry/Point.js";import{projectAsync as d}from"../../../geometry/projectionUtils.js";import{earth as x}from"../../../geometry/support/Ellipsoid.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{h as y}from"../../../chunks/vec3.js";import{ConstantElevation as b,isConstantElevation as j,isElevationSource as O}from"../core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as z}from"../core/utils.js";import{getElevationSampler as P}from"./updateElevationUtils.js";import{isNumber as R}from"../../../support/guards.js";import{defaultImageSphereSize as F}from"../../../widgets/PanoramicViewer/constants.js";function E(t,n,a){const[e,o,r,c]=n,[s,l,f,m]=a;S(e,o,r,c);const p=S(s,l,f,m),g=H(e,o,r,c),v=H(s,l,f,m),M=u(i(),g),d=h(i(),M,v),[x,w,y,b]=D(t,d);return[x/b,w/b,p?0:y/b]}function S(t,n,a,e){return 0===t[2]&&0===n[2]&&0===a[2]&&0===e[2]&&(t[2]=n[2]=a[2]=e[2]=1,!0)}function V(t){return 0===t?1:t}function D(t,n){const[a,e,i]=t,o=[0,0,0,0];return o[0]=a*n[0]+e*n[1]+i*n[2]+n[3],o[1]=a*n[4]+e*n[5]+i*n[6]+n[7],o[2]=a*n[8]+e*n[9]+i*n[10]+n[11],o[3]=V(a*n[12]+e*n[13]+i*n[14]+n[15]),o}function H(t,n,a,e){const r=I(s([...e,1]),u(new Array(16),o(t[0],n[0],a[0],0,t[1],n[1],a[1],0,t[2],n[2],a[2],0,1,1,1,1))),c=r[0],l=r[1],f=r[2],h=i();return h[0]=c*t[0],h[1]=l*n[0],h[2]=f*a[0],h[3]=0,h[4]=c*t[1],h[5]=l*n[1],h[6]=f*a[1],h[7]=0,h[8]=c*t[2],h[9]=l*n[2],h[10]=f*a[2],h[11]=0,h[12]=c,h[13]=l,h[14]=f,h[15]=1,h}function L(t,n,a,e,i=c()){return i[0]=t[0]+n[0]*a,i[1]=t[1]+n[1]*a,i[2]=t[2]+n[2]*(a/e),i}function N(t,n,a){const e=c();return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*(n/a),e}function A(t,n){const[a,e,i]=t,o=c();return o[0]=a*n[0]+e*n[3]+i*n[6],o[1]=a*n[1]+e*n[4]+i*n[7],o[2]=a*n[2]+e*n[5]+i*n[8],o}function I(t,n){const[a,e,i,o]=t,r=new Array(4);return r[0]=a*n[0]+e*n[1]+i*n[2]+o*n[3],r[1]=a*n[4]+e*n[5]+i*n[6]+o*n[7],r[2]=a*n[8]+e*n[9]+i*n[10]+o*n[11],r[3]=a*n[12]+e*n[13]+i*n[14]+o*n[15],r}function Y(n,i,o,r=!0){if(!Number.isFinite(n))throw new t("InvalidRotationAngle","Please specify a valid angle for rotation");const c=o*(r?a(n):n),s=Math.cos(c),l=Math.sin(c),f=e();switch(i){case 0:f[4]=s,f[5]=-l,f[7]=l,f[8]=s;break;case 1:f[0]=s,f[2]=l,f[6]=-l,f[8]=s;break;case 2:f[0]=s,f[1]=-l,f[3]=l,f[4]=s;break;default:throw new t("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return f}const k={HPR:[[2,-1],[0,1],[2,-1]],OPK:[[0,1],[1,1],[2,1]],YPR:[[0,-1],[1,-1],[2,-1]]};function q(n,a,i=!0){if(3!==n?.length||3!==a?.length)throw new t("InvalidRotationAngles","Please specify three angles with config for rotation");const o=e();for(let t=0;t<3;t++){const[e,r]=a[t],c=Y(n[t],e,r,i);f(o,c,o)}return o}function U(t,n=!0){return q(t,k.OPK,n)}function C(t,n=!0){return q(t,k.HPR,n)}function K(t,n,e){const i=Math.sin(a(e)),o=Math.cos(a(e)),r=[[t,0],[t,n],[0,n]];r.forEach((t,n)=>{r[n]=[o*t[0]-i*t[1],i*t[0]+o*t[1]]});const c={xmin:Math.min(0,r[0][0],r[1][0],r[2][0]),xmax:Math.max(0,r[0][0],r[1][0],r[2][0]),ymin:Math.min(0,r[0][1],r[1][1],r[2][1]),ymax:Math.max(0,r[0][1],r[1][1],r[2][1])};return{hfov:Math.abs(c.xmax-c.xmin),vfov:Math.abs(c.ymax-c.ymin)}}function T(t,e){const i=Number(t[0]),o=Number(t[1]),r=Number(t[2]),[c,s,l,f]=e,u=a(c),h=a(s),m=l/Math.sqrt(1-f*Math.sin(u)**2),p=i/m,g=o/m,v=r/m,M=Math.cos(u)-Math.sin(u)*g+Math.cos(u)*v,d=Math.sin(u)+Math.cos(u)*g+Math.sin(u)*v,x=Math.sqrt(M**2+p**2),w=f*m*Math.sin(u),y=(t,n=5)=>{if(0===n)return t;const a=y(t,n-1);return Math.atan(d/x-(w-f*(l/Math.sqrt(1-f*Math.sin(a)**2))*Math.sin(a))/(m*x))},b=y(u),j=Math.atan(i/(m*M))+h,O=n(b);return[n(j),O,i/(Math.cos(b)*Math.sin(j-h))-l/Math.sqrt(1-f*Math.sin(b)**2)]}function W(t,n,a){const e=360/n,i=180/a;return{heading:(t.x-n/2)*e,pitch:90-(t.y-a/2)*i}}function X(t,n,a,e,i=F/2){const{heading:o,pitch:r}=G(t,i),c=e?Rt(o,r,e):[o,r];return{heading:o,pitch:r,...Z(c[0],c[1],n,a)}}function Z(t,n,a,e){const i=t%360;return{x:a/2+(i<-180?i+360:i>180?i-360:i)/(360/a),y:e-n/(180/e)}}function G(t,a){const e=n(Math.acos(-t.z/a));return{heading:n(Math.atan2(t.x,t.y)),pitch:e}}function J(t,n){return[Math.sin(a(t))*Math.sin(a(n)),Math.cos(a(t))*Math.sin(a(n)),Math.cos(a(180-n))]}function $(t,n,a,e=F/2){const i=a?Rt(t,n,a,!0):[t,n];return m(r(),J(i[0],i[1]),e)}function B(t,n,a,e,i=F/2){const{heading:o,pitch:r}=W(t,n,a);return $(o,r,e,i)}async function Q(t,a,e){const i=await d(a,t.spatialReference,e);let o=n(Math.atan2(i.y-t.y,i.x-t.x));return o=o>=0&&o<=90?90-o:o>90&&o<=180?360-o+90:90+Math.abs(o),o}function _(t,n,a){const e=Math.cos(a),i=Math.sin(a),o=[1,0,0,1,0,0],r=o[0]*e+o[2]*i,c=o[1]*e+o[3]*i,s=-o[0]*i+o[2]*e,l=-o[1]*i+o[3]*e;o[0]=r,o[1]=c,o[2]=s,o[3]=l;return[t*o[0]+n*o[2]+o[4],t*o[1]+n*o[3]+o[5]]}const tt=t=>t.toArray(),nt=(...t)=>t.some(t=>t);function at(t,n){if(nt(0===t.length,t.some(({x:t,y:n})=>nt(null==t,null==n)),!n.hasZ))throw new Error("Input pixels must have x, y and camera location must have z value")}function et(t,n){if(t.some(t=>null==t.z)||null==n.z)throw new Error("Input points and camera location must have z value")}function it(t){if(9!==t?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix")}function ot(t,n){return w(n)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/x.radius))):1}const rt=t=>n=>new M({x:n[0],y:n[1],z:n[2],spatialReference:t}),ct=t=>null!=t&&"queryExtent"in t;function st(t,n,a,e){return[[-n,-n],[+n,-n],[+n,+n],[-n,+n]].map(([n,i])=>E(y(c(),a,[n,i,0]),e,t))}function lt({a0:t,a1:n,a2:a,b0:e,b1:i,b2:o},r,c,s){const l=[t??r/2-.5,n,a??0,e??c/2-.5,i??0,o].map(ft);return null!=s&&ut(l)?{affines:l,focalLength:s}:{affines:[r/2-.5,1,0,c/2-.5,0,-1]}}function ft(t,n){if(null==t)return null;const a=parseFloat(`${t}`);return isNaN(a)?null:a}function ut(t){return null!=t[1]&&null!=t[5]}function ht(t,n,a){const{cameraHeight:e,cameraPitch:i,cameraRoll:o,elevation:r,farDistance:c,horizontalFieldOfView:s,location:l,verticalFieldOfView:f}=zt(t,t.location.spatialReference),u=r??(l.z??0)-e;return{...gt(t,n,a),averageElevation:u,cameraPitch:i,cameraRoll:o??0,farDistance:c,horizontalFieldOfView:s,verticalFieldOfView:f}}function mt(t,n,a,e){return jt(e)?U([e.omega,e.phi,e.kappa]):Ot(e)?C([e.heading,e.pitch,e.roll]):C([t,n,a??0])}function pt(t,n,a){const{cameraHeading:e,cameraHeight:i,farDistance:o,horizontalFieldOfView:r,location:c,verticalFieldOfView:s}=zt(t,t.location.spatialReference),l=(c.z??0)-i;let f=-e,u=0,h=0;if(t?.matrix){const{matrix:n}=t;[u,h,f]=Pt(n)}return{averageElevation:l,cameraLocation:c,cameraHeading:e,farDistance:o,horizontalFieldOfView:r,imageHeight:a,imageWidth:n,verticalFieldOfView:s,horizonYaw:f,horizonPitch:u,horizonRoll:h}}function gt(t,n,a){const{a0:e,a1:i,a2:o,b0:r,b1:c,b2:s,cameraHeading:l,cameraOrientation:f,cameraPitch:u,cameraRoll:h,focalLength:m,horizontalFieldOfView:p,location:g,matrix:v,principalX:M,principalY:d,radial:x,tangential:w,verticalFieldOfView:y}=t,{affines:b,focalLength:j}=lt({a0:e,a1:i,a2:o,b0:r,b1:c,b2:s},n,a,m),O=v??mt(l,u,h,f),z=null!=M&&null!=d?[M,d]:void 0;return{affineTransformations:f?.affineTransformations??b,cameraLocation:g.clone(),focalLength:f?.focalLength??j,horizontalFieldOfView:p,imageHeight:a,imageWidth:n,principalOffsetPoint:f?.principalOffsetPoint??z,radialDistortionCoefficients:f?.radialDistortionCoefficients??x,rotationMatrix:O,tangentialDistortionCoefficients:f?.tangentialDistortionCoefficients??w,verticalFieldOfView:y}}const vt=t=>null!=t&&"elevationSample"in t&&null!=t.elevationSample,Mt=t=>O(t?.elevationSource)&&null!=t?.extent,dt=t=>j(t?.elevationSource),xt=async(t,n,a,e,i)=>{const o=z(t),r=n-a/o;return dt(e)?(e.elevationSource=new b({constantElevation:e.elevationSource.constantElevation/o}),e):vt(e)?e:Mt(e)?{elevationSample:await P({...v(e.elevationSource)?e.elevationSource.toJSON():e.elevationSource,extent:e.extent},i),elevationSource:new b({constantElevation:r})}:{averageGroundElevation:r,spatialReference:t}},wt=t=>R(t?.heading)&&R(t?.pitch),yt=(t,n)=>[[-t,-n],[t,-n],[t,n],[-t,n]];function bt(t){const{cameraLocation:n,farDistance:i,horizontalFieldOfView:o,rotationMatrix:r,scalingFactor:s,verticalFieldOfView:f}=t,u=e();l(u,r);const h=2*Math.tan(a(f)/2)*i*s,m=2*Math.tan(a(o)/2)*i*s,v=A([0,0,-1],u),M=L([n.x,n.y,n.z],v,t.farDistance*s,s),d=A([0,1,0],u),x=A([1,0,0],u),w=N(d,h/2,s),y=N(x,m/2,s),b=p(c(),w,y),j=g(c(),w,y);return[g(c(),M,b),g(c(),M,j),p(c(),M,b),p(c(),M,j)]}const jt=t=>2===t?.type,Ot=t=>1===t?.type;function zt(t,n,a=!0){const e=z(n),i=a?t.clone():t;return i.cameraHeight/=e,i.farDistance/=e,i.nearDistance/=e,j(i.elevationSource)&&(i.elevationSource.constantElevation/=e),i}function Pt(t){return[n(Math.asin(-t[6])),n(Math.atan(t[7]/t[8])),n(Math.atan2(t[3],t[0]))]}function Rt(t,n,a,e=!1){return Ft(J(t,n),a,e)}function Ft(t,a,i=!1){const o=i?l(e(),q(a,k.YPR)):q(a,k.YPR),r=t[0]*o[0]+t[1]*o[1]+t[2]*o[2],c=t[0]*o[3]+t[1]*o[4]+t[2]*o[5],s=t[0]*o[6]+t[1]*o[7]+t[2]*o[8],f=n(Math.acos(-s));return[n(Math.atan2(r,c)),f]}export{Rt as adjustHorizonAngles,Ft as adjustHorizonAnglesVec3,bt as computeFarplaneVertices,K as computeHFOVAndVFOV,st as computeNewReferenceCoordinates,$ as convertHeadingPitchToSphereVertex,Z as convertOrientationToPixelLocation,B as convertPixelLocationToSphereVertex,W as convertPixelToHeadingPitch,G as convertSphereVertexToOrientation,X as convertSphereVertexToPixelLocation,zt as convertToSRUnits,J as createMeshSpaceVector,q as createRotationMatrix,C as createRotationMatrixFromHPR,U as createRotationMatrixFromOPK,Pt as extractHorizonAngles,lt as getAffinesAndFocalLength,pt as getImageToWorldPanoramicProperties,ht as getImageToWorldProperties,Q as getInitialAngle,xt as getUpdateElevationProps,ot as getWebMercatorScalingFactor,gt as getWorldToImageProperties,wt as hasAngles,Ot as hasHeadingPitchRoll,jt as hasOmegaPhiKappa,ct as isElevationSampler,vt as isUpdateElevationWithElevationSampler,Mt as isUpdateElevationWithElevationSource,dt as isUpdateUsingConstantElevation,ut as isValidAffines,H as linearEquationSolve,T as ltpToGeographic,nt as or,tt as pointToArray,E as projectiveTransform,yt as reducerFn,_ as rotatePixel,L as scaleAndAddWithFactor,N as scaleWithFactor,A as transformMat3,I as transformMat4,at as validatePixelsToTransform,et as validatePointsToTransform,it as validateRotationMatrix,rt as vecToPoint};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{eachAlways as s,createAbortError as a}from"../../../core/promiseUtils.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import i from"../../../geometry/Extent.js";import n from"../../../geometry/SpatialReference.js";import l from"./BaseRaster.js";import c from"./InMemoryRaster.js";import{parsePAMInfo as m}from"./pamParser.js";import{getFormat as f}from"../formats/RasterCodec.js";import{estimateStatisticsFromHistograms as p}from"../functions/stretchUtils.js";import h from"../transforms/PolynomialTransform.js";let u=class extends l{fetchRawTile(t,e,s,a={}){if(this._imageBlob){const{blockWidth:a,blockHeight:r}=this.rasterInfo.storageInfo;return this.decodePixelBlock(this._imageBlob,{tileSize:[a,r],tileIndex:[t,e,s],canvasUsage:"canvas-only",cloneSource:!0})}return this._inMemoryRaster.fetchRawTile(t,e,s,a)}async _open(t){const s=await this._fetchData(t);if(null==s)throw new e("image-aux-raster:open","the data cannot be decoded");let{spatialReference:a,statistics:r,histograms:o,transform:l}=await this._fetchAuxiliaryData(t);const m=!a;m&&(a=new n({wkid:3857})),o?.length&&null==r&&(r=p(o));const{width:f,height:h}=s;let u=new i({xmin:-.5,ymin:.5-h,xmax:f-.5,ymax:.5,spatialReference:a});const d=l?l.forwardTransform(u):u;let g=!0;if(l){const t=l.forwardCoefficients;g=t&&0===t[1]&&0===t[2],g&&(l=null,u=d)}const w=new c({preGenerateTiles:!1,source:{extent:d,nativeExtent:u,transform:l,pixelBlocks:[s],statistics:r,histograms:o,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:m},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(w.ioConfig.skipMapInfo=!0),await w.open(),w.source=null,this._set("rasterInfo",w.rasterInfo),this._inMemoryRaster=w}async _fetchData(t){const{data:s}=await this.request(this.url,{responseType:"array-buffer",signal:t?.signal}),a=f(s).toUpperCase();if("JPG"!==a&&"PNG"!==a&&"GIF"!==a&&"BMP"!==a)throw new e("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",a);const r=a.toLowerCase();try{const t=await this.decodePixelBlock(s,{format:r,canvasUsage:"canvas-only",cloneSource:!0});return this._imageBlob=s,t}catch{return this.decodePixelBlock(s,{format:r,canvasUsage:"no-canvas"})}}async _fetchAuxiliaryData(t){const e=t?.signal,{skipExtensions:r=[],skipMapInfo:o}=this.ioConfig,i=o||r.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:e}),n=this.datasetFormat,l="JPG"===n?"jgw":"PNG"===n?"pgw":"BMP"===n?"bpw":null,c=l&&r.includes(l)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+l,{responseType:"text",signal:e}),f=await s([i,c]);if(e?.aborted)throw a();const p=m(f[0].value?.data);if(!p.transform){const t=f[1].value?f[1].value.data.split("\n").slice(0,6).map(t=>Number(t)):null;p.transform=6===t?.length?new h({forwardCoefficients:[t[4],t[5],t[0],-t[1],t[2],-t[3]]}):null}return p}};t([r({type:String,json:{write:!0}})],u.prototype,"datasetFormat",void 0),u=t([o("esri.layers.raster.datasets.ImageAuxRaster")],u);const d=u;export{d as default};
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{eachAlways as s,createAbortError as a}from"../../../core/promiseUtils.js";import{property as r,subclass as o}from"../../../core/accessorSupport/decorators.js";import i from"../../../geometry/Extent.js";import n from"../../../geometry/SpatialReference.js";import l from"./BaseRaster.js";import c from"./InMemoryRaster.js";import{parsePAMInfo as m}from"./pamParser.js";import{getFormat as f}from"../formats/RasterCodec.js";import{estimateStatisticsFromHistograms as p}from"../functions/stretchUtils.js";import h from"../transforms/PolynomialTransform.js";let u=class extends l{fetchRawTile(t,e,s,a={}){if(this._imageBlob){const{blockWidth:a,blockHeight:r}=this.rasterInfo.storageInfo;return this.decodePixelBlock(this._imageBlob,{tileSize:[a,r],tileIndex:[t,e,s],canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0})}return this._inMemoryRaster.fetchRawTile(t,e,s,a)}async _open(t){const s=await this._fetchData(t);if(null==s)throw new e("image-aux-raster:open","the data cannot be decoded");let{spatialReference:a,statistics:r,histograms:o,transform:l}=await this._fetchAuxiliaryData(t);const m=!a;m&&(a=new n({wkid:3857})),o?.length&&null==r&&(r=p(o));const{width:f,height:h}=s;let u=new i({xmin:-.5,ymin:.5-h,xmax:f-.5,ymax:.5,spatialReference:a});const d=l?l.forwardTransform(u):u;let g=!0;if(l){const t=l.forwardCoefficients;g=t&&0===t[1]&&0===t[2],g&&(l=null,u=d)}const w=new c({preGenerateTiles:!1,source:{extent:d,nativeExtent:u,transform:l,pixelBlocks:[s],statistics:r,histograms:o,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:m},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(w.ioConfig.skipMapInfo=!0),await w.open(),w.source=null,this._set("rasterInfo",w.rasterInfo),this._inMemoryRaster=w}async _fetchData(t){const{data:s}=await this.request(this.url,{responseType:"array-buffer",signal:t?.signal}),a=f(s).toUpperCase();if("JPG"!==a&&"PNG"!==a&&"GIF"!==a&&"BMP"!==a)throw new e("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",a);const r=a.toLowerCase();try{const t=await this.decodePixelBlock(s,{format:r,canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0});return this._imageBlob=s,t}catch{return this.decodePixelBlock(s,{format:r,canvasUsage:"no-canvas",skipStatistics:!0})}}async _fetchAuxiliaryData(t){const e=t?.signal,{skipExtensions:r=[],skipMapInfo:o}=this.ioConfig,i=o||r.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:e}),n=this.datasetFormat,l="JPG"===n?"jgw":"PNG"===n?"pgw":"BMP"===n?"bpw":null,c=l&&r.includes(l)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+l,{responseType:"text",signal:e}),f=await s([i,c]);if(e?.aborted)throw a();const p=m(f[0].value?.data);if(!p.transform){const t=f[1].value?f[1].value.data.split("\n").slice(0,6).map(t=>Number(t)):null;p.transform=6===t?.length?new h({forwardCoefficients:[t[4],t[5],t[0],-t[1],t[2],-t[3]]}):null}return p}};t([r({type:String,json:{write:!0}})],u.prototype,"datasetFormat",void 0),u=t([o("esri.layers.raster.datasets.ImageAuxRaster")],u);const d=u;export{d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../../../core/Error.js";import{assertIsSome as e}from"../../../core/maybe.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{decode as i}from"./ImageCanvasDecoder.js";import s from"./JpgPlus.js";import{load as r,decode as n}from"./Lerc.js";import{decode as o}from"./Lzw.js";import{convertNoDataToMask as h}from"./pixelRangeUtils.js";import{F as c}from"../../../chunks/Zlib.js";import{load as l,decode as p}from"./Qb3.js";import d from"./Raw.js";import{decodeTileOrStrip as u,decode as f}from"./TiffDecoder.js";import{isPlatformLittleEndian as m}from"./utils.js";import w from"../../support/PixelBlock.js";import g from"../../support/SimpleBandStatistics.js";var y=function(t){var e,a,i,s,r,n;function o(t){var e,a,i,s,r,n,o,h,c,l,p,d,u;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},r=null;;){switch(e=this.readUInt32(),h=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join(""),h){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":r&&this.animation.frames.push(r),this.pos+=4,r={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},s=this.readUInt16(),i=this.readUInt16()||100,r.delay=1e3*s/i,r.disposeOp=this.data[this.pos++],r.blendOp=this.data[this.pos++],r.data=[];break;case"IDAT":case"fdAT":for("fdAT"===h&&(this.pos+=4,e-=4),t=(null!=r?r.data:void 0)||this.imgData,p=0;0<=e?p<e:p>e;0<=e?++p:--p)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(c=255-this.transparency.indexed.length)>0)for(d=0;0<=c?d<c:d>c;0<=c?++d:--d)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":n=(l=this.read(e)).indexOf(0),o=String.fromCharCode.apply(String,l.slice(0,n)),this.text[o]=String.fromCharCode.apply(String,l.slice(n+1));break;case"IEND":return r&&this.animation.frames.push(r),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(u=this.colorType)||6===u,a=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*a,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return o.load=function(t,e,a){var i;return"function"==typeof e&&(a=e),(i=new XMLHttpRequest).open("GET",t,!0),i.responseType="arraybuffer",i.onload=function(){var t;return t=new o(new Uint8Array(i.response||i.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof a?a(t):void 0},i.send(null)},a=1,i=2,e=0,o.prototype.read=function(t){var e,a;for(a=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)a.push(this.data[this.pos++]);return a},o.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.decodePixels=function(t){var e,a,i,s,r,n,o,h,l,p,d,u,f,m,w,g,y,x,b,k,v,T,C;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=(t=new c(t)).getBytes(),g=(u=this.pixelBitlength/8)*this.width,f=new Uint8Array(g*this.height),n=t.length,w=0,m=0,a=0;m<n;){switch(t[m++]){case 0:for(s=b=0;b<g;s=b+=1)f[a++]=t[m++];break;case 1:for(s=k=0;k<g;s=k+=1)e=t[m++],r=s<u?0:f[a-u],f[a++]=(e+r)%256;break;case 2:for(s=v=0;v<g;s=v+=1)e=t[m++],i=(s-s%u)/u,y=w&&f[(w-1)*g+i*u+s%u],f[a++]=(y+e)%256;break;case 3:for(s=T=0;T<g;s=T+=1)e=t[m++],i=(s-s%u)/u,r=s<u?0:f[a-u],y=w&&f[(w-1)*g+i*u+s%u],f[a++]=(e+Math.floor((r+y)/2))%256;break;case 4:for(s=C=0;C<g;s=C+=1)e=t[m++],i=(s-s%u)/u,r=s<u?0:f[a-u],0===w?y=x=0:(y=f[(w-1)*g+i*u+s%u],x=i&&f[(w-1)*g+(i-1)*u+s%u]),o=r+y-x,h=Math.abs(o-r),p=Math.abs(o-y),d=Math.abs(o-x),l=h<=p&&h<=d?r:p<=d?y:x,f[a++]=(e+l)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}w++}return f},o.prototype.decodePalette=function(){var t,e,a,i,s,r,n,o,h;for(a=this.palette,r=this.transparency.indexed||[],s=new Uint8Array((r.length||0)+a.length),i=0,a.length,t=0,e=n=0,o=a.length;n<o;e=n+=3)s[i++]=a[e],s[i++]=a[e+1],s[i++]=a[e+2],s[i++]=null!=(h=r[t++])?h:255;return s},o.prototype.copyToImageData=function(t,e){var a,i,s,r,n,o,h,c,l,p,d;if(i=this.colors,l=null,a=this.hasAlphaChannel,this.palette.length&&(l=null!=(d=this._decodedPalette)?d:this._decodedPalette=this.decodePalette(),i=4,a=!0),c=(s=t.data||t).length,n=l||e,r=o=0,1===i)for(;r<c;)h=l?4*e[r/4]:o,p=n[h++],s[r++]=p,s[r++]=p,s[r++]=p,s[r++]=a?n[h++]:this.transparency.grayscale&&this.transparency.grayscale===p?0:255,o=h;else for(;r<c;)h=l?4*e[r/4]:o,s[r++]=n[h++],s[r++]=n[h++],s[r++]=n[h++],s[r++]=a?n[h++]:this.transparency.rgb&&this.transparency.rgb[1]===n[h-3]&&this.transparency.rgb[3]===n[h-2]&&this.transparency.rgb[5]===n[h-1]?0:255,o=h},o.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},r=t.document&&t.document.createElement("canvas"),n=r&&r.getContext("2d"),s=function(t){var e;return n.width=t.width,n.height=t.height,n.clearRect(0,0,t.width,t.height),n.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},o.prototype.decodeFrames=function(t){var e,a,i,r,n,o,h,c;if(this.animation){for(c=[],a=n=0,o=(h=this.animation.frames).length;n<o;a=++n)e=h[a],i=t.createImageData(e.width,e.height),r=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(i,r),e.imageData=i,c.push(e.image=s(i));return c}},o.prototype.renderFrame=function(t,s){var r,n,o;return r=(n=this.animation.frames)[s],o=n[s-1],0===s&&t.clearRect(0,0,this.width,this.height),(null!=o?o.disposeOp:void 0)===a?t.clearRect(o.xOffset,o.yOffset,o.width,o.height):(null!=o?o.disposeOp:void 0)===i&&t.putImageData(o.imageData,o.xOffset,o.yOffset),r.blendOp===e&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},o.prototype.animate=function(t){var e,a,i,s,r,n,o=this;return a=0,n=this.animation,s=n.numFrames,i=n.frames,r=n.numPlays,(e=function(){var n,h;if(n=a++%s,h=i[n],o.renderFrame(t,n),s>1&&a/s<r)return o.animation._timeout=setTimeout(e,h.delay)})()},o.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},o.prototype.render=function(t){var e,a;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(a=e.createImageData(this.width,this.height),this.copyToImageData(a,this.decodePixels()),e.putImageData(a,0,0))},o}(self);const x=new Set(["jpg","png","bmp","gif"]);async function b(e,a){if(!m)throw new t("rasterCoded:decode","lerc decoder is not supported on big endian platform");await r();const{offset:i}=a,{width:s,height:o,pixelType:h,statistics:c,depthCount:l,noDataValues:p,bandMasks:d,pixels:u,mask:f,validPixelCount:y}=n(e,{inputOffset:i,returnInterleaved:a.returnInterleaved}),x=new w({width:s,height:o,pixelType:h.toLowerCase(),pixels:u,mask:f,validPixelCount:y,statistics:c.map(({minValue:t,maxValue:e})=>new g(t,e)),bandMasks:d,depthCount:l,noDataValues:p});return c?.length||x.updateStatistics(),x}async function k(e,a){await l();const i=p(e);if(!i)throw new t("rasterCodec:decode","failed to decode the input data.");const{width:s,height:r,pixels:n,pixelType:o}=i,h=new w({width:s,height:r,pixelType:o,pixels:n});return h.updateStatistics(),h}async function v(t,a){const i=await f(t,{...a,noDataValue:a.tiffNoDataValue,matchAllNoData:a.matchAllNoData});e(i);const s=new w({width:i.width,height:i.height,pixels:i.pixels,pixelType:i.pixelType.toLowerCase(),mask:i.mask,bandMasks:i.bandMasks,statistics:null});return s.updateStatistics(),s}async function T(t,e){const a=await u(t,e.customOptions),i=new w({width:a.width,height:a.height,pixels:a.pixels,pixelType:a.pixelType.toLowerCase(),mask:a.mask,statistics:null});return i.updateStatistics(),i}function C(t,e){const a=e.pixelType||"u8",i=w.getPixelArrayConstructor(a),s="u8"===a?t:new i(t.buffer),r=[],n=e.planes||1;if(1===n)r.push(s);else for(let h=0;h<n;h++){const a=(e.width||1)*(e.height||t.length),o=new i(a);for(let t=0;t<a;t++)o[t]=s[t*n+h];r.push(o)}const o=new w({width:e.width||1,height:e.height||t.length,pixels:r,pixelType:a,statistics:null});return o.updateStatistics(),o}function I(t,e){return C(new c(new Uint8Array(t)).getBytes(),e)}function U(t,e){return C(o(t,e.offset,e.eof,!e.isInputBigEndian),e)}function A(t,e,a){const{pixelTypeCtor:i}=M(e.pixelType),s=(0,d.decode)(t,{width:e.width,height:e.height,pixelType:i,format:a}),r=new w({width:e.width,height:e.height,pixels:s.pixels,pixelType:e.pixelType,mask:s.mask,statistics:null});return r.updateStatistics(),r}function D(t,e){const a=s.decode(t,e.applyJpegMask),i=new w({width:a.width,height:a.height,pixels:a.pixels,pixelType:"u8",mask:a.mask,statistics:null});return i.updateStatistics(),i}function P(t,e){const a=new Uint8Array(t),i=new y(a),{width:s,height:r}=e,n=s*r,o=i.decode(),h=new Uint8Array(n);for(let l=0;l<n;l++)h[l]=o[4*l+3];const c=new w({width:s,height:r,pixels:[],pixelType:"u8",mask:h,statistics:[]});for(let l=0;l<3;l++){const t=new Uint8Array(n);for(let e=0;e<n;e++)t[e]=o[4*e+l];c.addData({pixels:t})}return c.updateStatistics(),c}async function S(t,e,a,s){const r={...a,format:e},n=await i(t,r,s),o=new w(n);return o.updateStatistics(),o}function j(e){if(null==e)throw new t("rasterCodec:decode","parameter encodeddata is required.");const a=new Uint8Array(e,0,10);let i="";return 255===a[0]&&216===a[1]?i="jpg":137===a[0]&&80===a[1]&&78===a[2]&&71===a[3]?i="png":67===a[0]&&110===a[1]&&116===a[2]&&90===a[3]&&73===a[4]&&109===a[5]&&97===a[6]&&103===a[7]&&101===a[8]&&32===a[9]?i="lerc":76===a[0]&&101===a[1]&&114===a[2]&&99===a[3]&&50===a[4]&&32===a[5]?i="lerc2":73===a[0]&&73===a[1]&&42===a[2]&&0===a[3]||77===a[0]&&77===a[1]&&0===a[2]&&42===a[3]||73===a[0]&&73===a[1]&&43===a[2]&&0===a[3]||77===a[0]&&77===a[1]&&0===a[2]&&43===a[3]?i="tiff":71===a[0]&&73===a[1]&&70===a[2]?i="gif":66===a[0]&&77===a[1]?i="bmp":81===a[0]&&66===a[1]&&51===a[2]?i="qb3":String.fromCharCode.apply(null,a).toLowerCase().includes("error")&&(i="error"),i}function O(e){let a=null;switch(e){case"lerc":case"lerc2":a=b;break;case"jpg":a=D;break;case"png":a=P;break;case"bsq":case"bip":a=(t,a)=>A(t,a,e);break;case"tiff":a=v;break;case"deflate":a=I;break;case"lzw":a=U;break;case"qb3":a=k;break;case"error":a=()=>{throw new t("rasterCodec:decode","input data contains error")};break;default:a=()=>{throw new t("rasterCodec:decode","unsupported raster format")}}return a}function M(t){let e=null,a=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":a=255,e=Uint8Array;break;case"u16":a=a||65535,e=Uint16Array;break;case"u32":a=a||2**32-1,e=Uint32Array;break;case"s8":a=a||-128,e=Int8Array;break;case"s16":a=a||-32768,e=Int16Array;break;case"s32":a=a||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:a}}function L(t,e=1){if(!t)return;const{pixels:a,width:i,height:s,mask:r}=t;if(!a||0===a.length)return;const n=i-1,o=s-1,h=[];let c=null;const l=w.getPixelArrayConstructor(t.pixelType);if(0===e){for(const t of a){const e=new l(n*o);for(let a=0;a<o;a++){const s=a*i;for(let i=0;i<n;i++)e[a*n+i]=t[s+i]}h.push(e)}if(null!=r){c=new Uint8Array(n*o);for(let t=0;t<o;t++){const e=t*i;for(let a=0;a<n;a++)c[t*n+a]=r[e+a]}}}else{for(const t of a){const e=new l(n*o);for(let a=0;a<o;a++){const s=a*i;for(let r=0;r<n;r++)e[a*n+r]=(t[s+r]+t[s+r+1]+t[s+i+r]+t[s+i+r+1])/4}h.push(e)}if(r){c=new Uint8Array(n*o);for(let t=0;t<o;t++){const e=t*i;for(let a=0;a<n;a++)c[t*n+a]=Math.min.apply(null,[r[e+a],r[e+a+1],r[e+i+a],r[e+i+a+1]])}}}t.width=n,t.height=o,t.mask=c,t.pixels=h}function R(t){let e=j(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function B(e,i={},s){if(null==e)throw new t("rasterCodec:decode","missing encodeddata parameter.");let r=i.format?.toLowerCase();if(!("bsq"!==r&&"bip"!==r||null!=i.width&&null!=i.height))throw new t("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===r&&i.customOptions)return T(e,i);if((!r||"bsq"!==r&&"bip"!==r&&"deflate"!==r&&"lzw"!==r)&&(r=j(e)),"no-canvas"!==i.canvasUsage&&x.has(r))try{return await S(e,r,i,s)}catch(l){if(a(l))throw l;if("canvas-only"===i.canvasUsage)throw new t("rasterCodec:decode",`failed to decode the input data with canvas for format ${r}`)}const n=O(r);let o;i.isPoint&&(null!=(i={...i}).width&&i.width++,null!=i.height&&i.height++);const{offsets:c}=i;if(c&&c.length>1){const t=c.map((t,a)=>n(e.slice(t,c[a+1]),i)),a=await Promise.all(t);o=a[0],o.pixels=a.map(t=>t.pixels[0]);const s=a.map(t=>t.mask);a.some(t=>null!=t)&&(s.forEach((t,e)=>{null==t&&(s[e]=new Uint8Array(o.width*o.height).fill(255))}),o.bandMasks=s,o.mask=w.combineBandMasks(s)),o.updateStatistics()}else o=await n(e,{...i,offset:c?.[0]??i.offset});return"jpg"!==r&&null!=i.noDataValue&&1===o.depthCount&&h(o,i.noDataValue,{customFloatTolerance:i.tolerance}),i.isPoint&&L(o),o}export{B as decode,R as getFormat};
|
|
2
|
+
import t from"../../../core/Error.js";import{assertIsSome as e}from"../../../core/maybe.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{decode as i}from"./ImageCanvasDecoder.js";import s from"./JpgPlus.js";import{load as r,decode as n}from"./Lerc.js";import{decode as o}from"./Lzw.js";import{convertNoDataToMask as h}from"./pixelRangeUtils.js";import{F as c}from"../../../chunks/Zlib.js";import{load as l,decode as p}from"./Qb3.js";import d from"./Raw.js";import{decodeTileOrStrip as u,decode as f}from"./TiffDecoder.js";import{isPlatformLittleEndian as m}from"./utils.js";import w from"../../support/PixelBlock.js";import g from"../../support/SimpleBandStatistics.js";var y=function(t){var e,a,i,s,r,n;function o(t){var e,a,i,s,r,n,o,h,c,l,p,d,u;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},r=null;;){switch(e=this.readUInt32(),h=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join(""),h){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":r&&this.animation.frames.push(r),this.pos+=4,r={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},s=this.readUInt16(),i=this.readUInt16()||100,r.delay=1e3*s/i,r.disposeOp=this.data[this.pos++],r.blendOp=this.data[this.pos++],r.data=[];break;case"IDAT":case"fdAT":for("fdAT"===h&&(this.pos+=4,e-=4),t=(null!=r?r.data:void 0)||this.imgData,p=0;0<=e?p<e:p>e;0<=e?++p:--p)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(c=255-this.transparency.indexed.length)>0)for(d=0;0<=c?d<c:d>c;0<=c?++d:--d)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":n=(l=this.read(e)).indexOf(0),o=String.fromCharCode.apply(String,l.slice(0,n)),this.text[o]=String.fromCharCode.apply(String,l.slice(n+1));break;case"IEND":return r&&this.animation.frames.push(r),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(u=this.colorType)||6===u,a=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*a,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return o.load=function(t,e,a){var i;return"function"==typeof e&&(a=e),(i=new XMLHttpRequest).open("GET",t,!0),i.responseType="arraybuffer",i.onload=function(){var t;return t=new o(new Uint8Array(i.response||i.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof a?a(t):void 0},i.send(null)},a=1,i=2,e=0,o.prototype.read=function(t){var e,a;for(a=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)a.push(this.data[this.pos++]);return a},o.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.decodePixels=function(t){var e,a,i,s,r,n,o,h,l,p,d,u,f,m,w,g,y,x,b,k,v,T,C;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=(t=new c(t)).getBytes(),g=(u=this.pixelBitlength/8)*this.width,f=new Uint8Array(g*this.height),n=t.length,w=0,m=0,a=0;m<n;){switch(t[m++]){case 0:for(s=b=0;b<g;s=b+=1)f[a++]=t[m++];break;case 1:for(s=k=0;k<g;s=k+=1)e=t[m++],r=s<u?0:f[a-u],f[a++]=(e+r)%256;break;case 2:for(s=v=0;v<g;s=v+=1)e=t[m++],i=(s-s%u)/u,y=w&&f[(w-1)*g+i*u+s%u],f[a++]=(y+e)%256;break;case 3:for(s=T=0;T<g;s=T+=1)e=t[m++],i=(s-s%u)/u,r=s<u?0:f[a-u],y=w&&f[(w-1)*g+i*u+s%u],f[a++]=(e+Math.floor((r+y)/2))%256;break;case 4:for(s=C=0;C<g;s=C+=1)e=t[m++],i=(s-s%u)/u,r=s<u?0:f[a-u],0===w?y=x=0:(y=f[(w-1)*g+i*u+s%u],x=i&&f[(w-1)*g+(i-1)*u+s%u]),o=r+y-x,h=Math.abs(o-r),p=Math.abs(o-y),d=Math.abs(o-x),l=h<=p&&h<=d?r:p<=d?y:x,f[a++]=(e+l)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}w++}return f},o.prototype.decodePalette=function(){var t,e,a,i,s,r,n,o,h;for(a=this.palette,r=this.transparency.indexed||[],s=new Uint8Array((r.length||0)+a.length),i=0,a.length,t=0,e=n=0,o=a.length;n<o;e=n+=3)s[i++]=a[e],s[i++]=a[e+1],s[i++]=a[e+2],s[i++]=null!=(h=r[t++])?h:255;return s},o.prototype.copyToImageData=function(t,e){var a,i,s,r,n,o,h,c,l,p,d;if(i=this.colors,l=null,a=this.hasAlphaChannel,this.palette.length&&(l=null!=(d=this._decodedPalette)?d:this._decodedPalette=this.decodePalette(),i=4,a=!0),c=(s=t.data||t).length,n=l||e,r=o=0,1===i)for(;r<c;)h=l?4*e[r/4]:o,p=n[h++],s[r++]=p,s[r++]=p,s[r++]=p,s[r++]=a?n[h++]:this.transparency.grayscale&&this.transparency.grayscale===p?0:255,o=h;else for(;r<c;)h=l?4*e[r/4]:o,s[r++]=n[h++],s[r++]=n[h++],s[r++]=n[h++],s[r++]=a?n[h++]:this.transparency.rgb&&this.transparency.rgb[1]===n[h-3]&&this.transparency.rgb[3]===n[h-2]&&this.transparency.rgb[5]===n[h-1]?0:255,o=h},o.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},r=t.document&&t.document.createElement("canvas"),n=r&&r.getContext("2d"),s=function(t){var e;return n.width=t.width,n.height=t.height,n.clearRect(0,0,t.width,t.height),n.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},o.prototype.decodeFrames=function(t){var e,a,i,r,n,o,h,c;if(this.animation){for(c=[],a=n=0,o=(h=this.animation.frames).length;n<o;a=++n)e=h[a],i=t.createImageData(e.width,e.height),r=this.decodePixels(new Uint8Array(e.data)),this.copyToImageData(i,r),e.imageData=i,c.push(e.image=s(i));return c}},o.prototype.renderFrame=function(t,s){var r,n,o;return r=(n=this.animation.frames)[s],o=n[s-1],0===s&&t.clearRect(0,0,this.width,this.height),(null!=o?o.disposeOp:void 0)===a?t.clearRect(o.xOffset,o.yOffset,o.width,o.height):(null!=o?o.disposeOp:void 0)===i&&t.putImageData(o.imageData,o.xOffset,o.yOffset),r.blendOp===e&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},o.prototype.animate=function(t){var e,a,i,s,r,n,o=this;return a=0,n=this.animation,s=n.numFrames,i=n.frames,r=n.numPlays,(e=function(){var n,h;if(n=a++%s,h=i[n],o.renderFrame(t,n),s>1&&a/s<r)return o.animation._timeout=setTimeout(e,h.delay)})()},o.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},o.prototype.render=function(t){var e,a;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(a=e.createImageData(this.width,this.height),this.copyToImageData(a,this.decodePixels()),e.putImageData(a,0,0))},o}(self);const x=new Set(["jpg","png","bmp","gif"]);async function b(e,a){if(!m)throw new t("rasterCoded:decode","lerc decoder is not supported on big endian platform");await r();const{offset:i}=a,{width:s,height:o,pixelType:h,statistics:c,depthCount:l,noDataValues:p,bandMasks:d,pixels:u,mask:f,validPixelCount:y}=n(e,{inputOffset:i,returnInterleaved:a.returnInterleaved}),x=new w({width:s,height:o,pixelType:h.toLowerCase(),pixels:u,mask:f,validPixelCount:y,statistics:c.map(({minValue:t,maxValue:e})=>new g(t,e)),bandMasks:d,depthCount:l,noDataValues:p});return c?.length||a.skipStatistics||x.updateStatistics(),x}async function k(e,a){await l();const i=p(e);if(!i)throw new t("rasterCodec:decode","failed to decode the input data.");const{width:s,height:r,pixels:n,pixelType:o}=i,h=new w({width:s,height:r,pixelType:o,pixels:n});return a.skipStatistics||h.updateStatistics(),h}async function v(t,a){const i=await f(t,{...a,noDataValue:a.tiffNoDataValue,matchAllNoData:a.matchAllNoData});e(i);const s=new w({width:i.width,height:i.height,pixels:i.pixels,pixelType:i.pixelType.toLowerCase(),mask:i.mask,bandMasks:i.bandMasks,statistics:null});return a.skipStatistics||s.updateStatistics(),s}async function T(t,e){const a=await u(t,e.customOptions),i=new w({width:a.width,height:a.height,pixels:a.pixels,pixelType:a.pixelType.toLowerCase(),mask:a.mask,statistics:null});return e.skipStatistics||i.updateStatistics(),i}function C(t,e){const a=e.pixelType||"u8",i=w.getPixelArrayConstructor(a),s="u8"===a?t:new i(t.buffer),r=[],n=e.planes||1;if(1===n)r.push(s);else for(let h=0;h<n;h++){const a=(e.width||1)*(e.height||t.length),o=new i(a);for(let t=0;t<a;t++)o[t]=s[t*n+h];r.push(o)}const o=new w({width:e.width||1,height:e.height||t.length,pixels:r,pixelType:a,statistics:null});return e.skipStatistics||o.updateStatistics(),o}function I(t,e){return C(new c(new Uint8Array(t)).getBytes(),e)}function U(t,e){return C(o(t,e.offset,e.eof,!e.isInputBigEndian),e)}function A(t,e,a){const{pixelTypeCtor:i}=M(e.pixelType),s=(0,d.decode)(t,{width:e.width,height:e.height,pixelType:i,format:a}),r=new w({width:e.width,height:e.height,pixels:s.pixels,pixelType:e.pixelType,mask:s.mask,statistics:null});return e.skipStatistics||r.updateStatistics(),r}function D(t,e){const a=s.decode(t,e.applyJpegMask),i=new w({width:a.width,height:a.height,pixels:a.pixels,pixelType:"u8",mask:a.mask,statistics:null});return e.skipStatistics||i.updateStatistics(),i}function S(t,e){const a=new Uint8Array(t),i=new y(a),{width:s,height:r}=e,n=s*r,o=i.decode(),h=new Uint8Array(n);for(let l=0;l<n;l++)h[l]=o[4*l+3];const c=new w({width:s,height:r,pixels:[],pixelType:"u8",mask:h,statistics:[]});for(let l=0;l<3;l++){const t=new Uint8Array(n);for(let e=0;e<n;e++)t[e]=o[4*e+l];c.addData({pixels:t})}return e.skipStatistics||c.updateStatistics(),c}async function P(t,e,a,s){const r={...a,format:e},n=await i(t,r,s),o=new w(n);return a.skipStatistics||o.updateStatistics(),o}function j(e){if(null==e)throw new t("rasterCodec:decode","parameter encodeddata is required.");const a=new Uint8Array(e,0,10);let i="";return 255===a[0]&&216===a[1]?i="jpg":137===a[0]&&80===a[1]&&78===a[2]&&71===a[3]?i="png":67===a[0]&&110===a[1]&&116===a[2]&&90===a[3]&&73===a[4]&&109===a[5]&&97===a[6]&&103===a[7]&&101===a[8]&&32===a[9]?i="lerc":76===a[0]&&101===a[1]&&114===a[2]&&99===a[3]&&50===a[4]&&32===a[5]?i="lerc2":73===a[0]&&73===a[1]&&42===a[2]&&0===a[3]||77===a[0]&&77===a[1]&&0===a[2]&&42===a[3]||73===a[0]&&73===a[1]&&43===a[2]&&0===a[3]||77===a[0]&&77===a[1]&&0===a[2]&&43===a[3]?i="tiff":71===a[0]&&73===a[1]&&70===a[2]?i="gif":66===a[0]&&77===a[1]?i="bmp":81===a[0]&&66===a[1]&&51===a[2]?i="qb3":String.fromCharCode.apply(null,a).toLowerCase().includes("error")&&(i="error"),i}function O(e){let a=null;switch(e){case"lerc":case"lerc2":a=b;break;case"jpg":a=D;break;case"png":a=S;break;case"bsq":case"bip":a=(t,a)=>A(t,a,e);break;case"tiff":a=v;break;case"deflate":a=I;break;case"lzw":a=U;break;case"qb3":a=k;break;case"error":a=()=>{throw new t("rasterCodec:decode","input data contains error")};break;default:a=()=>{throw new t("rasterCodec:decode","unsupported raster format")}}return a}function M(t){let e=null,a=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":a=255,e=Uint8Array;break;case"u16":a=a||65535,e=Uint16Array;break;case"u32":a=a||2**32-1,e=Uint32Array;break;case"s8":a=a||-128,e=Int8Array;break;case"s16":a=a||-32768,e=Int16Array;break;case"s32":a=a||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:a}}function L(t,e=1){if(!t)return;const{pixels:a,width:i,height:s,mask:r}=t;if(!a||0===a.length)return;const n=i-1,o=s-1,h=[];let c=null;const l=w.getPixelArrayConstructor(t.pixelType);if(0===e){for(const t of a){const e=new l(n*o);for(let a=0;a<o;a++){const s=a*i;for(let i=0;i<n;i++)e[a*n+i]=t[s+i]}h.push(e)}if(null!=r){c=new Uint8Array(n*o);for(let t=0;t<o;t++){const e=t*i;for(let a=0;a<n;a++)c[t*n+a]=r[e+a]}}}else{for(const t of a){const e=new l(n*o);for(let a=0;a<o;a++){const s=a*i;for(let r=0;r<n;r++)e[a*n+r]=(t[s+r]+t[s+r+1]+t[s+i+r]+t[s+i+r+1])/4}h.push(e)}if(r){c=new Uint8Array(n*o);for(let t=0;t<o;t++){const e=t*i;for(let a=0;a<n;a++)c[t*n+a]=Math.min.apply(null,[r[e+a],r[e+a+1],r[e+i+a],r[e+i+a+1]])}}}t.width=n,t.height=o,t.mask=c,t.pixels=h}function R(t){let e=j(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function B(e,i={},s){if(null==e)throw new t("rasterCodec:decode","missing encodeddata parameter.");let r=i.format?.toLowerCase();if(!("bsq"!==r&&"bip"!==r||null!=i.width&&null!=i.height))throw new t("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===r&&i.customOptions)return T(e,i);if((!r||"bsq"!==r&&"bip"!==r&&"deflate"!==r&&"lzw"!==r)&&(r=j(e)),"no-canvas"!==i.canvasUsage&&x.has(r))try{return await P(e,r,i,s)}catch(l){if(a(l))throw l;if("canvas-only"===i.canvasUsage)throw new t("rasterCodec:decode",`failed to decode the input data with canvas for format ${r}`)}const n=O(r);let o;i.isPoint&&(null!=(i={...i}).width&&i.width++,null!=i.height&&i.height++);const{offsets:c}=i;if(c&&c.length>1){const t=c.map((t,a)=>n(e.slice(t,c[a+1]),i)),a=await Promise.all(t);o=a[0],o.pixels=a.map(t=>t.pixels[0]);const s=a.map(t=>t.mask);a.some(t=>null!=t)&&(s.forEach((t,e)=>{null==t&&(s[e]=new Uint8Array(o.width*o.height).fill(255))}),o.bandMasks=s,o.mask=w.combineBandMasks(s)),o.updateStatistics()}else o=await n(e,{...i,offset:c?.[0]??i.offset});return"jpg"!==r&&null!=i.noDataValue&&1===o.depthCount&&h(o,i.noDataValue,{customFloatTolerance:i.tolerance}),i.isPoint&&L(o),o}export{B as decode,R as getFormat};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{getMetersPerUnitForSR as n}from"../../../core/units.js";import i from"../../../geometry/Extent.js";import{P as o,a as r,g as s,h as a,j as l}from"../../../chunks/pe.js";import c from"../../../geometry/Point.js";import f from"../../../geometry/Polygon.js";import{projectWithoutEngine as u}from"../../../geometry/projectionUtils.js";import x from"../../../geometry/SpatialReference.js";import{getInfo as m}from"../../../geometry/support/spatialReferenceUtils.js";function h(){if(!T)throw new t("rasterprojectionhelper-project","projection operator is not loaded")}const p=(e,t,n,i=0)=>{if(1===n[0])return[0,0];let o=1,r=-1,s=1,a=-1;for(let g=0;g<e.length;g+=2)isNaN(e[g])||(o=o>e[g]?e[g]:o,r=r>e[g]?r:e[g],s=s>e[g+1]?e[g+1]:s,a=a>e[g+1]?a:e[g+1]);const{cols:l,rows:c}=t,f=(r-o)/l/n[0],u=(a-s)/c/n[1],x=2*i;let m=0,h=!1,p=[0,0];for(let g=0;g<l-3;g++){for(let t=0;t<c-3;t++){const n=g*c*2+2*t,i=(e[n]+e[n+4]+e[n+4*c]+e[n+4*c+4])/4,o=(e[n+1]+e[n+5]+e[n+4*c+1]+e[n+4*c+5])/4,r=Math.abs((i-e[n+2*c+2])/f),s=Math.abs((o-e[n+2*c+3])/u);if(r+s>m&&(m=r+s,p=[r,s]),x&&m>x){h=!0;break}}if(h)break}return p},g={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},y=32,d=4,w=d,M=new Map,R=new Map,S=500,P=39.37,b=96;let G,k,E,T=!1;async function N(){return G||(G=Promise.withResolvers(),k=await import("../../../geometry/operators/projectOperator.js"),E=await import("../../../geometry/operators/support/geographicTransformationUtils.js"),k.isLoaded()||await k.load(),E.isLoaded()||await E.load(),T=!0,G.resolve()),G.promise}function v(e,t,n){if(h(),n){const n=k.execute(e,t);return E.getTransformation(t,e.spatialReference,n)}return E.getTransformation(e.spatialReference,t,e)}function j(e,t,n,o){const r=e.spatialReference;if(!r||!t||r.equals(t))return e;h();const s=n.center,a=new i({xmin:s.x-e.x/2,xmax:s.x+e.x/2,ymin:s.y-e.y/2,ymax:s.y+e.y/2,spatialReference:r}),l=k.execute(a,t,{geographicTransformation:o}),c=Z(t);return null==l||null!=c&&l.width>=c?C(e,r,t):{x:l.width,y:l.height}}function C(e,t,i){const o=n(t)/n(i);return{x:e.x*o,y:e.y*o}}function _(e,i,o){const{spatialReference:r}=o;if(!r||!i||r.equals(i))return e;if(r.isGeographic&&i.isGeographic)return C(e,r,i);if(h(),!T)throw new t("raster-projection-helper:project-dataset-resolution","geometry engine is not loaded");let{x:s,y:a}=e;const l=(s+a)/2*n(r);let c=1;l>30&&(c=30/l,s*=c,a*=c);const u=256,x=s*u/2,m=a*u/2,{x:p,y:g}=o.center,y=[];for(let t=0;t<=u;t++)y.push([p-x,g-m+t*a]);for(let t=1;t<=u;t++)y.push([p-x+t*s,g+m]);for(let t=1;t<=u;t++)y.push([p+x,g+m-t*a]);for(let t=1;t<u;t++)y.push([p+x-t*s,g-m]);y.push(y[0]);const d=new f({rings:[y],spatialReference:r}),w=k.execute(d,i);if(!w)return C(e,r,i);const M=w.extent,R=Z(i);if(null==M||null!=R&&M.width>=R)return C(e,r,i);const S=he(w.rings),P=s*a*u*u,b=Math.sqrt(S/P)/c,G={x:M.width/c/u,y:M.height/c/u},E={x:s*b,y:a*b},N=G.x*G.y;return Math.abs(N-E.x*E.y)/N<.1?G:E}function z(e,t){return("number"==typeof e?e:(e.x+e.y)/2)*n(t)*b*P}function L(e,t){const{pixelSize:n,extent:i}=e;return z(_(n,t,i),t)}function W(e,t=.01){return n(e)?t/n(e):0}function I(e,t,n,i=!0){const o=e.spatialReference;if(o.equals(t))return e;h();const r=k.execute(e,t,{geographicTransformation:n});return i&&r?(O([e],[r],o,t),r):r}function O(e,t,n,i){const o=$(n,!0),r=$(i,!0),s=W(n,S),a=W(i,S);if(s&&null!=o&&null!=r)for(let l=0;l<e.length;l++){const n=t[l];if(!n)continue;const{x:i}=e[l],{x:c}=n;c>=r[1]-a&&Math.abs(i-o[0])<s?n.x-=r[1]-r[0]:c<=r[0]+a&&Math.abs(i-o[1])<s&&(n.x+=r[1]-r[0])}}function A(e){const{inSR:t,outSR:n,preferPE:i}=e;if(t.equals(n)){const{points:t}=J(e,null);return t}if(t.isWebMercator&&n.isWGS84||t.isWGS84&&n.isWebMercator)return Y(e);if(i){if(t.isGeographic)return q(e);if(null!=B(t))return q(e)}return F(e)}function F(e){const{points:t}=J(e,null),{inSR:n,outSR:i,datumTransformation:o}=e,r=t.map(e=>new c(e[0],e[1],n)),s=k.executeMany(r,i,{geographicTransformation:o});return o&&O(r,s,n,i),s.map(e=>e?[e.x,e.y]:[NaN,NaN])}function q(e){const{inSR:t,outSR:n,datumTransformation:i}=e,s=B(t),{points:c,mask:f}=J(e,s);if(!t.isGeographic){const e=t.wkid?o.coordsys(t.wkid):o.fromString(t.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,t.wkt2||t.wkt);a.projToGeog(e,c.length,c)}if(null!=i&&i.steps.length){let e;const t=179.9955;if(n.isGeographic&&(e=c.map(([e])=>e>t?1:e<-t?-1:0)),i.steps.forEach(e=>{const t=e.wkid?o.geogtran(e.wkid):o.fromString(r.PE_TYPE_GEOGTRAN,e.wkt);l.geogToGeog(t,c.length,c,null,e.isInverse?r.PE_TRANSFORM_2_TO_1:r.PE_TRANSFORM_1_TO_2)}),e)for(let n=0;n<c.length;n++){const i=e[n],o=c[n][0],r=o>t?1:o<-t?-1:0;i&&r&&i!==r&&(c[n][0]=i>0?o+360:o-360)}}if(!n.isGeographic){const e=B(n,!0),t=null!=e&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90];X(c,t);const i=n.wkid?o.coordsys(n.wkid):o.fromString(n.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,n.wkt2||n.wkt);a.geogToProj(i,c.length,c)}let u=c;if(f&&c.length!==f.length){u=[];for(let e=0,t=0;e<f.length;e++)f[e]?u.push(c[t++]):u.push([NaN,NaN])}return u}function Y(e){const{cols:t,rows:n,xres:i,yres:o,usePixelCenter:r,inSR:s,outSR:a}=e;let{xmin:l,ymax:f}=e;r&&(l+=i/2,f-=o/2);const x=[],m=[],h=Math.max(t,n);for(let g=0;g<h;g++){const e=l+i*Math.min(t,g),r=f-o*Math.min(n,g),h=u(new c({x:e,y:r,spatialReference:s}),s,a);g<=t&&x.push(h.x),g<=n&&m.push(h.y)}const p=[];for(let c=0;c<t;c++)for(let e=0;e<n;e++)p.push([x[c],m[e]]);return p}function B(e,t=!1){let n=e.wkid||e.wkt2||e.wkt;if(!n||e.isGeographic)return null;if(n=String(n),M.has(n)){const e=M.get(n);return t?e?.gcs:e?.pcs}const i=e.wkid?o.coordsys(e.wkid):o.fromString(e.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,e.wkt2||e.wkt),s=U(i,W(e,1e-4)),a=U(i,0,!0);return M.set(n,{pcs:s,gcs:a}),t?a:s}function U(e,t=0,n=!1){const i=s.generate(e),o=n?e.horizonGcsGenerate():e.horizonPcsGenerate();if(!i||!o?.length)return null;let r=!1,a=o.find(e=>1===e.getInclusive()&&1===e.getKind());if(!a){if(a=o.find(e=>1===e.getInclusive()&&0===e.getKind()),!a)return null;r=!0}const l=n?0:(2===i.getNorthPoleLocation()?1:0)|(2===i.getSouthPoleLocation()?2:0),c=i.isPannableRectangle(),f=a.getCoord();if(r)return{isEnvelope:r,isPannable:c,vertices:f,coef:null,bbox:[f[0][0]-t,f[0][1]-t,f[1][0]+t,f[1][1]+t],poleLocation:l};let u=0;const x=[];let[m,h]=f[0],[p,g]=f[0];for(let s=0,y=f.length;s<y;s++){u++,u===y&&(u=0);const[e,t]=f[s],[n,i]=f[u];if(i===t)x.push([e,n,t,i,2]);else{const o=(n-e)/(i-t||1e-4),r=e-o*t;t<i?x.push([o,r,t,i,0]):x.push([o,r,i,t,1])}m=m<e?m:e,h=h<t?h:t,p=p>e?p:e,g=g>t?g:t}return{isEnvelope:!1,isPannable:c,vertices:f,coef:x,bbox:[m,h,p,g],poleLocation:l}}function J(e,t){const n=[],{cols:i,rows:o,xres:r,yres:s,usePixelCenter:a}=e;let{xmin:l,ymax:c}=e;if(a&&(l+=r/2,c-=s/2),null==t){for(let e=0;e<i;e++)for(let t=0;t<o;t++)n.push([l+r*e,c-s*t]);return{points:n}}const f=new Uint8Array(i*o);if(t.isEnvelope){const{isPannable:e,bbox:[a,u,x,m]}=t;for(let t=0,h=0;t<i;t++){const i=l+r*t,p=e||i>=a&&i<=x;for(let e=0;e<o;e++,h++){const t=c-s*e;p&&t>=u&&t<=m&&(n.push([i,t]),f[h]=1)}}return{points:n,mask:f}}const u=t.coef,x=[];for(let m=0;m<o;m++){const e=c-s*m,t=[],n=[];for(let o=0;o<u.length;o++){const[i,r,s,a,l]=u[o];if(e===s&&s===a)t.push(i),t.push(r),n.push(2),n.push(2);else if(e>=s&&e<=a){const o=i*e+r;t.push(o),n.push(l)}}let i=t;if(t.length>2){let e=2===n[0]?0:n[0],o=t[0];i=[];for(let r=1;r<n.length;r++)2===n[r]&&r!==n.length-1||(n[r]!==e&&(i.push(0===e?Math.min(o,t[r-1]):Math.max(o,t[r-1])),e=n[r],o=t[r]),r===n.length-1&&i.push(0===n[r]?Math.min(o,t[r]):Math.max(o,t[r])));i.sort((e,t)=>e-t)}else t[0]>t[1]&&(i=[t[1],t[0]]);x.push(i)}for(let m=0,h=0;m<i;m++){const e=l+r*m;for(let t=0;t<o;t++,h++){const i=c-s*t,o=x[t];if(2===o.length)e>=o[0]&&e<=o[1]&&(n.push([e,i]),f[h]=1);else if(o.length>2){let t=!1;for(let n=0;n<o.length;n+=2)if(e>=o[n]&&e<=o[n+1]){t=!0;break}t&&(n.push([e,i]),f[h]=1)}}}return{points:n,mask:f}}function X(e,t){const[n,i]=t;for(let o=0;o<e.length;o++){const t=e[o][1];(t<n||t>i)&&(e[o]=[NaN,NaN])}}function K(e,t){const n=Z(e[0].spatialReference);if(e.length<2||null==n)return e[0];if(t=t??W(e[0].spatialReference),1===(e=e.filter(e=>e.width>t)).length)return e[0];let{xmin:o,xmax:r,ymin:s,ymax:a}=e[0];for(let i=1;i<e.length;i++){const t=e[i];r=t.xmax+n*i,s=Math.min(s,t.ymin),a=Math.max(a,t.ymax)}return new i({xmin:o,xmax:r,ymin:s,ymax:a,spatialReference:e[0].spatialReference})}function D(t,n,o=null,r=!0){const s=t.spatialReference;if(s.equals(n)||!n)return t;const a=te(t),l=Z(s,!0),c=Z(n);if(0===a||null==l||null==c){const e=V(t,n,o,r);if(e&&null==l&&null!=c&&Math.abs(e.width-c)<W(n)&&k.isLoaded()){const i=B(s);if(null!=i&&0===i.poleLocation&&t.width<(i.bbox[2]-i.bbox[0])/2)return Q(t,n)||e}return e}const f=t.clone().normalize();if(1===f.length&&t.xmax<l&&t.xmax-l/2>W(s)){const{xmin:e,xmax:n}=t;for(let o=0;o<=a;o++){const r=0===o?e:-l/2,c=o===a?n-l*o:l/2;f[o]=new i({xmin:r,xmax:c,ymin:t.ymin,ymax:t.ymax,spatialReference:s})}}const u=f.map(e=>V(e,n,o,r)).filter(e);return 0===u.length?null:K(u)}function H(e,t,n){if("extent"===e.type){const{xmin:t,ymin:n,xmax:i,ymax:o,spatialReference:r}=e;e=new f({rings:[[[t,o],[i,o],[i,n],[t,n],[t,o]]],spatialReference:r})}return e.spatialReference.equals(t)?e:(h(),k.execute(e,t,{geographicTransformation:n}))}function Q(e,t){const n=Z(t);if(null==n)return null;let{xmin:o,ymin:r,xmax:s,ymax:a}=e;const l=e.spatialReference,c=new f({spatialReference:l,rings:[[[o,r],[s,r],[s,a],[o,a],[o,r]]]}),u=k.execute(c,t);if(2!==u.rings.length||!u.rings[0].length||!u.rings[1].length)return null;const{rings:x}=u,m=W(l),h=new i({spatialReference:t});for(let i=0;i<2;i++){o=s=x[i][0][0],r=a=x[i][0][1];for(let e=0;e<x[i].length;e++)o=o>x[i][e][0]?x[i][e][0]:o,s=s<x[i][e][0]?x[i][e][0]:s,r=r>x[i][e][1]?x[i][e][1]:r,a=a<x[i][e][1]?x[i][e][1]:a;if(0===i)h.ymin=r,h.ymax=a,h.xmin=o,h.xmax=s;else if(h.ymin=Math.min(h.ymin,r),h.ymax=Math.max(h.ymax,a),Math.abs(s-n/2)<m)h.xmin=o,h.xmax=h.xmax+n;else{if(!(Math.abs(o+n/2)<m))return null;h.xmax=s+n}}return h}function V(e,t,n,i=!0,o=!0){const r=e.spatialReference;if(r.equals(t)||!t)return e;h();const s=k.execute(e,t,{geographicTransformation:n});if(o&&t.isWebMercator&&s&&(s.ymax=Math.min(20037508.342787,s.ymax),s.ymin=Math.max(-20037508.342787,s.ymin),s.ymin>=s.ymax))return null;if(!i||!s)return s;const a=$(r,!0),l=$(t,!0);if(null==a||null==l)return s;const f=W(r,.001),u=W(r,S),x=W(t,.001);if(Math.abs(s.xmin-l[0])<x&&Math.abs(s.xmax-l[1])<x){const i=Math.abs(e.xmin-a[0]),o=Math.abs(a[1]-e.xmax);if(i<f&&o>u){s.xmin=l[0];const i=[];i.push(new c(e.xmax,e.ymin,r)),i.push(new c(e.xmax,(e.ymin+e.ymax)/2,r)),i.push(new c(e.xmax,e.ymax,r));const o=i.map(e=>I(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmax=Math.max.apply(null,o)}if(o<f&&i>u){s.xmax=l[1];const i=[];i.push(new c(e.xmin,e.ymin,r)),i.push(new c(e.xmin,(e.ymin+e.ymax)/2,r)),i.push(new c(e.xmin,e.ymax,r));const o=i.map(e=>I(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmin=Math.min.apply(null,o)}}else{const e=W(t,.001);Math.abs(s.xmin-l[0])<e&&(s.xmin=l[0]),Math.abs(s.xmax-l[1])<e&&(s.xmax=l[1])}return s}function Z(e,t=!1){if(!e)return null;const n=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*n:e.wkid&&e.isGeographic?360:2*g[e.wkid]||null}function $(e,t=!1){if(e.isGeographic)return[-180,180];const n=Z(e,t);return n?[-n/2,n/2]:null}function ee(e,t,n,i){let o=(e-t)/n;return o-Math.floor(o)!==0?o=Math.floor(o):i&&(o-=1),o}function te(e,t=!1){const n=Z(e.spatialReference);if(null==n)return 0;const i=t?0:-(n/2),o=W(e.spatialReference),r=!t&&Math.abs(e.xmax-n/2)<o?n/2:e.xmax,s=!t&&Math.abs(e.xmin+n/2)<o?-n/2:e.xmin;return ee(r,i,n,!0)-ee(s,i,n,!1)}function ne(e){const t=e.storageInfo.origin.x,n=Z(e.spatialReference,!0);if(null==n)return{originX:t,halfWorldWidth:null,pyramidsInfo:null};const i=n/2,{nativePixelSize:o,storageInfo:r,extent:s}=e,{maximumPyramidLevel:a,blockWidth:l,pyramidScalingFactor:c}=r;let f=o.x;const u=[],x=null!=e.transform&&"gcs-shift"===e.transform.type,m=t+(x?0:i),h=x?n-t:i-t;for(let p=0;p<=a;p++){const e=(s.xmax-t)/f/l,n=e-Math.floor(e)===0?e:Math.ceil(e),i=h/f/l,o=i-Math.floor(i)===0?i:Math.ceil(i),r=Math.floor(m/f/l),a=Math.round(m/f)%l,x=(l-Math.round(h/f)%l)%l;u.push({resolutionX:f,blockWidth:l,datasetColumnCount:n,worldColumnCountFromOrigin:o,leftMargin:a,rightPadding:x,originColumnOffset:r}),f*=c}return{originX:t,halfWorldWidth:i,pyramidsInfo:u,hasGCSSShiftTransform:x}}function ie(e){if(!e||e.isGeographic)return e;const t=String(e.wkid||e.wkt2||e.wkt);let n;if(R.has(t))n=R.get(t);else{n=(e.wkid?o.coordsys(e.wkid):o.fromString(r.PE_TYPE_PROJCS,e.wkt2||e.wkt)).getGeogcs().getCode(),R.set(t,n)}return new x({wkid:n})}function oe(e){const t=e.isAdaptive&&null==e.spacing;let n=e.spacing||[y,y],i=re(e),o={cols:i.size[0]+1,rows:i.size[1]+1};const r=i.outofBoundPointCount>0&&i.outofBoundPointCount<i.offsets.length/2;let s=i.outofBoundPointCount===i.offsets.length/2||t&&r?[0,0]:p(i.offsets,o,n,w);const a=(s[0]+s[1])/2,l=e.projectedExtent.spatialReference,c=e.srcBufferExtent.spatialReference;if(t&&(r||a>w)&&(l.isGeographic||B(l),n=[d,d],i=re({...e,spacing:n}),o={cols:i.size[0]+1,rows:i.size[1]+1},s=p(i.offsets,o,n,w)),i.error=s,n[0]>1&&(i.coefficients=se(i.offsets,o,r)),e.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)i.gcsGrid={offsets:i.offsets,coefficients:i.coefficients,spacing:n};else{const t=B(l);if(null!=t&&!t.isEnvelope){const t=ie(l),s=D(e.projectedExtent,t),{offsets:a}=re({...e,srcBufferExtent:s,spacing:n}),c=se(a,o,r);i.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return i}function re(e){const{projectedExtent:t,srcBufferExtent:n,pixelSize:i,datumTransformation:o,rasterTransform:r}=e,s=t.spatialReference,a=n.spatialReference;h();const{xmin:l,ymin:f,xmax:u,ymax:x}=t,m=Z(a),p=null!=m&&(e.hasWrapAround||"gcs-shift"===r?.type),g=e.spacing||[y,y],w=g[0]*i.x,M=g[1]*i.y,R=1===g[0],P=Math.ceil((u-l)/w-.1/g[0])+(R?0:1),b=Math.ceil((x-f)/M-.1/g[1])+(R?0:1),G=A({cols:P,rows:b,xmin:l,ymax:x,xres:w,yres:M,inSR:s,outSR:a,datumTransformation:o,preferPE:g[0]<=d,usePixelCenter:R}),k=[];let E,T=0;const N=R?-1:NaN,{xmin:v,xmax:j,ymax:C,width:_,height:z}=n,L=W(a,S),I=null!=m&&v>0&&j>m/2,O=B(s),F=null!=O&&O.poleLocation>0;for(let h=0;h<P;h++){const e=[];for(let t=0;t<b;t++){let n=G[h*b+t];if(p&&n[0]>j&&n[0]>m/2-L?n[0]-=m:p&&0===h&&n[0]<0&&I&&!r&&(n[0]+=m),!n||isNaN(n[0])||isNaN(n[1]))k.push(N),k.push(N),e.push(null),T++;else{if(r){const e=r.inverseTransform(new c({x:n[0],y:n[1],spatialReference:a}));n=[e.x,e.y]}e.push(n),h>0&&p&&E[t]&&n[0]<E[t][0]&&(n[0]+=m,F&&n[0]>j&&n[0]>m&&(n[0]-=m)),k.push((n[0]-v)/_),k.push((C-n[1])/z)}}E=e}return{offsets:k,error:null,coefficients:null,outofBoundPointCount:T,spacing:g,size:R?[P,b]:[P-1,b-1]}}function se(e,t,n){const{cols:i,rows:o}=t,r=new Float32Array((i-1)*(o-1)*2*6),s=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let l=0;l<i-1;l++){for(let t=0;t<o-1;t++){let n=l*o*2+2*t;const c=e[n],f=e[n+1],u=e[n+2],x=e[n+3];n+=2*o;const m=e[n],h=e[n+1],p=e[n+2],g=e[n+3];let y=0,d=12*(t*(i-1)+l);for(let e=0;e<3;e++)r[d++]=s[y++]*c+s[y++]*u+s[y++]*p;y=0;for(let e=0;e<3;e++)r[d++]=s[y++]*f+s[y++]*x+s[y++]*g;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*c+a[y++]*m+a[y++]*p;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*f+a[y++]*h+a[y++]*g}if(n)for(let e=0;e<r.length;e++)isNaN(r[e])&&(r[e]=-1)}return r}function ae(e,t){const n=e.clone().normalize();return 1===n.length?n[0]:K(n,t)}function le(e){const{spatialReference:t}=e,n=m(t);if(!n)return e;const[o,r]=n.valid,s=r-o;let a=0;if(e.xmin<o){const t=o-e.xmin;a=Math.ceil(t/s)}else if(e.xmin>r){const t=e.xmin-r;a=-Math.ceil(t/s)}return new i({spatialReference:e.spatialReference,xmin:e.xmin+a*s,ymin:e.ymin,xmax:e.xmax+a*s,ymax:e.ymax})}function ce(e,t,i){const{storageInfo:o,pixelSize:r}=t;let s=0,a=!1;const{pyramidResolutions:l}=o,f="mixed"===o.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,o.tileInfo.dpi/96)):1,u=(e.x+e.y)/2/f;if(null!=l&&l.length){const e=l[l.length-1],o=(e.x+e.y)/2,f=(r.x+r.y)/2;if(u<=f)s=0;else if(u>=o)s=l.length,a=u/o>8;else{let e,t=f;for(let n=1;n<=l.length;n++){if(e=(l[n-1].x+l[n-1].y)/2,u<=e){u===e?s=n:"down"===i?(s=n-1,a=u/t>8):s="up"===i||u-t>e-u||u/t>2?n:n-1;break}t=e}}const x=0===s?r:l[s-1];if(a){Math.min(x.x,x.y)*n(t.spatialReference)>19567&&(a=!1)}return{pyramidLevel:s,pyramidResolution:new c({x:x.x,y:x.y,spatialReference:t.spatialReference}),excessiveReading:a}}const x=Math.log(e.x/r.x)/Math.LN2,m=Math.log(e.y/r.y)/Math.LN2,h=t.storageInfo.maximumPyramidLevel||0;s="down"===i?Math.floor(Math.min(x,m)):"up"===i?Math.ceil(Math.max(x,m)):Math.round((x+m)/2),s<0?s=0:s>h&&(a=s>h+3,s=h);const p=2**s;return{pyramidLevel:s,pyramidResolution:new c({x:p*t.nativePixelSize.x,y:p*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}function fe(e,t,n=!1){const{pixelSize:i,extent:o}=e,r=v(o,t,!1),s=D(ae(o,(i.x+i.y)/16),t,r);return!s||n||0===te(s)?s:V(o,t,r)}function ue(e,t,n){const i=n?.tileSize??512,o=n?.alignGlobalDatasetWithAGOL??!0,r=!!n?.limitToSrcResolution,{extent:s,pixelSize:a}=e,l=_(a,t,s);if(null==l)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const c=(l.x+l.y)/2,f=z(c,t),u=256/i,x=t.isGeographic?295828763.7958547*u:591657527.591555*u,m=(t.isGeographic?.703125:156543.03392800014)*u;let h="vector-magdir"===e.dataType||"vector-uv"===e.dataType;const p=fe(e,t,!0),g=Math.min(Math.ceil(Math.log(Math.min(e.width,e.height)/32)/Math.LN2),Math.ceil(Math.log(x/2/f)/Math.LN2));if(!h&&p&&o&&(t.isGeographic||t.isWebMercator)){const n=Z(t);if(h=te(p)>0||null!=n&&p.width>n/4,!h&&null!=n){let t=-1;if(g<3)t=2**g*c*i;else if(e.storageInfo){const{maximumPyramidLevel:n=0,pyramidScalingFactor:o=2}=e.storageInfo;t=o**n*c*i}const o=Math.ceil(n/t);h=1===o||2===o&&n/2-p.xmax<t}}let y,d=f;const w=1.001,M=Math.min(2,Math.max(1.414,e.storageInfo?.pyramidScalingFactor||2));if(h){d=x;const n=xe(e,t);y={x:n.x*m,y:n.y*m}}else{y={x:a.x,y:a.y};let e=0;for(;d<x*(w/2)&&e<g;)e++,d*=M,y.x*=M,y.y*=M;Math.max(d,x)/Math.min(d,x)<=w&&(d=x)}const R=[d],S=[{x:y.x,y:y.y}],P=70.5310735,b=Math.min(P,f)/w;for(;d>=b;)d/=M,y.x/=M,y.y/=M,R.push(d),S.push({x:y.x,y:y.y});if(r){const e=.001*a.x;let t=S.findIndex(t=>t.x>=a.x-e&&t.x<=a.x+e);t>-1?(S.length=t+1,R.length=t+1):(t=S.findIndex(t=>t.x<=a.x+e),t>0&&(S.length=t,R.length=t))}return{projectedPixelSize:l,scales:R,srcResolutions:S,isCustomTilingScheme:!h}}function xe(e,t){if(t.isWGS84||t.isWebMercator){const n=t.isGeographic?1341104507446289e-21:.29858214164761665,i=t.isGeographic?4326:3857,o=fe(e,new x({wkid:i}),!0),r=_({x:n,y:n},e.spatialReference,o);return{x:r.x/n,y:r.y/n}}const n=_(e.pixelSize,t,e.extent),i=(n.x+n.y)/2;return{x:e.pixelSize.x/i,y:e.pixelSize.y/i}}function me(e,t){const{spatialReference:n,lods:i}=t,{x:o,y:r}=xe(e,n);return i.map(({resolution:e})=>({x:e*o,y:e*r}))}function he(e){let t=0;for(const n of e){const e=n.length;let i=n[0][0]*(n[1][1]-n[e-2][1]);for(let t=1;t<e-1;t++)i+=n[t][0]*(n[t+1][1]-n[t-1][1]);t+=i/2}return Math.abs(t)}export{ue as computeProjectedScales,xe as computeSrcResolutionRatio,me as computeSrcResolutions,y as defaultGridSpacing,w as defaultProjectionToleranceInPixels,v as getDefaultDatumTransformationForDataset,A as getProjectedGridPoints,oe as getProjectionOffsetGrid,ne as getRasterDatasetAlignmentInfo,L as getSourceScale,Z as getWorldWidth,te as getWorldWrapCount,N as load,d as minimumGridSpacing,fe as projectDatasetExtent,_ as projectDatasetResolution,D as projectExtent,I as projectPoint,H as projectPolygon,j as projectResolution,le as shiftExtent,ae as snapExtent,ce as snapPyramid};
|
|
2
|
+
import{isSome as e}from"../../../core/arrayUtils.js";import t from"../../../core/Error.js";import{getMetersPerUnitForSR as n}from"../../../core/units.js";import i from"../../../geometry/Extent.js";import{c as o,a as r,n as s,P as a,e as l}from"../../../chunks/pe.js";import c from"../../../geometry/Point.js";import f from"../../../geometry/Polygon.js";import{projectWithoutEngine as u}from"../../../geometry/projectionUtils.js";import x from"../../../geometry/SpatialReference.js";import{getInfo as m}from"../../../geometry/support/spatialReferenceUtils.js";function h(){if(!T)throw new t("rasterprojectionhelper-project","projection operator is not loaded")}const p=(e,t,n,i=0)=>{if(1===n[0])return[0,0];let o=1,r=-1,s=1,a=-1;for(let g=0;g<e.length;g+=2)isNaN(e[g])||(o=o>e[g]?e[g]:o,r=r>e[g]?r:e[g],s=s>e[g+1]?e[g+1]:s,a=a>e[g+1]?a:e[g+1]);const{cols:l,rows:c}=t,f=(r-o)/l/n[0],u=(a-s)/c/n[1],x=2*i;let m=0,h=!1,p=[0,0];for(let g=0;g<l-3;g++){for(let t=0;t<c-3;t++){const n=g*c*2+2*t,i=(e[n]+e[n+4]+e[n+4*c]+e[n+4*c+4])/4,o=(e[n+1]+e[n+5]+e[n+4*c+1]+e[n+4*c+5])/4,r=Math.abs((i-e[n+2*c+2])/f),s=Math.abs((o-e[n+2*c+3])/u);if(r+s>m&&(m=r+s,p=[r,s]),x&&m>x){h=!0;break}}if(h)break}return p},g={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},y=32,d=4,w=d,M=new Map,R=new Map,S=500,P=39.37,b=96;let G,k,E,T=!1;async function N(){return G||(G=Promise.withResolvers(),k=await import("../../../geometry/operators/projectOperator.js"),E=await import("../../../geometry/operators/support/geographicTransformationUtils.js"),k.isLoaded()||await k.load(),E.isLoaded()||await E.load(),T=!0,G.resolve()),G.promise}function v(e,t,n){if(h(),n){const n=k.execute(e,t);return E.getTransformation(t,e.spatialReference,n)}return E.getTransformation(e.spatialReference,t,e)}function j(e,t,n,o){const r=e.spatialReference;if(!r||!t||r.equals(t))return e;h();const s=n.center,a=new i({xmin:s.x-e.x/2,xmax:s.x+e.x/2,ymin:s.y-e.y/2,ymax:s.y+e.y/2,spatialReference:r}),l=k.execute(a,t,{geographicTransformation:o}),c=Z(t);return null==l||null!=c&&l.width>=c?C(e,r,t):{x:l.width,y:l.height}}function C(e,t,i){const o=n(t)/n(i);return{x:e.x*o,y:e.y*o}}function _(e,i,o){const{spatialReference:r}=o;if(!r||!i||r.equals(i))return e;if(r.isGeographic&&i.isGeographic)return C(e,r,i);if(h(),!T)throw new t("raster-projection-helper:project-dataset-resolution","geometry engine is not loaded");let{x:s,y:a}=e;const l=(s+a)/2*n(r);let c=1;l>30&&(c=30/l,s*=c,a*=c);const u=256,x=s*u/2,m=a*u/2,{x:p,y:g}=o.center,y=[];for(let t=0;t<=u;t++)y.push([p-x,g-m+t*a]);for(let t=1;t<=u;t++)y.push([p-x+t*s,g+m]);for(let t=1;t<=u;t++)y.push([p+x,g+m-t*a]);for(let t=1;t<u;t++)y.push([p+x-t*s,g-m]);y.push(y[0]);const d=new f({rings:[y],spatialReference:r}),w=k.execute(d,i);if(!w)return C(e,r,i);const M=w.extent,R=Z(i);if(null==M||null!=R&&M.width>=R)return C(e,r,i);const S=he(w.rings),P=s*a*u*u,b=Math.sqrt(S/P)/c,G={x:M.width/c/u,y:M.height/c/u},E={x:s*b,y:a*b},N=G.x*G.y;return Math.abs(N-E.x*E.y)/N<.1?G:E}function z(e,t){return("number"==typeof e?e:(e.x+e.y)/2)*n(t)*b*P}function L(e,t){const{pixelSize:n,extent:i}=e;return z(_(n,t,i),t)}function W(e,t=.01){return n(e)?t/n(e):0}function I(e,t,n,i=!0){const o=e.spatialReference;if(o.equals(t))return e;h();const r=k.execute(e,t,{geographicTransformation:n});return i&&r?(O([e],[r],o,t),r):r}function O(e,t,n,i){const o=$(n,!0),r=$(i,!0),s=W(n,S),a=W(i,S);if(s&&null!=o&&null!=r)for(let l=0;l<e.length;l++){const n=t[l];if(!n)continue;const{x:i}=e[l],{x:c}=n;c>=r[1]-a&&Math.abs(i-o[0])<s?n.x-=r[1]-r[0]:c<=r[0]+a&&Math.abs(i-o[1])<s&&(n.x+=r[1]-r[0])}}function A(e){const{inSR:t,outSR:n,preferPE:i}=e;if(t.equals(n)){const{points:t}=J(e,null);return t}if(t.isWebMercator&&n.isWGS84||t.isWGS84&&n.isWebMercator)return Y(e);if(i){if(t.isGeographic)return q(e);if(null!=B(t))return q(e)}return F(e)}function F(e){const{points:t}=J(e,null),{inSR:n,outSR:i,datumTransformation:o}=e,r=t.map(e=>new c(e[0],e[1],n)),s=k.executeMany(r,i,{geographicTransformation:o});return o&&O(r,s,n,i),s.map(e=>e?[e.x,e.y]:[NaN,NaN])}function q(e){const{inSR:t,outSR:n,datumTransformation:i}=e,s=B(t),{points:c,mask:f}=J(e,s);if(!t.isGeographic){const e=t.wkid?o.coordsys(t.wkid):o.fromString(t.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,t.wkt2||t.wkt);a.projToGeog(e,c.length,c)}if(null!=i&&i.steps.length){let e;const t=179.9955;if(n.isGeographic&&(e=c.map(([e])=>e>t?1:e<-t?-1:0)),i.steps.forEach(e=>{const t=e.wkid?o.geogtran(e.wkid):o.fromString(r.PE_TYPE_GEOGTRAN,e.wkt);l.geogToGeog(t,c.length,c,null,e.isInverse?r.PE_TRANSFORM_2_TO_1:r.PE_TRANSFORM_1_TO_2)}),e)for(let n=0;n<c.length;n++){const i=e[n],o=c[n][0],r=o>t?1:o<-t?-1:0;i&&r&&i!==r&&(c[n][0]=i>0?o+360:o-360)}}if(!n.isGeographic){const e=B(n,!0),t=null!=e&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90];X(c,t);const i=n.wkid?o.coordsys(n.wkid):o.fromString(n.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,n.wkt2||n.wkt);a.geogToProj(i,c.length,c)}let u=c;if(f&&c.length!==f.length){u=[];for(let e=0,t=0;e<f.length;e++)f[e]?u.push(c[t++]):u.push([NaN,NaN])}return u}function Y(e){const{cols:t,rows:n,xres:i,yres:o,usePixelCenter:r,inSR:s,outSR:a}=e;let{xmin:l,ymax:f}=e;r&&(l+=i/2,f-=o/2);const x=[],m=[],h=Math.max(t,n);for(let g=0;g<h;g++){const e=l+i*Math.min(t,g),r=f-o*Math.min(n,g),h=u(new c({x:e,y:r,spatialReference:s}),s,a);g<=t&&x.push(h.x),g<=n&&m.push(h.y)}const p=[];for(let c=0;c<t;c++)for(let e=0;e<n;e++)p.push([x[c],m[e]]);return p}function B(e,t=!1){let n=e.wkid||e.wkt2||e.wkt;if(!n||e.isGeographic)return null;if(n=String(n),M.has(n)){const e=M.get(n);return t?e?.gcs:e?.pcs}const i=e.wkid?o.coordsys(e.wkid):o.fromString(e.isGeographic?r.PE_TYPE_GEOGCS:r.PE_TYPE_PROJCS,e.wkt2||e.wkt),s=U(i,W(e,1e-4)),a=U(i,0,!0);return M.set(n,{pcs:s,gcs:a}),t?a:s}function U(e,t=0,n=!1){const i=s.generate(e),o=n?e.horizonGcsGenerate():e.horizonPcsGenerate();if(!i||!o?.length)return null;let r=!1,a=o.find(e=>1===e.getInclusive()&&1===e.getKind());if(!a){if(a=o.find(e=>1===e.getInclusive()&&0===e.getKind()),!a)return null;r=!0}const l=n?0:(2===i.getNorthPoleLocation()?1:0)|(2===i.getSouthPoleLocation()?2:0),c=i.isPannableRectangle(),f=a.getCoord();if(r)return{isEnvelope:r,isPannable:c,vertices:f,coef:null,bbox:[f[0][0]-t,f[0][1]-t,f[1][0]+t,f[1][1]+t],poleLocation:l};let u=0;const x=[];let[m,h]=f[0],[p,g]=f[0];for(let s=0,y=f.length;s<y;s++){u++,u===y&&(u=0);const[e,t]=f[s],[n,i]=f[u];if(i===t)x.push([e,n,t,i,2]);else{const o=(n-e)/(i-t||1e-4),r=e-o*t;t<i?x.push([o,r,t,i,0]):x.push([o,r,i,t,1])}m=m<e?m:e,h=h<t?h:t,p=p>e?p:e,g=g>t?g:t}return{isEnvelope:!1,isPannable:c,vertices:f,coef:x,bbox:[m,h,p,g],poleLocation:l}}function J(e,t){const n=[],{cols:i,rows:o,xres:r,yres:s,usePixelCenter:a}=e;let{xmin:l,ymax:c}=e;if(a&&(l+=r/2,c-=s/2),null==t){for(let e=0;e<i;e++)for(let t=0;t<o;t++)n.push([l+r*e,c-s*t]);return{points:n}}const f=new Uint8Array(i*o);if(t.isEnvelope){const{isPannable:e,bbox:[a,u,x,m]}=t;for(let t=0,h=0;t<i;t++){const i=l+r*t,p=e||i>=a&&i<=x;for(let e=0;e<o;e++,h++){const t=c-s*e;p&&t>=u&&t<=m&&(n.push([i,t]),f[h]=1)}}return{points:n,mask:f}}const u=t.coef,x=[];for(let m=0;m<o;m++){const e=c-s*m,t=[],n=[];for(let o=0;o<u.length;o++){const[i,r,s,a,l]=u[o];if(e===s&&s===a)t.push(i),t.push(r),n.push(2),n.push(2);else if(e>=s&&e<=a){const o=i*e+r;t.push(o),n.push(l)}}let i=t;if(t.length>2){let e=2===n[0]?0:n[0],o=t[0];i=[];for(let r=1;r<n.length;r++)2===n[r]&&r!==n.length-1||(n[r]!==e&&(i.push(0===e?Math.min(o,t[r-1]):Math.max(o,t[r-1])),e=n[r],o=t[r]),r===n.length-1&&i.push(0===n[r]?Math.min(o,t[r]):Math.max(o,t[r])));i.sort((e,t)=>e-t)}else t[0]>t[1]&&(i=[t[1],t[0]]);x.push(i)}for(let m=0,h=0;m<i;m++){const e=l+r*m;for(let t=0;t<o;t++,h++){const i=c-s*t,o=x[t];if(2===o.length)e>=o[0]&&e<=o[1]&&(n.push([e,i]),f[h]=1);else if(o.length>2){let t=!1;for(let n=0;n<o.length;n+=2)if(e>=o[n]&&e<=o[n+1]){t=!0;break}t&&(n.push([e,i]),f[h]=1)}}}return{points:n,mask:f}}function X(e,t){const[n,i]=t;for(let o=0;o<e.length;o++){const t=e[o][1];(t<n||t>i)&&(e[o]=[NaN,NaN])}}function K(e,t){const n=Z(e[0].spatialReference);if(e.length<2||null==n)return e[0];if(t=t??W(e[0].spatialReference),1===(e=e.filter(e=>e.width>t)).length)return e[0];let{xmin:o,xmax:r,ymin:s,ymax:a}=e[0];for(let i=1;i<e.length;i++){const t=e[i];r=t.xmax+n*i,s=Math.min(s,t.ymin),a=Math.max(a,t.ymax)}return new i({xmin:o,xmax:r,ymin:s,ymax:a,spatialReference:e[0].spatialReference})}function D(t,n,o=null,r=!0){const s=t.spatialReference;if(s.equals(n)||!n)return t;const a=te(t),l=Z(s,!0),c=Z(n);if(0===a||null==l||null==c){const e=V(t,n,o,r);if(e&&null==l&&null!=c&&Math.abs(e.width-c)<W(n)&&k.isLoaded()){const i=B(s);if(null!=i&&0===i.poleLocation&&t.width<(i.bbox[2]-i.bbox[0])/2)return Q(t,n)||e}return e}const f=t.clone().normalize();if(1===f.length&&t.xmax<l&&t.xmax-l/2>W(s)){const{xmin:e,xmax:n}=t;for(let o=0;o<=a;o++){const r=0===o?e:-l/2,c=o===a?n-l*o:l/2;f[o]=new i({xmin:r,xmax:c,ymin:t.ymin,ymax:t.ymax,spatialReference:s})}}const u=f.map(e=>V(e,n,o,r)).filter(e);return 0===u.length?null:K(u)}function H(e,t,n){if("extent"===e.type){const{xmin:t,ymin:n,xmax:i,ymax:o,spatialReference:r}=e;e=new f({rings:[[[t,o],[i,o],[i,n],[t,n],[t,o]]],spatialReference:r})}return e.spatialReference.equals(t)?e:(h(),k.execute(e,t,{geographicTransformation:n}))}function Q(e,t){const n=Z(t);if(null==n)return null;let{xmin:o,ymin:r,xmax:s,ymax:a}=e;const l=e.spatialReference,c=new f({spatialReference:l,rings:[[[o,r],[s,r],[s,a],[o,a],[o,r]]]}),u=k.execute(c,t);if(2!==u.rings.length||!u.rings[0].length||!u.rings[1].length)return null;const{rings:x}=u,m=W(l),h=new i({spatialReference:t});for(let i=0;i<2;i++){o=s=x[i][0][0],r=a=x[i][0][1];for(let e=0;e<x[i].length;e++)o=o>x[i][e][0]?x[i][e][0]:o,s=s<x[i][e][0]?x[i][e][0]:s,r=r>x[i][e][1]?x[i][e][1]:r,a=a<x[i][e][1]?x[i][e][1]:a;if(0===i)h.ymin=r,h.ymax=a,h.xmin=o,h.xmax=s;else if(h.ymin=Math.min(h.ymin,r),h.ymax=Math.max(h.ymax,a),Math.abs(s-n/2)<m)h.xmin=o,h.xmax=h.xmax+n;else{if(!(Math.abs(o+n/2)<m))return null;h.xmax=s+n}}return h}function V(e,t,n,i=!0,o=!0){const r=e.spatialReference;if(r.equals(t)||!t)return e;h();const s=k.execute(e,t,{geographicTransformation:n});if(o&&t.isWebMercator&&s&&(s.ymax=Math.min(20037508.342787,s.ymax),s.ymin=Math.max(-20037508.342787,s.ymin),s.ymin>=s.ymax))return null;if(!i||!s)return s;const a=$(r,!0),l=$(t,!0);if(null==a||null==l)return s;const f=W(r,.001),u=W(r,S),x=W(t,.001);if(Math.abs(s.xmin-l[0])<x&&Math.abs(s.xmax-l[1])<x){const i=Math.abs(e.xmin-a[0]),o=Math.abs(a[1]-e.xmax);if(i<f&&o>u){s.xmin=l[0];const i=[];i.push(new c(e.xmax,e.ymin,r)),i.push(new c(e.xmax,(e.ymin+e.ymax)/2,r)),i.push(new c(e.xmax,e.ymax,r));const o=i.map(e=>I(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmax=Math.max.apply(null,o)}if(o<f&&i>u){s.xmax=l[1];const i=[];i.push(new c(e.xmin,e.ymin,r)),i.push(new c(e.xmin,(e.ymin+e.ymax)/2,r)),i.push(new c(e.xmin,e.ymax,r));const o=i.map(e=>I(e,t,n)).filter(e=>!isNaN(e?.x)).map(e=>e.x);s.xmin=Math.min.apply(null,o)}}else{const e=W(t,.001);Math.abs(s.xmin-l[0])<e&&(s.xmin=l[0]),Math.abs(s.xmax-l[1])<e&&(s.xmax=l[1])}return s}function Z(e,t=!1){if(!e)return null;const n=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*n:e.wkid&&e.isGeographic?360:2*g[e.wkid]||null}function $(e,t=!1){if(e.isGeographic)return[-180,180];const n=Z(e,t);return n?[-n/2,n/2]:null}function ee(e,t,n,i){let o=(e-t)/n;return o-Math.floor(o)!==0?o=Math.floor(o):i&&(o-=1),o}function te(e,t=!1){const n=Z(e.spatialReference);if(null==n)return 0;const i=t?0:-(n/2),o=W(e.spatialReference),r=!t&&Math.abs(e.xmax-n/2)<o?n/2:e.xmax,s=!t&&Math.abs(e.xmin+n/2)<o?-n/2:e.xmin;return ee(r,i,n,!0)-ee(s,i,n,!1)}function ne(e){const t=e.storageInfo.origin.x,n=Z(e.spatialReference,!0);if(null==n)return{originX:t,halfWorldWidth:null,pyramidsInfo:null};const i=n/2,{nativePixelSize:o,storageInfo:r,extent:s}=e,{maximumPyramidLevel:a,blockWidth:l,pyramidScalingFactor:c}=r;let f=o.x;const u=[],x=null!=e.transform&&"gcs-shift"===e.transform.type,m=t+(x?0:i),h=x?n-t:i-t;for(let p=0;p<=a;p++){const e=(s.xmax-t)/f/l,n=e-Math.floor(e)===0?e:Math.ceil(e),i=h/f/l,o=i-Math.floor(i)===0?i:Math.ceil(i),r=Math.floor(m/f/l),a=Math.round(m/f)%l,x=(l-Math.round(h/f)%l)%l;u.push({resolutionX:f,blockWidth:l,datasetColumnCount:n,worldColumnCountFromOrigin:o,leftMargin:a,rightPadding:x,originColumnOffset:r}),f*=c}return{originX:t,halfWorldWidth:i,pyramidsInfo:u,hasGCSSShiftTransform:x}}function ie(e){if(!e||e.isGeographic)return e;const t=String(e.wkid||e.wkt2||e.wkt);let n;if(R.has(t))n=R.get(t);else{n=(e.wkid?o.coordsys(e.wkid):o.fromString(r.PE_TYPE_PROJCS,e.wkt2||e.wkt)).getGeogcs().getCode(),R.set(t,n)}return new x({wkid:n})}function oe(e){const t=e.isAdaptive&&null==e.spacing;let n=e.spacing||[y,y],i=re(e),o={cols:i.size[0]+1,rows:i.size[1]+1};const r=i.outofBoundPointCount>0&&i.outofBoundPointCount<i.offsets.length/2;let s=i.outofBoundPointCount===i.offsets.length/2||t&&r?[0,0]:p(i.offsets,o,n,w);const a=(s[0]+s[1])/2,l=e.projectedExtent.spatialReference,c=e.srcBufferExtent.spatialReference;if(t&&(r||a>w)&&(l.isGeographic||B(l),n=[d,d],i=re({...e,spacing:n}),o={cols:i.size[0]+1,rows:i.size[1]+1},s=p(i.offsets,o,n,w)),i.error=s,n[0]>1&&(i.coefficients=se(i.offsets,o,r)),e.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)i.gcsGrid={offsets:i.offsets,coefficients:i.coefficients,spacing:n};else{const t=B(l);if(null!=t&&!t.isEnvelope){const t=ie(l),s=D(e.projectedExtent,t),{offsets:a}=re({...e,srcBufferExtent:s,spacing:n}),c=se(a,o,r);i.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return i}function re(e){const{projectedExtent:t,srcBufferExtent:n,pixelSize:i,datumTransformation:o,rasterTransform:r}=e,s=t.spatialReference,a=n.spatialReference;h();const{xmin:l,ymin:f,xmax:u,ymax:x}=t,m=Z(a),p=null!=m&&(e.hasWrapAround||"gcs-shift"===r?.type),g=e.spacing||[y,y],w=g[0]*i.x,M=g[1]*i.y,R=1===g[0],P=Math.ceil((u-l)/w-.1/g[0])+(R?0:1),b=Math.ceil((x-f)/M-.1/g[1])+(R?0:1),G=A({cols:P,rows:b,xmin:l,ymax:x,xres:w,yres:M,inSR:s,outSR:a,datumTransformation:o,preferPE:g[0]<=d,usePixelCenter:R}),k=[];let E,T=0;const N=R?-1:NaN,{xmin:v,xmax:j,ymax:C,width:_,height:z}=n,L=W(a,S),I=null!=m&&v>0&&j>m/2,O=B(s),F=null!=O&&O.poleLocation>0;for(let h=0;h<P;h++){const e=[];for(let t=0;t<b;t++){let n=G[h*b+t];if(p&&n[0]>j&&n[0]>m/2-L?n[0]-=m:p&&0===h&&n[0]<0&&I&&!r&&(n[0]+=m),!n||isNaN(n[0])||isNaN(n[1]))k.push(N),k.push(N),e.push(null),T++;else{if(r){const e=r.inverseTransform(new c({x:n[0],y:n[1],spatialReference:a}));n=[e.x,e.y]}e.push(n),h>0&&p&&E[t]&&n[0]<E[t][0]&&(n[0]+=m,F&&n[0]>j&&n[0]>m&&(n[0]-=m)),k.push((n[0]-v)/_),k.push((C-n[1])/z)}}E=e}return{offsets:k,error:null,coefficients:null,outofBoundPointCount:T,spacing:g,size:R?[P,b]:[P-1,b-1]}}function se(e,t,n){const{cols:i,rows:o}=t,r=new Float32Array((i-1)*(o-1)*2*6),s=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let l=0;l<i-1;l++){for(let t=0;t<o-1;t++){let n=l*o*2+2*t;const c=e[n],f=e[n+1],u=e[n+2],x=e[n+3];n+=2*o;const m=e[n],h=e[n+1],p=e[n+2],g=e[n+3];let y=0,d=12*(t*(i-1)+l);for(let e=0;e<3;e++)r[d++]=s[y++]*c+s[y++]*u+s[y++]*p;y=0;for(let e=0;e<3;e++)r[d++]=s[y++]*f+s[y++]*x+s[y++]*g;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*c+a[y++]*m+a[y++]*p;y=0;for(let e=0;e<3;e++)r[d++]=a[y++]*f+a[y++]*h+a[y++]*g}if(n)for(let e=0;e<r.length;e++)isNaN(r[e])&&(r[e]=-1)}return r}function ae(e,t){const n=e.clone().normalize();return 1===n.length?n[0]:K(n,t)}function le(e){const{spatialReference:t}=e,n=m(t);if(!n)return e;const[o,r]=n.valid,s=r-o;let a=0;if(e.xmin<o){const t=o-e.xmin;a=Math.ceil(t/s)}else if(e.xmin>r){const t=e.xmin-r;a=-Math.ceil(t/s)}return new i({spatialReference:e.spatialReference,xmin:e.xmin+a*s,ymin:e.ymin,xmax:e.xmax+a*s,ymax:e.ymax})}function ce(e,t,i){const{storageInfo:o,pixelSize:r}=t;let s=0,a=!1;const{pyramidResolutions:l}=o,f="mixed"===o.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,o.tileInfo.dpi/96)):1,u=(e.x+e.y)/2/f;if(null!=l&&l.length){const e=l[l.length-1],o=(e.x+e.y)/2,f=(r.x+r.y)/2;if(u<=f)s=0;else if(u>=o)s=l.length,a=u/o>8;else{let e,t=f;for(let n=1;n<=l.length;n++){if(e=(l[n-1].x+l[n-1].y)/2,u<=e){u===e?s=n:"down"===i?(s=n-1,a=u/t>8):s="up"===i||u-t>e-u||u/t>2?n:n-1;break}t=e}}const x=0===s?r:l[s-1];if(a){Math.min(x.x,x.y)*n(t.spatialReference)>19567&&(a=!1)}return{pyramidLevel:s,pyramidResolution:new c({x:x.x,y:x.y,spatialReference:t.spatialReference}),excessiveReading:a}}const x=Math.log(e.x/r.x)/Math.LN2,m=Math.log(e.y/r.y)/Math.LN2,h=t.storageInfo.maximumPyramidLevel||0;s="down"===i?Math.floor(Math.min(x,m)):"up"===i?Math.ceil(Math.max(x,m)):Math.round((x+m)/2),s<0?s=0:s>h&&(a=s>h+3,s=h);const p=2**s;return{pyramidLevel:s,pyramidResolution:new c({x:p*t.nativePixelSize.x,y:p*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}function fe(e,t,n=!1){const{pixelSize:i,extent:o}=e,r=v(o,t,!1),s=D(ae(o,(i.x+i.y)/16),t,r);return!s||n||0===te(s)?s:V(o,t,r)}function ue(e,t,n){const i=n?.tileSize??512,o=n?.alignGlobalDatasetWithAGOL??!0,r=!!n?.limitToSrcResolution,{extent:s,pixelSize:a}=e,l=_(a,t,s);if(null==l)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const c=(l.x+l.y)/2,f=z(c,t),u=256/i,x=t.isGeographic?295828763.7958547*u:591657527.591555*u,m=(t.isGeographic?.703125:156543.03392800014)*u;let h="vector-magdir"===e.dataType||"vector-uv"===e.dataType;const p=fe(e,t,!0),g=Math.min(Math.ceil(Math.log(Math.min(e.width,e.height)/32)/Math.LN2),Math.ceil(Math.log(x/2/f)/Math.LN2));if(!h&&p&&o&&(t.isGeographic||t.isWebMercator)){const n=Z(t);if(h=te(p)>0||null!=n&&p.width>n/4,!h&&null!=n){let t=-1;if(g<3)t=2**g*c*i;else if(e.storageInfo){const{maximumPyramidLevel:n=0,pyramidScalingFactor:o=2}=e.storageInfo;t=o**n*c*i}const o=Math.ceil(n/t);h=1===o||2===o&&n/2-p.xmax<t}}let y,d=f;const w=1.001,M=Math.min(2,Math.max(1.414,e.storageInfo?.pyramidScalingFactor||2));if(h){d=x;const n=xe(e,t);y={x:n.x*m,y:n.y*m}}else{y={x:a.x,y:a.y};let e=0;for(;d<x*(w/2)&&e<g;)e++,d*=M,y.x*=M,y.y*=M;Math.max(d,x)/Math.min(d,x)<=w&&(d=x)}const R=[d],S=[{x:y.x,y:y.y}],P=70.5310735,b=Math.min(P,f)/w;for(;d>=b;)d/=M,y.x/=M,y.y/=M,R.push(d),S.push({x:y.x,y:y.y});if(r){const e=.001*a.x;let t=S.findIndex(t=>t.x>=a.x-e&&t.x<=a.x+e);t>-1?(S.length=t+1,R.length=t+1):(t=S.findIndex(t=>t.x<=a.x+e),t>0&&(S.length=t,R.length=t))}return{projectedPixelSize:l,scales:R,srcResolutions:S,isCustomTilingScheme:!h}}function xe(e,t){if(t.isWGS84||t.isWebMercator){const n=t.isGeographic?1341104507446289e-21:.29858214164761665,i=t.isGeographic?4326:3857,o=fe(e,new x({wkid:i}),!0),r=_({x:n,y:n},e.spatialReference,o);return{x:r.x/n,y:r.y/n}}const n=_(e.pixelSize,t,e.extent),i=(n.x+n.y)/2;return{x:e.pixelSize.x/i,y:e.pixelSize.y/i}}function me(e,t){const{spatialReference:n,lods:i}=t,{x:o,y:r}=xe(e,n);return i.map(({resolution:e})=>({x:e*o,y:e*r}))}function he(e){let t=0;for(const n of e){const e=n.length;let i=n[0][0]*(n[1][1]-n[e-2][1]);for(let t=1;t<e-1;t++)i+=n[t][0]*(n[t+1][1]-n[t-1][1]);t+=i/2}return Math.abs(t)}export{ue as computeProjectedScales,xe as computeSrcResolutionRatio,me as computeSrcResolutions,y as defaultGridSpacing,w as defaultProjectionToleranceInPixels,v as getDefaultDatumTransformationForDataset,A as getProjectedGridPoints,oe as getProjectionOffsetGrid,ne as getRasterDatasetAlignmentInfo,L as getSourceScale,Z as getWorldWidth,te as getWorldWrapCount,N as load,d as minimumGridSpacing,fe as projectDatasetExtent,_ as projectDatasetResolution,D as projectExtent,I as projectPoint,H as projectPolygon,j as projectResolution,le as shiftExtent,ae as snapExtent,ce as snapPyramid};
|
|
@@ -23,9 +23,49 @@ export interface FeatureReductionBinningProperties extends Partial<Pick<FeatureR
|
|
|
23
23
|
*
|
|
24
24
|
* > [!WARNING]
|
|
25
25
|
* >
|
|
26
|
-
* > Support is limited in version 5.
|
|
26
|
+
* > Support is limited in version 5.1. For details, see the [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) documentation.
|
|
27
27
|
*
|
|
28
28
|
* @since 5.0
|
|
29
|
+
* @see [FeatureReductionBinning.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#getFieldConfiguration)
|
|
30
|
+
* @see [FeatureReductionBinning.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#getFieldAlias)
|
|
31
|
+
* @example
|
|
32
|
+
* // Adding a new field configuration
|
|
33
|
+
* const addNewConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
34
|
+
* // Check if there is already an existing configuration for fieldName
|
|
35
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
36
|
+
* if (!existingConfig) {
|
|
37
|
+
* const newConfig = new FieldConfiguration({ name: fieldName, alias, fieldFormat });
|
|
38
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
39
|
+
* newConfigs.push(newConfig);
|
|
40
|
+
* layer.fieldConfigurations = newConfigs;
|
|
41
|
+
* }
|
|
42
|
+
* };
|
|
43
|
+
* @example
|
|
44
|
+
* // Updating an existing field configuration
|
|
45
|
+
* const updateConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
46
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
47
|
+
* if (existingConfig) {
|
|
48
|
+
* const newConfig = existingConfig.clone();
|
|
49
|
+
* newConfig.alias = alias;
|
|
50
|
+
* newConfig.fieldFormat = fieldFormat;
|
|
51
|
+
*
|
|
52
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
53
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
54
|
+
* newConfigs[index] = newConfig;
|
|
55
|
+
* layer.fieldConfigurations = newConfigs;
|
|
56
|
+
* }
|
|
57
|
+
* };
|
|
58
|
+
* @example
|
|
59
|
+
* // Deleting an existing field configuration
|
|
60
|
+
* const deleteConfig = (layer, fieldName) => {
|
|
61
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
62
|
+
* if (existingConfig) {
|
|
63
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
64
|
+
* var newConfigs = clone(layer.fieldConfigurations);
|
|
65
|
+
* newConfigs.splice(index, 1);
|
|
66
|
+
* layer.fieldConfigurations = newConfigs;
|
|
67
|
+
* }
|
|
68
|
+
* };
|
|
29
69
|
*/
|
|
30
70
|
fieldConfigurations?: FieldConfigurationProperties[] | null;
|
|
31
71
|
/**
|
|
@@ -333,9 +373,49 @@ export default class FeatureReductionBinning extends FeatureReductionBinningSupe
|
|
|
333
373
|
*
|
|
334
374
|
* > [!WARNING]
|
|
335
375
|
* >
|
|
336
|
-
* > Support is limited in version 5.
|
|
376
|
+
* > Support is limited in version 5.1. For details, see the [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) documentation.
|
|
337
377
|
*
|
|
338
378
|
* @since 5.0
|
|
379
|
+
* @see [FeatureReductionBinning.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#getFieldConfiguration)
|
|
380
|
+
* @see [FeatureReductionBinning.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#getFieldAlias)
|
|
381
|
+
* @example
|
|
382
|
+
* // Adding a new field configuration
|
|
383
|
+
* const addNewConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
384
|
+
* // Check if there is already an existing configuration for fieldName
|
|
385
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
386
|
+
* if (!existingConfig) {
|
|
387
|
+
* const newConfig = new FieldConfiguration({ name: fieldName, alias, fieldFormat });
|
|
388
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
389
|
+
* newConfigs.push(newConfig);
|
|
390
|
+
* layer.fieldConfigurations = newConfigs;
|
|
391
|
+
* }
|
|
392
|
+
* };
|
|
393
|
+
* @example
|
|
394
|
+
* // Updating an existing field configuration
|
|
395
|
+
* const updateConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
396
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
397
|
+
* if (existingConfig) {
|
|
398
|
+
* const newConfig = existingConfig.clone();
|
|
399
|
+
* newConfig.alias = alias;
|
|
400
|
+
* newConfig.fieldFormat = fieldFormat;
|
|
401
|
+
*
|
|
402
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
403
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
404
|
+
* newConfigs[index] = newConfig;
|
|
405
|
+
* layer.fieldConfigurations = newConfigs;
|
|
406
|
+
* }
|
|
407
|
+
* };
|
|
408
|
+
* @example
|
|
409
|
+
* // Deleting an existing field configuration
|
|
410
|
+
* const deleteConfig = (layer, fieldName) => {
|
|
411
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
412
|
+
* if (existingConfig) {
|
|
413
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
414
|
+
* var newConfigs = clone(layer.fieldConfigurations);
|
|
415
|
+
* newConfigs.splice(index, 1);
|
|
416
|
+
* layer.fieldConfigurations = newConfigs;
|
|
417
|
+
* }
|
|
418
|
+
* };
|
|
339
419
|
*/
|
|
340
420
|
get fieldConfigurations(): FieldConfiguration[] | null | undefined;
|
|
341
421
|
set fieldConfigurations(value: FieldConfigurationProperties[] | null | undefined);
|
|
@@ -648,22 +728,20 @@ export default class FeatureReductionBinning extends FeatureReductionBinningSupe
|
|
|
648
728
|
* @param fieldName - The name of the field.
|
|
649
729
|
* @returns The field alias of the specified field.
|
|
650
730
|
* @since 5.0
|
|
651
|
-
* @see [fieldConfigurations](
|
|
652
|
-
* @see [getFieldConfiguration
|
|
653
|
-
* @see [getField()](#getField)
|
|
731
|
+
* @see [FeatureReductionBinning.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#fieldConfigurations)
|
|
732
|
+
* @see [FeatureReductionBinning.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#getFieldConfiguration)
|
|
654
733
|
*/
|
|
655
734
|
getFieldAlias(fieldName: string): string | null | undefined;
|
|
656
735
|
/**
|
|
657
736
|
* Returns the [FieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) for the specified field. The field configuration provides optional formatting and display information for the field.
|
|
658
737
|
*
|
|
659
|
-
* Previously, field formatting was commonly retrieved from [
|
|
738
|
+
* Previously, field formatting was commonly retrieved from [Layer.popupTemplate.fieldInfos[x].format](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/#format). This is no longer needed, instead use [Layer.getFieldConfiguration(fieldname).fieldFormat](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/#fieldFormat) to retrieve the field configuration formatting.
|
|
660
739
|
*
|
|
661
740
|
* @param fieldName - The name of the field.
|
|
662
741
|
* @returns The field configuration of the specified field.
|
|
663
742
|
* @since 5.0
|
|
664
|
-
* @see [fieldConfigurations](
|
|
665
|
-
* @see [getFieldAlias
|
|
666
|
-
* @see [getField()](#getField)
|
|
743
|
+
* @see [FeatureReductionBinning.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#fieldConfigurations)
|
|
744
|
+
* @see [FeatureReductionBinning.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionBinning/#getFieldAlias)
|
|
667
745
|
*/
|
|
668
746
|
getFieldConfiguration(fieldName: string): FieldConfiguration | null | undefined;
|
|
669
747
|
}
|
|
@@ -111,9 +111,49 @@ export interface FeatureReductionClusterProperties extends Partial<Pick<FeatureR
|
|
|
111
111
|
*
|
|
112
112
|
* > [!WARNING]
|
|
113
113
|
* >
|
|
114
|
-
* > Support is limited in version 5.
|
|
114
|
+
* > Support is limited in version 5.1. For details, see the [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) documentation.
|
|
115
115
|
*
|
|
116
116
|
* @since 5.0
|
|
117
|
+
* @see [FeatureReductionCluster.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#getFieldConfiguration)
|
|
118
|
+
* @see [FeatureReductionCluster.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#getFieldAlias)
|
|
119
|
+
* @example
|
|
120
|
+
* // Adding a new field configuration
|
|
121
|
+
* const addNewConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
122
|
+
* // Check if there is already an existing configuration for fieldName
|
|
123
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
124
|
+
* if (!existingConfig) {
|
|
125
|
+
* const newConfig = new FieldConfiguration({ name: fieldName, alias, fieldFormat });
|
|
126
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
127
|
+
* newConfigs.push(newConfig);
|
|
128
|
+
* layer.fieldConfigurations = newConfigs;
|
|
129
|
+
* }
|
|
130
|
+
* };
|
|
131
|
+
* @example
|
|
132
|
+
* // Updating an existing field configuration
|
|
133
|
+
* const updateConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
134
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
135
|
+
* if (existingConfig) {
|
|
136
|
+
* const newConfig = existingConfig.clone();
|
|
137
|
+
* newConfig.alias = alias;
|
|
138
|
+
* newConfig.fieldFormat = fieldFormat;
|
|
139
|
+
*
|
|
140
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
141
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
142
|
+
* newConfigs[index] = newConfig;
|
|
143
|
+
* layer.fieldConfigurations = newConfigs;
|
|
144
|
+
* }
|
|
145
|
+
* };
|
|
146
|
+
* @example
|
|
147
|
+
* // Deleting an existing field configuration
|
|
148
|
+
* const deleteConfig = (layer, fieldName) => {
|
|
149
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
150
|
+
* if (existingConfig) {
|
|
151
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
152
|
+
* var newConfigs = clone(layer.fieldConfigurations);
|
|
153
|
+
* newConfigs.splice(index, 1);
|
|
154
|
+
* layer.fieldConfigurations = newConfigs;
|
|
155
|
+
* }
|
|
156
|
+
* };
|
|
117
157
|
*/
|
|
118
158
|
fieldConfigurations?: FieldConfigurationProperties[] | null;
|
|
119
159
|
/**
|
|
@@ -730,9 +770,49 @@ export default class FeatureReductionCluster extends FeatureReductionClusterSupe
|
|
|
730
770
|
*
|
|
731
771
|
* > [!WARNING]
|
|
732
772
|
* >
|
|
733
|
-
* > Support is limited in version 5.
|
|
773
|
+
* > Support is limited in version 5.1. For details, see the [FieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) documentation.
|
|
734
774
|
*
|
|
735
775
|
* @since 5.0
|
|
776
|
+
* @see [FeatureReductionCluster.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#getFieldConfiguration)
|
|
777
|
+
* @see [FeatureReductionCluster.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#getFieldAlias)
|
|
778
|
+
* @example
|
|
779
|
+
* // Adding a new field configuration
|
|
780
|
+
* const addNewConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
781
|
+
* // Check if there is already an existing configuration for fieldName
|
|
782
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
783
|
+
* if (!existingConfig) {
|
|
784
|
+
* const newConfig = new FieldConfiguration({ name: fieldName, alias, fieldFormat });
|
|
785
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
786
|
+
* newConfigs.push(newConfig);
|
|
787
|
+
* layer.fieldConfigurations = newConfigs;
|
|
788
|
+
* }
|
|
789
|
+
* };
|
|
790
|
+
* @example
|
|
791
|
+
* // Updating an existing field configuration
|
|
792
|
+
* const updateConfig = (layer, fieldName, alias, fieldFormat) => {
|
|
793
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
794
|
+
* if (existingConfig) {
|
|
795
|
+
* const newConfig = existingConfig.clone();
|
|
796
|
+
* newConfig.alias = alias;
|
|
797
|
+
* newConfig.fieldFormat = fieldFormat;
|
|
798
|
+
*
|
|
799
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
800
|
+
* const newConfigs = clone(layer.fieldConfigurations);
|
|
801
|
+
* newConfigs[index] = newConfig;
|
|
802
|
+
* layer.fieldConfigurations = newConfigs;
|
|
803
|
+
* }
|
|
804
|
+
* };
|
|
805
|
+
* @example
|
|
806
|
+
* // Deleting an existing field configuration
|
|
807
|
+
* const deleteConfig = (layer, fieldName) => {
|
|
808
|
+
* const existingConfig = layer.getFieldConfiguration(fieldName);
|
|
809
|
+
* if (existingConfig) {
|
|
810
|
+
* const index = layer.fieldConfigurations.indexOf(existingConfig);
|
|
811
|
+
* var newConfigs = clone(layer.fieldConfigurations);
|
|
812
|
+
* newConfigs.splice(index, 1);
|
|
813
|
+
* layer.fieldConfigurations = newConfigs;
|
|
814
|
+
* }
|
|
815
|
+
* };
|
|
736
816
|
*/
|
|
737
817
|
get fieldConfigurations(): FieldConfiguration[] | null | undefined;
|
|
738
818
|
set fieldConfigurations(value: FieldConfigurationProperties[] | null | undefined);
|
|
@@ -1218,22 +1298,20 @@ export default class FeatureReductionCluster extends FeatureReductionClusterSupe
|
|
|
1218
1298
|
* @param fieldName - The name of the field.
|
|
1219
1299
|
* @returns The field alias of the specified field.
|
|
1220
1300
|
* @since 5.0
|
|
1221
|
-
* @see [fieldConfigurations](
|
|
1222
|
-
* @see [getFieldConfiguration
|
|
1223
|
-
* @see [getField()](#getField)
|
|
1301
|
+
* @see [FeatureReductionCluster.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#fieldConfigurations)
|
|
1302
|
+
* @see [FeatureReductionCluster.getFieldConfiguration](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#getFieldConfiguration)
|
|
1224
1303
|
*/
|
|
1225
1304
|
getFieldAlias(fieldName: string): string | null | undefined;
|
|
1226
1305
|
/**
|
|
1227
1306
|
* Returns the [FieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/) for the specified field. The field configuration provides optional formatting and display information for the field.
|
|
1228
1307
|
*
|
|
1229
|
-
* Previously, field formatting was commonly retrieved from [
|
|
1308
|
+
* Previously, field formatting was commonly retrieved from [Layer.popupTemplate.fieldInfos[x].format](https://developers.arcgis.com/javascript/latest/references/core/popup/FieldInfo/#format). This is no longer needed, instead use [Layer.getFieldConfiguration(fieldname).fieldFormat](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FieldConfiguration/#fieldFormat) to retrieve the field configuration formatting.
|
|
1230
1309
|
*
|
|
1231
1310
|
* @param fieldName - The name of the field.
|
|
1232
1311
|
* @returns The field configuration of the specified field.
|
|
1233
1312
|
* @since 5.0
|
|
1234
|
-
* @see [fieldConfigurations](
|
|
1235
|
-
* @see [getFieldAlias
|
|
1236
|
-
* @see [getField()](#getField)
|
|
1313
|
+
* @see [FeatureReductionCluster.fieldConfigurations](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#fieldConfigurations)
|
|
1314
|
+
* @see [FeatureReductionCluster.getFieldAlias](https://developers.arcgis.com/javascript/latest/references/core/layers/support/FeatureReductionCluster/#getFieldAlias)
|
|
1237
1315
|
*/
|
|
1238
1316
|
getFieldConfiguration(fieldName: string): FieldConfiguration | null | undefined;
|
|
1239
1317
|
}
|