@arcgis/core 5.1.0-next.70 → 5.1.0-next.71
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/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/icon/addToLivestreamVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer32.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer32.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture16.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture24.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture32.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12316.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12324.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12332.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/busTravelMode16.json +1 -0
- package/assets/components/assets/icon/busTravelMode16F.json +1 -0
- package/assets/components/assets/icon/busTravelMode24.json +1 -0
- package/assets/components/assets/icon/busTravelMode24F.json +1 -0
- package/assets/components/assets/icon/busTravelMode32.json +1 -0
- package/assets/components/assets/icon/busTravelMode32F.json +1 -0
- package/assets/components/assets/icon/carTravelMode16.json +1 -0
- package/assets/components/assets/icon/carTravelMode16F.json +1 -0
- package/assets/components/assets/icon/carTravelMode24.json +1 -0
- package/assets/components/assets/icon/carTravelMode24F.json +1 -0
- package/assets/components/assets/icon/carTravelMode32.json +1 -0
- package/assets/components/assets/icon/carTravelMode32F.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown16.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown24.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown32.json +1 -0
- package/assets/components/assets/icon/emergency16.json +1 -0
- package/assets/components/assets/icon/emergency16F.json +1 -0
- package/assets/components/assets/icon/emergency24.json +1 -0
- package/assets/components/assets/icon/emergency24F.json +1 -0
- package/assets/components/assets/icon/emergency32.json +1 -0
- package/assets/components/assets/icon/emergency32F.json +1 -0
- package/assets/components/assets/icon/eyedropper16.json +1 -1
- package/assets/components/assets/icon/eyedropper24.json +1 -1
- package/assets/components/assets/icon/eyedropper32.json +1 -1
- package/assets/components/assets/icon/featureDetailsSet16.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet24.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet32.json +1 -0
- package/assets/components/assets/icon/fileBim16.json +1 -0
- package/assets/components/assets/icon/fileBim24.json +1 -0
- package/assets/components/assets/icon/fileBim32.json +1 -0
- package/assets/components/assets/icon/fileDwg16.json +1 -0
- package/assets/components/assets/icon/fileDwg24.json +1 -0
- package/assets/components/assets/icon/fileDwg32.json +1 -0
- package/assets/components/assets/icon/fileRvt16.json +1 -0
- package/assets/components/assets/icon/fileRvt24.json +1 -0
- package/assets/components/assets/icon/fileRvt32.json +1 -0
- package/assets/components/assets/icon/gradient16.json +1 -0
- package/assets/components/assets/icon/gradient24.json +1 -0
- package/assets/components/assets/icon/gradient32.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting16.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting24.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/publish16.json +1 -0
- package/assets/components/assets/icon/publish24.json +1 -0
- package/assets/components/assets/icon/publish32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32F.json +1 -0
- package/assets/components/assets/icon/velocityServer16.json +1 -0
- package/assets/components/assets/icon/velocityServer24.json +1 -0
- package/assets/components/assets/icon/velocityServer32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32F.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/09ecb36e44096e577af8.js +1 -0
- package/assets/esri/core/workers/chunks/0b1454a77a6a682541dc.js +2 -0
- package/assets/esri/core/workers/chunks/{d82b543c96f09ded3bf9.js.LICENSE.txt → 0b1454a77a6a682541dc.js.LICENSE.txt} +6 -1
- package/assets/esri/core/workers/chunks/0ca06ea649bbdb93ff49.js +1 -0
- package/assets/esri/core/workers/chunks/10308c9f3f0d709d96bc.js +1 -0
- package/assets/esri/core/workers/chunks/{03e20ac54d6f141b5001.js → 11241781baaed346af52.js} +1 -1
- package/assets/esri/core/workers/chunks/123e920e4460124ec3bb.js +288 -0
- package/assets/esri/core/workers/chunks/{fc64ae69581e4c38fa8a.js → 141edf5ed890105a079b.js} +1 -1
- package/assets/esri/core/workers/chunks/160b9a76b75875507c86.js +1 -0
- package/assets/esri/core/workers/chunks/16dfdee05704df249e95.js +1 -0
- package/assets/esri/core/workers/chunks/17ef955dc48e329aa184.js +1 -0
- package/assets/esri/core/workers/chunks/18001536ed345955121a.js +1 -0
- package/assets/esri/core/workers/chunks/1c7183551f5269bdcf13.js +30 -0
- package/assets/esri/core/workers/chunks/1d9560eb8b21b9e76616.js +1 -0
- package/assets/esri/core/workers/chunks/{b364ec104dd59faa41b6.js → 1f82a0f134ea912fc686.js} +1 -1
- package/assets/esri/core/workers/chunks/231f502cd15f30d12be2.js +1 -0
- package/assets/esri/core/workers/chunks/238f51d0b36f998017b8.js +1 -0
- package/assets/esri/core/workers/chunks/2cee6d751c5e73fe09d4.js +1 -0
- package/assets/esri/core/workers/chunks/31071a43e2c03984d619.js +1 -0
- package/assets/esri/core/workers/chunks/36031cb53c486630f3c9.js +1 -0
- package/assets/esri/core/workers/chunks/3697e51e1e4cf442f39a.js +1 -0
- package/assets/esri/core/workers/chunks/3a58708217a9c11836ab.js +1 -0
- package/assets/esri/core/workers/chunks/3b1446286a9b87f34761.js +1 -0
- package/assets/esri/core/workers/chunks/3b7cda16e656db450f11.js +1 -0
- package/assets/esri/core/workers/chunks/3e972ae291df1844017d.js +1 -0
- package/assets/esri/core/workers/chunks/{73e000cc3c4da10e9937.js → 3f7fd58ee7d71989fc83.js} +1 -1
- package/assets/esri/core/workers/chunks/416e031bafc0189544fa.js +1 -0
- package/assets/esri/core/workers/chunks/427dec43ef2d67467699.js +1 -0
- package/assets/esri/core/workers/chunks/{746b3e98bad32c366a27.js → 444f0f51b3ee0b9845a5.js} +1 -1
- package/assets/esri/core/workers/chunks/4d51261d6131c07402cd.js +1 -0
- package/assets/esri/core/workers/chunks/{8ccf2f65d8ed3c48ffff.js → 4d8670f6fa8952b7bab6.js} +1 -1
- package/assets/esri/core/workers/chunks/{f209a7076d67cbf4d205.js → 4e676e888a935c507d90.js} +1 -1
- package/assets/esri/core/workers/chunks/50d5d6654ada9f28345d.js +1 -0
- package/assets/esri/core/workers/chunks/54c6e870262469d0d702.js +1 -0
- package/assets/esri/core/workers/chunks/55ee78923987ed17ea8c.js +1 -0
- package/assets/esri/core/workers/chunks/58b3c888c8bfedbe6443.js +1 -0
- package/assets/esri/core/workers/chunks/58c79e15ca95238a4b43.js +1 -0
- package/assets/esri/core/workers/chunks/6118706b9a038e9a06b8.js +1 -0
- package/assets/esri/core/workers/chunks/628f56c09838eb9c573b.js +1 -0
- package/assets/esri/core/workers/chunks/{f11ea0d3de93ec0392af.js → 6ac5ec3ecbca8860338b.js} +1 -1
- package/assets/esri/core/workers/chunks/6d15229b3fa84a7acf4d.js +599 -0
- package/assets/esri/core/workers/chunks/6dac8dfcd63fc757ae2d.js +1 -0
- package/assets/esri/core/workers/chunks/6e70e922331704b92a08.js +1 -0
- package/assets/esri/core/workers/chunks/6f67c9f68101a084b683.js +30 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/7314c0131403cac84ad7.js +1 -0
- package/assets/esri/core/workers/chunks/73545bb13c70f6a347a4.js +1 -0
- package/assets/esri/core/workers/chunks/74be994d789c57031631.js +1 -0
- package/assets/esri/core/workers/chunks/7bacdd65a6cc4d284e0a.js +2 -0
- package/assets/esri/core/workers/chunks/7c7c11c0fde8b63e330b.js +1 -0
- package/assets/esri/core/workers/chunks/7ca32806e47be15109a4.js +1 -0
- package/assets/esri/core/workers/chunks/7cb6d8f7eaf762279632.js +1 -0
- package/assets/esri/core/workers/chunks/7d6ed65bbcd279448191.js +1 -0
- package/assets/esri/core/workers/chunks/7e6ccf9f3e756186e93e.js +1 -0
- package/assets/esri/core/workers/chunks/81f149e45c79b9b086fb.js +1 -0
- package/assets/esri/core/workers/chunks/824051af00e7a1f05ed0.js +1 -0
- package/assets/esri/core/workers/chunks/84fa25f66a6949290221.js +1 -0
- package/assets/esri/core/workers/chunks/852aabbf671d2ca9cd33.js +1 -0
- package/assets/esri/core/workers/chunks/85edbb072a2ce6c1bb30.js +2 -0
- package/assets/esri/core/workers/chunks/{2d2c10c31cc1460dd96a.js → 88827e23f8938342781c.js} +1 -1
- package/assets/esri/core/workers/chunks/{bc2c7cb99e227ddbd3a6.js → 89345a682dea60ef1643.js} +1 -1
- package/assets/esri/core/workers/chunks/8985402c328b90af5724.js +1 -0
- package/assets/esri/core/workers/chunks/89fdf9ad10ca8fbb08a5.js +1 -0
- package/assets/esri/core/workers/chunks/8a48a6760c33ed50b650.js +1 -0
- package/assets/esri/core/workers/chunks/8b094330323d9b16fb5d.js +1 -0
- package/assets/esri/core/workers/chunks/8b73f4d2f99c0b54cced.js +1 -0
- package/assets/esri/core/workers/chunks/90aed8c4b266832f84ca.js +1 -0
- package/assets/esri/core/workers/chunks/916a8f3eed1fafdc7242.js +1 -0
- package/assets/esri/core/workers/chunks/9187d1caca1fd2d713e0.js +1 -0
- package/assets/esri/core/workers/chunks/943cf0653a2b7de16a4f.js +1 -0
- package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +1 -0
- package/assets/esri/core/workers/chunks/967758a05170545cd371.js +1 -0
- package/assets/esri/core/workers/chunks/9776c2db337222ceceef.js +1 -0
- package/assets/esri/core/workers/chunks/990853e9df38fdfc58b5.js +1 -0
- package/assets/esri/core/workers/chunks/9a21ba0c45a96b94c05e.js +1 -0
- package/assets/esri/core/workers/chunks/{e0a63b5861e8c975097e.js → 9aaf78b831f8739bc127.js} +1 -1
- package/assets/esri/core/workers/chunks/9b56162ac67c992193ce.js +1 -0
- package/assets/esri/core/workers/chunks/{4d378d4e021a33b0047e.js → 9be4438ce2c7180adadf.js} +1 -1
- package/assets/esri/core/workers/chunks/a169d9fe66b5865911d9.js +1 -0
- package/assets/esri/core/workers/chunks/a1e6187c239fdc7553ed.js +1 -0
- package/assets/esri/core/workers/chunks/a5a46d0a0831497cf1b4.js +1 -0
- package/assets/esri/core/workers/chunks/a5afcd633b32e6ee31a7.js +1 -0
- package/assets/esri/core/workers/chunks/a5d8d6f3c0c8de474efd.js +1 -0
- package/assets/esri/core/workers/chunks/a65d576e90179a2b5400.js +1 -0
- package/assets/esri/core/workers/chunks/a760be8fa6c6ea6b745c.js +1 -0
- package/assets/esri/core/workers/chunks/a8782286ce3c0d6c20e6.js +1 -0
- package/assets/esri/core/workers/chunks/{38328a785365c4783b1e.js → a994a3c912a33b2f4100.js} +1 -1
- package/assets/esri/core/workers/chunks/{678c9f15712cf3d3bb9e.js → aa1a3a849aba84cf585b.js} +1 -1
- package/assets/esri/core/workers/chunks/abcc5fb71be2bd94878c.js +1 -0
- package/assets/esri/core/workers/chunks/ae0a572cbbdd9815ee2e.js +1 -0
- package/assets/esri/core/workers/chunks/aecb05df4ad1454f5435.js +1 -0
- package/assets/esri/core/workers/chunks/aecb105db7cec2c9c4c5.js +1 -0
- package/assets/esri/core/workers/chunks/b19f33e026a2a43b17c4.js +1 -0
- package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +1 -0
- package/assets/esri/core/workers/chunks/b2983f521d8c96becd8a.js +1 -0
- package/assets/esri/core/workers/chunks/b5922991d2f450e6a9d9.js +1 -0
- package/assets/esri/core/workers/chunks/b8643976a7f984552d94.js +1 -0
- package/assets/esri/core/workers/chunks/ba4259aa050169c1d523.js +1 -0
- package/assets/esri/core/workers/chunks/bc53ce9a643f82d516c2.js +1 -0
- package/assets/esri/core/workers/chunks/{81b2985b83be8f8f1090.js → c06d021180418f2014de.js} +1 -1
- package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +1 -0
- package/assets/esri/core/workers/chunks/{0e2e4cb34ac6aac88ebf.js → c178e2cfc34603661b1d.js} +1 -1
- package/assets/esri/core/workers/chunks/c3e80c0e29ac6a7a6f80.js +1 -0
- package/assets/esri/core/workers/chunks/c46a4adea39636a96d03.js +1 -0
- package/assets/esri/core/workers/chunks/c6030271bd6d39b6e1db.js +1 -0
- package/assets/esri/core/workers/chunks/c9065cee85eb8dde6a42.js +1 -0
- package/assets/esri/core/workers/chunks/c92352b0e39576ca317a.js +1 -0
- package/assets/esri/core/workers/chunks/c92b40a532e708e506cc.js +1 -0
- package/assets/esri/core/workers/chunks/c961aff385e38b081204.js +1 -0
- package/assets/esri/core/workers/chunks/cca095f0c623e037002d.js +1 -0
- package/assets/esri/core/workers/chunks/ce2aa75e084ee56f5e29.js +1 -0
- package/assets/esri/core/workers/chunks/ce44e172e2847fd8df14.js +1 -0
- package/assets/esri/core/workers/chunks/cf826787ab8d4b27ad80.js +1 -0
- package/assets/esri/core/workers/chunks/cff7e921649aef715c78.js +1 -0
- package/assets/esri/core/workers/chunks/d05a7ce6c1d4b883ed4c.js +30 -0
- package/assets/esri/core/workers/chunks/d4a9eb4470cc6a1f67fc.js +2 -0
- package/assets/esri/core/workers/chunks/{478879ba965798f61bf3.js → d69110ec4078c583a05e.js} +1 -1
- package/assets/esri/core/workers/chunks/d8c0d18f0132872decd3.js +1 -0
- package/assets/esri/core/workers/chunks/db0061a6d5bf454cc509.js +1 -0
- package/assets/esri/core/workers/chunks/dbc9249dae41096d750d.js +1 -0
- package/assets/esri/core/workers/chunks/dcfafcf4386f2940d000.js +1 -0
- package/assets/esri/core/workers/chunks/deb8a0b306d7b9c86b97.js +1 -0
- package/assets/esri/core/workers/chunks/df8143b72ef94806c992.js +1 -0
- package/assets/esri/core/workers/chunks/e0b47b08ae2c36c76fa2.js +1 -0
- package/assets/esri/core/workers/chunks/e2b034c391c603f7f825.js +1 -0
- package/assets/esri/core/workers/chunks/e77d958cb62536b8eebc.js +1 -0
- package/assets/esri/core/workers/chunks/e797d45eba0884dc7e6f.js +1 -0
- package/assets/esri/core/workers/chunks/{453280ea87a696a4df81.js → e81a3da05fcff97b4752.js} +1 -1
- package/assets/esri/core/workers/chunks/e957d52cb9643961a843.js +1127 -0
- package/assets/esri/core/workers/chunks/{915a5e8aecf25f3bc72b.js → eb3cdc4ff45243fc3cc5.js} +1 -1
- package/assets/esri/core/workers/chunks/eb9982bc866976fef960.js +1 -0
- package/assets/esri/core/workers/chunks/{edc2e87968c958bc852b.js → ec4669a0edeca94710e0.js} +1 -1
- package/assets/esri/core/workers/chunks/f05932aea4eb267cba4d.js +1 -0
- package/assets/esri/core/workers/chunks/f09a41ad239d467d9438.js +2 -0
- package/assets/esri/core/workers/chunks/f52443cd203e687551da.js +1 -0
- package/assets/esri/core/workers/chunks/f653970d983f17fb764b.js +1 -0
- package/assets/esri/core/workers/chunks/f6912532aae1638cbe8f.js +1 -0
- package/assets/esri/core/workers/chunks/f6d5dd2eef0d9918096e.js +1 -0
- package/assets/esri/core/workers/chunks/f89976ec97938bf86996.js +1 -0
- package/assets/esri/core/workers/chunks/f9edc685099f51363f41.js +1 -0
- package/assets/esri/core/workers/chunks/fa687ba2d66fcc2501da.js +1 -0
- package/assets/esri/core/workers/chunks/fe68c28d3c61f116ff23.js +1 -0
- package/assets/esri/core/workers/chunks/fef5dc19736f12dfa99a.js +1 -0
- package/assets/esri/core/workers/chunks/ffcd4fca7f67e1f943f1.js +1 -0
- 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/chunks/OITDim.glsl.js +3 -4
- package/config.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/triangulationUtilsDeprecated.js +1 -1
- package/kernel.js +1 -1
- package/package.json +3 -3
- package/popup/Feature.d.ts +2 -0
- package/popup/Feature.js +1 -1
- package/popup/actions.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/support/renderInfoUtils/polygonDeprecated.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/SamplerRepository.js +2 -0
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/ViewAnimation.d.ts +2 -21
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/support/rasterHitTestUtils.js +2 -0
- package/views/webgl/Sampler.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/01be1315c60810651783.js +0 -1
- package/assets/esri/core/workers/chunks/0dd12d6af0cf7707109c.js +0 -2
- package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +0 -1
- package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +0 -1
- package/assets/esri/core/workers/chunks/171cca726a763c770469.js +0 -1
- package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +0 -1
- package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +0 -1
- package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +0 -1
- package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +0 -1
- package/assets/esri/core/workers/chunks/1ae4e43a399e1974f106.js +0 -1
- package/assets/esri/core/workers/chunks/1c742bfe3b0aa51823d1.js +0 -1
- package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +0 -1
- package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +0 -1
- package/assets/esri/core/workers/chunks/205e957ffd7e95f530f7.js +0 -1
- package/assets/esri/core/workers/chunks/210629f3c28d4339c655.js +0 -1
- package/assets/esri/core/workers/chunks/21a8e2a11ffacc226e2b.js +0 -1
- package/assets/esri/core/workers/chunks/27643750dce502fedef3.js +0 -1
- package/assets/esri/core/workers/chunks/29b1a4ce7646b403008e.js +0 -1
- package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +0 -1
- package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +0 -1
- package/assets/esri/core/workers/chunks/35217befc8f9882d139e.js +0 -1
- package/assets/esri/core/workers/chunks/3a2ecb883fdb5c598544.js +0 -30
- package/assets/esri/core/workers/chunks/3eef3c2e94aa2a00d76a.js +0 -1
- package/assets/esri/core/workers/chunks/40d6ad030614099155cd.js +0 -1414
- package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +0 -1
- package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +0 -1
- package/assets/esri/core/workers/chunks/499b899bf88aaf29230d.js +0 -1
- package/assets/esri/core/workers/chunks/4b0d6309abf273f1f79f.js +0 -1
- package/assets/esri/core/workers/chunks/4e07827ab870c65377d3.js +0 -1
- package/assets/esri/core/workers/chunks/51852ef71ac04954fdae.js +0 -1
- package/assets/esri/core/workers/chunks/53b797e384be9628fc94.js +0 -1
- package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +0 -1
- package/assets/esri/core/workers/chunks/54c0306082d30d59cba2.js +0 -1
- package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +0 -1
- package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +0 -1
- package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +0 -1
- package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +0 -1
- package/assets/esri/core/workers/chunks/60d0f8a949b130baff81.js +0 -1
- package/assets/esri/core/workers/chunks/61778185d702da468b00.js +0 -1
- package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +0 -1
- package/assets/esri/core/workers/chunks/621ea864e2774f160d1c.js +0 -1
- package/assets/esri/core/workers/chunks/679086351352756b33c9.js +0 -1
- package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +0 -1
- package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +0 -1
- package/assets/esri/core/workers/chunks/6a567755b67c06d16f21.js +0 -1
- package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +0 -1
- package/assets/esri/core/workers/chunks/70263c2182dc43046742.js +0 -1
- package/assets/esri/core/workers/chunks/71326d16b5cc35c3ff7f.js +0 -1
- package/assets/esri/core/workers/chunks/78fbfc03d9b827c3f767.js +0 -1
- package/assets/esri/core/workers/chunks/7d0350f459844162d3a7.js +0 -1
- package/assets/esri/core/workers/chunks/7e39e9d4d68843b60e4c.js +0 -1
- package/assets/esri/core/workers/chunks/823127b23bec07e1f9d0.js +0 -2
- package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +0 -1
- package/assets/esri/core/workers/chunks/888f6387e795d45a7ad3.js +0 -2
- package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +0 -1
- package/assets/esri/core/workers/chunks/8969788c57bcc11bf77b.js +0 -1
- package/assets/esri/core/workers/chunks/8d6da6573d07385f4ed5.js +0 -1
- package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +0 -1
- package/assets/esri/core/workers/chunks/8fb336c2066113300d0d.js +0 -1
- package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +0 -1
- package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +0 -1
- package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +0 -1
- package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +0 -1
- package/assets/esri/core/workers/chunks/9d7ffd83f69d6e639f09.js +0 -1
- package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +0 -1
- package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +0 -1
- package/assets/esri/core/workers/chunks/a061a17b62686f945e81.js +0 -1
- package/assets/esri/core/workers/chunks/a30815a0155a3b8790b4.js +0 -1
- package/assets/esri/core/workers/chunks/a43decc8ede8b4910553.js +0 -1
- package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +0 -1
- package/assets/esri/core/workers/chunks/a520f83ae0c3c3e78858.js +0 -1
- package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +0 -1
- package/assets/esri/core/workers/chunks/a73e8b80760dc88f926f.js +0 -1
- package/assets/esri/core/workers/chunks/b014f0b2385dc82dc683.js +0 -2
- package/assets/esri/core/workers/chunks/b2120c4c56656be941ae.js +0 -1
- package/assets/esri/core/workers/chunks/b8005b1996f42dee8237.js +0 -1
- package/assets/esri/core/workers/chunks/b85c9ceeece1bae67a16.js +0 -1
- package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +0 -1
- package/assets/esri/core/workers/chunks/bbdf27bc34fadbe8e6fe.js +0 -1
- package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +0 -1
- package/assets/esri/core/workers/chunks/be42fe0b7ba0e27030b2.js +0 -1
- package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +0 -1
- package/assets/esri/core/workers/chunks/be61ea8e1883b915bbb1.js +0 -1
- package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +0 -1
- package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +0 -1
- package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +0 -1
- package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +0 -1
- package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +0 -1
- package/assets/esri/core/workers/chunks/c7ca47f5d4b2f3885239.js +0 -1
- package/assets/esri/core/workers/chunks/d024278a1c2aa7d22be3.js +0 -1
- package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +0 -1
- package/assets/esri/core/workers/chunks/d4e55eb75fa4d3ac1e84.js +0 -1
- package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +0 -1
- package/assets/esri/core/workers/chunks/d635f97b7b82a37482d6.js +0 -1
- package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +0 -1
- package/assets/esri/core/workers/chunks/d816d1a4220d827faf63.js +0 -1
- package/assets/esri/core/workers/chunks/d82b543c96f09ded3bf9.js +0 -2
- package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +0 -1
- package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +0 -1
- package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +0 -1
- package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +0 -1
- package/assets/esri/core/workers/chunks/e5801b0f3893d4d4f5b0.js +0 -1
- package/assets/esri/core/workers/chunks/e59f5dc8c85bcea66e98.js +0 -1
- package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +0 -1
- package/assets/esri/core/workers/chunks/e62d08f5488a74cbda82.js +0 -1
- package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +0 -1
- package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +0 -1
- package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +0 -1
- package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +0 -1
- package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +0 -1
- package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +0 -1
- package/assets/esri/core/workers/chunks/f9cde38cb56c547e87e5.js +0 -1
- package/assets/esri/core/workers/chunks/fd6bbe47773bbd9f7dd9.js +0 -1
- package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +0 -1
- /package/assets/esri/core/workers/chunks/{0dd12d6af0cf7707109c.js.LICENSE.txt → 7bacdd65a6cc4d284e0a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{823127b23bec07e1f9d0.js.LICENSE.txt → 85edbb072a2ce6c1bb30.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{888f6387e795d45a7ad3.js.LICENSE.txt → d4a9eb4470cc6a1f67fc.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b014f0b2385dc82dc683.js.LICENSE.txt → f09a41ad239d467d9438.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/Accessor.js";import i from"../../../../core/Logger.js";import{assertIsSome as s}from"../../../../core/maybe.js";import{debounce as r,isAbortError as a}from"../../../../core/promiseUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import h from"../../../../geometry/Extent.js";import c from"../../../../geometry/Point.js";import{isFunctionRaster as u}from"../../../../layers/raster/datasets/datasetUtils.js";import{update as d,unregister as p,getRasterId as y,register as g}from"../../../../layers/raster/datasets/RawBlockCache.js";import{getPixelLocationAndValue as m}from"../../../../layers/raster/functions/pixelUtils.js";import{getWorldWidth as f,computeProjectedScales as _}from"../../../../layers/raster/functions/rasterProjectionHelper.js";import{getStretchCutoff as b}from"../../../../layers/raster/functions/stretchUtils.js";import{uvComponentToVector as w}from"../../../../layers/raster/functions/vectorFieldUtils.js";import R from"../../../../layers/support/PixelBlock.js";import I from"../../../../layers/support/TileInfo.js";import P from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import x from"../../tiling/TileQueue.js";import U from"../../tiling/TileStrategy.js";import{tileSize as C}from"../../engine/webgl/definitions.js";import{TaskPriority as S}from"../../../support/Scheduler.js";import{getWebGLCapabilities as v}from"../../../webgl/capabilities.js";const D=[0,0];let F=class extends t{constructor(){super(...arguments),this._updatingHandles=new l,this._emptyTilePixelBlock=null,this._tileStrategy=null,this._tileInfoView=null,this._fetchQueue=null,this._blockCacheRegistryUrl=null,this._blockCacheRegistryId=null,this._srcResolutions=[],this.previousLOD=null,this._needBlockCacheUpdate=!1,this._globalSymbolizerParams=null,this._symbolizerParams=null,this._abortController=null,this._isCustomTilingScheme=!1,this._maxIndexedColormapSize=0,this._rasterFunctionState="na",this._globalUpdateRequested=!1,this.attached=!1,this.timeExtent=null,this.refreshDRAFunctionOnce=r(async()=>{const{fullExtent:e,view:t}=this.layerView;if(e?.intersects(t.extent))try{await this._updateDRAStatistics(this._abortController?.signal)&&await this.doRefresh()}catch{}}),this.redrawOrRefetch=r(async(e={})=>{const t=this._rasterFunctionState,i=e.reprocess||"gpu"===t&&!this.canUseWebGLForProcessing||"cpu"===t&&this.canUseWebGLForProcessing;if(i&&(await this._updatingHandles.addPromise(this.layer.updateRasterFunction()),this.updateRasterFunctionParameters()),!this.previousLOD||this.layerView.suspended)return;const s=this._rasterFunctionState,{type:r}=this;return e.refetch||"raster"!==r&&!!i||"cpu"===s||"cpu"===t?this._updatingHandles.addPromise(this.doRefresh()):this._updatingHandles.addPromise(this._redrawImage(e.signal))})}destroy(){this._updatingHandles.destroy()}get canUseWebGLForProcessing(){return!1}get canUseLocalSymbolizerParams(){return(this.canUseWebGLForProcessing||"rasterVF"===this.type)&&!this.layerView.hasTilingEffects}get hasDRAInRasterFunction(){const{rasterFunction:e}=this.layer;return!!e&&JSON.stringify(e,null,0).includes('"dra":true')}get isCPUBasedDRA(){const{renderer:e}=this.layer;return"raster-stretch"===e?.type&&e.dynamicRangeAdjustment&&(!this.canUseWebGLForProcessing||!("min-max"===e.stretchType||"standard-deviation"===e.stretchType))}get useWebGLForProcessing(){return this._get("useWebGLForProcessing")??!0}set useWebGLForProcessing(e){this._set("useWebGLForProcessing",e)}get useProgressiveUpdate(){return this._get("useProgressiveUpdate")??!0}set useProgressiveUpdate(e){if(this._tileStrategy&&this.useProgressiveUpdate!==e){this._tileStrategy.destroy(),this.container.removeAllChildren();const t=this._getCacheSize(e);this._tileStrategy=new U({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._set("useProgressiveUpdate",e),this.layerView.requestUpdate()}}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume();const{extent:t,resolution:i,scale:s}=e.state,r=this._tileInfoView.getClosestInfoForScale(s);if(this.layer.raster){if(!this.useProgressiveUpdate||this._needBlockCacheUpdate){const e=this._srcResolutions[r.level],s="toJSON"in t?t:h.fromJSON(t);d(this._blockCacheRegistryUrl,this._blockCacheRegistryId,s,i,e,this.layer.raster.ioConfig.sampling)}this._needBlockCacheUpdate=!1,this.previousLOD?.level!==r.level&&(this.previousLOD=r,null!=this._symbolizerParams&&this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._tileStrategy.updateCacheSize(0))}}moveEnd(){(this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate)&&(this._abortController&&this._abortController.abort(),this._abortController=new AbortController,0===this._fetchQueue.length&&(this.hasDRAInRasterFunction?(this._globalUpdateRequested=!1,this.refreshDRAFunctionOnce()):this.isCPUBasedDRA&&this._redrawImage(this._abortController.signal).then(()=>{this._globalUpdateRequested=!1,this.layerView.requestUpdate()})));const e=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy.updateCacheSize(e),this.layerView.requestUpdate()}get updating(){return this._globalUpdateRequested||this._updatingHandles?.updating}attach(){const e=v();this._maxIndexedColormapSize=4*(e.maxTextureSize||4096),this._initializeTileInfo(),this._tileInfoView=new P(this.layerView.tileInfo,this.layerView.fullExtent);const t=this._computeFetchConcurrency();this._fetchQueue=new x({tileInfoView:this._tileInfoView,concurrency:t,process:(e,t)=>this._fetchTile(e,t),priority:S.MAPVIEW_FETCH_QUEUE,scheduler:this.scheduler});const i=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy=new U({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:i,tileInfoView:this._tileInfoView}),this._updateBlockCacheRegistry()}detach(){this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null,p(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryUrl=this._blockCacheRegistryId=null}async hitTest(e){const{layer:t}=this;if(!t.loaded||!this.attached)return null;const i=this._locateSourceData(e);if(!i)return null;const{rawPixelData:s,transformGrid:r,tileSize:a}=i;if(!s?.pixelBlock)return null;const{extent:o}=s,n={x:o.width/a.width,y:o.height/a.height},l=m({pos:e,pixelData:s,pixelSize:n,transformGrid:r});if(!l?.value?.length)return null;const h=t.serviceRasterInfo?.storageInfo.isBsqTile,{raster:c}=t,{value:d}=l,p=Array.from({length:Math.min(3,d.length)},(e,t)=>t);if(!u(c)||!this.canUseWebGLForProcessing){const e=h?t.getRawDisplayBandIds()??[0,1,2]:i.bandIds?.length?i.bandIds:p;return this._processHitTestPixelValue(d,e)}const y=await c.processOnePixel(l,s);if(!y?.length)return null;const g=t.bandIds?.length?t.bandIds:p;return this._processHitTestPixelValue(y,g)}acquireTile(e){const t=this.container.createTile(e);return this._updatingHandles.consumePromise(this._enqueueTileFetch(t)),this.layerView.requestUpdate(),this._needBlockCacheUpdate=!0,this._globalUpdateRequested=this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate,t}releaseTile(e){this._fetchQueue.abort(e.key.id),this.container.removeChild(e),e.once("detach",()=>{e.destroy(),this.layerView.requestUpdate()}),this.layerView.requestUpdate()}createEmptyTilePixelBlock(e=null){const t=null==e||e.join(",")===this._tileInfoView.size.join(",");if(t&&null!=this._emptyTilePixelBlock)return this._emptyTilePixelBlock;e=e||this._tileInfoView.size;const[i,s]=e,r=new R({width:i,height:s,pixels:[new Uint8Array(i*s)],mask:new Uint8Array(i*s),pixelType:"u8"});return t&&(this._emptyTilePixelBlock=r),r}_getBandIds(){if(this.container&&(!("rasterFunctionChain"in this.container)||!this.container.rasterFunctionChain))return this.layer.bandIds;const{bandIds:e,raster:t}=this.layer,i="rasterFunction"in t?t.rasterFunction.rawInputBandIds:null;return e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):"rasterFunction"in t?i:e}updateRasterFunctionParameters(){}_fetchTile(e,t){const i=this._getFetchOptions(e.level,t.signal);return this.fetchTile(e,i)}_getFetchOptions(e,t){const{canUseWebGLForProcessing:i}=this,{layerView:s}=this,{tileInfo:r}=s,a=!r.isWrappable&&null!=f(s.view.spatialReference),o=i&&this.layer.raster.hasUniqueSourceStorageInfo,{layer:n}=this.layerView,l=n.serviceRasterInfo?.storageInfo.isBsqTile?n.getRawDisplayBandIds():void 0;return{allowPartialFill:!0,datumTransformation:s.datumTransformation,interpolation:i?"nearest":this.layer.interpolation,registryId:this._blockCacheRegistryId,requestRawData:o,skipRasterFunction:"raster"===this.type&&null!=this.container.rasterFunctionChain,signal:t,srcResolution:this._srcResolutions[e],timeExtent:s.timeExtent,tileInfo:r,bandIds:l,disableWrapAround:a}}_getCacheSize(e){return e?40:0}_initializeTileInfo(){const{layerView:e}=this,t=e.view.spatialReference;if(this._canUseLayerLODs()){const{origin:i,lods:s}=this.layer.tileInfo,r=s.map(({scale:e})=>e),a=I.create({spatialReference:t,size:C,scales:r,origin:i});return e.set("tileInfo",a),void(this._srcResolutions=s.map(({resolution:e})=>({x:e,y:e})))}const{scales:i,srcResolutions:r,isCustomTilingScheme:a}=_(this.layer.serviceRasterInfo,t,{tileSize:C,alignGlobalDatasetWithAGOL:!0,limitToSrcResolution:!1}),o=I.create({spatialReference:t,size:C,scales:i}),n=0===o.origin.x;s(e.fullExtent);const{xmin:l,ymax:h}=e.fullExtent;(n||a&&o.origin.x>l)&&(o.origin=new c({x:l,y:h,spatialReference:t})),this._isCustomTilingScheme=a,e.set("tileInfo",o),this._srcResolutions=r??[]}_canUseLayerLODs(){const{layer:e,layerView:t}=this;if("Map"!==e.raster.tileType)return!1;const{lods:i}=e.tileInfo,s=t.view.constraints?.effectiveLODs;return s?.length===i.length&&s.every(({scale:e},t)=>Math.abs(e-i[t].scale)<.001)}_computeFetchConcurrency(){const{blockBoundary:e}=this.layer.serviceRasterInfo.storageInfo,t=e[e.length-1];return(t.maxCol-t.minCol+1)*(t.maxRow-t.minRow+1)>64?2:10}async _enqueueTileFetch(e,t){if(!this._fetchQueue.has(e.key.id)){try{let t=e.once("detach",()=>t=void 0);const r=await this._fetchQueue.push(e.key),o=this._getBandIds(),n=this.hasDRAInRasterFunction&&u(this.layer.raster)&&!this.layer.raster.processParameters?.stretchCutoff;let l=!this.useProgressiveUpdate||n||this.isCPUBasedDRA&&!this._globalSymbolizerParams;const h=this._globalUpdateRequested&&!this.layerView.moving&&0===this._fetchQueue.length;if(h){if(l=!1,!this.hasDRAInRasterFunction)try{await this._redrawImage(this._abortController?.signal)}catch(s){a(s)&&i.getLogger(this).error(s)}this._globalUpdateRequested=!1}if(!t)return;this.canUseLocalSymbolizerParams&&null==this._symbolizerParams&&this._updateSymbolizerParams();const c=this._tileInfoView.getTileCoords(D,e.key),d=this._tileInfoView.getTileResolution(e.key);await this.updateTileSource(e,{source:r,symbolizerParams:this._symbolizerParams,globalSymbolizerParams:this._globalSymbolizerParams,suspended:l,bandIds:o,coords:c,resolution:d}),t&&(e.once("attach",()=>this.layerView.requestUpdate()),this.container.addChild(e),t.remove()),h&&this.hasDRAInRasterFunction&&u(this.layer.raster)&&!this.layer.raster.processParameters?.extent?.equals(this.layerView.view.extent)&&this.refreshDRAFunctionOnce()}catch(s){a(s)||i.getLogger(this).error(s)}this.layerView.requestUpdate()}}async _updateDRAStatistics(e){if(!u(this.layer.raster))return!1;const t=await this.layer.getDynamicRangeInputRaster();if(!t)return!1;const{raster:i,functionArguments:s}=t,r=this._getFetchOptions(this.previousLOD.level,e),{extent:a,width:o,height:n}=this.layerView.view,{pixelBlock:l}=await i.fetchPixels(a,o,n,{...r,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1}),h=b(s,{rasterInfo:i.rasterInfo,pixelBlock:l});return this.layer.raster.processParameters={stretchCutoff:h,extent:a},!0}_locateSourceData(e){if(!this.layer.loaded||!this.attached)return null;const t=new Map,i=this.container.children.find(i=>{if(!i.visible)return!1;const s="bitmap"in i?i.bitmap?.rawPixelData:i.tileData?.rawPixelData;if(!s?.pixelBlock)return!1;const{key:r}=i,{level:a}=r;if(!t.has(a)){const i=this._tileInfoView.getLODInfoAt(a);if(!i)return!1;const s=Math.floor(i.getColumnForX(e.x)),r=Math.floor(i.getRowForY(e.y));t.set(a,[r,s])}const[o,n]=t.get(a);return o===r.row&&n===r.col});if(null==i)return null;if("tileData"in i){const{rawPixelData:e}=i.tileData;return e?.pixelBlock?{rawPixelData:e,bandIds:[0,1],tileSize:{width:i.width,height:i.height}}:null}const{bandIds:s,rawPixelData:r,transformGrid:a,width:o,height:n}=i.bitmap;return r?.pixelBlock?{rawPixelData:r,bandIds:s,transformGrid:a,tileSize:{width:o,height:n}}:null}_processHitTestPixelValue(e,t){const i=this.layer.serviceRasterInfo?.storageInfo.isBsqTile;let s=i?e:t.map(t=>e[t]);const r=this.layer.serviceRasterInfo?.dataType;return 2===s?.length&&"vector-magdir"===r||"vector-uv"===r?(s=w(s),{pixelValue:s,bandIds:t,isMagnitudeAndDirection:!0}):{pixelValue:s,bandIds:t,isMagnitudeAndDirection:!1}}async _redrawImage(e){if(!this.attached||0===this.container.children.length)return;if(await this.layer.updateRenderer(),this.isCPUBasedDRA?await this._updateGlobalSymbolizerParams(e):(this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._globalSymbolizerParams=null),!this.attached||e?.aborted)return;const t=this.container.children.map(async t=>this.updateTileSymbolizerParameters(t,{local:this._symbolizerParams,global:this._globalSymbolizerParams},e));await Promise.allSettled(t),this.attached&&!e?.aborted&&this.container.requestRender()}async _updateGlobalSymbolizerParams(e){const{fullExtent:t,view:i}=this.layerView;if(!t?.intersects(i.extent))return;const s=this._getFetchOptions(this.previousLOD.level,e),r=await this.layer.fetchPixels(i.extent,i.width,i.height,{...s,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1});if(!r?.pixelBlock)return;const{resolution:a}=this.previousLOD,{isBsqTile:o}=this.layer.raster.rasterInfo.storageInfo,n=o?null:this._getBandIds(),l=this.layer.symbolizer.generateWebGLParameters({pixelBlock:r.pixelBlock.extractBands(n),isGCS:i.spatialReference.isGeographic,resolution:{x:a,y:a},bandIds:n});!this.canUseWebGLForProcessing&&l&&"stretch"===l.type&&"raster-stretch"===this.layer.renderer?.type&&(l.factor=l.factor.map(e=>255*e),l.minOutput=Math.round(255*l.minOutput),l.maxOutput=Math.round(255*l.maxOutput)),this._globalSymbolizerParams=l}_updateSymbolizerParams(){const{resolution:e}=this.previousLOD,t=this._getBandIds();this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null,isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:e,y:e},bandIds:t})}_updateBlockCacheRegistry(e=!1){const{layer:t,layerView:i}=this,{raster:s}=t,{multidimensionalDefinition:r}=t.normalizeRasterFetchOptions({multidimensionalDefinition:t.multidimensionalDefinition,timeExtent:i.timeExtent}),a=s.rasterInfo.multidimensionalInfo?s.getSliceIndex(r):null,o=s.rasterInfo.storageInfo.isBsqTile?t.getRawDisplayBandIds():null,n=u(s)?s.primaryRasters.rasters[0]??s:s,l=y(n.rasterId,a,o);if(l!==this._blockCacheRegistryUrl){null!=this._blockCacheRegistryUrl&&p(this._blockCacheRegistryUrl,this._blockCacheRegistryId);const t=n.rawBlockRegistryIds.indexOf(this._blockCacheRegistryId);if(t>-1&&n.rawBlockRegistryIds.splice(t,1),this._blockCacheRegistryId=g(l,n.rasterInfo),n.rawBlockRegistryIds.push(this._blockCacheRegistryId),e){const{view:e}=i,t=this._tileInfoView.getClosestInfoForScale(e.scale),r=this._srcResolutions[t.level];d(l,this._blockCacheRegistryId,e.extent,e.resolution,r,s.ioConfig.sampling)}this._blockCacheRegistryUrl=l}}async doRefresh(){if(!this.attached||!this.previousLOD||this.layerView.suspended)return;await this._updatingHandles.addPromise(this.layer.updateRenderer()),this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._updateBlockCacheRegistry(!0),this._fetchQueue.reset();const e=[];this._globalUpdateRequested=this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate,this._tileStrategy.refresh(t=>e.push(this._enqueueTileFetch(t))),await this._updatingHandles.addPromise(Promise.allSettled(e))}};e([o()],F.prototype,"_globalUpdateRequested",void 0),e([o()],F.prototype,"attached",void 0),e([o()],F.prototype,"canUseWebGLForProcessing",null),e([o()],F.prototype,"canUseLocalSymbolizerParams",null),e([o()],F.prototype,"hasDRAInRasterFunction",null),e([o()],F.prototype,"isCPUBasedDRA",null),e([o()],F.prototype,"container",void 0),e([o()],F.prototype,"layer",void 0),e([o()],F.prototype,"layerView",void 0),e([o()],F.prototype,"scheduler",void 0),e([o()],F.prototype,"type",void 0),e([o()],F.prototype,"useWebGLForProcessing",null),e([o()],F.prototype,"useProgressiveUpdate",null),e([o()],F.prototype,"timeExtent",void 0),e([o()],F.prototype,"updating",null),F=e([n("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")],F);export{F as BaseImageryTileSubView2D};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{assertIsSome as s}from"../../../../core/maybe.js";import{debounce as r,isAbortError as a}from"../../../../core/promiseUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as l}from"../../../../core/support/UpdatingHandles.js";import h from"../../../../geometry/Extent.js";import c from"../../../../geometry/Point.js";import{isFunctionRaster as u}from"../../../../layers/raster/datasets/datasetUtils.js";import{update as d,unregister as p,getRasterId as y,register as m}from"../../../../layers/raster/datasets/RawBlockCache.js";import{getWorldWidth as g,computeProjectedScales as f}from"../../../../layers/raster/functions/rasterProjectionHelper.js";import{getStretchCutoff as _}from"../../../../layers/raster/functions/stretchUtils.js";import b from"../../../../layers/support/PixelBlock.js";import w from"../../../../layers/support/TileInfo.js";import R from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import P from"../../tiling/TileQueue.js";import I from"../../tiling/TileStrategy.js";import{tileSize as U}from"../../engine/webgl/definitions.js";import{readFromTiledRasterData as C}from"../../../support/rasterHitTestUtils.js";import{TaskPriority as S}from"../../../support/Scheduler.js";import{getWebGLCapabilities as x}from"../../../webgl/capabilities.js";const v=[0,0];let F=class extends t{constructor(){super(...arguments),this._updatingHandles=new l,this._emptyTilePixelBlock=null,this._tileStrategy=null,this._tileInfoView=null,this._fetchQueue=null,this._blockCacheRegistryUrl=null,this._blockCacheRegistryId=null,this._srcResolutions=[],this.previousLOD=null,this._needBlockCacheUpdate=!1,this._globalSymbolizerParams=null,this._symbolizerParams=null,this._abortController=null,this._isCustomTilingScheme=!1,this._maxIndexedColormapSize=0,this._rasterFunctionState="na",this._globalUpdateRequested=!1,this.attached=!1,this.timeExtent=null,this.refreshDRAFunctionOnce=r(async()=>{const{fullExtent:e,view:t}=this.layerView;if(e?.intersects(t.extent))try{await this._updateDRAStatistics(this._abortController?.signal)&&await this.doRefresh()}catch{}}),this.redrawOrRefetch=r(async(e={})=>{const t=this._rasterFunctionState,i=e.reprocess||"gpu"===t&&!this.canUseWebGLForProcessing||"cpu"===t&&this.canUseWebGLForProcessing;if(i&&(await this._updatingHandles.addPromise(this.layer.updateRasterFunction()),this.updateRasterFunctionParameters()),!this.previousLOD||this.layerView.suspended)return;const s=this._rasterFunctionState,{type:r}=this;return e.refetch||"raster"!==r&&!!i||"cpu"===s||"cpu"===t?this._updatingHandles.addPromise(this.doRefresh()):this._updatingHandles.addPromise(this._redrawImage(e.signal))})}destroy(){this._updatingHandles.destroy()}get canUseWebGLForProcessing(){return!1}get canUseLocalSymbolizerParams(){return(this.canUseWebGLForProcessing||"rasterVF"===this.type)&&!this.layerView.hasTilingEffects}get hasDRAInRasterFunction(){const{rasterFunction:e}=this.layer;return!!e&&JSON.stringify(e,null,0).includes('"dra":true')}get isCPUBasedDRA(){const{renderer:e}=this.layer;return"raster-stretch"===e?.type&&e.dynamicRangeAdjustment&&(!this.canUseWebGLForProcessing||!("min-max"===e.stretchType||"standard-deviation"===e.stretchType))}get useWebGLForProcessing(){return this._get("useWebGLForProcessing")??!0}set useWebGLForProcessing(e){this._set("useWebGLForProcessing",e)}get useProgressiveUpdate(){return this._get("useProgressiveUpdate")??!0}set useProgressiveUpdate(e){if(this._tileStrategy&&this.useProgressiveUpdate!==e){this._tileStrategy.destroy(),this.container.removeAllChildren();const t=this._getCacheSize(e);this._tileStrategy=new I({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._set("useProgressiveUpdate",e),this.layerView.requestUpdate()}}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume();const{extent:t,resolution:i,scale:s}=e.state,r=this._tileInfoView.getClosestInfoForScale(s);if(this.layer.raster){if(!this.useProgressiveUpdate||this._needBlockCacheUpdate){const e=this._srcResolutions[r.level],s="toJSON"in t?t:h.fromJSON(t);d(this._blockCacheRegistryUrl,this._blockCacheRegistryId,s,i,e,this.layer.raster.ioConfig.sampling)}this._needBlockCacheUpdate=!1,this.previousLOD?.level!==r.level&&(this.previousLOD=r,null!=this._symbolizerParams&&this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._tileStrategy.updateCacheSize(0))}}moveEnd(){(this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate)&&(this._abortController&&this._abortController.abort(),this._abortController=new AbortController,0===this._fetchQueue.length&&(this.hasDRAInRasterFunction?(this._globalUpdateRequested=!1,this.refreshDRAFunctionOnce()):this.isCPUBasedDRA&&this._redrawImage(this._abortController.signal).then(()=>{this._globalUpdateRequested=!1,this.layerView.requestUpdate()})));const e=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy.updateCacheSize(e),this.layerView.requestUpdate()}get updating(){return this._globalUpdateRequested||this._updatingHandles?.updating}attach(){const e=x();this._maxIndexedColormapSize=4*(e.maxTextureSize||4096),this._initializeTileInfo(),this._tileInfoView=new R(this.layerView.tileInfo,this.layerView.fullExtent);const t=this._computeFetchConcurrency();this._fetchQueue=new P({tileInfoView:this._tileInfoView,concurrency:t,process:(e,t)=>this._fetchTile(e,t),priority:S.MAPVIEW_FETCH_QUEUE,scheduler:this.scheduler});const i=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy=new I({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:i,tileInfoView:this._tileInfoView}),this._updateBlockCacheRegistry()}detach(){this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null,p(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryUrl=this._blockCacheRegistryId=null}async hitTest(e){const t=this._locateSourceData(e);if(!t)return null;const{layer:i}=this,s="vector-field"===i.renderer?.type,r=this.canUseWebGLForProcessing&&u(this.layer.raster);return C({mapPoint:e,layer:i,sourceData:t,processRasterFunction:r,sourceIsUV:s})}acquireTile(e){const t=this.container.createTile(e);return this._updatingHandles.consumePromise(this._enqueueTileFetch(t)),this.layerView.requestUpdate(),this._needBlockCacheUpdate=!0,this._globalUpdateRequested=this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate,t}releaseTile(e){this._fetchQueue.abort(e.key.id),this.container.removeChild(e),e.once("detach",()=>{e.destroy(),this.layerView.requestUpdate()}),this.layerView.requestUpdate()}createEmptyTilePixelBlock(e=null){const t=null==e||e.join(",")===this._tileInfoView.size.join(",");if(t&&null!=this._emptyTilePixelBlock)return this._emptyTilePixelBlock;e=e||this._tileInfoView.size;const[i,s]=e,r=new b({width:i,height:s,pixels:[new Uint8Array(i*s)],mask:new Uint8Array(i*s),pixelType:"u8"});return t&&(this._emptyTilePixelBlock=r),r}_getBandIds(){if(this.container&&(!("rasterFunctionChain"in this.container)||!this.container.rasterFunctionChain))return this.layer.bandIds;const{bandIds:e,raster:t}=this.layer,i="rasterFunction"in t?t.rasterFunction.rawInputBandIds:null;return e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):"rasterFunction"in t?i:e}updateRasterFunctionParameters(){}_fetchTile(e,t){const i=this._getFetchOptions(e.level,t.signal);return this.fetchTile(e,i)}_getFetchOptions(e,t){const{canUseWebGLForProcessing:i}=this,{layerView:s}=this,{tileInfo:r}=s,a=!r.isWrappable&&null!=g(s.view.spatialReference),o=i&&this.layer.raster.hasUniqueSourceStorageInfo,{layer:n}=this.layerView,l=n.serviceRasterInfo?.storageInfo.isBsqTile?n.getRawDisplayBandIds():void 0;return{allowPartialFill:!0,datumTransformation:s.datumTransformation,interpolation:i?"nearest":this.layer.interpolation,registryId:this._blockCacheRegistryId,requestRawData:o,skipRasterFunction:"raster"===this.type&&null!=this.container.rasterFunctionChain,signal:t,srcResolution:this._srcResolutions[e],timeExtent:s.timeExtent,tileInfo:r,bandIds:l,disableWrapAround:a}}_getCacheSize(e){return e?40:0}_initializeTileInfo(){const{layerView:e}=this,t=e.view.spatialReference;if(this._canUseLayerLODs()){const{origin:i,lods:s}=this.layer.tileInfo,r=s.map(({scale:e})=>e),a=w.create({spatialReference:t,size:U,scales:r,origin:i});return e.set("tileInfo",a),void(this._srcResolutions=s.map(({resolution:e})=>({x:e,y:e})))}const{scales:i,srcResolutions:r,isCustomTilingScheme:a}=f(this.layer.serviceRasterInfo,t,{tileSize:U,alignGlobalDatasetWithAGOL:!0,limitToSrcResolution:!1}),o=w.create({spatialReference:t,size:U,scales:i}),n=0===o.origin.x;s(e.fullExtent);const{xmin:l,ymax:h}=e.fullExtent;(n||a&&o.origin.x>l)&&(o.origin=new c({x:l,y:h,spatialReference:t})),this._isCustomTilingScheme=a,e.set("tileInfo",o),this._srcResolutions=r??[]}_canUseLayerLODs(){const{layer:e,layerView:t}=this;if("Map"!==e.raster.tileType)return!1;const{lods:i}=e.tileInfo,s=t.view.constraints?.effectiveLODs;return s?.length===i.length&&s.every(({scale:e},t)=>Math.abs(e-i[t].scale)<.001)}_computeFetchConcurrency(){const{blockBoundary:e}=this.layer.serviceRasterInfo.storageInfo,t=e[e.length-1];return(t.maxCol-t.minCol+1)*(t.maxRow-t.minRow+1)>64?2:10}async _enqueueTileFetch(e,t){if(!this._fetchQueue.has(e.key.id)){try{let t=e.once("detach",()=>t=void 0);const r=await this._fetchQueue.push(e.key),o=this._getBandIds(),n=this.hasDRAInRasterFunction&&u(this.layer.raster)&&!this.layer.raster.processParameters?.stretchCutoff;let l=!this.useProgressiveUpdate||n||this.isCPUBasedDRA&&!this._globalSymbolizerParams;const h=this._globalUpdateRequested&&!this.layerView.moving&&0===this._fetchQueue.length;if(h){if(l=!1,!this.hasDRAInRasterFunction)try{await this._redrawImage(this._abortController?.signal)}catch(s){a(s)&&i.getLogger(this).error(s)}this._globalUpdateRequested=!1}if(!t)return;this.canUseLocalSymbolizerParams&&null==this._symbolizerParams&&this._updateSymbolizerParams();const c=this._tileInfoView.getTileCoords(v,e.key),d=this._tileInfoView.getTileResolution(e.key);await this.updateTileSource(e,{source:r,symbolizerParams:this._symbolizerParams,globalSymbolizerParams:this._globalSymbolizerParams,suspended:l,bandIds:o,coords:c,resolution:d}),t&&(e.once("attach",()=>this.layerView.requestUpdate()),this.container.addChild(e),t.remove()),h&&this.hasDRAInRasterFunction&&u(this.layer.raster)&&!this.layer.raster.processParameters?.extent?.equals(this.layerView.view.extent)&&this.refreshDRAFunctionOnce()}catch(s){a(s)||i.getLogger(this).error(s)}this.layerView.requestUpdate()}}async _updateDRAStatistics(e){if(!u(this.layer.raster))return!1;const t=await this.layer.getDynamicRangeInputRaster();if(!t)return!1;const{raster:i,functionArguments:s}=t,r=this._getFetchOptions(this.previousLOD.level,e),{extent:a,width:o,height:n}=this.layerView.view,{pixelBlock:l}=await i.fetchPixels(a,o,n,{...r,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1}),h=_(s,{rasterInfo:i.rasterInfo,pixelBlock:l});return this.layer.raster.processParameters={stretchCutoff:h,extent:a},!0}_locateSourceData(e){if(!this.layer.loaded||!this.attached)return null;const t=new Map,i=this.container.children.find(i=>{if(!i.visible)return!1;const s="bitmap"in i?i.bitmap?.rawPixelData:i.tileData?.rawPixelData;if(!s?.pixelBlock)return!1;const{key:r}=i,{level:a}=r;if(!t.has(a)){const i=this._tileInfoView.getLODInfoAt(a);if(!i)return!1;const s=Math.floor(i.getColumnForX(e.x)),r=Math.floor(i.getRowForY(e.y));t.set(a,[r,s])}const[o,n]=t.get(a);return o===r.row&&n===r.col});if(null==i)return null;if("tileData"in i){const{rawPixelData:e}=i.tileData;return e?.pixelBlock?{rawPixelData:e,tileSize:{width:i.width,height:i.height}}:null}const{rawPixelData:s,transformGrid:r,width:a,height:o}=i.bitmap;return s?.pixelBlock?{rawPixelData:s,transformGrid:r,tileSize:{width:a,height:o}}:null}async _redrawImage(e){if(!this.attached||0===this.container.children.length)return;if(await this.layer.updateRenderer(),this.isCPUBasedDRA?await this._updateGlobalSymbolizerParams(e):(this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._globalSymbolizerParams=null),!this.attached||e?.aborted)return;const t=this.container.children.map(async t=>this.updateTileSymbolizerParameters(t,{local:this._symbolizerParams,global:this._globalSymbolizerParams},e));await Promise.allSettled(t),this.attached&&!e?.aborted&&this.container.requestRender()}async _updateGlobalSymbolizerParams(e){const{fullExtent:t,view:i}=this.layerView;if(!t?.intersects(i.extent))return;const s=this._getFetchOptions(this.previousLOD.level,e),r=await this.layer.fetchPixels(i.extent,i.width,i.height,{...s,interpolation:"nearest",requestRawData:!1,skipRasterFunction:!1});if(!r?.pixelBlock)return;const{resolution:a}=this.previousLOD,{isBsqTile:o}=this.layer.raster.rasterInfo.storageInfo,n=o?null:this._getBandIds(),l=this.layer.symbolizer.generateWebGLParameters({pixelBlock:r.pixelBlock.extractBands(n),isGCS:i.spatialReference.isGeographic,resolution:{x:a,y:a},bandIds:n});!this.canUseWebGLForProcessing&&l&&"stretch"===l.type&&"raster-stretch"===this.layer.renderer?.type&&(l.factor=l.factor.map(e=>255*e),l.minOutput=Math.round(255*l.minOutput),l.maxOutput=Math.round(255*l.maxOutput)),this._globalSymbolizerParams=l}_updateSymbolizerParams(){const{resolution:e}=this.previousLOD,t=this._getBandIds();this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null,isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:e,y:e},bandIds:t})}_updateBlockCacheRegistry(e=!1){const{layer:t,layerView:i}=this,{raster:s}=t,{multidimensionalDefinition:r}=t.normalizeRasterFetchOptions({multidimensionalDefinition:t.multidimensionalDefinition,timeExtent:i.timeExtent}),a=s.rasterInfo.multidimensionalInfo?s.getSliceIndex(r):null,o=s.rasterInfo.storageInfo.isBsqTile?t.getRawDisplayBandIds():null,n=u(s)?s.primaryRasters.rasters[0]??s:s,l=y(n.rasterId,a,o);if(l!==this._blockCacheRegistryUrl){null!=this._blockCacheRegistryUrl&&p(this._blockCacheRegistryUrl,this._blockCacheRegistryId);const t=n.rawBlockRegistryIds.indexOf(this._blockCacheRegistryId);if(t>-1&&n.rawBlockRegistryIds.splice(t,1),this._blockCacheRegistryId=m(l,n.rasterInfo),n.rawBlockRegistryIds.push(this._blockCacheRegistryId),e){const{view:e}=i,t=this._tileInfoView.getClosestInfoForScale(e.scale),r=this._srcResolutions[t.level];d(l,this._blockCacheRegistryId,e.extent,e.resolution,r,s.ioConfig.sampling)}this._blockCacheRegistryUrl=l}}async doRefresh(){if(!this.attached||!this.previousLOD||this.layerView.suspended)return;await this._updatingHandles.addPromise(this.layer.updateRenderer()),this.canUseLocalSymbolizerParams&&this._updateSymbolizerParams(),this._updateBlockCacheRegistry(!0),this._fetchQueue.reset();const e=[];this._globalUpdateRequested=this.isCPUBasedDRA||this.hasDRAInRasterFunction||!this.useProgressiveUpdate,this._tileStrategy.refresh(t=>e.push(this._enqueueTileFetch(t))),await this._updatingHandles.addPromise(Promise.allSettled(e))}};e([o()],F.prototype,"_globalUpdateRequested",void 0),e([o()],F.prototype,"attached",void 0),e([o()],F.prototype,"canUseWebGLForProcessing",null),e([o()],F.prototype,"canUseLocalSymbolizerParams",null),e([o()],F.prototype,"hasDRAInRasterFunction",null),e([o()],F.prototype,"isCPUBasedDRA",null),e([o()],F.prototype,"container",void 0),e([o()],F.prototype,"layer",void 0),e([o()],F.prototype,"layerView",void 0),e([o()],F.prototype,"scheduler",void 0),e([o()],F.prototype,"type",void 0),e([o()],F.prototype,"useWebGLForProcessing",null),e([o()],F.prototype,"useProgressiveUpdate",null),e([o()],F.prototype,"timeExtent",void 0),e([o()],F.prototype,"updating",null),F=e([n("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")],F);export{F as BaseImageryTileSubView2D};
|
|
@@ -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"../../../../
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{isAbortError as r}from"../../../../core/promiseUtils.js";import{property as a,subclass as s}from"../../../../core/accessorSupport/decorators.js";import{mosaicPixelData as o}from"../../../../layers/raster/functions/pixelUtils.js";import{BitmapContainer as l}from"../../engine/BitmapContainer.js";import{Container as n}from"../../engine/Container.js";import p from"../../engine/ImageryBitmapSource.js";import h from"../support/ExportStrategy.js";import{readFromPixelData as c}from"../../../support/rasterHitTestUtils.js";let g=class extends e{constructor(){super(...arguments),this.attached=!1,this.container=new n,this.updateRequested=!1,this.pixelHighlights=[],this.type="imagery",this._bitmapView=new l}destroy(){this.attached&&(this.detach(),this.attached=!1),this.updateRequested=!1}get updating(){return!this.attached||this.isUpdating()}update(t){this.strategy.update(t).catch(t=>{r(t)||i.getLogger(this).error(t)})}async hitTest(t){let e=null;const{bitmaps:i}=this.strategy;if(1===i.length&&i[0].source)e={extent:i[0].source.extent,pixelBlock:i[0].source.originalPixelBlock};else if(i.length>1){const r=i.map(t=>t.source).find(e=>e.extent&&e.extent.contains(t));r&&(e={extent:r.extent,pixelBlock:r.originalPixelBlock})}return e?.pixelBlock?await c({mapPoint:t,layer:this.layer,pixelData:e}):null}attach(){this.container.addChild(this._bitmapView);const t=this.layer.version>=10,e=this.layer.version>=10.1?this.layer.imageMaxHeight:2048,i=this.layer.version>=10.1?this.layer.imageMaxWidth:2048;this.strategy=new h({container:this._bitmapView,imageNormalizationSupported:t,imageMaxHeight:e,imageMaxWidth:i,fetchSource:this._fetchImage.bind(this),requestUpdate:()=>this.requestUpdate()})}detach(){this.strategy.destroy(),this._bitmapView.removeAllChildren(),this.container.removeAllChildren(),this.updateRequested=!1}redraw(){this.strategy.updateExports(async t=>{const{source:e}=t;if(!e||e instanceof ImageBitmap)return;const i=e.originalPixelBlock??e.pixelBlock,{pixelHighlights:r}=this,a=r.length>0,s=await this.layer.applyRenderer({extent:e.extent,pixelBlock:i,isRawData:a}),o=s.pixelBlock;a&&i&&o&&await this.layer.highlightPixels({pixelBlock:i,renderedPixelBlock:o,highlightOptions:r}),e.filter=t=>this.layer.pixelFilter?this.layer.applyFilter(t):{...s,extent:e.extent}}).catch(t=>{r(t)||i.getLogger(this).error(t)})}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.view.requestUpdate())}isUpdating(){return this.strategy.updating||this.updateRequested}getPixelData(){if(this.updating)return null;const t=this.strategy.bitmaps;if(1===t.length&&t[0].source)return{extent:t[0].source.extent,pixelBlock:t[0].source.originalPixelBlock};if(t.length>1){const e=this.view.extent,i=t.map(t=>t.source).filter(t=>t.extent&&t.extent.intersects(e)).map(t=>({extent:t.extent,pixelBlock:t.originalPixelBlock})),r=o(i,e);return null!=r?{extent:r.extent,pixelBlock:r.pixelBlock}:null}return null}async _fetchImage(t,e,i,r){(r=r||{}).timeExtent=this.timeExtent;const a=this.pixelHighlights.length>0;r.requestAsImageElement=!a,r.returnImageBitmap=!a,r.requestRawData=a;const s=await this.layer.internalFetchImage(t,e,i,r);if(s.imageBitmap)return s.imageBitmap;const o=await this.layer.applyRenderer({...s.pixelData,isRawData:a},{signal:r.signal}),l=s.pixelData.pixelBlock,n=o.pixelBlock;a&&l&&n&&await this.layer.highlightPixels({pixelBlock:l,renderedPixelBlock:n,highlightOptions:this.pixelHighlights});const h=new p(n,o.extent?.clone(),l);return h.filter=t=>this.layer.applyFilter(t),h}};t([a()],g.prototype,"attached",void 0),t([a()],g.prototype,"container",void 0),t([a()],g.prototype,"layer",void 0),t([a()],g.prototype,"strategy",void 0),t([a()],g.prototype,"timeExtent",void 0),t([a()],g.prototype,"view",void 0),t([a()],g.prototype,"updateRequested",void 0),t([a()],g.prototype,"updating",null),t([a()],g.prototype,"pixelHighlights",void 0),t([a()],g.prototype,"type",void 0),g=t([s("esri.views.2d.layers.imagery.ImageryView2D")],g);export{g as default};
|
|
@@ -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"../../../../
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import r from"../../../../core/Logger.js";import{isAbortError as i}from"../../../../core/promiseUtils.js";import{watch as a,syncAndInitial as s}from"../../../../core/reactiveUtils.js";import{property as o,subclass as n}from"../../../../core/accessorSupport/decorators.js";import{load as l,projectExtent as c}from"../../../../layers/raster/functions/rasterProjectionHelper.js";import{snapImageToSymbolTile as m}from"../../../../layers/raster/functions/vectorFieldUtils.js";import{RasterVFContainer as h}from"../../engine/imagery/RasterVFContainer.js";import p from"./ImageryVFStrategy.js";import{readFromPixelData as x}from"../../../support/rasterHitTestUtils.js";let y=class extends e{constructor(){super(...arguments),this.attached=!1,this.container=new h,this.type="imageryVF",this._dataParameters={exportParametersVersion:0,bbox:"",symbolTileSize:0,time:""},this._fetchpixels=async(t,e,r,i)=>{const a=await this._projectFullExtentPromise,{layer:s}=this,{symbolTileSize:o}=s.renderer,{extent:n,width:l,height:c}=m(t,e,r,o,a);if(null!=a&&!a.intersects(t))return{extent:n,pixelBlock:null};const h={bbox:`${n.xmin}, ${n.ymin}, ${n.xmax}, ${n.ymax}`,exportParametersVersion:s.exportImageServiceParameters.version,symbolTileSize:o,time:JSON.stringify(this.timeExtent||"")};if(this._canReuseVectorFieldData(h)){const t=this.container.children[0]?.rawPixelData;if(null!=t){if(`${t.extent.xmin}, ${t.extent.ymin}, ${t.extent.xmax}, ${t.extent.ymax}`===h.bbox)return t}}const{pixelBlock:p}=await s.fetchPixels(n,l,c,{timeExtent:this.timeExtent,interpolation:s.interpolation,signal:i});if(this._dataParameters=h,null==p)return{extent:n,pixelBlock:null};const{dataType:x}=s.rasterInfo;return{extent:n,pixelBlock:p,magdirData:await s.sampleVectorFieldData({pixelBlock:p,srcDataType:x,tileSize:o},{signal:i})}}}get updating(){return!this.attached||this._strategy.updating}attach(){this._projectFullExtentPromise=this._getProjectedFullExtent(this.view.spatialReference),this._strategy=new p({container:this.container,fetchPixels:this._fetchpixels}),this.addHandles(a(()=>this.layer.renderer,t=>this._updateSymbolizerParams(t),s),"attach")}detach(){this._strategy.destroy(),this.container.children.forEach(t=>t.destroy()),this.container.removeAllChildren(),this.removeHandles("attach"),this._strategy=this.container=this._projectFullExtentPromise=null}getPixelData(){const t=this.container.children[0]?.rawPixelData;if(this.updating||!t)return null;const{extent:e,pixelBlock:r}=t;return{extent:e,pixelBlock:r}}async hitTest(t){const e=this.container.children[0]?.rawPixelData;return e?await x({mapPoint:t,layer:this.layer,pixelData:e}):null}update(t){this._strategy.update(t,this._symbolizerParams).catch(t=>{i(t)||r.getLogger(this).error(t)})}redraw(){const{renderer:t}=this.layer;t&&(this._updateSymbolizerParams(t),this._strategy.redraw(this._symbolizerParams))}_canReuseVectorFieldData(t){const e=this._dataParameters.exportParametersVersion===t.exportParametersVersion,r=this._dataParameters.time===t.time,i=this._dataParameters.symbolTileSize===t.symbolTileSize,a=this._dataParameters.bbox===t.bbox;return e&&r&&i&&a}async _getProjectedFullExtent(t){try{return await l(),c(this.layer.fullExtent,t)}catch{return null}}_updateSymbolizerParams(t){"vector-field"===t?.type&&(this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null}))}};t([o()],y.prototype,"attached",void 0),t([o()],y.prototype,"container",void 0),t([o()],y.prototype,"layer",void 0),t([o()],y.prototype,"timeExtent",void 0),t([o()],y.prototype,"type",void 0),t([o()],y.prototype,"view",void 0),t([o()],y.prototype,"updating",null),y=t([n("esri.views.2d.layers.imagery.VectorFieldView2D")],y);export{y as default};
|
|
@@ -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/Accessor.js";import{equals as r}from"../../core/arrayUtils.js";import o from"../../core/Collection.js";import s from"../../core/Error.js";import i from"../../core/Logger.js";import{mapCollection as n}from"../../core/mapCollectionUtils.js";import{watch as
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Accessor.js";import{equals as r}from"../../core/arrayUtils.js";import o from"../../core/Collection.js";import s from"../../core/Error.js";import i from"../../core/Logger.js";import{mapCollection as n}from"../../core/mapCollectionUtils.js";import{isPromiseLike as a}from"../../core/promiseUtils.js";import{watch as l,initial as m}from"../../core/reactiveUtils.js";import{convertToSpatialReferenceUnit as c,convertFromSpatialReferenceUnit as p}from"../../core/units.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{create as h}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as f}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import{getReferenceEllipsoid as y}from"../../geometry/ellipsoidUtils.js";import w from"../../geometry/Point.js";import{project as v}from"../../geometry/projectionUtils.js";import{execute as j}from"../../geometry/operators/gx/operatorDensify.js";import{fromPolygon as _,toPolygon as A}from"../../geometry/operators/support/apiConverter.js";import{computeTranslationToOriginAndRotation as x}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{earth as R}from"../../geometry/support/Ellipsoid.js";import{t as M}from"../../chunks/vec3.js";import{ElevationContext as N}from"./layers/graphics/ElevationContext.js";import{extrudePolygon as U}from"./layers/graphics/extrudeUtils.js";import{computeCentroid as b}from"./layers/graphics/graphicUtils.js";import{polygonToRenderInfoElevationAligned as H}from"./support/renderInfoUtils/polygon.js";import{FocusAreaColorNode as C}from"./webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{FocusAreaMaskNode as V}from"./webgl-engine/effects/focusArea/FocusAreaMaskNode.js";import{FocusAreaOutlineItem as k}from"./webgl-engine/effects/focusArea/FocusAreaOutlineItem.js";const O=2e4;let q=class extends t{get updating(){return this._updatingHandles.updating||!!this._outlineMap?.some(e=>e.updating)}constructor(e){super(e),this._updatingHandles=new g,this._elevationContext=new N,this._previousVolumes=new Map,this._outlineMap=new o}initialize(){this.addHandles([l(()=>({volumes:this.volumes,ready:this.view.groundView?.ready}),({volumes:e,ready:t})=>{this._previousVolumes=e,t&&(0!==e.size&&this._maskRenderNode?.updateGeometries(),this._ensureRenderNodes())},m)]),this._outlineMap=n(()=>this.areas?.areas,e=>new k({area:e,view:this.view}),{recycleItems:!0})}destroy(){this.removeAllHandles(),this._outlineMap.destroy(),this._updatingHandles.destroy()}get areas(){return this.view.map?.focusAreas}get enabledAreas(){return this.areas?.areas.toArray().filter(({enabled:e})=>e)??[]}get style(){return this.areas?.style??"bright"}get polygons(){return this.enabledAreas.reduce((e,t)=>e.concat(t.geometries.toArray()),new Array)}containsGeometry(e){if(0===this.polygons.length)return!0;const t=new w(e);return this.polygons.some(e=>e.contains(t))}get volumes(){const e=this.polygons,t=this._previousVolumes;if(!this.view.renderCoordsHelper||r(Array.from(t?.keys()??[]),e))return t??new Map;const o=this.view.renderCoordsHelper,n=f(),l=1===o.viewingMode,m=h(),u=h(),d=this.view.spatialReference,g=y(d).radius/R.radius,w=c(5e5*g,"meters",d,!0);l||o.worldUpAtPosition([0,0,0],n);const N=new Map;for(const r of e){const e=t?.get(r);if(e)N.set(r,e);else try{const e=d.equals(r.spatialReference)?r:v(r,d),t=Math.max(e.extent.width,e.extent.height),s=p(t,d,"meters",!0),i=Math.max(5*s,O*g),c=l?g/10:g,h=this._reduceGeometryHeight(e,i,c),f=b(h);if(null==f)continue;const y=_(h),R=j(y,w,0,0),C=A(R,d);if(null==C)continue;const V=H(C,this.view.elevationProvider,o,this._elevationContext,{outlineOutput:"tessellated-indices"});if(a(V)){this._updatingHandles.consumePromise(V);continue}if(null==V||0===V.polygonIndexCount)continue;x(d,[f.x,f.y,0],m,o.spatialReference),u[12]=-m[12],u[13]=-m[13],u[14]=-m[14];const k=U(V,{height:i,worldUp:n,spherical:l,requireElevation:!1,requireNormals:!1,requireSizes:!1});if(null==k)continue;M(k.vertices,k.vertices,u);const q=new F(k.vertices,k.bottomIndices,k.indices,i),I=new E(q,[m[12],m[13],m[14]]);N.set(r,I)}catch(C){i.getLogger(this).error(new s("focusareasview:projection-failed","Failed to project focus area geometry to view spatial reference",{geometry:r,error:C}))}}return N}_ensureRenderNodes(){if(this.view.stage)if(0===this.volumes.size){const{_maskRenderNode:e,_colorRenderNode:t}=this;this._maskRenderNode=this._colorRenderNode=null,t?.fadeOut(()=>{e?.destroy(),t?.destroy()})}else this._maskRenderNode??=new V({focusAreasView:this}),this._colorRenderNode??=new C({focusAreasView:this}),this.view.stage.renderView.requestRender()}_reduceGeometryHeight(e,t,r){const o=-12e5*r,s=Math.max(-t/2,o),i=e.rings.map(e=>e.map(e=>[e[0],e[1],s])),n=e.clone();return n.rings=i,n.hasZ=!0,n}};e([u()],q.prototype,"updating",null),e([u({readOnly:!0})],q.prototype,"volumes",null),e([u({constructOnly:!0})],q.prototype,"view",void 0),q=e([d("esri.views.3d.FocusAreasView")],q);class E{constructor(e,t){this.geometryVolume=e,this.origin=t}}class F{constructor(e,t,r,o){this.positions=e,this.indicesBottom=t,this.indicesExtruded=r,this.height=o}}export{q as FocusAreasView};
|
|
@@ -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/Accessor.js";import{destroyHandle as a}from"../../../../../core/handleUtils.js";import{watch as s,sync as r}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{destroyHandle as a}from"../../../../../core/handleUtils.js";import{watch as s,sync as r}from"../../../../../core/reactiveUtils.js";import{property as o,subclass as i}from"../../../../../core/accessorSupport/decorators.js";import{MeasurementData as n}from"./MeasurementData.js";const l={maxRelativeErrorCoplanar:.005,maxRelativeErrorAlmostCoplanar:.01,verticalAngleThreshold:80};let p=class extends e{get updating(){return this.analysisViewData.measurementData?.updating??!1}constructor(t){super(t)}initialize(){const{view:t}=this,e=new n({view:t,fittingSettings:l});this.analysisViewData.measurementData=e;const o=()=>this._update(e);this.addHandles([this.analysisViewData.path.on("change",o),s(()=>{const{stagedPoint:t,mode:e}=this.analysisViewData;return[t,e]},o,r),a(e)]),o()}_update(t){const{analysisViewData:e}=this;t.update(e.path,e.stagedPoint,e.mode)}};t([o({constructOnly:!0})],p.prototype,"view",void 0),t([o({constructOnly:!0})],p.prototype,"analysis",void 0),t([o({constructOnly:!0})],p.prototype,"analysisViewData",void 0),t([o()],p.prototype,"updating",null),p=t([i("esri.views.3d.analysis.AreaMeasurement.support.AreaMeasurementController")],p);export{p as AreaMeasurementController};
|
|
@@ -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/Accessor.js";import{resizeFilled as r}from"../../../../../core/arrayUtils.js";import{deg2rad as o}from"../../../../../core/mathUtils.js";import{abortMaybe as s}from"../../../../../core/maybe.js";import{debounce as i,throwIfAborted as n}from"../../../../../core/promiseUtils.js";import{valueInUnit as a}from"../../../../../core/quantity.js";import{lengthUnitFromSpatialReference as l,areaUnitFromSpatialReference as d}from"../../../../../core/units.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import{e as m}from"../../../../../chunks/earcut.js";import{set as c}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as _,set as g,cross as f,subtract as P,dot as j,scale as x,add as v}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as C}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import y from"../../../../../geometry/Polygon.js";import R from"../../../../../geometry/SpatialReference.js";import{isPCPF as U}from"../../../../../geometry/spatialReferenceEllipsoidUtils.js";import{i as W,e as M}from"../../../../../chunks/simplifyOperator.js";import{projectDirection as D}from"../../../../../geometry/projection/projectDirection.js";import{projectPointToVector as A}from"../../../../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as V}from"../../../../../geometry/projection/projectVectorToVector.js";import{compactIndices as b}from"../../../../../geometry/support/Indices.js";import{Sphere as F}from"../../../../../geometry/support/sphere.js";import{triangulate as S}from"../../../../../geometry/support/triangulationUtilsDeprecated.js";import{bestFitPlane as I,planePointDistance as T,boundingSphere as O}from"../../support/measurementUtils.js";import{getElevationAtPoint as k}from"../../../support/ElevationProvider.js";import{midpoint3d as z,makeOrthonormal as q}from"../../../support/mathUtils.js";import{flatten2DVertexDataToArray as E}from"../../../../support/euclideanAreaMeasurementUtils.js";import{computeEuclideanMeasurementSR as H}from"../../../../support/measurementUtils.js";import{MeasurementWorkerHandle as L}from"../../../../support/MeasurementWorkerHandle.js";import{autoMeasurementMode as B}from"../../../../support/measurementWorkerUtils.js";class G{constructor(t){this.positionsWorld=[],this.positionsRender=[],this.positionsFittedRender=[],this.positionsFittedRenderComplex=[],this.positionsFittedWorldPlaneProjectedComplex=[],this.triangleIndices=null,this.areaPolygon=new y({rings:[[]],spatialReference:t}),this.positionsFittedWorldPlaneProjected=this.areaPolygon.rings[0],this.trianglePositions=this.positionsFittedRender,this.triangleUvs=this.positionsFittedWorldPlaneProjected}}class Z{constructor(t,e=null,r=null,o=null,s=null,i=null,n=null){this.mode=t,this.area=e,this.geodesicArea=r,this.perimeter=o,this.geodesicPerimeter=s,this.areaCentroidRenderCoords=i,this.geodesicAreaCentroidRenderCoords=n}}let J=class extends e{get numVertices(){return this._length}get hasStagedVertex(){return null!=this._lastCursorPoint}get fittingMode(){return this._fittingMode}get measurements(){return this._measurements}get updateId(){return this._updateId}constructor(t){super(t),this._length=0,this._lastCursorPoint=null,this._fittingMode=null,this._measurements=null,this._updateId=0,this._centroidRenderCoords=w(),this._planeWorldCoords=C(),this._worldUp=w(),this._worldTangent=w(),this._frame=[w(),w(),w()],this._worldOrigin=w(),this._updateAxisU=w(),this._updateAxisV=w(),this._updateWorldOrigin=w(),this._lastPathVersion=-1,this._mode=null,this._tempU=w(),this._tempV=w(),this._tempVec3=w(),this._tempSphere=new F,this._measurementWorker=new L({preloadGeodetic:!0}),this._updateAbortController=null,this._updateMeasurements=i(async(t,e,r,o,s,i)=>{const a=t.spatialReference,l=0===B(a);_(this._updateAxisU,this._frame[0]),_(this._updateAxisV,this._frame[1]),_(this._updateWorldOrigin,this._worldOrigin);const d=(e,r)=>(e&&t.renderCoordsHelper.toRenderCoords(e,r)||g(r,0,0,0),r),h=e.areaMeasurement?.geometry,p=l&&1!==r&&h?await this._measurementWorker.geodeticLength(h,{stagedPoint:o?s:null}):null;n(i);const m=this._calculateMode(r,p),c="geodesic"===m,[u,f]=await Promise.all([c?null:this._measurementWorker.area2D(this.vertexData.areaPolygon,{unit:this._areaMeasurementUnit,lengthUnit:this._lengthMeasurementUnit,returnCentroid:!0,returnLength:!0}),c&&h?await this._measurementWorker.geodeticArea(h,{stagedPoint:o?s:null,returnCentroid:!0}):null]);n(i);const P=c?null:w();P&&u?.centroid&&this._projectWorldPlaneProjectedPointToRender(P,this._updateWorldOrigin,[u.centroid?.x??0,u.centroid?.y??0],this._updateAxisU,this._updateAxisV,this.view.renderSpatialReference,this._measurementSR);const j=f?.centroid?d(f.centroid,w()):null;this._measurements=new Z(m,c?null:u?.area,c?f?.area:null,c?null:u?.length,c?p:null,c?null:P,c?j:null)});const e=H(t.view.spatialReference);this._measurementSR=e,this._lengthMeasurementUnit=l(e)??"meters",this._areaMeasurementUnit=d(e)??"square-meters";const r=U(e)?R.WebMercator:e;this.vertexData=new G(r)}destroy(){this._measurementWorker.destroy()}update(t,e,r,o,s,i,n){const a=this._lastPathVersion===t.version,l=e?e.equals(this._lastCursorPoint):null==this._lastCursorPoint,d=this._mode===s;return!(a&&!i&&d&&l)&&(this._lastPathVersion=t.version,this._lastCursorPoint=e,this._update(t,e,r,o,s,n),!0)}_update(t,e,r,o,i,n){const a=this.view.renderSpatialReference,l=this._measurementSR;let d=t.numVertices;const h=!(null==e||e.equals(t.lastPoint)||d>2&&e.equals(t.firstPoint)||t.polygonIsClosed);h&&(d+=1);const p=!t.polygonIsClosed&&d>2,m=t.polygonIsClosed||p;this._resize(d);const{positionsWorld:c,positionsRender:u}=this.vertexData,_=(t,e)=>{K(r.elevationProvider,t),A(t,c[e],l),A(t,u[e],a)};if(t.forEachVertexPosition((t,e)=>_(t,e)),h&&_(e,d-1),this.vertexData.areaPolygon.clearCache(),!m)return this._measurements=null,this.vertexData.triangleIndices=null,this._updateId++,void(this._updateAbortController=s(this._updateAbortController));this._updateVertexData(r,a,l,o),this._updateId++,this._updateAbortController??=new AbortController,n.consumePromise(this._updateMeasurements(r,t,i,h,e,this._updateAbortController.signal))}_resize(t){const{positionsWorld:e,positionsRender:o,positionsFittedWorldPlaneProjected:s,positionsFittedRender:i}=this.vertexData;r(e,t,w),r(o,t,w),r(s,t,u),r(i,t,w),this._length=t}_updateVertexData(t,e,r,o){const s=t.renderCoordsHelper,{positionsWorld:i,positionsRender:n}=this.vertexData,a=this._planeWorldCoords,l=this._centroidRenderCoords;z(n,l),s.worldUpAtPosition(l,this._worldUp),s.worldBasisAtPosition(l,0,this._worldTangent),D(l,this._worldUp,e,this._worldUp,r),D(l,this._worldTangent,e,this._worldTangent,r),i.length>2&&I(i,a),this._fittingMode=this._selectFittingMode(a,i,this._worldUp,o);let d=0;if("horizontal"===this._fittingMode){let t=-1/0;n.forEach((e,r)=>{const o=s.getAltitude(n[r]);o>t&&(t=o,d=r)})}const{_worldOrigin:h}=this;_(this._worldOrigin,i[d]);let p=a,m=this._worldTangent;"horizontal"===this._fittingMode?p=this._worldUp:"vertical"===this._fittingMode&&(p=this._tempVec3,m=this._worldUp,q(a,this._worldUp,p));const u=this._frame[0],g=this._frame[1];_(this._frame[2],p),q(m,p,u),f(g,u,this._frame[2]);const{positionsFittedRender:x,positionsFittedWorldPlaneProjected:v}=this.vertexData,w=this._tempVec3;for(let _=0;_<this._length;++_){const t=v[_],o=x[_];P(w,i[_],h),c(t,j(u,w),j(g,w)),this._projectWorldPlaneProjectedPointToRender(o,h,t,u,g,e,r)}this._triangulate(new Q(h,u,g,e,r))}_triangulate(t){!W(this.vertexData.areaPolygon)&&this._triangulateComplexPolygon(t)||this._triangulateSimplePolygon()}_triangulateSimplePolygon(){const{positionsFittedWorldPlaneProjected:t}=this.vertexData;this.vertexData.triangleIndices=b(m(E(t),[],2)),this.vertexData.trianglePositions=this.vertexData.positionsFittedRender,this.vertexData.triangleUvs=t,this.vertexData.positionsFittedWorldPlaneProjectedComplex.length=0,this.vertexData.positionsFittedRenderComplex.length=0}_triangulateComplexPolygon({worldOrigin:t,axisU:e,axisV:o,renderSR:s,worldSR:i}){const{positionsFittedWorldPlaneProjectedComplex:n,positionsFittedRenderComplex:a,areaPolygon:l}=this.vertexData,d=M(l);if(!d)return!1;const{position:h,faces:p}=S(d),m=h.length/3;r(n,m,u),r(a,m,w);for(let r=0,u=0;r<h.length;r+=3,u++){const l=n[u];c(l,h[r],h[r+1]);const d=a[u];this._projectWorldPlaneProjectedPointToRender(d,t,l,e,o,s,i)}return this.vertexData.triangleIndices=p,this.vertexData.trianglePositions=a,this.vertexData.triangleUvs=n,!0}_projectWorldPlaneProjectedPointToRender(t,e,r,o,s,i,n){const a=this._tempU,l=this._tempV;x(a,o,r[0]),x(l,s,r[1]),v(t,a,l),v(t,t,e),V(t,n,t,i)}_selectFittingMode(t,e,r,s){const i=e.map(e=>Math.abs(T(t,e))).reduce((t,e)=>Math.max(t,e),0);O(e,this._tempSphere);const n=i/(2*this._tempSphere.radius),a=n<s.maxRelativeErrorCoplanar,l=n<s.maxRelativeErrorAlmostCoplanar;let d="horizontal";if(a)d="oblique";else if(l){d=Math.abs(j(r,t))>Math.cos(o(s.verticalAngleThreshold))?"horizontal":"vertical"}return d}_calculateMode(t,e){return null!=e&&0===t?a(e,"meters")>N?"geodesic":"euclidean":null==e||1===t?"euclidean":"geodesic"}};function K(t,e){e.hasZ||(e.z=k(t,e,"ground")??0)}t([h()],J.prototype,"_measurements",void 0),t([h()],J.prototype,"_updateId",void 0),t([h()],J.prototype,"view",void 0),J=t([p("esri.views.3d.analysis.AreaMeasurement.support.MeasurementData")],J);const N=1e5;class Q{constructor(t,e,r,o,s){this.worldOrigin=t,this.axisU=e,this.axisV=r,this.renderSR=o,this.worldSR=s}}export{Z as AreaMeasurementQuantities,J as MeasurementData};
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../../core/Accessor.js";import{resizeFilled as r}from"../../../../../core/arrayUtils.js";import{deg2rad as s}from"../../../../../core/mathUtils.js";import{abortMaybe as i}from"../../../../../core/maybe.js";import{debounce as o,throwIfAborted as n,isPromiseLike as a}from"../../../../../core/promiseUtils.js";import{valueInUnit as l}from"../../../../../core/quantity.js";import{lengthUnitFromSpatialReference as d,areaUnitFromSpatialReference as h}from"../../../../../core/units.js";import{property as p}from"../../../../../core/accessorSupport/decorators/property.js";import{subclass as u}from"../../../../../core/accessorSupport/decorators/subclass.js";import{set as c}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as m}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{copy as _,set as g,cross as f,subtract as P,dot as j,scale as y,add as v}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as w}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as R}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{UpdatingHandles as x}from"../../../../../core/support/UpdatingHandles.js";import U from"../../../../../geometry/Polygon.js";import C from"../../../../../geometry/SpatialReference.js";import{isPCPF as A}from"../../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectDirection as S}from"../../../../../geometry/projection/projectDirection.js";import{projectPointToVector as M}from"../../../../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as W}from"../../../../../geometry/projection/projectVectorToVector.js";import{Sphere as V}from"../../../../../geometry/support/sphere.js";import{bestFitPlane as b,planePointDistance as D,boundingSphere as T}from"../../support/measurementUtils.js";import{getElevationAtPoint as I}from"../../../support/ElevationProvider.js";import{midpoint3d as L,makeOrthonormal as F}from"../../../support/mathUtils.js";import{polygonToRenderInfoNotElevationAligned as O}from"../../../support/renderInfoUtils/polygon.js";import{computeEuclideanMeasurementSR as H}from"../../../../support/measurementUtils.js";import{MeasurementWorkerHandle as k}from"../../../../support/MeasurementWorkerHandle.js";import{autoMeasurementMode as z}from"../../../../support/measurementWorkerUtils.js";class q{constructor(t){this.positionsWorld=[],this.positionsRender=[],this.positionsFittedRender=[],this.triangleIndices=null,this.areaPolygon=new U({rings:[[]],spatialReference:t}),this.positionsFittedWorldPlaneProjected=this.areaPolygon.rings[0],this.trianglePositions=this.positionsFittedRender,this.triangleUvs=this.positionsFittedWorldPlaneProjected}}class E{constructor(t,e=null,r=null,s=null,i=null,o=null,n=null){this.mode=t,this.area=e,this.geodesicArea=r,this.perimeter=s,this.geodesicPerimeter=i,this.areaCentroidRenderCoords=o,this.geodesicAreaCentroidRenderCoords=n}}let B=class extends e{get numVertices(){return this._length}get hasStagedVertex(){return null!=this._lastCursorPoint}get fittingMode(){return this._fittingMode}get measurements(){return this._measurements}get updating(){return this._updatingHandles.updating}get renderSpatialReference(){return this.view.renderSpatialReference}get updateId(){return this._updateId}constructor(t){super(t),this._length=0,this._lastCursorPoint=null,this._lastPath=null,this._lastPathVersion=-1,this._lastMode=null,this._updatingHandles=new x,this._fittingMode=null,this._measurements=null,this._updateId=0,this._centroidRenderCoords=w(),this._planeWorldCoords=R(),this._worldUp=w(),this._worldTangent=w(),this._frame=[w(),w(),w()],this._worldOrigin=w(),this._updateAxisU=w(),this._updateAxisV=w(),this._updateWorldOrigin=w(),this._tempU=w(),this._tempV=w(),this._tempVec3=w(),this._tempSphere=new V,this._measurementWorker=new k({preloadGeodetic:!0}),this._retryAfterLoadScheduled=!1,this._updateAbortController=null,this._retryAfterTessellationLoad=()=>{if(this._retryAfterLoadScheduled=!1,this.destroyed)return;const t=this._lastPath,e=this._lastCursorPoint,r=this._lastMode;t&&null!=r&&this._update(t,e,r)},this._updateMeasurements=o(async(t,e,r,s,i)=>{const o=this.view.spatialReference,a=0===z(o);_(this._updateAxisU,this._frame[0]),_(this._updateAxisV,this._frame[1]),_(this._updateWorldOrigin,this._worldOrigin);const l=(t,e)=>(t&&this.view.renderCoordsHelper.toRenderCoords(t,e)||g(e,0,0,0),e),d=t.areaMeasurement?.geometry,h=a&&1!==e&&d?await this._measurementWorker.geodeticLength(d,{stagedPoint:r?s:null}):null;n(i);const p=this._calculateMode(e,h),u="geodesic"===p,[c,m]=await Promise.all([u?null:this._measurementWorker.area2D(this.vertexData.areaPolygon,{unit:this._areaMeasurementUnit,lengthUnit:this._lengthMeasurementUnit,returnCentroid:!0,returnLength:!0}),u&&d?await this._measurementWorker.geodeticArea(d,{stagedPoint:r?s:null,returnCentroid:!0}):null]);n(i);const f=u?null:w();f&&c?.centroid&&this._projectWorldPlaneProjectedPointToRender(f,this._updateWorldOrigin,[c.centroid?.x??0,c.centroid?.y??0],this._updateAxisU,this._updateAxisV,this.view.renderSpatialReference,this._measurementSR);const P=m?.centroid?l(m.centroid,w()):null;this._measurements=new E(p,u?null:c?.area,u?m?.area:null,u?null:c?.length,u?h:null,u?null:f,u?P:null)});const e=H(t.view.spatialReference);this._measurementSR=e,this._lengthMeasurementUnit=d(e)??"meters",this._areaMeasurementUnit=h(e)??"square-meters";const r=A(e)?C.WebMercator:e;this.vertexData=new q(r)}destroy(){this._measurementWorker.destroy(),this._updatingHandles.destroy()}update(t,e,r){const s=this._lastPathVersion===t.version,i=e?e.equals(this._lastCursorPoint):null==this._lastCursorPoint,o=this._lastMode===r;return!(s&&o&&i)&&(this._lastPath=t,this._lastPathVersion=t.version,this._lastCursorPoint=e,this._lastMode=r,this._update(t,e,r),!0)}_scheduleRetryAfterTessellationLoad(t){this._retryAfterLoadScheduled||(this._retryAfterLoadScheduled=!0,this._updatingHandles.consumePromise(t.then(()=>this._retryAfterTessellationLoad(),()=>{this._retryAfterLoadScheduled=!1})))}_update(t,e,r){const s=this._measurementSR;let o=t.numVertices;const n=!(null==e||e.equals(t.lastPoint)||o>2&&e.equals(t.firstPoint)||t.polygonIsClosed);n&&(o+=1);const a=!t.polygonIsClosed&&o>2,l=t.polygonIsClosed||a;this._resize(o);const{positionsWorld:d,positionsRender:h}=this.vertexData,p=(t,e)=>{G(this.view.elevationProvider,t),M(t,d[e],s),M(t,h[e],this.renderSpatialReference)};if(t.forEachVertexPosition((t,e)=>p(t,e)),n&&p(e,o-1),this.vertexData.areaPolygon.clearCache(),!l)return this._measurements=null,this.vertexData.triangleIndices=null,this._updateId++,void(this._updateAbortController=i(this._updateAbortController));this._updateVertexData()&&(this._updateId++,this._updateAbortController??=new AbortController,this._updatingHandles.consumePromise(this._updateMeasurements(t,r,n,e,this._updateAbortController.signal)))}_resize(t){const{positionsWorld:e,positionsRender:s,positionsFittedWorldPlaneProjected:i,positionsFittedRender:o}=this.vertexData;r(e,t,w),r(s,t,w),r(i,t,m),r(o,t,w),this._length=t}_updateVertexData(){const t=this._measurementSR,e=this.view.renderCoordsHelper,{positionsWorld:r,positionsRender:s}=this.vertexData,i=this._planeWorldCoords,o=this._centroidRenderCoords;L(s,o),e.worldUpAtPosition(o,this._worldUp),e.worldBasisAtPosition(o,0,this._worldTangent),S(o,this._worldUp,this.renderSpatialReference,this._worldUp,t),S(o,this._worldTangent,this.renderSpatialReference,this._worldTangent,t),r.length>2&&b(r,i),this._fittingMode=this._selectFittingMode(i,r,this._worldUp,this.fittingSettings);let n=0;if("horizontal"===this._fittingMode){let t=-1/0;s.forEach((r,i)=>{const o=e.getAltitude(s[i]);o>t&&(t=o,n=i)})}const{_worldOrigin:a}=this;_(this._worldOrigin,r[n]);let l=i,d=this._worldTangent;"horizontal"===this._fittingMode?l=this._worldUp:"vertical"===this._fittingMode&&(l=this._tempVec3,d=this._worldUp,F(i,this._worldUp,l));const h=this._frame[0],p=this._frame[1];_(this._frame[2],l),F(d,l,h),f(p,h,this._frame[2]);const{positionsFittedRender:u,positionsFittedWorldPlaneProjected:m}=this.vertexData,g=this._tempVec3;for(let _=0;_<this._length;++_){const e=m[_],s=u[_];P(g,r[_],a),c(e,j(h,g),j(p,g)),this._projectWorldPlaneProjectedPointToRender(s,a,e,h,p,this.renderSpatialReference,t)}return this._triangulate(new J(a,h,p,this.renderSpatialReference,t))}_triangulate(t){const{worldOrigin:e,axisU:s,axisV:i,renderSR:o,worldSR:n}=t,{areaPolygon:l}=this.vertexData,d=O(l);if(a(d))return this._scheduleRetryAfterTessellationLoad(d),!1;const h=d;if(null==h)return!0;const{positions:p,polygonIndices:u,vertexCount:_}=h,g=[],f=[];r(f,_,w),r(g,_,m);for(let r=0,a=0;r<p.length;r+=3,a++){const t=f[a],l=g[a];c(l,p[r],p[r+1]),this._projectWorldPlaneProjectedPointToRender(t,e,l,s,i,o,n)}return this.vertexData.trianglePositions=f,this.vertexData.triangleIndices=u,this.vertexData.triangleUvs=g,!0}_projectWorldPlaneProjectedPointToRender(t,e,r,s,i,o,n){const a=this._tempU,l=this._tempV;y(a,s,r[0]),y(l,i,r[1]),v(t,a,l),v(t,t,e),W(t,n,t,o)}_selectFittingMode(t,e,r,i){const o=e.map(e=>Math.abs(D(t,e))).reduce((t,e)=>Math.max(t,e),0);T(e,this._tempSphere);const n=o/(2*this._tempSphere.radius),a=n<i.maxRelativeErrorCoplanar,l=n<i.maxRelativeErrorAlmostCoplanar;let d="horizontal";if(a)d="oblique";else if(l){d=Math.abs(j(r,t))>Math.cos(s(i.verticalAngleThreshold))?"horizontal":"vertical"}return d}_calculateMode(t,e){return null!=e&&0===t?l(e,"meters")>Z?"geodesic":"euclidean":null==e||1===t?"euclidean":"geodesic"}};function G(t,e){e.hasZ||(e.z=I(t,e,"ground")??0)}t([p()],B.prototype,"_measurements",void 0),t([p()],B.prototype,"updating",null),t([p()],B.prototype,"renderSpatialReference",null),t([p()],B.prototype,"_updateId",void 0),t([p()],B.prototype,"view",void 0),t([p({constructOnly:!0})],B.prototype,"fittingSettings",void 0),B=t([u("esri.views.3d.analysis.AreaMeasurement.support.MeasurementData")],B);const Z=1e5;class J{constructor(t,e,r,s,i){this.worldOrigin=t,this.axisU=e,this.axisV=r,this.renderSR=s,this.worldSR=i}}export{E as AreaMeasurementQuantities,B as MeasurementData};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i}from"../../../../core/promiseUtils.js";import{createVolume as n}from"../../../../core/quantity.js";import{whenOnce as s,watch as a,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as u,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{create as m}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sqrDist as c}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as d}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as h}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as g,clone as f,create as y}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as _}from"../../../../core/support/UpdatingHandles.js";import v from"../../../../geometry/Multipoint.js";import{projectOrLoad as w}from"../../../../geometry/projectionUtils.js";import{e as j}from"../../../../chunks/containsOperator.js";import{e as E}from"../../../../chunks/convexHullOperator.js";import{e as b}from"../../../../chunks/simplifyOperator.js";import{e as R}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as x}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as C}from"../../../../geometry/projection/projectBoundingRect.js";import{fromExtent as T,intersects as G,create as L,empty as O}from"../../../../geometry/support/aaBoundingRect.js";import{isClockwise as D}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as P}from"../../../../geometry/support/DoubleArray.js";import{t as H}from"../../../../chunks/vec3.js";import M from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as V}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as I}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as U,VolumeMeasurementPerimeterTooLargeError as N,VolumeMeasurementUnsupportedCoordinateSystemError as k,VolumeMeasurementUnsupportedLayerTransparencyError as A}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as F}from"./VolumeMeasurementRawResult.js";import S from"./VolumeMeasurementResult.js";import{ElevationContext as W}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as z}from"../../support/ElevationProvider.js";import{polygonToRenderInfoElevationAligned as q}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as B}from"../../terrain/tileUtils.js";import{CutFillComputationRenderNode as Z,TargetGeometryRenderInfo as J}from"../../webgl-engine/lib/CutFillComputationRenderNode.js";import{isIntegratedMeshLayerView as K}from"../../../support/layerViewUtils.js";import{MeasurementWorkerHandle as Q}from"../../../support/MeasurementWorkerHandle.js";let X=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new Q,this._getElevationProvider=()=>this.view.elevationProvider,this.depthExtremaPositions=null,this._updatingHandles=new _,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new B,this._intersectingObbs=[],this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computationRenderNode.done)return;const{renderCoordsHelper:i}=this.view,n=new I({extent:t,localOrigin:r,renderCoordsHelper:i});this._computationRenderNode.update(n,o),this._determineDataCoverage(n);const[a]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),s(()=>this._computationRenderNode.done).then(()=>{this._updateDepthExtremaPositions(n,this._computationRenderNode.getResult())})]);if(this.error)return void(this._rawResult=null);const l=this._computationRenderNode.getResult();this._updateResult(n,l,"fulfilled"===a.status?a.value:null)}),this._determineDataCoverage=e=>{const{elevationAlignedGeometry:t}=this,{frustum:r}=this._computationRenderNode,{cameraDimensions:o}=e;t&&r&&(this._intersectingObbs.length=0,this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbs.length?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computationRenderNode=new Z({view:e}),this.addHandles([this._createElevationUpdateHandle(),a(()=>({projectedGeometry:this._projectedGeometry,localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo}),({projectedGeometry:e,localOrigin:t,targetGeometryRenderInfo:r})=>{const o=e?.extent;if(!(e&&o&&t&&r))return this._rawResult=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(e,o,t,r))},l)])}destroy(){this._updatingHandles.destroy(),this._computationRenderNode.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=b(e),r=w(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&V(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?g(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return Y(this._getElevationProvider(),t),t}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:i}=this.view,n=q(e,o,i,W.fromElevationInfo(new M({mode:"absolute-height"})));if(null==n)return null;const{positions:s,polygonIndices:a,vertexCount:l}=n,u=P(3*l),p=m(),c=m();return x(t.spatialReference,r,p,i.spatialReference),c[12]=-p[12],c[13]=-p[13],c[14]=-p[14],H(u,s,c),new J(u,a)}get updating(){return this._computationRenderNode.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e?new S({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>K(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new U}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeterForError,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new N:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new N:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new k:null}get _unsupportedLayerTransparencyError(){return this.view.map.ground&&this.view.map.ground.opacity<1?new A:null}get _perimeterForError(){const{targetGeometry:e}=this;if(null==e)return null;let t=null;for(const r of e.rings){if(!D(r))continue;const e=ee(te(r));t=e?Math.max(t??0,e):t}return null!=t?t*e.spatialReference.metersPerUnit:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(C(e.extent,e.spatialReference,oe,this.view.spatialReference),T(t,ie),G(oe,ie)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:s},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(s/t.height),p=$(t.cut.totalDepth,a,l)*u,m=$(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new F({cutVolume:n(Math.abs(p*c),"cubic-meters"),fillVolume:n(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:d}=e,g=f(s);return 0!==d&&(h(g,g,l,r*(m/t.width-.5)),h(g,g,a,o*(c/t.height-.5))),h(g,g,u,-$(p,i,n)),g};this.depthExtremaPositions={cut:p(t.cut),fill:p(t.fill)}}_findIntersectingObbs(e,t){const r=this._intersectingObbs;"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)})}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new v({spatialReference:o});if(this._intersectingObbs.forEach(e=>{if(re(e.radius,t)&&(e.getCorners(se),n.points.length=0,se.forEach(e=>{const t=r.fromRenderCoords(e,ae,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=E(n);"polygon"===e?.type&&i.push(e)}}),!i.length)return!1;const s=R(i);return!!s&&j(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;if(this._intersectingTiles.length=0,!e.extent)return;T(e.extent,ne);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(ne)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>re(t.radius*r,e))}};function Y(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=z(e,t,"ground")??0))}function $(e,t,r){return e*(r-t)+t}function ee(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1]]),r?o+=c(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=c(r,t)),Math.sqrt(o)}function*te(e){const t=d();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([u()],X.prototype,"_projectedGeometry",null),e([u()],X.prototype,"_localOrigin",null),e([u()],X.prototype,"_getElevationProvider",void 0),e([u()],X.prototype,"elevationAlignedGeometry",null),e([u()],X.prototype,"targetGeometry",null),e([u()],X.prototype,"_targetGeometryRenderInfo",null),e([u({constructOnly:!0})],X.prototype,"analysis",void 0),e([u({constructOnly:!0})],X.prototype,"analysisViewData",void 0),e([u({constructOnly:!0})],X.prototype,"view",void 0),e([u()],X.prototype,"updating",null),e([u()],X.prototype,"result",null),e([u()],X.prototype,"depthExtremaPositions",void 0),e([u()],X.prototype,"error",null),e([u()],X.prototype,"_imLayerViewsAffectingMeasurement",null),e([u()],X.prototype,"_insufficientDataError",null),e([u()],X.prototype,"_perimeterTooLargeError",null),e([u()],X.prototype,"_perimeterTooLargeLocalError",null),e([u()],X.prototype,"_perimeterTooLargeGlobalError",null),e([u()],X.prototype,"_unsupportedCoordinateSystemError",null),e([u()],X.prototype,"_unsupportedLayerTransparencyError",null),e([u()],X.prototype,"_perimeterForError",null),e([u()],X.prototype,"_computationRenderNode",void 0),e([u({readOnly:!0})],X.prototype,"_updatingHandles",void 0),e([u()],X.prototype,"_rawResult",void 0),e([u()],X.prototype,"_sufficientDataCoverage",void 0),X=e([p("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],X);const re=(e,t)=>e<(t.width+t.height)/2,oe=O(),ie=O(),ne=L(),se=new Array(8).fill(0).map(()=>y()),ae=y();export{X as VolumeMeasurementCutFillController};
|
|
2
|
+
import{__decorate as e}from"tslib";import{volumeMeasurementConfiguration as t}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import o from"../../../../core/Logger.js";import{debounce as i,isPromiseLike as n}from"../../../../core/promiseUtils.js";import{createVolume as s}from"../../../../core/quantity.js";import{whenOnce as a,watch as l,syncAndInitial as u}from"../../../../core/reactiveUtils.js";import{property as p,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{sqrDist as d}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{scaleAndAdd as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as f,clone as y,create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as v}from"../../../../core/support/UpdatingHandles.js";import w from"../../../../geometry/Multipoint.js";import{projectOrLoad as j}from"../../../../geometry/projectionUtils.js";import{e as E}from"../../../../chunks/containsOperator.js";import{e as b}from"../../../../chunks/convexHullOperator.js";import{e as R}from"../../../../chunks/simplifyOperator.js";import{e as x}from"../../../../chunks/unionOperator.js";import{computeTranslationToOriginAndRotation as C}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{projectBoundingRect as T}from"../../../../geometry/projection/projectBoundingRect.js";import{fromExtent as G,intersects as L,create as O,empty as P}from"../../../../geometry/support/aaBoundingRect.js";import{isClockwise as D}from"../../../../geometry/support/coordsUtils.js";import{newDoubleArray as H}from"../../../../geometry/support/DoubleArray.js";import{t as M}from"../../../../chunks/vec3.js";import V from"../../../../symbols/support/ElevationInfo.js";import{logFailedGeometryProjectionError as I}from"../support/projectionUtils.js";import{VolumeMeasurementCutFillComputation as U}from"./VolumeMeasurementCutFillComputation.js";import{VolumeMeasurementInsufficientDataError as N,VolumeMeasurementPerimeterTooLargeError as k,VolumeMeasurementUnsupportedCoordinateSystemError as A,VolumeMeasurementUnsupportedLayerTransparencyError as F}from"./volumeMeasurementErrors.js";import{VolumeMeasurementRawResult as S}from"./VolumeMeasurementRawResult.js";import W from"./VolumeMeasurementResult.js";import{ElevationContext as z}from"../../layers/graphics/ElevationContext.js";import{getElevationAtPoint as q}from"../../support/ElevationProvider.js";import{polygonToRenderInfoElevationAligned as B}from"../../support/renderInfoUtils/polygon.js";import{IteratorPreorder as Z}from"../../terrain/tileUtils.js";import{CutFillComputationRenderNode as J,TargetGeometryRenderInfo as K}from"../../webgl-engine/lib/CutFillComputationRenderNode.js";import{isIntegratedMeshLayerView as Q}from"../../../support/layerViewUtils.js";import{MeasurementWorkerHandle as X}from"../../../support/MeasurementWorkerHandle.js";let Y=class extends r{constructor(e){super(e),this._measurementWorkerHandle=new X,this._getElevationProvider=()=>this.view.elevationProvider,this.depthExtremaPositions=null,this._updatingHandles=new v,this._rawResult=null,this._sufficientDataCoverage=!0,this._tileIterator=new Z,this._intersectingObbs=[],this._intersectingTiles=[],this._debouncedUpdate=i(async(e,t,r,o)=>{if(!this._computationRenderNode.done)return;const{renderCoordsHelper:i}=this.view,n=new U({extent:t,localOrigin:r,renderCoordsHelper:i});this._computationRenderNode.update(n,o),this._determineDataCoverage(n);const[s]=await Promise.allSettled([this._measurementWorkerHandle.areaHorizontal(e,{returnLength:!0}),a(()=>this._computationRenderNode.done).then(()=>{this._updateDepthExtremaPositions(n,this._computationRenderNode.getResult())})]);if(this.error)return void(this._rawResult=null);const l=this._computationRenderNode.getResult();this._updateResult(n,l,"fulfilled"===s.status?s.value:null)}),this._determineDataCoverage=e=>{const{elevationAlignedGeometry:t}=this,{frustum:r}=this._computationRenderNode,{cameraDimensions:o}=e;t&&r&&(this._intersectingObbs.length=0,this._imLayerViewsAffectingMeasurement.forEach(e=>{this._findIntersectingObbs(e,r)}),this._intersectingObbs.length?this._sufficientDataCoverage=this._sufficientIntegratedMeshCoverage(t,o):(this._findIntersectingTerrainTiles(t),this._sufficientDataCoverage=this._sufficientTerrainCoverage(o)))}}initialize(){const e=this.view;this._computationRenderNode=new J({view:e}),this.addHandles([this._createElevationUpdateHandle(),l(()=>({projectedGeometry:this._projectedGeometry,localOrigin:this._localOrigin,targetGeometryRenderInfo:this._targetGeometryRenderInfo}),({projectedGeometry:e,localOrigin:t,targetGeometryRenderInfo:r})=>{const o=e?.extent;if(!(e&&o&&t&&r))return this._rawResult=null,void(this._sufficientDataCoverage=!0);this._updatingHandles.consumePromise(this._debouncedUpdate(e,o,t,r))},u)])}destroy(){this._updatingHandles.destroy(),this._computationRenderNode.destroy(),this._measurementWorkerHandle.destroy()}get _projectedGeometry(){const e=this.analysis.geometry;if(!e||!this.analysis.valid)return null;const t=R(e),r=j(t,this.view.spatialReference);return r.pending?(this._updatingHandles.consumePromise(r.pending),null):(t&&!r.geometry&&I(this.analysis,e.spatialReference,o.getLogger(this)),r.geometry)}get _localOrigin(){const e=this._projectedGeometry?.extent;return e?f(e.center.x,e.center.y,0):null}get elevationAlignedGeometry(){const e=this._projectedGeometry;if(!e)return null;const t=e.clone();return $(this._getElevationProvider(),t),t}get targetGeometry(){const{elevationAlignedGeometry:e}=this;if(!e)return null;const t=this.analysis.measureType,{effectiveTargetElevation:r}=this.analysisViewData;if("stockpile"===t||null==r)return e;const o=e.clone();return o.rings.forEach(e=>e.forEach(e=>e[2]=r)),o}get _targetGeometryRenderInfo(){const e=this.targetGeometry,t=this._projectedGeometry?.extent,r=this._localOrigin;if(!e||!t||!r)return null;const{elevationProvider:o,renderCoordsHelper:i}=this.view,s=B(e,o,i,z.fromElevationInfo(new V({mode:"absolute-height"})));if(n(s))return this._updatingHandles.consumePromise(s),null;if(null==s)return null;const{positions:a,polygonIndices:l,vertexCount:u}=s,p=H(3*u),m=c(),d=c();return C(t.spatialReference,r,m,i.spatialReference),d[12]=-m[12],d[13]=-m[13],d[14]=-m[14],M(p,a,d),new K(p,l)}get updating(){return this._computationRenderNode.updating||this._updatingHandles.updating}get result(){const e=this._rawResult,{volume:t,area:r,length:o}=this.analysisViewData.effectiveDisplayUnits;return e?new W({measureType:this.analysis.measureType,rawResult:e,volumeUnit:t,areaUnit:r,lengthUnit:o}):null}get error(){return this._unsupportedCoordinateSystemError??this._unsupportedLayerTransparencyError??this._perimeterTooLargeError??this._insufficientDataError}get _imLayerViewsAffectingMeasurement(){return this.view.allLayerViews.filter(e=>Q(e)).filter(e=>e.visible&&!e.suspended)}get _insufficientDataError(){return this._sufficientDataCoverage?null:new N}get _perimeterTooLargeError(){return this._perimeterTooLargeLocalError??this._perimeterTooLargeGlobalError}get _perimeterTooLargeLocalError(){const{spatialReference:e,state:{isLocal:r}}=this.view;if(!r||!e.isWebMercator)return null;const o=this._perimeterForError,{maxPerimeterLocalWebMercator:i}=t;return null!=o&&o>i?new k:null}get _perimeterTooLargeGlobalError(){if(!this.view.state.isGlobal)return null;const e=this._perimeterForError,{maxPerimeterGlobal:r}=t;return null!=e&&e>r?new k:null}get _unsupportedCoordinateSystemError(){return this.view.state.isLocal&&this.view.spatialReference.isGeographic?new A:null}get _unsupportedLayerTransparencyError(){return this.view.map.ground&&this.view.map.ground.opacity<1?new F:null}get _perimeterForError(){const{targetGeometry:e}=this;if(null==e)return null;let t=null;for(const r of e.rings){if(!D(r))continue;const e=te(re(r));t=e?Math.max(t??0,e):t}return null!=t?t*e.spatialReference.metersPerUnit:null}_createElevationUpdateHandle(){const e=e=>{const t=this._projectedGeometry?.extent;"ground"===e.context&&t&&(T(e.extent,e.spatialReference,ie,this.view.spatialReference),G(t,ne),L(ie,ne)&&(this._getElevationProvider=()=>this.view.elevationProvider))};return this.view.elevationProvider.on("elevation-change",t=>e(t))}_updateResult(e,t,r){const{unitInMeters:o}=this.view.renderCoordsHelper,{dimensions:{width:i,height:n},cameraNearFar:{near:a,far:l}}=e,u=i/t.width*(n/t.height),p=ee(t.cut.totalDepth,a,l)*u,m=ee(t.fill.totalDepth,a,l)*u,c=o**3;this._rawResult=new S({cutVolume:s(Math.abs(p*c),"cubic-meters"),fillVolume:s(m*c,"cubic-meters"),area:r?.area,perimeter:r?.length})}_updateDepthExtremaPositions(e,t){const{dimensions:{width:r,height:o},cameraNearFar:{near:i,far:n},cameraPositionRenderSpace:s,northVector:a,eastVector:l,upVector:u}=e,p=e=>{const{depthExtremum:p,depthExtremumCoords:[m,c],totalDepth:d}=e,h=y(s);return 0!==d&&(g(h,h,l,r*(m/t.width-.5)),g(h,h,a,o*(c/t.height-.5))),g(h,h,u,-ee(p,i,n)),h};this.depthExtremaPositions={cut:p(t.cut),fill:p(t.fill)}}_findIntersectingObbs(e,t){const r=this._intersectingObbs;"integrated-mesh-3d"===e.type&&e.getVisibleNodes().forEach(o=>{e.isNodeLoaded(o.index)&&o.geometryObbInRenderSR?.intersectsFrustum(t)&&r.push(o.geometryObbInRenderSR)}),"integrated-mesh-3dtiles"===e.type&&e.forEachVisibleComponentObject(({obb:e})=>{e.intersectsFrustum(t)&&r.push(e)})}_sufficientIntegratedMeshCoverage(e,t){const{renderCoordsHelper:r,spatialReference:o}=this.view,i=[],n=new w({spatialReference:o});if(this._intersectingObbs.forEach(e=>{if(oe(e.radius,t)&&(e.getCorners(ae),n.points.length=0,ae.forEach(e=>{const t=r.fromRenderCoords(e,le,o);t&&n.addPoint([t[0],t[1]])}),n.points.length)){const e=b(n);"polygon"===e?.type&&i.push(e)}}),!i.length)return!1;const s=x(i);return!!s&&E(s,e)}_findIntersectingTerrainTiles(e){const{basemapTerrain:t}=this.view;if(this._intersectingTiles.length=0,!e.extent)return;G(e.extent,se);const r=this._tileIterator;r.reset(t.rootTiles);for(let o=r.next();o;o=r.next())o.intersectsExtent(se)?o.rendered&&this._intersectingTiles.push(o):r.skipSubtree()}_sufficientTerrainCoverage(e){const{basemapTerrain:{tilingScheme:t}}=this.view;if(!this._intersectingTiles.length)return!1;const r=256/t.pixelSize;return this._intersectingTiles.every(t=>oe(t.radius*r,e))}};function $(e,t){t.hasZ=!0,t.rings.forEach(t=>t.forEach(t=>t[2]=q(e,t,"ground")??0))}function ee(e,t,r){return e*(r-t)+t}function te(e){if(!e)return null;let t=null,r=null,o=0;for(const i of e)t||(t=[i[0],i[1]]),r?o+=d(r,i):r=[0,0],r[0]=i[0],r[1]=i[1];return t&&r&&(o+=d(r,t)),Math.sqrt(o)}function*re(e){const t=h();for(let r=0;r<e.length;r++)t[0]=e[r][0],t[1]=e[r][1],yield t}e([p()],Y.prototype,"_projectedGeometry",null),e([p()],Y.prototype,"_localOrigin",null),e([p()],Y.prototype,"_getElevationProvider",void 0),e([p()],Y.prototype,"elevationAlignedGeometry",null),e([p()],Y.prototype,"targetGeometry",null),e([p()],Y.prototype,"_targetGeometryRenderInfo",null),e([p({constructOnly:!0})],Y.prototype,"analysis",void 0),e([p({constructOnly:!0})],Y.prototype,"analysisViewData",void 0),e([p({constructOnly:!0})],Y.prototype,"view",void 0),e([p()],Y.prototype,"updating",null),e([p()],Y.prototype,"result",null),e([p()],Y.prototype,"depthExtremaPositions",void 0),e([p()],Y.prototype,"error",null),e([p()],Y.prototype,"_imLayerViewsAffectingMeasurement",null),e([p()],Y.prototype,"_insufficientDataError",null),e([p()],Y.prototype,"_perimeterTooLargeError",null),e([p()],Y.prototype,"_perimeterTooLargeLocalError",null),e([p()],Y.prototype,"_perimeterTooLargeGlobalError",null),e([p()],Y.prototype,"_unsupportedCoordinateSystemError",null),e([p()],Y.prototype,"_unsupportedLayerTransparencyError",null),e([p()],Y.prototype,"_perimeterForError",null),e([p()],Y.prototype,"_computationRenderNode",void 0),e([p({readOnly:!0})],Y.prototype,"_updatingHandles",void 0),e([p()],Y.prototype,"_rawResult",void 0),e([p()],Y.prototype,"_sufficientDataCoverage",void 0),Y=e([m("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillController")],Y);const oe=(e,t)=>e<(t.width+t.height)/2,ie=P(),ne=P(),se=O(),ae=new Array(8).fill(0).map(()=>_()),le=_();export{Y as VolumeMeasurementCutFillController};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../../../intl.js";import{volumeMeasurementConfiguration as o}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import{equals as n}from"../../../../core/arrayUtils.js";import{cyclicalPI as l}from"../../../../core/Cyclical.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{formatDecimal as c,preferredVolumePrecision as u}from"../../../../core/quantityFormatUtils.js";import{watch as d,initial as m}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as h}from"../../../../core/units.js";import{property as p,subclass as g}from"../../../../core/accessorSupport/decorators.js";import{create as y}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as _,normalize as f,subtract as v,cross as j,dot as L}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as b,fromValues as C}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as w}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{angleAroundAxis as G}from"../../../../geometry/support/vector.js";import{t as V}from"../../../../chunks/vec3.js";import P from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as x}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as R}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as O}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as M}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as A}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as D}from"../../layers/graphics/extrudeUtils.js";import{polygonToRenderInfoElevationAligned as F}from"../../support/renderInfoUtils/polygon.js";import{CutFillVisualizationRenderNode as E,VolumeGeometry as U}from"../../webgl-engine/lib/CutFillVisualizationRenderNode.js";import{createStipplePatternSimple as S}from"../../webgl-engine/materials/lineStippleUtils.js";let N=class extends r{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}get _extrusionHeights(){const{renderCoordsHelper:e}=this.view,{depthExtremaPositions:t,targetGeometry:i}=this.analysisViewData,{targetElevationRange:s}=o;if(!i||!t)return{cut:s,fill:-s};let r=-1/0;for(const o of i.rings)for(const e of o)r=Math.max(r,e[2]);const n=1,l=e.getAltitude(t.fill);return{cut:s,fill:Math.min(l-r,0)-n}}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._elevationContext=A.fromElevationInfo(new P({mode:"absolute-height"})),this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=o,r={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new O({...r,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new O(r);const n={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:3},l={...n,stipplePattern:S(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),c=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new R({...n,color:a}),this._occludedCutProjectionLines=new R({...l,color:a}),this._fillProjectionLines=new R({...n,color:c,renderOccluded:8}),this._occludedFillProjectionLines=new R({...l,color:c});const u={...i,attached:!0};this._cutVolumeLabel=new x({...u,distance:s.labelDistance}),this._fillVolumeLabel=new x({...u,distance:-s.labelDistance}),this._renderNode=new E({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([d(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},m),d(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._renderNode.measureType=i},m),d(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),m),d(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},m),d(()=>[this.analysisViewData.targetGeometry,this._extrusionHeights,this._polygonRenderInfo],()=>this._updateCutFillGeometry(),m),d(()=>this.visible&&this.view.state.camera.aboveGround&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),m),d(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{depthExtremaPositions:s.depthExtremaPositions,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),d(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),m),t(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=a(this._elevationAlignedGeometry),this._targetGeometry=a(this._targetGeometry),this._cutProjectionLines=a(this._cutProjectionLines),this._occludedCutProjectionLines=a(this._occludedCutProjectionLines),this._fillProjectionLines=a(this._fillProjectionLines),this._occludedFillProjectionLines=a(this._occludedFillProjectionLines),this._cutVolumeLabel=a(this._cutVolumeLabel),this._fillVolumeLabel=a(this._fillVolumeLabel),this._renderNode.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],r=[],l=[],a=[],c=[],u=e.spatialReference;for(let d=0;d<e.rings.length;d++){const i=e.rings[d],m=i.length>1&&n(i[0],i[i.length-1]),h=i.length-(m?1:0),p=[];for(let e=0;e<h;++e){const o=i[e],r=_(b(),o[0],o[1],o[2]);s.toRenderCoords(r,u,r);const n=t.rings[d][e],l=_(b(),n[0],n[1],n[2]);s.toRenderCoords(l,u,l);const a=new M(r,l);p.push(a)}const g=this.view.state.camera;for(let e=0;e<p.length;++e){const s=p[e],n=p[0===e?p.length-1:e-1],u=p[e===p.length-1?0:e+1],m=i[e],h=t.rings[d][e],y=m[2]>h[2],_=new H(s,n,u,y);o.push(_),_.updateOccluded(g);const f=_.isOccluded;y?(f?l:r).push(s):(f?c:a).push(s)}}this._projectionLines=o,this._cutProjectionLines.setGeometryFromSegments(r),this._occludedCutProjectionLines.setGeometryFromSegments(l),this._fillProjectionLines.setGeometryFromSegments(a),this._occludedFillProjectionLines.setGeometryFromSegments(c)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,n=!1;for(const l of this._projectionLines){l.updateOccluded(e)&&(r||=l.isCut,n||=!l.isCut);const a=l.isOccluded;(l.isCut?a?i:t:a?o:s).push(l.segment)}n&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,t,i){const{geometryOutlineColor:s,cutColor:r,fillColor:n,cutColorMuted:l,fillColorMuted:a,cutProjectionLineColor:c,fillProjectionLineColor:u}=o;if(this._renderNode.cutColor=i?r:l,this._renderNode.fillColor=i?n:a,e){const e=t.toUnitRGBA();this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._renderNode.borderColor=t}else{this._targetGeometry.color=s.toUnitRGBA();const e=(i?c:l).toUnitRGBA();this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const t=(i?u:a).toUnitRGBA();this._fillProjectionLines.color=t,this._occludedFillProjectionLines.color=t,this._renderNode.borderColor=s}}_updateLabels(e){const{effectiveDisplayUnits:t,depthExtremaPositions:s,messages:o,unitsMessages:r,result:n,visible:l}=e;if(this._cutVolumeLabel.visible=l,this._fillVolumeLabel.visible=l,this._cutVolumeLabel.geometry=s?{type:"point",point:s.cut}:null,this._fillVolumeLabel.geometry=s?{type:"point",point:s.fill}:null,null==n||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=t.volume,c=i(o.labels.cut,{volume:B(r,n.cutVolume,a)}),u=i(o.labels.fill,{volume:B(r,n.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(e){e?this._renderNode.enable():this._renderNode.disable()}get _polygonRenderInfo(){const{renderCoordsHelper:e,elevationProvider:t}=this.view,{targetGeometry:i}=this.analysisViewData;return null==i?null:F(i,t,e,this._elevationContext,{outlineOutput:"tessellated-indices"})}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData,{cut:i,fill:s}=this._extrusionHeights;if(!t?.extent)return;const{center:o}=t.extent,r=C(o.x,o.y,0),n=b();e.toRenderCoords(r,t.spatialReference,n);const l=this._getExtrudedVolume(i,r,n),a=this._getExtrudedVolume(s,r,n);null!=l&&null!=a&&this._renderNode.updateGeometries(l,a,n)}_getExtrudedVolume(e,t,i){const{renderCoordsHelper:s,spatialReference:o}=this.view,r=b(),n=1===s.viewingMode;s.worldUpAtPosition(i,r);const{_polygonRenderInfo:l}=this;if(null==l)return null;const a=D(l,{height:e,worldUp:r,spherical:n,requireElevation:!1,requireNormals:!0,requireSizes:!1});if(null==a)return null;const c=y(),u=y();if(w(o,t,c,s.spatialReference),u[12]=-c[12],u[13]=-c[13],u[14]=-c[14],V(a.vertices,a.vertices,u),"stockpile"===this.analysis.measureType)for(let d=0;d<a.normals.length;d+=3)a.normals[d]=r[0],a.normals[d+1]=r[1],a.normals[d+2]=r[2];return new U(a.vertices,a.bottomIndices,a.indices,a.normals)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await s("esri/core/t9n/Units"),this.messages=await s("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function B(e,t,i){if(!t||!e)return null;const s=h(t.value,t.unit,i),o=u(s);return c(e,t,s,o)}e([p({constructOnly:!0})],N.prototype,"view",void 0),e([p({constructOnly:!0})],N.prototype,"analysis",void 0),e([p({constructOnly:!0})],N.prototype,"analysisViewData",void 0),e([p()],N.prototype,"unitsMessages",void 0),e([p()],N.prototype,"messages",void 0),e([p()],N.prototype,"loadingMessages",void 0),e([p({readOnly:!0})],N.prototype,"visible",null),e([p()],N.prototype,"updating",null),e([p()],N.prototype,"hasUnsupportedError",null),e([p()],N.prototype,"_extrusionHeights",null),e([p()],N.prototype,"_polygonRenderInfo",null),N=e([g("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],N);class H{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=b(),this._n2=b();const o=f(I,v(I,e.endRenderSpace,e.startRenderSpace));f(this._n1,j(this._n1,o,f(T,v(T,t.startRenderSpace,e.startRenderSpace)))),f(this._n2,j(this._n2,o,f(T,v(T,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=l.normalize(G(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){v(I,this.segment.startRenderSpace,e.eye);const t=L(this._n1,I)<0,i=L(this._n2,I)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const I=b(),T=b();export{N as VolumeMeasurementCutFillVisualization};
|
|
2
|
+
import{__decorate as e}from"tslib";import{onLocaleChange as t,substitute as i,fetchMessageBundle as s}from"../../../../intl.js";import{volumeMeasurementConfiguration as o}from"../../../../analysis/VolumeMeasurement/volumeMeasurementConfiguration.js";import r from"../../../../core/Accessor.js";import{equals as n}from"../../../../core/arrayUtils.js";import{cyclicalPI as l}from"../../../../core/Cyclical.js";import{destroyMaybe as a}from"../../../../core/maybe.js";import{isPromiseLike as c}from"../../../../core/promiseUtils.js";import{formatDecimal as u,preferredVolumePrecision as d}from"../../../../core/quantityFormatUtils.js";import{watch as m,initial as h}from"../../../../core/reactiveUtils.js";import{adaptiveVolumeUnit as p}from"../../../../core/units.js";import{property as g,subclass as y}from"../../../../core/accessorSupport/decorators.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as f,normalize as v,subtract as j,cross as L,dot as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as C,fromValues as w}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as G}from"../../../../core/support/UpdatingHandles.js";import{computeTranslationToOriginAndRotation as P}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{angleAroundAxis as V}from"../../../../geometry/support/vector.js";import{t as x}from"../../../../chunks/vec3.js";import R from"../../../../symbols/support/ElevationInfo.js";import{LabelVisualElement as O}from"../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as M}from"../../interactive/visualElements/LineVisualElement.js";import{OutlineVisualElement as A}from"../../interactive/visualElements/OutlineVisualElement.js";import{EuclideanSegment as D}from"../../interactive/visualElements/support/Segment.js";import{ElevationContext as U}from"../../layers/graphics/ElevationContext.js";import{extrudePolygon as F}from"../../layers/graphics/extrudeUtils.js";import{polygonToRenderInfoElevationAligned as E}from"../../support/renderInfoUtils/polygon.js";import{CutFillVisualizationRenderNode as S,VolumeGeometry as H}from"../../webgl-engine/lib/CutFillVisualizationRenderNode.js";import{createStipplePatternSimple as N}from"../../webgl-engine/materials/lineStippleUtils.js";let B=class extends r{get visible(){return this.analysisViewData.visible&&null!=this.analysisViewData.elevationAlignedGeometry&&null!=this.analysisViewData.targetGeometry}get updating(){return this.loadingMessages||this._updatingHandles.updating}get hasUnsupportedError(){const{error:e}=this.analysisViewData;return!!e&&["unsupported-coordinate-system","unsupported-layer-transparency"].includes(e.name)}get _extrusionHeights(){const{renderCoordsHelper:e}=this.view,{depthExtremaPositions:t,targetGeometry:i}=this.analysisViewData,{targetElevationRange:s}=o;if(!i||!t)return{cut:s,fill:-s};let r=-1/0;for(const o of i.rings)for(const e of o)r=Math.max(r,e[2]);const n=1,l=e.getAltitude(t.fill);return{cut:s,fill:Math.min(l-r,0)-n}}constructor(e){super(e),this.unitsMessages=null,this.messages=null,this.loadingMessages=!0,this._updatingHandles=new G,this._elevationContext=U.fromElevationInfo(new R({mode:"absolute-height"})),this._projectionLines=[]}initialize(){const{view:e}=this,i={view:e,isDecoration:!0},s=o,r={...i,width:s.geometryOutlineWidth};this._elevationAlignedGeometry=new A({...r,isDraped:!0,color:s.geometryOutlineColor.toUnitRGBA()}),this._targetGeometry=new A(r);const n={...i,attached:!0,width:s.projectionLineWidth,renderOccluded:4,polygonOffset:3},l={...n,stipplePattern:N(s.projectionLineStippleSize)},a=s.cutProjectionLineColor.toUnitRGBA(),c=s.fillProjectionLineColor.toUnitRGBA();this._cutProjectionLines=new M({...n,color:a}),this._occludedCutProjectionLines=new M({...l,color:a}),this._fillProjectionLines=new M({...n,color:c,renderOccluded:8}),this._occludedFillProjectionLines=new M({...l,color:c});const u={...i,attached:!0};this._cutVolumeLabel=new O({...u,distance:s.labelDistance}),this._fillVolumeLabel=new O({...u,distance:-s.labelDistance}),this._renderNode=new S({view:e,cutColor:s.cutColor,fillColor:s.fillColor,borderColor:s.geometryOutlineColor}),this.addHandles([m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry}),({elevationAlignedGeometry:e,targetGeometry:t})=>{this._elevationAlignedGeometry.geometry=e,this._targetGeometry.geometry=t},h),m(()=>({interactive:this.analysisViewData.interactive,measureType:this.analysis.measureType,visible:this.visible}),({visible:e,interactive:t,measureType:i})=>{this._elevationAlignedGeometry.visible=e&&!t,this._targetGeometry.visible=e&&"cut-fill"===i,this._renderNode.measureType=i},h),m(()=>({elevationAlignedGeometry:this.analysisViewData.elevationAlignedGeometry,targetGeometry:this.analysisViewData.targetGeometry,visible:this.visible}),({elevationAlignedGeometry:e,targetGeometry:t,visible:i})=>this._updateProjectionLines(e,t,i),h),m(()=>({interactive:this.analysisViewData.interactive,accentColor:this.view.effectiveTheme.accentColor,hasResult:!!this.analysisViewData.result}),({interactive:e,accentColor:t,hasResult:i})=>{this._updateColors(e,t,i)},h),m(()=>[this.analysisViewData.targetGeometry,this._extrusionHeights,this._polygonRenderInfo],()=>this._updateCutFillGeometry(),h),m(()=>this.visible&&this.view.state.camera.aboveGround&&!this.hasUnsupportedError,e=>this._updateCutFillVisibility(e),h),m(()=>{const{messages:e,unitsMessages:t,visible:i,analysisViewData:s}=this;return{depthExtremaPositions:s.depthExtremaPositions,effectiveDisplayUnits:s.effectiveDisplayUnits,messages:e,unitsMessages:t,result:s.result,visible:i&&!!s.result}},e=>this._updateLabels(e)),m(()=>this.view.state.camera,e=>this._updateProjectionLineOcclusion(e),h),t(()=>this._updateMessageBundle())]),this._updateMessageBundle()}destroy(){this._elevationAlignedGeometry=a(this._elevationAlignedGeometry),this._targetGeometry=a(this._targetGeometry),this._cutProjectionLines=a(this._cutProjectionLines),this._occludedCutProjectionLines=a(this._occludedCutProjectionLines),this._fillProjectionLines=a(this._fillProjectionLines),this._occludedFillProjectionLines=a(this._occludedFillProjectionLines),this._cutVolumeLabel=a(this._cutVolumeLabel),this._fillVolumeLabel=a(this._fillVolumeLabel),this._renderNode.destroy(),this._updatingHandles.destroy()}_updateProjectionLines(e,t,i){if(this._cutProjectionLines.visible=i,this._occludedCutProjectionLines.visible=i,this._fillProjectionLines.visible=i,this._occludedFillProjectionLines.visible=i,!e||!t)return;const{renderCoordsHelper:s}=this.view,o=[],r=[],l=[],a=[],c=[],u=e.spatialReference;for(let d=0;d<e.rings.length;d++){const i=e.rings[d],m=i.length>1&&n(i[0],i[i.length-1]),h=i.length-(m?1:0),p=[];for(let e=0;e<h;++e){const o=i[e],r=f(C(),o[0],o[1],o[2]);s.toRenderCoords(r,u,r);const n=t.rings[d][e],l=f(C(),n[0],n[1],n[2]);s.toRenderCoords(l,u,l);const a=new D(r,l);p.push(a)}const g=this.view.state.camera;for(let e=0;e<p.length;++e){const s=p[e],n=p[0===e?p.length-1:e-1],u=p[e===p.length-1?0:e+1],m=i[e],h=t.rings[d][e],y=m[2]>h[2],_=new T(s,n,u,y);o.push(_),_.updateOccluded(g);const f=_.isOccluded;y?(f?l:r).push(s):(f?c:a).push(s)}}this._projectionLines=o,this._cutProjectionLines.setGeometryFromSegments(r),this._occludedCutProjectionLines.setGeometryFromSegments(l),this._fillProjectionLines.setGeometryFromSegments(a),this._occludedFillProjectionLines.setGeometryFromSegments(c)}_updateProjectionLineOcclusion(e){const t=[],i=[],s=[],o=[];let r=!1,n=!1;for(const l of this._projectionLines){l.updateOccluded(e)&&(r||=l.isCut,n||=!l.isCut);const a=l.isOccluded;(l.isCut?a?i:t:a?o:s).push(l.segment)}n&&(this._fillProjectionLines.setGeometryFromSegments(s),this._occludedFillProjectionLines.setGeometryFromSegments(o)),r&&(this._cutProjectionLines.setGeometryFromSegments(t),this._occludedCutProjectionLines.setGeometryFromSegments(i))}_updateColors(e,t,i){const{geometryOutlineColor:s,cutColor:r,fillColor:n,cutColorMuted:l,fillColorMuted:a,cutProjectionLineColor:c,fillProjectionLineColor:u}=o;if(this._renderNode.cutColor=i?r:l,this._renderNode.fillColor=i?n:a,e){const e=t.toUnitRGBA();this._targetGeometry.color=e,this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e,this._fillProjectionLines.color=e,this._occludedFillProjectionLines.color=e,this._renderNode.borderColor=t}else{this._targetGeometry.color=s.toUnitRGBA();const e=(i?c:l).toUnitRGBA();this._cutProjectionLines.color=e,this._occludedCutProjectionLines.color=e;const t=(i?u:a).toUnitRGBA();this._fillProjectionLines.color=t,this._occludedFillProjectionLines.color=t,this._renderNode.borderColor=s}}_updateLabels(e){const{effectiveDisplayUnits:t,depthExtremaPositions:s,messages:o,unitsMessages:r,result:n,visible:l}=e;if(this._cutVolumeLabel.visible=l,this._fillVolumeLabel.visible=l,this._cutVolumeLabel.geometry=s?{type:"point",point:s.cut}:null,this._fillVolumeLabel.geometry=s?{type:"point",point:s.fill}:null,null==n||null==o||null==r)return this._cutVolumeLabel.text="-",void(this._fillVolumeLabel.text="-");const a=t.volume,c=i(o.labels.cut,{volume:I(r,n.cutVolume,a)}),u=i(o.labels.fill,{volume:I(r,n.fillVolume,a)});this._cutVolumeLabel.text=c,this._fillVolumeLabel.text=u}_updateCutFillVisibility(e){e?this._renderNode.enable():this._renderNode.disable()}get _polygonRenderInfo(){const{renderCoordsHelper:e,elevationProvider:t}=this.view,{targetGeometry:i}=this.analysisViewData;if(null==i)return null;const s=E(i,t,e,this._elevationContext,{outlineOutput:"tessellated-indices"});return c(s)?(this._updatingHandles.consumePromise(s),null):s}_updateCutFillGeometry(){const{renderCoordsHelper:e}=this.view,{targetGeometry:t}=this.analysisViewData,{cut:i,fill:s}=this._extrusionHeights;if(!t?.extent)return;const{center:o}=t.extent,r=w(o.x,o.y,0),n=C();e.toRenderCoords(r,t.spatialReference,n);const l=this._getExtrudedVolume(i,r,n),a=this._getExtrudedVolume(s,r,n);null!=l&&null!=a&&this._renderNode.updateGeometries(l,a,n)}_getExtrudedVolume(e,t,i){const{renderCoordsHelper:s,spatialReference:o}=this.view,r=C(),n=1===s.viewingMode;s.worldUpAtPosition(i,r);const{_polygonRenderInfo:l}=this;if(null==l)return null;const a=F(l,{height:e,worldUp:r,spherical:n,requireElevation:!1,requireNormals:!0,requireSizes:!1});if(null==a)return null;const c=_(),u=_();if(P(o,t,c,s.spatialReference),u[12]=-c[12],u[13]=-c[13],u[14]=-c[14],x(a.vertices,a.vertices,u),"stockpile"===this.analysis.measureType)for(let d=0;d<a.normals.length;d+=3)a.normals[d]=r[0],a.normals[d+1]=r[1],a.normals[d+2]=r[2];return new H(a.vertices,a.bottomIndices,a.indices,a.normals)}async _updateMessageBundle(){this.loadingMessages=!0;try{this.unitsMessages=await s("esri/core/t9n/Units"),this.messages=await s("esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis")}finally{this.loadingMessages=!1}}};function I(e,t,i){if(!t||!e)return null;const s=p(t.value,t.unit,i),o=d(s);return u(e,t,s,o)}e([g({constructOnly:!0})],B.prototype,"view",void 0),e([g({constructOnly:!0})],B.prototype,"analysis",void 0),e([g({constructOnly:!0})],B.prototype,"analysisViewData",void 0),e([g()],B.prototype,"unitsMessages",void 0),e([g()],B.prototype,"messages",void 0),e([g()],B.prototype,"loadingMessages",void 0),e([g({readOnly:!0})],B.prototype,"_updatingHandles",void 0),e([g({readOnly:!0})],B.prototype,"visible",null),e([g()],B.prototype,"updating",null),e([g()],B.prototype,"hasUnsupportedError",null),e([g()],B.prototype,"_extrusionHeights",null),e([g()],B.prototype,"_polygonRenderInfo",null),B=e([y("esri.views.3d.analysis.VolumeMeasurement.VolumeMeasurementCutFillVisualization")],B);class T{constructor(e,t,i,s){this.segment=e,this.previous=t,this.next=i,this.isCut=s,this._isOccluded=!1,this._n1=C(),this._n2=C();const o=v(z,j(z,e.endRenderSpace,e.startRenderSpace));v(this._n1,L(this._n1,o,v(q,j(q,t.startRenderSpace,e.startRenderSpace)))),v(this._n2,L(this._n2,o,v(q,j(q,e.startRenderSpace,i.startRenderSpace)))),this._isConvex=l.normalize(V(this._n1,this._n2,o))<0}get isOccluded(){return this._isOccluded}updateOccluded(e){j(z,this.segment.startRenderSpace,e.eye);const t=b(this._n1,z)<0,i=b(this._n2,z)<0,s=this._isOccluded;return this._isOccluded=this._isConvex?t&&i:t||i,this._isOccluded!==s}}const z=C(),q=C();export{B as VolumeMeasurementCutFillVisualization};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{throwIfAborted as l,throwIfAbortError as a}from"../../../core/promiseUtils.js";import{syncAndInitial as n,initial as o}from"../../../core/reactiveUtils.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import p from"../../../core/sql/WhereClause.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../../../Graphic.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{throwIfAborted as l,throwIfAbortError as a}from"../../../core/promiseUtils.js";import{syncAndInitial as n,initial as o}from"../../../core/reactiveUtils.js";import{property as u,subclass as d}from"../../../core/accessorSupport/decorators.js";import p from"../../../core/sql/WhereClause.js";import{fallbackObjectIDAttribute as h}from"../../../layers/LayerConstants.js";import"../../../layers/buildingSublayers/BuildingComponentSublayer.js";import y from"../../../layers/support/FeatureFilter.js";import{fixFields as c,unpackFieldNames as g,populateMissingFields as f}from"../../../layers/support/fieldUtils.js";import m from"../../../rest/support/Query.js";import{isNumber as F}from"../../../support/guards.js";import{BuildingSublayerView3DMixin as b}from"./BuildingSublayerView3D.js";import{I3SMeshView3D as _}from"./I3SMeshView3D.js";import{applyFilterMode as w}from"./i3s/BuildingFilterUtil.js";import{createGetFeatureExtent as E}from"./i3s/I3SGeometryUtil.js";import{I3SMeshViewFilter as x}from"./i3s/I3SMeshViewFilter.js";import{I3SQueryEngine as S}from"./i3s/I3SQueryEngine.js";import{I3SQueryFeatureAdapter as j,I3SQueryFeature as v}from"./i3s/I3SQueryFeatureAdapter.js";import{I3SQueryFeatureStore as I}from"./i3s/I3SQueryFeatureStore.js";import{findFieldsCaseInsensitive as Q,getIndexCrs as q}from"./i3s/I3SUtil.js";import{DefinitionExpressionSceneLayerView as L}from"./support/DefinitionExpressionSceneLayerView.js";import{TemporalSceneLayerView as R}from"./support/TemporalSceneLayerView.js";import O from"../../layers/BuildingComponentSublayerView.js";import{hasPopupTemplate as V,getRequiredFields as U,getFetchPopupTemplate as C}from"../../layers/support/popupUtils.js";import{isInEffectiveScaleRange as A}from"../../support/layerViewUtils.js";import{TaskPriority as H}from"../../support/Scheduler.js";let D=class extends(R(L(_(b(O))))){constructor(e){super(e),this.type="building-component-sublayer-3d",this._elevationContext=2,this._supportsLabeling=!1,this.requiredFields=[],this.progressiveLoadFactor=1,this._queryEngine=null}get i3slayer(){return this.sublayer}get layerViewUid(){return this.layerView.uid}get layerId(){return this.sublayer.layer.id}get sublayerId(){return this.sublayer.id}get layerPopupEnabledAndHasTemplate(){return this.sublayer.popupEnabled&&V(this.sublayer,this.layerView.view.popup?.defaultPopupTemplateEnabled)}initialize(){this._updatingHandles.add(()=>this.mergedFilter,e=>{null!=e&&x.checkSupport(e)?null==this._i3sFilter?this._i3sFilter=new x({viewFilter:e,layerFieldsIndex:this.sublayer.fieldsIndex,loadAsyncModule:e=>this._loadAsyncModule(e),addSqlFilter:(e,r)=>this.addSqlFilter(e,r,this.logError),addTimeFilter:(e,r)=>this.addTimeFilter(e,r)}):this._i3sFilter.viewFilter=e:this._i3sFilter=s(this._i3sFilter)},n),this._updatingHandles.add(()=>[this.sublayer.renderer,this.definitionExpressionFields,this.filterExpressionFields],()=>this._updateRequiredFields()),this._updatingHandles.add(()=>this.sublayer.renderer,e=>this._rendererChange(e),o);const e=()=>this._filterChange();this._updatingHandles.add(()=>this.parsedDefinitionExpression,e),this._updatingHandles.add(()=>this._i3sFilter?.sortedObjectIds,e),this._updatingHandles.add(()=>this._i3sFilter?.parsedWhereClause,e),this._updatingHandles.add(()=>this.getTimeFilterDependencies(),e),this._updatingHandles.add(()=>this.mergedFilter,e),this._updatingHandles.add(()=>[this._i3sFilter?.parsedGeometry,this.filter?.spatialRelationship],()=>this._geometryFilterChange()),this._updatingHandles.add(()=>this.parsedFilterExpressions,()=>this._updateSymbologyOverride(),o),this.addResolvingPromise(this._updateRequiredFields())}get lodFactor(){return this.view.qualitySettings.sceneService.objectLoDFactor}get parsedFilterExpressions(){return"Overview"===this.sublayer.modelName?[]:this.layerView.filterExpressions.map(([e,r])=>{let t;try{t=p.create(e,{fieldsIndex:this.sublayer.fieldsIndex})}catch(a){return i.getLogger(this).error("Failed to parse filterExpression: "+a),null}if(!t.isStandardized)return i.getLogger(this).error("filterExpression is using non standard function"),null;const s=[],l=t.fieldNames;return Q(l,this.sublayer.fieldsIndex,{missingFields:s}),s.length>0?(i.getLogger(this).error(`filterExpression references unknown fields: ${s.join(", ")}`),null):[t,r]}).filter(e=>null!=e)}get filter(){return this._get("filter")}set filter(e){this._set("filter",x.checkSupport(e)?e:null)}isUpdating(){return super.isUpdating()||(this._i3sFilter?.updating??!1)}_updateSymbologyOverride(){const e=this.parsedFilterExpressions;e.length>0?this._setSymbologyOverride((r,t)=>{for(const[s,l]of e)try{if(s.testFeature(r))return w(t,l)}catch(i){this.logError(i)}return w(t,null)},this.filterExpressionFields):this._setSymbologyOverride(null,null)}get filterExpressionFields(){return c(this.sublayer.fieldsIndex,this.parsedFilterExpressions.reduce((e,[r])=>e.concat(r.fieldNames),new Array))}get availableFields(){const e=this.sublayer,r=e.fieldsIndex;let t=this.requiredFields;if(e.outFields||e.layer.outFields){const i=[...e.outFields||[],...e.layer.outFields||[]];t=[...g(r,i),...t]}return t=[...t,e.objectIdField??h],c(r,t)}get _graphicOrigin(){return this.sublayer.graphicOrigin}_createLayerGraphic(e){return new r({attributes:e,layer:this.sublayer.layer,sourceLayer:this.sublayer,origin:this._graphicOrigin})}canResume(){return super.canResume()&&A(this.i3slayer.effectiveScaleRange,this.view.scale)&&(!this._controller||this._controller.rootNodeVisible)}async fetchPopupFeaturesFromGraphics(e,r){const t=this._validateFetchPopupFeatures(r);if(t)throw t;if(0===e.length)return[];const s=[],n=[],o=null!=this.sublayer.associatedLayer?await this.sublayer.associatedLayer.load(r):this.sublayer,u=g(this.sublayer.fieldsIndex,await U(o,C(this.sublayer,r)));l(r);const d=new Set;for(const i of e)f(i,u,d)?n.push(i):s.push(i);return 0===n.length?s:(null!=this.sublayer.associatedLayer&&await this.sublayer.associatedLayer.load().catch(()=>i.getLogger(this).warn("Failed to load associated feature layer. Displaying popup attributes from cached attributes.")),this.whenGraphicAttributes(n,Array.from(d)).catch(e=>(a(e),n)).then(e=>s.concat(e)))}async _updateRequiredFields(){const e=c(this.sublayer.fieldsIndex,[...this.sublayer.renderer?await this.sublayer.renderer.getRequiredFields(this.sublayer.fieldsIndex):[],...this.definitionExpressionFields,...this.filterExpressionFields]);this._set("requiredFields",e)}_validateFetchPopupFeatures(e){const{sublayer:r}=this,{popupEnabled:i}=r;return i?C(r,e)?void 0:new t("buildingscenelayerview3d:fetchPopupFeatures","Layer does not define a popup template",{sublayer:r}):new t("buildingscenelayerview3d:fetchPopupFeatures","Popups are disabled",{sublayer:r})}getFilters(){const e=super.getFilters();return this.addSqlFilter(e,this.parsedDefinitionExpression,this.logError),this._i3sFilter?.addFilters(e,this.view,this._controller.crsIndex,this._collection),e}createQuery(){const e={outFields:["*"],returnGeometry:!1,outSpatialReference:this.view.spatialReference};return null!=this.filter?this.filter.createQuery(e):new m(e)}queryExtent(e,r){return this._ensureQueryEngine().executeQueryForExtent(this._ensureQuery(e),r?.signal)}queryFeatureCount(e,r){return this._ensureQueryEngine().executeQueryForCount(this._ensureQuery(e),r?.signal)}queryFeatures(e,r){return this._ensureQueryEngine().executeQuery(this._ensureQuery(e),r?.signal).then(e=>{if(!e?.features)return e;const r=this.sublayer,t=r.layer,i=this._graphicOrigin;for(const s of e.features)s.layer=t,s.sourceLayer=r,s.origin=i;return e})}async queryObjectIds(e,r){return(await this._ensureQueryEngine().executeQueryForIds(this._ensureQuery(e),r?.signal)).filter(F)}_ensureQueryEngine(){return this._queryEngine??=this._createQueryEngine(),this._queryEngine}_createQueryEngine(){const e=E(this.view.spatialReference,this.view.renderSpatialReference,this._collection);return new S({layerView:this,priority:H.FEATURE_QUERY_ENGINE,spatialIndex:new I({featureAdapter:new j({objectIdField:this.sublayer.objectIdField,attributeStorageInfo:this.sublayer.attributeStorageInfo,getFeatureExtent:e}),forAllFeatures:(e,r)=>this._forAllFeatures((r,t,i)=>e(new v(r,t,i)),r,2),getFeatureExtent:e,sourceSpatialReference:q(this.sublayer),viewSpatialReference:this.view.spatialReference})})}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():m.from(e))}};e([u()],D.prototype,"i3slayer",null),e([u()],D.prototype,"layerView",void 0),e([u()],D.prototype,"lodFactor",null),e([u({readOnly:!0})],D.prototype,"parsedFilterExpressions",null),e([u({type:y})],D.prototype,"filter",null),e([u()],D.prototype,"_i3sFilter",void 0),e([u({type:[String],readOnly:!0})],D.prototype,"filterExpressionFields",null),e([u({type:[String],readOnly:!0})],D.prototype,"requiredFields",void 0),e([u({type:[String],readOnly:!0})],D.prototype,"availableFields",null),e([u()],D.prototype,"_graphicOrigin",null),D=e([d("esri.views.3d.layers.BuildingComponentSublayerView3D")],D);export{D as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a}from"../../../core/reactiveUtils.js";import{generateUID as n}from"../../../core/uid.js";import{property as l,subclass as d}from"../../../core/accessorSupport/decorators.js";import{set as u}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as h,create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as c}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as g}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as m,extentContainsCoords2D as y}from"../../../geometry/support/contains.js";import{newDoubleArray as f,doubleArrayFrom as _}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as b}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as v}from"../../../layers/LayerConstants.js";import{estimateSize as I}from"../../../layers/graphics/dehydratedFeatures.js";import{ImmutableDehydratedPoint as x}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as E}from"../../../layers/graphics/hydratedFeatures.js";import w from"../../../layers/graphics/controllers/I3SOnDemandController.js";import O from"../../../layers/support/FeatureFilter.js";import j from"../../../rest/support/Query.js";import{isBasemapLayerView as N}from"../../../support/basemapUtils.js";import{isGraphic as C}from"../../../support/graphicInstanceUtils.js";import{I3SPointsWorkerHandle as D}from"./I3SPointsWorkerHandle.js";import{LayerView3D as F}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as S}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as G}from"./graphics/QueryEngine.js";import{QueryEngineContext as A}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as V,normalizeEditResultsEvent as P,processAttributeEdits as L}from"./i3s/featureEditing.js";import{getCachedAttributeValue as R}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as H}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as M}from"./i3s/I3SOverrides.js";import{checkRecyclable as U,checkSpatialReferences as Q,containsDraco as q,whenGraphicAttributes as T}from"./i3s/I3SUtil.js";import{attributeLookup as B}from"./support/attributeUtils.js";import{DefinitionExpressionSceneLayerView as k}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as z}from"./support/fieldProperties.js";import{normalizeHighlightTarget as W,emptyHighlightHandle as K,isObjectId as Z}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as $}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as Y}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as J}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as X}from"./support/TemporalSceneLayerView.js";import{debugFlags as ee}from"../support/debugFlags.js";import{compute as te}from"../support/orientedBoundingBox.js";import{updatingProgress as re}from"../support/updatingProperties.js";import{Vertices as ie}from"../webgl-engine/lib/Attribute.js";import se from"../../layers/SceneLayerView.js";import{hasPopupTemplate as oe}from"../../layers/support/popupUtils.js";import{getHighlightName as ae}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as ne,isInEffectiveScaleRange as le}from"../../support/layerViewUtils.js";import{TaskPriority as de}from"../../support/Scheduler.js";const ue=z();class he{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get usedMemory(){return this.graphics.reduce((e,t)=>I(t)+e,i(this.featureIds)+1024)}}let pe=class extends(X(k(Y(F(se))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new H((e,t,r)=>ye(e,t,r),e=>this.processor.graphicsCore.recreateGraphics(e),this.logError),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),U(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()}):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new M({view:this.view,layer:this.layer,memoryController:e}),Q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new J({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o),this._updatingHandles.add(()=>this.layer.renderer,(e,t)=>this._rendererChange(e,t)),this._updatingHandles.add(()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds],()=>this._filterChange()),this._set("processor",new S({owner:this,preferredUpdatePolicy:0,scaleVisibilityEnabled:!ne(),filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t)),this.supportsHeightUnitConversion&&(this._verticalScale=b("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new w({layerView:this}),q(this.layer.geometryDefinitions)&&(this._workerHandle=new D(e=>this.view.resourceController.immediate.schedule(e))),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles([this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.consumePromise(t)}),a(()=>ee.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&ee.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||!this._treeDebugger||ee.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)},o)]),this.when(()=>{this._setupQueryEngine(),this._updatingHandles.add(()=>this.availableFields,()=>this._queryEngine?.clear()),this._updatingHandles.add(()=>this.maximumNumberOfFeatures,e=>this._controller.featureTarget=e,o),this._updatingHandles.add(()=>this.suspended,e=>{e&&this._removeAllNodeData()})})}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._workerHandle=r(this._workerHandle),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return ne()?le(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.pointLoDFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get _graphicOrigin(){return this.layer.graphicOrigin}async whenGraphicAttributes(e,t){return T(this.layer,e,this._getObjectIdField(),t,()=>[...this.loadedGraphics.nodes()])}getHit(e){if(!this.loadedGraphics)return null;const t=E(this.loadedGraphics.find(t=>t.uid===e),this.layer,this._graphicOrigin),r=this._getObjectIdField();return null==t?.attributes?.[r]?null:{type:"graphic",graphic:t,layer:t.layer}}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){const r=ae(t),i=this.layer.objectIdField,s=W(e);if(0===s.length)return K;if(C(s[0])){const e=s;if(null!=B(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map(e=>B(this.layer.fieldsIndex,e.attributes,i));return this.processor.highlightByObjectIds(t,i,r)}return this.processor.highlightByGraphics(e,r)}return Z(s[0])?this.processor.highlightByObjectIds(s,i,r):K}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return V(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._workerHandle&&(this._workerHandle=new D(e=>this.view.resourceController.immediate.schedule(e)));const i=await this._workerHandle.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!me(r)&&!ge(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?_e(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=me(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;c(a,l,0,a,d,0,o.length);const u=me(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new he(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),fe(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const g=this.view.stage.renderView.olidRenderHelper;if(g){const e=N(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];g.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&oe(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;c(t,r,0,t,s,0),e.serviceObbInIndexSR=te(new ie(t,3)),i.isGeographic&&(g(e.serviceObbInIndexSR.center,s,ve,i),e.serviceObbInIndexSR.center=ve)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=f(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:h,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?_(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=f(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??be[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;u(ve,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?m(s,ve):y(s,ve))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(ve[0],ve[1],ve[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),l=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??n(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=new x(u,t[g],t[g+1],m),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(Ie.property="geometry",Ie.graphic=f,Ie.oldValue=f.geometry,Ie.newValue=y,f.geometry=y,f.level=i,l.graphicUpdateHandler(Ie),xe()),d.push(f);else{const e=n();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)}),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributeInfo=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),fe(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode(t=>e.push(t.node.id)),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode(t=>e.push(t.node)),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode((t,r)=>e.push(r))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){fe(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach(e=>e.nodeIndex===t&&i.push(e.uid)),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||v}_getGlobalIdField(){return this.layer.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every((e,t)=>s[t]===o[t])||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode(e=>this._filterNode(e))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(Ie.graphic=s,Ie.property="visible",Ie.oldValue=e,Ie.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(Ie),xe())}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new j(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():j.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new A(s,e,o,()=>this.processor.featureStore,i,r,()=>this.availableFields);this._queryEngine=new G({context:a,priority:de.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await P(t,e);L(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode(t=>e(t.node,t.featureIds)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new $(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([l()],pe.prototype,"processor",void 0),e([l({type:O})],pe.prototype,"filter",void 0),e([l()],pe.prototype,"loadedGraphics",void 0),e([l()],pe.prototype,"i3slayer",null),e([l()],pe.prototype,"layerViewUid",null),e([l()],pe.prototype,"_controller",void 0),e([l()],pe.prototype,"updating",void 0),e([l()],pe.prototype,"suspended",void 0),e([l(re)],pe.prototype,"updatingProgress",void 0),e([l()],pe.prototype,"updatingProgressValue",null),e([l({readOnly:!0})],pe.prototype,"visibleAtCurrentScale",null),e([l(ue.requiredFields)],pe.prototype,"requiredFields",null),e([l(ue.availableFields)],pe.prototype,"availableFields",void 0),e([l()],pe.prototype,"_fieldsHelper",void 0),e([l({type:Number})],pe.prototype,"maximumNumberOfFeatures",null),e([l({readOnly:!0})],pe.prototype,"maximumNumberOfFeaturesExceeded",null),e([l()],pe.prototype,"_excludeObjectIds",null),e([l({readOnly:!0})],pe.prototype,"lodFactor",null),e([l({readOnly:!0})],pe.prototype,"hasM",null),e([l({readOnly:!0})],pe.prototype,"hasZ",null),e([l()],pe.prototype,"contentVisible",null),e([l({readOnly:!0})],pe.prototype,"legendEnabled",null),e([l()],pe.prototype,"_graphicOrigin",null),pe=e([d("esri.views.3d.layers.SceneLayerGraphicsView3D")],pe);const ce=pe;function ge(e){return"pointData"in e}function me(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function ye(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=R(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function fe(e){const t=e.attributeInfo;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=R(t.attributeData[e],i))}}}function _e(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const be={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},ve=p(),Ie={graphic:null,property:null,oldValue:null,newValue:null};function xe(){Ie.graphic=null,Ie.property=null,Ie.oldValue=null,Ie.newValue=null}export{ce as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../../core/has.js";import t from"../../../core/Logger.js";import{destroyMaybe as r}from"../../../core/maybe.js";import{estimateNumberArrayMemory as i}from"../../../core/memoryEstimations.js";import{throwIfAborted as s}from"../../../core/promiseUtils.js";import{initial as o,watch as a,sync as n}from"../../../core/reactiveUtils.js";import{generateUID as l}from"../../../core/uid.js";import{property as d,subclass as u}from"../../../core/accessorSupport/decorators.js";import{set as h}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{ZEROS as p,create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{projectBuffer as g}from"../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as m}from"../../../geometry/projection/projectVectorToVector.js";import{extentContainsCoords3D as y,extentContainsCoords2D as f}from"../../../geometry/support/contains.js";import{newDoubleArray as _,doubleArrayFrom as b}from"../../../geometry/support/DoubleArray.js";import{getGeometryZScaler as v}from"../../../geometry/support/zscale.js";import{fallbackObjectIDAttribute as I}from"../../../layers/LayerConstants.js";import{estimateSize as x}from"../../../layers/graphics/dehydratedFeatures.js";import{ImmutableDehydratedPoint as E}from"../../../layers/graphics/dehydratedPoint.js";import{hydrateGraphic as w}from"../../../layers/graphics/hydratedFeatures.js";import O from"../../../layers/graphics/controllers/I3SOnDemandController.js";import j from"../../../layers/support/FeatureFilter.js";import N from"../../../rest/support/Query.js";import{isBasemapLayerView as C}from"../../../support/basemapUtils.js";import{isGraphic as D}from"../../../support/graphicInstanceUtils.js";import{I3SPointsWorkerHandle as F}from"./I3SPointsWorkerHandle.js";import{LayerView3D as S}from"./LayerView3D.js";import{Graphics3DFeatureProcessor as G}from"./graphics/Graphics3DFeatureProcessor.js";import{QueryEngine as A}from"./graphics/QueryEngine.js";import{QueryEngineContext as V}from"./graphics/QueryEngineContext.js";import{createInteractiveEditSession as P,normalizeEditResultsEvent as L,processAttributeEdits as R}from"./i3s/featureEditing.js";import{getCachedAttributeValue as H}from"./i3s/I3SBinaryReader.js";import{I3SGraphicsMap as M}from"./i3s/I3SGraphicsMap.js";import{I3SOverrides as U}from"./i3s/I3SOverrides.js";import{checkRecyclable as Q,checkSpatialReferences as q,containsDraco as T,whenGraphicAttributes as B}from"./i3s/I3SUtil.js";import{attributeLookup as k}from"./support/attributeUtils.js";import{DefinitionExpressionSceneLayerView as z}from"./support/DefinitionExpressionSceneLayerView.js";import{defineFieldProperties as W}from"./support/fieldProperties.js";import{normalizeHighlightTarget as K,emptyHighlightHandle as Z,isObjectId as $}from"./support/highlightUtils.js";import{LayerViewPerformanceInfo as Y}from"./support/LayerViewPerformanceInfo.js";import{PopupSceneLayerView as J}from"./support/PopupSceneLayerView.js";import{SceneLayerViewRequiredFields as X}from"./support/SceneLayerViewRequiredFields.js";import{TemporalSceneLayerView as ee}from"./support/TemporalSceneLayerView.js";import{debugFlags as te}from"../support/debugFlags.js";import{compute as re}from"../support/orientedBoundingBox.js";import{updatingProgress as ie}from"../support/updatingProperties.js";import{Vertices as se}from"../webgl-engine/lib/Attribute.js";import oe from"../../layers/SceneLayerView.js";import{hasPopupTemplate as ae}from"../../layers/support/popupUtils.js";import{getHighlightName as ne}from"../../support/highlightOptionsUtils.js";import{hasLayerBasedScaleVisibility as le,isInEffectiveScaleRange as de}from"../../support/layerViewUtils.js";import{TaskPriority as ue}from"../../support/Scheduler.js";const he=W();class pe{constructor(e,t,r,i){this.graphics=e,this.featureIds=t,this.attributeInfo=r,this.node=i}get usedMemory(){return this.graphics.reduce((e,t)=>x(t)+e,i(this.featureIds)+1024)}}let ce=class extends(ee(z(J(S(oe))))){constructor(){super(...arguments),this.type="scene-layer-graphics-3d",this._queryEngine=null,this._memCache=null,this._interactiveEditingSessions=new Map,this._pendingEditsQueue=Promise.resolve(),this.loadedGraphics=new M((e,t,r)=>fe(e,t,r),e=>this.processor.graphicsCore.recreateGraphics(e),this.logError),this.holeFilling="always",this.progressiveLoadFactor=1,this.supportsHeightUnitConversion=!0,this._coordinatesOutsideExtentErrors=0,this._maxCoordinatesOutsideExtentErrors=20}tryRecycleWith(e,t){return e.url===this.layer.url&&this._i3sOverrides.isEmpty?e.load(t).then(()=>{s(t),Q(this.layer,e,this._i3sOverrides),this.layer=e,this._i3sOverrides.destroy();const i=this.view.resourceController?.memoryController;this._i3sOverrides=new U({view:this.view,layer:e,memoryController:i}),r(this._queryEngine),this._setupQueryEngine(),this.processor.resetObjectStates()}):null}initialize(){this.addResolvingPromise(this.layer.indexInfo);const e=this.view.resourceController?.memoryController;this._i3sOverrides=new U({view:this.view,layer:this.layer,memoryController:e}),q(this.layer,this.view.spatialReference,this.view.viewingMode),this._fieldsHelper=new X({layerView:this}),this._updatingHandles.add(()=>this.layer.rangeInfos,e=>this._rangeInfosChanged(e),o),this._updatingHandles.add(()=>this.layer.renderer,(e,t)=>this._rendererChange(e,t)),this._updatingHandles.add(()=>[this.parsedDefinitionExpression,this.layer.excludeObjectIds],()=>this._filterChange()),this._set("processor",new G({owner:this,preferredUpdatePolicy:0,scaleVisibilityEnabled:!le(),filterVisibilityEnabled:!0,timeExtentEnabled:!1,frustumVisibilityEnabled:!1,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!1,setUidToIdOnAdd:!1,dataExtent:this.layer.fullExtent,updateClippingExtent:e=>this._updateClippingExtent(e)})),this.processor.elevationAlignment?.events.on("invalidate-elevation",({extent:e,spatialReference:t})=>this._controller.updateElevationChanged(e,t)),this.supportsHeightUnitConversion&&(this._verticalScale=v("point",this.layer.spatialReference,this.view.spatialReference)),this.addResolvingPromise(this.processor.when()),this._memCache=this.view.resourceController.memoryController.newCache(`psl-${this.uid}`),this._controller=new O({layerView:this}),T(this.layer.geometryDefinitions)&&(this._workerHandle=new F(e=>this.view.resourceController.immediate.schedule(e))),this.addHandles(this.layer.on("apply-edits",e=>this._updatingHandles.addPromise(e.result))),this.addHandles([this.layer.on("edits",e=>{const t=this._pendingEditsQueue.then(()=>this._handleEdits(e)).then();this._pendingEditsQueue=t,this._updatingHandles.consumePromise(t)}),a(()=>te.I3S_TREE_SHOW_TILES,e=>{if(e&&!this._treeDebugger){const e=this._controller.crsIndex;import("./support/I3STreeDebugger.js").then(({I3STreeDebugger:t})=>{!this._treeDebugger&&te.I3S_TREE_SHOW_TILES&&(this._treeDebugger=new t({lv:this,view:this.view,nodeSR:e}))})}else e||!this._treeDebugger||te.I3S_TREE_SHOW_TILES||(this._treeDebugger.destroy(),this._treeDebugger=null)},o)]),this.when(()=>{this._setupQueryEngine(),this._updatingHandles.add(()=>this.availableFields,()=>this._queryEngine?.clear(),n),this._updatingHandles.add(()=>this.maximumNumberOfFeatures,e=>this._controller.featureTarget=e,o),this._updatingHandles.add(()=>this.suspended,e=>{e&&this._removeAllNodeData()})})}destroy(){this._treeDebugger=r(this._treeDebugger),this._i3sOverrides=r(this._i3sOverrides),this._set("processor",r(this.processor)),this._controller=r(this._controller),this._queryEngine=r(this._queryEngine),this._workerHandle=r(this._workerHandle),this._memCache=r(this._memCache),this.loadedGraphics.clear(),this._fieldsHelper=r(this._fieldsHelper)}get i3slayer(){return this.layer}get layerViewUid(){return this.uid}get updatingProgressValue(){return this._controller?.updatingProgress??1}get visibleAtCurrentScale(){return le()?de(this.layer.effectiveScaleRange,this.view.scale):!this.processor?.scaleVisibilitySuspended}get requiredFields(){return this._fieldsHelper?.requiredFields??[]}get maximumNumberOfFeatures(){const e=this.processor?.graphicsCore?.displayFeatureLimit;return e?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){null!=e?(this._override("maximumNumberOfFeatures",e),this._controller.fixedFeatureTarget=!0):(this._clearOverride("maximumNumberOfFeatures"),this._controller.fixedFeatureTarget=!1)}get maximumNumberOfFeaturesExceeded(){return!this.suspended&&(!!this._controller?.useMaximumNumberOfFeatures&&!this._controller.leavesReached)}get _excludeObjectIds(){return new Set(this.layer.excludeObjectIds)}get lodFactor(){return"Labels"===this.layer.semantic?1:this.view.qualitySettings.sceneService.pointLoDFactor}get hasM(){return!1}get hasZ(){return!0}get contentVisible(){return!this.suspended&&!!this._controller?.rootNodeVisible}get legendEnabled(){return this.contentVisible&&!0===this.i3slayer?.legendEnabled}get _graphicOrigin(){return this.layer.graphicOrigin}async whenGraphicAttributes(e,t){return B(this.layer,e,this._getObjectIdField(),t,()=>[...this.loadedGraphics.nodes()])}getHit(e){if(!this.loadedGraphics)return null;const t=w(this.loadedGraphics.find(t=>t.uid===e),this.layer,this._graphicOrigin),r=this._getObjectIdField();return null==t?.attributes?.[r]?null:{type:"graphic",graphic:t,layer:t.layer}}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor.computeAttachmentOrigin(e,t)}isUpdating(){return!!(this._controller?.updating||this.processor?.updating||this._fieldsHelper?.updating||this.layerFilterUpdating)}highlight(e,t){const r=ne(t),i=this.layer.objectIdField,s=K(e);if(0===s.length)return Z;if(D(s[0])){const e=s;if(null!=k(this.layer.fieldsIndex,e[0].attributes,i)){const t=e.map(e=>k(this.layer.fieldsIndex,e.attributes,i));return this.processor.highlightByObjectIds(t,i,r)}return this.processor.highlightByGraphics(e,r)}return $(s[0])?this.processor.highlightByObjectIds(s,i,r):Z}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}createInteractiveEditSession(e){return P(this._attributeEditingContext,e)}async _decompressBinaryPointData(e,t){const r={geometryBuffer:e.geometryBuffer};null==this._workerHandle&&(this._workerHandle=new F(e=>this.view.resourceController.immediate.schedule(e)));const i=await this._workerHandle.invoke(r,t);if(null==i)throw new Error("Failed to decompress Draco point data");return{positionData:i.positions,featureIds:i.featureIds}}async addNode(e,r,i){if(!ye(r)&&!me(r))throw new Error;if(this.loadedGraphics.hasNode(e.index))return void t.getLogger(this).error("I3S node "+e.id+" already added");const s=null!=this.layer.fullExtent?be(this.layer.fullExtent.clone(),.5):null,{featureIds:o,pointPositions:a}=ye(r)?await this._extractBinaryPointPositions(e,r,i):this._extractLegacyPointPositions(r),n=new Array;this._validatePositions(e,o,a,s,n);const l=this._controller.crsVertex,d=this.view.spatialReference;g(a,l,0,a,d,0,o.length);const u=ye(r)?e.level:0,h=this._createGraphics(o,a,e.index,u),p=new pe(h,o,r.attributeDataInfo,e);if(await this._i3sOverrides.applyAttributeOverrides(p.featureIds,r.attributeDataInfo,i),e.numFeatures=p.graphics.length,this._updateNodeMemory(e),_e(p),n.length>0&&(this._computeObb(e,n,l),this._controller.updateVisibility(e.index)),!this._controller.isGeometryVisible(e))return void this._cacheNodeData(p);if(null!=this._verticalScale)for(const t of p.graphics)this._verticalScale(t.geometry);const c=this.view.stage.renderView.olidRenderHelper;if(c){const e=C(this.view,this.uid);for(let t=0;t<p.featureIds.length;t++){const r=p.featureIds[t];c.setUidToObjectAndLayerId(r,p.graphics[t].uid,this.layer.id,this.uid,this.layer.popupEnabled&&!e&&ae(this.layer,this.view.popup?.defaultPopupTemplateEnabled),p.node.resources.attributes,t)}}this.loadedGraphics.addNode(e.index,p),this._controller.updateLoadStatus(e.index,!0),this._filterNode(p),this._treeDebugger&&this._treeDebugger.update()}_computeObb(e,t,r){const i=this._controller.crsIndex,s=i.isGeographic?this.view.renderSpatialReference:i;g(t,r,0,t,s,0),e.serviceObbInIndexSR=re(new se(t,3)),i.isGeographic&&(m(e.serviceObbInIndexSR.center,s,Ie,i),e.serviceObbInIndexSR.center=Ie)}isNodeLoaded(e){return this.loadedGraphics.hasNode(e)}isNodeReloading(){return!1}updateNodeState(){}getNodeComponentHandle(){}async _extractBinaryPointPositions(e,t,r){const i=await this._decompressBinaryPointData(t,r),s=i.positionData,o=3,a=s.length/o,n=_(3*a),l=null!=e.serviceObbInIndexSR?e.serviceObbInIndexSR.center:p,d=Math.abs(l[2])*2**-20;for(let u=0;u<a;u++){const e=u*o;n[e]=s[e]+l[0],n[e+1]=s[e+1]+l[1],n[e+2]=s[e+2]+l[2],Math.abs(n[e+2])<d&&(n[e+2]=0)}return{featureIds:i.featureIds?b(i.featureIds):[],pointPositions:n}}_extractLegacyPointPositions(e){const t=e.pointData.length,r=_(3*t),i=new Array;for(let s=0;s<t;s++){const t=e.pointData[s],o=t.featureDataPosition,a=o.length,n=t.geometries?.[0]??ve[a],l=t.featureIds[0];if("Embedded"!==n.type||"points"!==n.params.type||a<2||a>3)continue;const d=n.params.vertexAttributes?.position??[0,0,0],u=3*i.length;r[u]=o[0]+d[0],r[u+1]=o[1]+d[1],r[u+2]=3===a?o[2]+d[2]:NaN,i.push(l)}return{featureIds:i,pointPositions:r}}_validatePositions(e,r,i,s,o){if(null==s&&e.serviceObbInIndexSR)return;const a=r.length,n=3;for(let l=0;l<a;l++){const r=l*n;h(Ie,i[r],i[r+1],i[r+2]);const a=!Number.isNaN(i[2]);null==s||(a?y(s,Ie):f(s,Ie))||(this._coordinatesOutsideExtentErrors<this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Service Error: Coordinates outside of layer extent"),this._coordinatesOutsideExtentErrors+1===this._maxCoordinatesOutsideExtentErrors&&t.getLogger(this).error("Maximum number of errors reached. Further errors are ignored."),this._coordinatesOutsideExtentErrors++),e.serviceObbInIndexSR||o.push(Ie[0],Ie[1],Ie[2])}}_createGraphics(e,t,r,i){const s=e.length,o=3,a=this._getObjectIdField(),n=this.processor.graphicsCore,d=new Array,u=this.view.spatialReference;for(let h=0;h<s;h++){const s=e[h],p={};null!=s&&(p[a]=s);const c=s??l(),g=h*o,m=isNaN(t[g+2])?void 0:t[g+2],y=new E(u,t[g],t[g+1],m),f=this.loadedGraphics.get(c);if(null!=f)(null==f.level||f.level<i)&&(xe.property="geometry",xe.graphic=f,xe.oldValue=f.geometry,xe.newValue=y,f.geometry=y,f.level=i,n.graphicUpdateHandler(xe),Ee()),d.push(f);else{const e=l();d.push({objectId:c,uid:e,geometry:y,attributes:p,visible:!0,nodeIndex:r,level:i})}}return d}_updateNodeMemory(e){e.memory=4096+(e.numFeatures??0)*this.processor.graphicsCore.usedMemoryPerGraphic}_cacheNodeData(e){this._memCache.put(this._getMemCacheKey(e.node),e)}_getMemCacheKey(e){return`${e.index}`}_removeAllNodeData(){this.loadedGraphics.forEachNode((e,t)=>{if(e){const t=e.node;this._updateNodeMemory(t),this._cacheNodeData(e)}this._controller.updateLoadStatus(t,!1)}),this._treeDebugger&&this._treeDebugger.update(),this.loadedGraphics.clear()}removeNode(e){const t=this._removeNodeStageData(e);t&&(this._updateNodeMemory(t.node),this._cacheNodeData(t))}_removeNodeStageData(e){const t=this.loadedGraphics.getNode(e);return null==t?null:(this._controller.updateLoadStatus(e,!1),this.loadedGraphics.removeNode(e),this._treeDebugger&&this._treeDebugger.update(),t)}async loadCachedNodeData(e){return this._memCache?.pop(this._getMemCacheKey(e))}async addCachedNodeData(e,r,i,s){this.loadedGraphics.hasNode(e.index)?t.getLogger(this).error("I3S node "+e.id+" already added"):(await this._i3sOverrides.applyAttributeOverrides(r.featureIds,i,s),r.attributeInfo=i,this.loadedGraphics.addNode(e.index,r),this._controller.updateLoadStatus(e.index,!0),this._updateNodeMemory(e),_e(r),this._filterNode(r),this._treeDebugger&&this._treeDebugger.update())}getLoadedNodeIds(){const e=[];return this.loadedGraphics.forEachNode(t=>e.push(t.node.id)),e.sort()}getVisibleNodes(){const e=new Array;return this.loadedGraphics.forEachNode(t=>e.push(t.node)),e}getLoadedNodeIndices(e){this.loadedGraphics.forEachNode((t,r)=>e.push(r))}getLoadedAttributes(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.loadedAttributes}getAttributeData(e){const t=this.loadedGraphics.getNode(e);if(null!=t?.attributeInfo)return t.attributeInfo.attributeData}_setAttributeData(e,t){const r=this.loadedGraphics.getNode(e);null!=r?.attributeInfo&&(r.attributeInfo.attributeData=t,this._attributeValuesChanged(r))}async updateAttributes(e,t,r){const i=this.loadedGraphics.getNode(e);null!=i&&(await this._i3sOverrides.applyAttributeOverrides(i.featureIds,t,r),i.attributeInfo=t,this._attributeValuesChanged(i))}_attributeValuesChanged(e){_e(e),this._filterNode(e);const{processor:t}=this,{graphicsCore:r}=t;if(r.labelsEnabled){const t=e.node.index,i=new Array;e.graphics.forEach(e=>e.nodeIndex===t&&i.push(e.uid)),r.updateLabelingInfo(i)}t.refreshFilter()}_updateClippingExtent(e){return this._controller&&this._controller.updateClippingArea(e),!1}_getObjectIdField(){return this.layer.objectIdField||I}_getGlobalIdField(){return this.layer.globalIdField}async _rendererChange(e,t){const{layer:{fieldsIndex:r}}=this,i=new Set;let s,o;e?(await e.collectRequiredFields(i,r),s=Array.from(i).sort()):s=[],i.clear(),t?(await t.collectRequiredFields(i,r),o=Array.from(i).sort()):o=[],s.length===o.length&&s.every((e,t)=>s[t]===o[t])||this._reloadAllNodes()}_rangeInfosChanged(e){null!=e&&e.length>0&&t.getLogger(this).warn("Unsupported property: rangeInfos are currently only serialized to and from web scenes but do not affect rendering.")}_filterChange(){this.loadedGraphics.forEachNode(e=>this._filterNode(e))}_reloadAllNodes(){this._removeAllNodeData(),this._controller&&this._controller.restartNodeLoading()}_filterNode(e){const t=this.parsedDefinitionExpression,r=this._excludeObjectIds,i=this._getObjectIdField();for(const s of e.graphics){const e=s.visible,o=this._evaluateClause(t,s),a=!r.has(s.attributes[i]);s.visible=o&&a,e!==s.visible&&(xe.graphic=s,xe.property="visible",xe.oldValue=e,xe.newValue=s.visible,this.processor.graphicsCore.graphicUpdateHandler(xe),Ee())}}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return this.filter?.createQuery(e)??new N(e)}queryFeatures(e,t){return this._queryEngine.executeQuery(this._ensureQuery(e),t?.signal)}queryObjectIds(e,t){return this._queryEngine.executeQueryForIds(this._ensureQuery(e),t?.signal)}queryFeatureCount(e,t){return this._queryEngine.executeQueryForCount(this._ensureQuery(e),t?.signal)}queryExtent(e,t){return this._queryEngine.executeQueryForExtent(this._ensureQuery(e),t?.signal)}_ensureQuery(e){return this._addDefinitionExpressionToQuery(null==e?this.createQuery():N.from(e))}_setupQueryEngine(){const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:s,resourceController:o}=t,a=new V(s,e,o,()=>this.processor.featureStore,i,r,()=>this.availableFields);this._queryEngine=new A({context:a,priority:ue.FEATURE_QUERY_ENGINE})}get usedMemory(){return this.processor?.graphicsCore?.usedMemory??0}get unloadedMemory(){return.8*((this._controller?.unloadedMemoryEstimate??0)+(this.processor?.graphicsCore?.unprocessedMemoryEstimate??0))}get ignoresMemoryFactor(){return this._controller&&this._controller.fixedFeatureTarget}async _handleEdits(e){const t=this._attributeEditingContext,r=await L(t,e);R(t,r)}get _attributeEditingContext(){const e=this._getObjectIdField(),t=this._getGlobalIdField();return{sessions:this._interactiveEditingSessions,fieldsIndex:this.layer.fieldsIndex,objectIdField:e,globalIdField:t,forEachNode:e=>this.loadedGraphics.forEachNode(t=>e(t.node,t.featureIds)),attributeStorageInfo:this.i3slayer.attributeStorageInfo??[],i3sOverrides:this._i3sOverrides,getAttributeData:e=>this.getAttributeData(e),setAttributeData:(t,r,i)=>{this._setAttributeData(t,r);const s=this.loadedGraphics.getNode(t);if(null!=i){const t=this.loadedGraphics.get(i.attributes[e]);null!=t&&this.processor.graphicsCore.recreateGraphics([t])}else null!=s&&this.processor.graphicsCore.recreateGraphics(s.graphics)},clearMemCache:()=>{}}}get performanceInfo(){return new Y(this.usedMemory,this.loadedGraphics.length,-1,this.maximumNumberOfFeatures,this.loadedGraphics.nodeCount,this.processor.graphicsCore.performanceInfo)}get test(){}};e([d()],ce.prototype,"processor",void 0),e([d({type:j})],ce.prototype,"filter",void 0),e([d()],ce.prototype,"loadedGraphics",void 0),e([d()],ce.prototype,"i3slayer",null),e([d()],ce.prototype,"layerViewUid",null),e([d()],ce.prototype,"_controller",void 0),e([d()],ce.prototype,"updating",void 0),e([d()],ce.prototype,"suspended",void 0),e([d(ie)],ce.prototype,"updatingProgress",void 0),e([d()],ce.prototype,"updatingProgressValue",null),e([d({readOnly:!0})],ce.prototype,"visibleAtCurrentScale",null),e([d(he.requiredFields)],ce.prototype,"requiredFields",null),e([d(he.availableFields)],ce.prototype,"availableFields",void 0),e([d()],ce.prototype,"_fieldsHelper",void 0),e([d({type:Number})],ce.prototype,"maximumNumberOfFeatures",null),e([d({readOnly:!0})],ce.prototype,"maximumNumberOfFeaturesExceeded",null),e([d()],ce.prototype,"_excludeObjectIds",null),e([d({readOnly:!0})],ce.prototype,"lodFactor",null),e([d({readOnly:!0})],ce.prototype,"hasM",null),e([d({readOnly:!0})],ce.prototype,"hasZ",null),e([d()],ce.prototype,"contentVisible",null),e([d({readOnly:!0})],ce.prototype,"legendEnabled",null),e([d()],ce.prototype,"_graphicOrigin",null),ce=e([u("esri.views.3d.layers.SceneLayerGraphicsView3D")],ce);const ge=ce;function me(e){return"pointData"in e}function ye(e){return"geometryBuffer"in e&&null!==e.geometryBuffer}function fe(e,t,r){const i=t.attributeInfo;if(null==i?.loadedAttributes||null==i.attributeData)return!1;let s=!1;for(const{name:o}of i.loadedAttributes)if(i.attributeData[o]){const t=H(i.attributeData[o],r);t!==e.attributes[o]&&(e.attributes[o]=t,s=!0)}return s}function _e(e){const t=e.attributeInfo;if(null==t?.loadedAttributes||null==t.attributeData)return;const r=e.node.index;for(let i=0;i<e.graphics.length;i++){const s=e.graphics[i];if(s.nodeIndex===r){s.attributes||(s.attributes={});for(const{name:e}of t.loadedAttributes)t.attributeData[e]&&(s.attributes[e]=H(t.attributeData[e],i))}}}function be(e,t){return e.xmin-=t,e.ymin-=t,e.xmax+=t,e.ymax+=t,null!=e.zmin&&null!=e.zmax&&(e.zmin-=t,e.zmax+=t),null!=e.mmin&&null!=e.mmax&&(e.mmin-=t,e.mmax+=t),e}const ve={2:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0]}}},3:{type:"Embedded",params:{type:"points",vertexAttributes:{position:[0,0,0]}}}},Ie=c(),xe={graphic:null,property:null,oldValue:null,newValue:null};function Ee(){xe.graphic=null,xe.property=null,xe.oldValue=null,xe.newValue=null}export{ge as default};
|