@arcgis/core 5.2.0-next.125 → 5.2.0-next.127
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/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +3 -2
- package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -0
- package/applications/Components/basemapToggleUtils.d.ts +53 -0
- package/applications/Components/basemapToggleUtils.js +2 -0
- package/arcgisGlobal.d.ts +2 -0
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{e35eb93c0fb1f6de8db0.js → 00d9e41deecf5828975c.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe9582bc2244667e40ab.js → 05afa8c2b5929ce0545a.js} +1 -1
- package/assets/esri/core/workers/chunks/0a20f84b5f004a77a9f9.js +1 -0
- package/assets/esri/core/workers/chunks/{cfd56e0a716baf95e17b.js → 0a2b7c691a577cb3d189.js} +1 -1
- package/assets/esri/core/workers/chunks/{6cf34cfdd063a1b6fe3e.js → 0ccd4200c5a2a5de6e16.js} +1 -1
- package/assets/esri/core/workers/chunks/{ab8a1140bf31f46f8ebf.js → 1262918b2161d79851c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{bdf012e591a8476db467.js → 1406a884241809b62bff.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3ef23923424ad8c5048.js → 1c2723f9630e7d597843.js} +1 -1
- package/assets/esri/core/workers/chunks/{378bdb4e5cd1ebada1f4.js → 1c33aa349beea9a3792f.js} +1 -1
- package/assets/esri/core/workers/chunks/1d040aa8951fff3141d9.js +1 -0
- package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js → 2226c20c38e20713bcb5.js} +2 -2
- package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js.LICENSE.txt → 2226c20c38e20713bcb5.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/26995de0c18bef8db590.js +1 -0
- package/assets/esri/core/workers/chunks/2c7fc24649d91552e68a.js +1 -0
- package/assets/esri/core/workers/chunks/{f05becec0952a61bc654.js → 2ebad7e588b26e74cefe.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f52ad525744b8793d49.js → 3b7dff15a0058ea29886.js} +1 -1
- package/assets/esri/core/workers/chunks/{4716693eca44e8f89f5c.js → 3bf56c33876ba56c4b21.js} +1 -1
- package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +1 -0
- package/assets/esri/core/workers/chunks/3ef367c9b7bf1588307d.js +1 -0
- package/assets/esri/core/workers/chunks/{5b9b76e180cf206a8a0c.js → 4327d2c39a660bd89da7.js} +1 -1
- package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +1 -0
- package/assets/esri/core/workers/chunks/474d9541d387b31ad275.js +1 -0
- package/assets/esri/core/workers/chunks/{26bc509a031788bfa678.js → 4f464047c6f6c9486efd.js} +1 -1
- package/assets/esri/core/workers/chunks/50c29d10ec53f0e48e8a.js +1 -0
- package/assets/esri/core/workers/chunks/{58528ccb7f72ae76d52b.js → 540f60e31b19d85e9371.js} +1 -1
- package/assets/esri/core/workers/chunks/{44857a76be2c0ac65bb9.js → 55a560fd872f7463b33d.js} +1 -1
- package/assets/esri/core/workers/chunks/58fb92775d668cfd295c.js +1 -0
- package/assets/esri/core/workers/chunks/{f0901f9c7135b708434f.js → 5adf2792416b22cd602f.js} +1 -1
- package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 668ec0bdfb2095e90c9e.js} +1 -1
- package/assets/esri/core/workers/chunks/67678054342178b601cf.js +1 -0
- package/assets/esri/core/workers/chunks/67dcf9b873cb037b2647.js +1 -0
- package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +1 -0
- package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +1 -0
- package/assets/esri/core/workers/chunks/7d6da4e89aa951e6523f.js +1 -0
- package/assets/esri/core/workers/chunks/7dd94567833386dc74de.js +1 -0
- package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 86d7a3ae672a51b75fcc.js} +1 -1
- package/assets/esri/core/workers/chunks/88e11b645a1361f1bdbe.js +1 -0
- package/assets/esri/core/workers/chunks/{f0709c48daca93e759c8.js → 8b0d6205ceeec1ab446f.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f55701d23a5e5a0c70c.js → 8cb216404a6254bc695c.js} +123 -122
- package/assets/esri/core/workers/chunks/9d6a96e4c7ccedcb0c13.js +1 -0
- package/assets/esri/core/workers/chunks/9ec04faad97be55309b8.js +1 -0
- package/assets/esri/core/workers/chunks/a08385ebf1715414c1a6.js +1 -0
- package/assets/esri/core/workers/chunks/{b96358d475dc98034aa4.js → a15ed056e7493ddf3b4c.js} +1 -1
- package/assets/esri/core/workers/chunks/{25e212fe9a2ea37c9e81.js → a3a33ffa34f4d645ddfe.js} +1 -1
- package/assets/esri/core/workers/chunks/{e22a013ec38989caf9de.js → a790fc6b22acf651574b.js} +1 -1
- package/assets/esri/core/workers/chunks/af0704494398f33aa315.js +1 -0
- package/assets/esri/core/workers/chunks/{813dd84933b407c8fe86.js → b34305474a861aaf6ccb.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce1ccf9ec90b786591e5.js → b396c4b4bb144200acc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{bbaaebe1774a22dba39b.js → bbfb80a6983574007ce5.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f082329a544c2c1d62d.js → bcf2e5cf6b9c6d0442bb.js} +1 -1
- package/assets/esri/core/workers/chunks/c35e9dee87937f483a3d.js +1 -0
- package/assets/esri/core/workers/chunks/c5b733c3a5b2680042a2.js +1 -0
- package/assets/esri/core/workers/chunks/{4f7e8e4ddf52b5245ea4.js → c77496c350004ee66eb2.js} +1 -1
- package/assets/esri/core/workers/chunks/{85739ed6af0f0a3cb302.js → c94bdfed831c775e04c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e3fd81653dc0d86456c.js → cfeba0ffb7fdc2a9af05.js} +1 -1
- package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +1 -0
- package/assets/esri/core/workers/chunks/d5f0fed415b5b155d57c.js +1 -0
- package/assets/esri/core/workers/chunks/d6e914f6ed45ea59034e.js +1 -0
- package/assets/esri/core/workers/chunks/{0fba5c0e89b057da548d.js → dc92710a8fdfb9135e55.js} +1 -1
- package/assets/esri/core/workers/chunks/e0894a308c84d5c158b0.js +1 -0
- package/assets/esri/core/workers/chunks/{df79c00b5ddbef7148a0.js → eaa7cb3ffa8c11706a09.js} +1 -1
- package/assets/esri/core/workers/chunks/eebbc86a15ae3adb5f38.js +1 -0
- package/assets/esri/core/workers/chunks/f479b4a4cee4bb2e046c.js +1 -0
- package/assets/esri/core/workers/chunks/{78abd6c42f39e6f6ffbb.js → f983296b6f4a62a911eb.js} +1 -1
- package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
- package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
- package/assets/esri/images/portal/propresentation16.png +0 -0
- package/assets/esri/images/portal/urbanproject16.png +0 -0
- package/assets/esri/images/support/loading-throb.gif +0 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/assets/esri/libs/pdfjs/pdf.worker.mjs +4 -63051
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/09ab0626-bb45-4650-acc8-0182d693df02.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/0c8a5d21-8a14-4451-8145-695071809cb7.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/12f4c786-0bef-4a48-b7c0-eebaa7591688.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/3ae1e25e-3aa6-4061-a016-a079159f9d65.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/41331c3c-3759-4462-8695-33c9a21b6a5b.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/94aa531e-7746-4df0-bb6e-349891f2eda5.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-arabic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-georgian.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-thai.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b8b15cdf-85d1-4120-8daa-48863d803939.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-cyrillic.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-ext.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-greek.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-hebrew.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-math.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d-vietnamese.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts/b9c5b839-db56-4419-8fcb-6ab661babb1d.woff2 +0 -0
- package/assets/esri/themes/base/fonts/fonts.scss +0 -0
- package/assets/esri/themes/base/icons/style.scss +0 -0
- package/assets/esri/themes/base/icons/variables.scss +0 -0
- package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
- package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
- package/assets/esri/themes/base/images/files/code-32.svg +0 -0
- package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
- package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
- package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
- package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
- package/assets/esri/themes/base/images/files/image-32.svg +0 -0
- package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
- package/assets/esri/themes/base/images/files/report-32.svg +0 -0
- package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
- package/assets/esri/themes/base/images/files/text-32.svg +0 -0
- package/assets/esri/themes/base/images/files/video-32.svg +0 -0
- package/assets/esri/themes/base/images/files/word-32.svg +0 -0
- package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
- package/assets/esri/themes/base/images/loading-throb.gif +0 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
- package/assets/esri/themes/base/widgets/_Tooltip.scss +37 -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/assets/esri/views/interactive/tooltip/t9n/messages.en.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.no.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/messages.zh-TW.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +10 -9
- package/chunks/GlobalIlluminationBlur.glsl.js +8 -8
- package/chunks/HeatmapDensity.glsl.js +5 -5
- package/chunks/Pattern.glsl.js +30 -30
- package/chunks/RibbonLine.glsl.js +19 -19
- package/config.js +1 -1
- package/core/Accessor.d.ts +1 -1
- package/core/accessorSupport/types.d.ts +5 -1
- package/core/lang.js +1 -1
- package/interfaces.d.ts +3 -0
- package/kernel.js +1 -1
- package/layers/ParquetLayer.d.ts +24 -15
- package/layers/ParquetLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +2 -2
- package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
- package/layers/geospatialPDF/LGIDictMapFrame.js +1 -1
- package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
- package/layers/geospatialPDF/geospatialPDFParserUtils.js +2 -0
- package/layers/geospatialPDF/projectionToWKTUtils.js +2 -0
- package/layers/geospatialPDF/renderExtentUtils.js +1 -1
- package/layers/geospatialPDF/sharedUtils.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
- package/layers/raster/types.d.ts +6 -0
- package/layers/support/TimeSeriesCalculation.d.ts +32 -0
- package/layers/support/TimeSeriesCalculation.js +2 -0
- package/layers/support/TimeSeriesInfo.d.ts +19 -0
- package/layers/support/TimeSeriesInfo.js +1 -1
- package/layers/support/commonProperties.js +1 -1
- package/layers/support/timeSeriesUtils.d.ts +25 -1
- package/layers/support/timeSeriesUtils.js +1 -1
- package/layers/types.d.ts +1 -0
- package/package.json +3 -3
- package/popup/FeatureContentCollection.d.ts +19 -26
- package/popup/FeatureContentCollection.js +1 -1
- package/popup/types.d.ts +14 -3
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/sceneLayerItem.js +1 -1
- package/renderers/support/AuthoringInfo.d.ts +8 -1
- package/renderers/support/AuthoringInfo.js +1 -1
- package/renderers/support/AuthoringInfoVisualVariable.d.ts +8 -1
- package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
- package/rest/imageService/fetchRasterInfo.js +1 -1
- package/rest/knowledgeGraph/DataModel.js +1 -1
- package/smartMapping/renderers/color.d.ts +12 -0
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/opacity.d.ts +6 -0
- package/smartMapping/renderers/opacity.js +1 -1
- package/smartMapping/renderers/size.d.ts +12 -0
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/regenerateUtils.js +1 -1
- package/smartMapping/renderers/support/rendererUtils.js +1 -1
- package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
- package/smartMapping/renderers/type.d.ts +6 -0
- package/smartMapping/renderers/type.js +1 -1
- package/smartMapping/renderers/univariateColorSize.d.ts +6 -0
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/callouts/calloutAnalysisUtils.js +2 -0
- package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
- package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
- package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
- package/symbols/cim/callouts/effects/SimpleLineCallout.js +1 -1
- package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +8 -0
- package/views/2d/analysis/AreaMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +8 -0
- package/views/2d/analysis/DistanceMeasurementAnalysisView2D.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +3 -2
- package/views/2d/engine/webgl/ClipMesh.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
- package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimension/DimensionController.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +3 -2
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +5 -3
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +1 -0
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/input/handlers/DragRotate.js +1 -1
- package/views/3d/input/handlers/PinchAndPanNavigation.js +1 -1
- package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
- package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
- package/views/3d/interactive/editingTools/manipulatedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/support/FeatureMemory.js +2 -0
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/controllers/GroundNavigationController.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/planarDistanceToGroundRatio.js +2 -0
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +13 -13
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +2 -2
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/DOMContainer.d.ts +2 -2
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.d.ts +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileController.js +1 -1
- package/views/analysis/LengthDimensionResult.d.ts +4 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/interactive/options/SnappingOptions.d.ts +4 -2
- package/views/interactive/options/SnappingOptions.js +1 -1
- package/views/interactive/options/ViewOptions.d.ts +18 -0
- package/views/interactive/options/bindViewToolOptions.js +2 -0
- package/views/interactive/snapping/SnappingManagerPool.js +1 -1
- package/views/interactive/snapping/allLayerSnapping.js +1 -1
- package/views/interactive/tooltip/components/ElevationModeSelect.js +2 -0
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
- package/views/overlay/FocusRegionOverlayItem.js +1 -1
- package/views/selection/SelectionOperation.d.ts +27 -1
- package/views/selection/types.d.ts +8 -20
- package/views/support/hitTestSelectUtils.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +1 -0
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement2D.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
- package/widgets/BasemapLayerList.d.ts +1 -0
- package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +1 -0
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/BatchAttributeForm/expressions/types.d.ts +1 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +9 -1
- package/widgets/BatchAttributeForm/types.d.ts +5 -1
- package/widgets/BatchAttributeForm.d.ts +1 -0
- package/widgets/Bookmarks/BookmarksViewModel.d.ts +1 -0
- package/widgets/Bookmarks.d.ts +1 -0
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +1 -0
- package/widgets/CatalogLayerList.d.ts +1 -0
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -0
- package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +1 -0
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.d.ts +1 -0
- package/widgets/FeatureForm.d.ts +1 -0
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +14 -0
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.d.ts +14 -0
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +1 -0
- package/widgets/FeatureTemplates.d.ts +1 -0
- package/widgets/Features/FeaturesViewModel.d.ts +1 -0
- package/widgets/Features.d.ts +2 -1
- package/widgets/HistogramRangeSlider.d.ts +1 -0
- package/widgets/Home/HomeViewModel.d.ts +1 -0
- package/widgets/Home.d.ts +1 -0
- package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
- package/widgets/LayerList.d.ts +1 -0
- package/widgets/Locate/LocateViewModel.d.ts +1 -0
- package/widgets/Locate.d.ts +1 -0
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
- package/widgets/OrientedImageryViewer/types.d.ts +4 -1
- package/widgets/OrientedImageryViewer.d.ts +4 -1
- package/widgets/Popup/types.d.ts +0 -7
- package/widgets/Popup.d.ts +8 -7
- package/widgets/Print/PrintViewModel.d.ts +1 -0
- package/widgets/Print.d.ts +1 -0
- package/widgets/Search.d.ts +1 -0
- package/widgets/Sketch.d.ts +1 -0
- package/widgets/Slider.d.ts +4 -0
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -0
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider.d.ts +1 -0
- package/widgets/TimeSlider.js +1 -1
- package/widgets/Track/TrackViewModel.d.ts +1 -0
- package/widgets/Track.d.ts +1 -0
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +1 -0
- package/widgets/UtilityNetworkTrace.d.ts +1 -0
- package/widgets/ValuePicker/types.d.ts +1 -0
- package/widgets/ValuePicker.d.ts +1 -0
- package/widgets/smartMapping/SmartMappingSliderBase.d.ts +1 -0
- package/widgets/support/SelectionList/types.d.ts +2 -0
- package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.d.ts +2 -1
- package/assets/esri/core/workers/chunks/0148cb611bf7c8c5fe8a.js +0 -1
- package/assets/esri/core/workers/chunks/0a4a5ed831a4e4d8e0fc.js +0 -1
- package/assets/esri/core/workers/chunks/0acc754907395e83bbc6.js +0 -1
- package/assets/esri/core/workers/chunks/0f8ff964461cf8e0673b.js +0 -1
- package/assets/esri/core/workers/chunks/1e46703cb566c25458ad.js +0 -1
- package/assets/esri/core/workers/chunks/25c90092def215949db9.js +0 -1
- package/assets/esri/core/workers/chunks/2a34760b3f0c134898ec.js +0 -1
- package/assets/esri/core/workers/chunks/38890ac5917942374ab8.js +0 -1
- package/assets/esri/core/workers/chunks/3b4ceaf21be540cb3499.js +0 -1
- package/assets/esri/core/workers/chunks/4c4ba466e23159991322.js +0 -1
- package/assets/esri/core/workers/chunks/5afc12671a9a1bb6c56c.js +0 -1
- package/assets/esri/core/workers/chunks/606ac9358f508bda94f2.js +0 -1
- package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +0 -1
- package/assets/esri/core/workers/chunks/6c4def0faaef861a09c9.js +0 -1
- package/assets/esri/core/workers/chunks/7285a37cd5359aa4bac5.js +0 -1
- package/assets/esri/core/workers/chunks/753d1ff177ecee8e2377.js +0 -1
- package/assets/esri/core/workers/chunks/8a8e94b5d7d153361b0b.js +0 -1
- package/assets/esri/core/workers/chunks/923c45ebcf45d9ce8ae0.js +0 -1
- package/assets/esri/core/workers/chunks/9af36ee6a0df224859bc.js +0 -1
- package/assets/esri/core/workers/chunks/a7ce5b958dfeb240c4a5.js +0 -1
- package/assets/esri/core/workers/chunks/aed479c14d93955f4798.js +0 -1
- package/assets/esri/core/workers/chunks/be52c319a0a81ce1ba36.js +0 -1
- package/assets/esri/core/workers/chunks/c0ec87800faf99cbd8bd.js +0 -1
- package/assets/esri/core/workers/chunks/ca5a4f62b09cc8579dc0.js +0 -1
- package/assets/esri/core/workers/chunks/d090baaa974e1e83fa44.js +0 -1
- package/assets/esri/core/workers/chunks/e9f8325a4cf89ae816cc.js +0 -1
- package/assets/esri/core/workers/chunks/ed7d4e8725aaa0ca4589.js +0 -1
- package/assets/esri/core/workers/chunks/f4572ad25712d204f258.js +0 -1
- package/layers/geospatialPDF/GeospatialPDFParserUtils.js +0 -2
- package/layers/geospatialPDF/Projection.js +0 -2
- package/views/2d/engine/webgl/mesh/bufcut.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import r from"../../core/Error.js";import{Loadable as t}from"../../core/Loadable.js";import{open as o}from"../../core/workers.js";import{subclass as s}from"../../core/accessorSupport/decorators.js";import a from"./GeospatialPDFFrame.js";import{parse as i}from"./
|
|
2
|
+
import{__decorate as e}from"tslib";import r from"../../core/Error.js";import{Loadable as t}from"../../core/Loadable.js";import{open as o}from"../../core/workers.js";import{subclass as s}from"../../core/accessorSupport/decorators.js";import a from"./GeospatialPDFFrame.js";import{parse as i}from"./geospatialPDFParserUtils.js";let n=class extends t{constructor(){super(...arguments),this._connection=null,this._workerHandler=null}load(e){const r=o("GeospatialPDFLayerWorker",{...e,strategy:"dedicated",registryTarget:this}).then(e=>{this._connection=e,this._workerHandler=this._connection.createInvokeProxy()});return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null,this._workerHandler=null,super.destroy()}async loadPDF(e,t={}){await this.load(t);const{geospatialMetadata:o}=await this._workerHandler.loadPDF(e,t),s=i(o,0),n=s.lgiDictFrame??s.vpFrame;if(!n)throw new r("geospatial-pdf-layer:load","pdf does not contain supported LGIDict or VP/Measure.");const l=new a(n),c=l.spatialReference.toJSON();return{frame:l,sourceSpatialReference:c,fullExtent:l.toExtent()}}async render(e,r,t,o,s,a){const i={sourceExtentAsJSON:e.toJSON(),width:r,height:t,ctm:o,currentRing:s};return this._workerHandler.renderPDF(i,a)}};n=e([s("esri.layers.geospatialPDF.GeospatialPDFWorkerClient")],n);export{n as GeospatialPDFWorkerClient};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"../../core/Error.js";import{fromValues as i}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{fromValues as e}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{expandMediaBox as n,createGeoreferencer as a,validateTransform as r,affineTransformationFromGeoreference as o}from"./sharedUtils.js";class s{constructor(t){const i=this.inputValidation(t);this._registration=i.registration,this._projection=i.projection,this._neatline=i.neatline,this.pairedNeatline=this._pairNeatline(),this.outerExtentMediaBox=n(i.mediaBox),this.geoControlPoints=this._getRegistrationPoints("geo"),this.ctm=i.ctm??this._buildCTMFromRegistration(),this.outputValidation()}inputValidation(e){const{ctm:n,registration:a,projection:r,display:o,neatline:s,mediaBox:l}=e;if(n&&6!==n.length)throw new t("geospatial-pdf-layer:
|
|
2
|
+
import t from"../../core/Error.js";import{fromValues as i}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{fromValues as e}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import{expandMediaBox as n,createGeoreferencer as a,validateTransform as r,affineTransformationFromGeoreference as o}from"./sharedUtils.js";class s{constructor(t){const i=this.inputValidation(t);this._registration=i.registration,this._projection=i.projection,this._neatline=i.neatline,this.pairedNeatline=this._pairNeatline(),this.outerExtentMediaBox=n(i.mediaBox),this.geoControlPoints=this._getRegistrationPoints("geo"),this.ctm=i.ctm??this._buildCTMFromRegistration(),this.outputValidation()}inputValidation(e){const{ctm:n,registration:a,projection:r,display:o,neatline:s,mediaBox:l}=e;if(n&&6!==n.length)throw new t("geospatial-pdf-layer:invalid-frame","LGIDict has invalid CTM.");if(!n&&(!a||a.length<3))throw new t("geospatial-pdf-layer:invalid-frame","LGIDict missing CTM and minimum registration points");if(!l||4!==l.length)throw new t("geospatial-pdf-layer:invalid-frame","LGIDict missing or invalid MediaBox.");if(!s||s.length<4||s.length%2!=0)throw new t("geospatial-pdf-layer:invalid-frame","LGIDict missing or invalid amount of neatline points");return{ctm:n?i(n[0],n[1],n[2],n[3],n[4],n[5]):void 0,registration:a??[],projection:r,display:o,neatline:s,mediaBox:l}}outputValidation(){if(6!==this.ctm.length)throw new t("geospatial-pdf-layer:invalid-frame","LGIDict missing or invalid CTM");if(this.pairedNeatline.length<4)throw new t("geospatial-pdf-layer:invalid-frame","Map Frame should have at least 4 neatline points.");if(4!==this.outerExtentMediaBox.length)throw new t("geospatial-pdf-layer:invalid-frame","Failed to generate outerextent from mediaBox.");if(!this.ctm&&this.geoControlPoints.length<2)throw new t("geospatial-pdf-layer:invalid-frame","Map Frame should have at least 2 geoControlPoints if defaulting.")}toSpatialReference(){return this._projection}_buildCTMFromRegistration(){const t=[],i=[];for(const a of this._registration)a.length<4||(t.push(e(a[0],a[1])),i.push(e(a[2],a[3])));const n=this._getSourceRect(),s=a(t,i,this.toSpatialReference(),n),l=r(s);return o(l)}_extentFromArray(i){let e=1/0,n=1/0,a=-1/0,r=-1/0;for(let t=0;t<i.length;t++){const o=i[t];e=Math.min(e,o[0]),n=Math.min(n,o[1]),a=Math.max(a,o[0]),r=Math.max(r,o[1])}if(!(Number.isFinite(e)&&Number.isFinite(n)&&Number.isFinite(a)&&Number.isFinite(r)))throw new t("geospatial-pdf-layer: invalid-frame","Failed to compute extent from registration.");return{xmin:e,ymin:n,xmax:a,ymax:r}}_getSourceRect(){if(4===this.outerExtentMediaBox?.length)return this._extentFromArray(this.outerExtentMediaBox);if(this._neatline.length>=6)return this._extentFromArray(this.pairedNeatline);const i=this._getRegistrationPoints("page");if(i.length>=2)return this._extentFromArray(i);throw new t("geospatial-pdf-layer: invalid-frame","Cannot build source rectangle from Neatline or Registration points.")}_getRegistrationPoints(t){const[i,e]="page"===t?[0,1]:[2,3];return this._registration.filter(t=>t.length>e).map(t=>[t[i],t[e]])}_pairNeatline(){const t=[];for(let i=0;i<this._neatline.length;i+=2){const e=this._neatline[i],n=this._neatline[i+1];Number.isFinite(e)&&Number.isFinite(n)&&t.push([e,n])}return 2===t.length&&(t.splice(1,0,[t[1][0],t[0][1]]),t.push([t[0][0],t[2][1]])),t}}export{s as LGIDictMapFrame};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"../../core/Error.js";import{fromValues as e}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import o from"../../geometry/Point.js";import i from"../../geometry/SpatialReference.js";import{projectExecute as s}from"../../geometry/operators/projectOperator.js";import{expandMediaBox as n,validateTransform as a,affineTransformationFromGeoreference as r,createGeoreferencer as l}from"./sharedUtils.js";class h{constructor(t){const{bbox:e,bounds:o,gpts:i,lpts:s,gcs:l,mediaBox:h}=this.inputValidation(t);this._bbox=e,this._bounds=o,this._gpts=i,this._lpts=s,this._gcs=l,this.outerExtentMediaBox=n(h),this.geoControlPoints=this._getProjectedGeoControlPoints().map(t=>[t[0],t[1]]);const g=this._getBoundsPolygonPage()??this._getPageControlPoints();this.pairedNeatline=g.map(t=>[t[0],t[1]]),this.neatLine=this.pairedNeatline.flat(),this._georeference=this._createControlPointsGeoreference();const p=a(this._georeference);this.ctm=r(p),this.outputValidation()}toSpatialReference(){return new i({wkt:this._gcs.WKT})}inputValidation(e){const{bbox:o,bounds:i,gpts:s,lpts:n,gcs:a,mediaBox:r}=e;if(!o||4!==o.length)throw new t("geospatial-pdf-layer:
|
|
2
|
+
import t from"../../core/Error.js";import{fromValues as e}from"../../core/libs/gl-matrix-2/factories/vec2f64.js";import o from"../../geometry/Point.js";import i from"../../geometry/SpatialReference.js";import{projectExecute as s}from"../../geometry/operators/projectOperator.js";import{expandMediaBox as n,validateTransform as a,affineTransformationFromGeoreference as r,createGeoreferencer as l}from"./sharedUtils.js";class h{constructor(t){const{bbox:e,bounds:o,gpts:i,lpts:s,gcs:l,mediaBox:h}=this.inputValidation(t);this._bbox=e,this._bounds=o,this._gpts=i,this._lpts=s,this._gcs=l,this.outerExtentMediaBox=n(h),this.geoControlPoints=this._getProjectedGeoControlPoints().map(t=>[t[0],t[1]]);const g=this._getBoundsPolygonPage()??this._getPageControlPoints();this.pairedNeatline=g.map(t=>[t[0],t[1]]),this.neatLine=this.pairedNeatline.flat(),this._georeference=this._createControlPointsGeoreference();const p=a(this._georeference);this.ctm=r(p),this.outputValidation()}toSpatialReference(){return new i({wkt:this._gcs.WKT})}inputValidation(e){const{bbox:o,bounds:i,gpts:s,lpts:n,gcs:a,mediaBox:r}=e;if(!o||4!==o.length)throw new t("geospatial-pdf-layer:invalid-frame","Viewport missing or invalid BBox.");if(!r||4!==r.length)throw new t("geospatial-pdf-layer:invalid-frame","Viewport missing or invalid MediaBox.");if(!s||s.length<6||s.length%2!=0)throw new t("geospatial-pdf-layer:invalid-frame","MeasureFrame missing or invalid GPTS.");if(!n||n.length<6||n.length%2!=0)throw new t("geospatial-pdf-layer:invalid-frame","MeasureFrame missing or invalid LPTS.");if(n.length!==s.length)throw new t("geospatial-pdf-layer: invalid-frame","MeasureFrame LPTS and GPTS must be same length");if(!a?.WKT)throw new t("geospatial-pdf-layer:invalid-frame","MeasureFrame missing or invalid WKT.");return{bbox:o,bounds:i,gpts:s,lpts:n,gcs:{WKT:a.WKT},mediaBox:r}}outputValidation(){if(4!==this.outerExtentMediaBox.length)throw new t("geospatial-pdf-layer:invalid-frame","Failed to generate outer extent from mediaBox.");if(this.geoControlPoints.length<2)throw new t("geospatial-pdf-layer:invalid-frame","Map Frame should have at least 2 geoControlPoints.");if(this.pairedNeatline.length<4)throw new t("geospatial-pdf-layer:invalid-frame","Map Frame should have at least 4 neatline points.");if(!this.ctm||6!==this.ctm.length)throw new t("geospatial-pdf-layer:invalid-frame","Missing or invalid Map Frame CTM")}_createControlPointsGeoreference(){const t=this._getPageControlPoints(),e=this._getProjectedGeoControlPoints(),o=this._getViewportRect();return l(t,e,this.toSpatialReference(),o)}_getBoundsPolygonLocal(){if(!this._bounds||this._bounds.length<8||this._bounds.length%2!=0)return null;const t=[];for(let e=0;e<this._bounds.length;e+=2)t.push({u:this._bounds[e],v:this._bounds[e+1]});return t}_getBoundsPolygonPage(){const t=this._getBoundsPolygonLocal();return t?.map(t=>this._localToPage(t.u,t.v))??null}_getPageControlPoints(){const t=[];for(let e=0;e<this._lpts.length;e+=2){const o=this._lpts[e],i=this._lpts[e+1];t.push(this._localToPage(o,i))}return t}_getProjectedGeoControlPoints(){const t=this.toSpatialReference(),i=[];for(let n=0;n<this._gpts.length;n+=2){const a=this._gpts[n],r=this._gpts[n+1],l=new o({x:r,y:a}),h=s(l,t);i.push(e(h.x,h.y))}return i}_getViewportRect(){const[t,e,o,i]=this._bbox;return{xmin:Math.min(t,o),ymin:Math.min(e,i),xmax:Math.max(t,o),ymax:Math.max(e,i)}}_localToPage(t,o){const[i,s,n,a]=this._bbox;return e(i+t*(n-i),s+o*(a-s))}}export{h as ViewportMeasureFrame};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import r from"../../core/Error.js";import"../../core/has.js";import{LGIDictMapFrame as e}from"./LGIDictMapFrame.js";import{projectionToSpatialReference as i}from"./projectionToWKTUtils.js";import{ViewportMeasureFrame as n}from"./ViewportMeasureFrame.js";function t(t,u=0){const s={mediaBox:_(t.MediaBox),rotate:P(t.Rotate),hasLGIDict:null!=t.LGIDict,hasVP:null!=t.VP},l=o(t.LGIDict,u);if(l){if(!l.Projection)throw new r("geospatial-pdf-layer:parse","LGIDict map frame missing Projection.");const n=i(l.Projection);let o;try{o=l.Display?i(l.Display):void 0}catch{o=n}return{result:s,lgiDictFrame:new e({ctm:l.CTM,registration:l.Registration,projection:n,display:o,neatline:l.Neatline,mediaBox:_(t.MediaBox)})}}const c=a(t.VP,u);if(c){return{result:s,vpFrame:new n({bbox:c.BBox,bounds:c.Measure?.Bounds,gpts:c.Measure?.GPTS,lpts:c.Measure?.LPTS,gcs:c.Measure?.GCS,mediaBox:_(t.MediaBox)})}}return{result:s}}function o(r,e){return u(r)[e]}function a(r,e){return s(r)[e]}function u(r){return null==r?[]:Array.isArray(r)?r.map(r=>l(r)):[l(r)]}function s(r){return null==r?[]:Array.isArray(r)?r.map(r=>c(r)):[c(r)]}function l(r){const e=M(r,"LGIDict map frame must be an object.");return{CTM:_(e.CTM),Registration:S(e.Registration),Neatline:_(e.Neatline),Projection:p(e.Projection),Display:p(e.Display)}}function c(r){const e=M(r,"Viewport frame must be an object."),i=d(e.Measure);return{BBox:_(e.BBox),Measure_Raw:e.Measure,Measure:i,Raw:e}}function d(r){if(w(r))return{Bounds:_(r.Bounds),GPTS:_(r.GPTS),LPTS:_(r.LPTS),GCS:f(r.GCS)}}function f(r){if(w(r))return{WKT:T(r.WKT)}}function p(r){if(w(r))return{Type:L(r.Type),Units:L(r.Units),Datum:m(r.Datum),Projection_Type:L(r.ProjectionType),Central_Meridian:P(r.CentralMeridian),False_Easting:P(r.FalseEasting),False_Northing:P(r.FalseNorthing),Height:P(r.Height),Hemisphere:L(r.Hemisphere),Latitude_One:P(r.LatitudeOne),Latitude_Two:P(r.LatitudeTwo),Latitude_Of_True_Scale:P(r.LatitudeOfTrueScale),Longitude_One:P(r.LongitudeOne),Longitude_Two:P(r.LongitudeTwo),Longitude_Down_From_Pole:P(r.LongitudeDownFromPole),Orientation:L(r.Orientation),Origin_Height:P(r.OriginHeight),Origin_Latitude:P(r.OriginLatitude),Origin_Longitude:P(r.OriginLongitude),Scale_Factor:P(r.ScaleFactor),Standard_Parallel:P(r.StandardParallel),Standard_Parallel_One:P(r.StandardParallelOne),Standard_Parallel_Two:P(r.StandardParallelTwo),Zone:P(r.Zone),Description:L(r.Description),raw:r}}function m(r){return null==r?null:"string"==typeof r?{kind:"name",name:L(r),ellipsoid:null,to_WGS84:null,raw:r}:w(r)?{kind:"definition",name:L(r.Description),ellipsoid:g(r.Ellipsoid),to_WGS84:y(r.ToWGS84),raw:r}:{kind:"unknown",name:L(r),ellipsoid:null,to_WGS84:null,raw:r}}function g(r){if(w(r))return{semi_Major_Axis:P(r.SemiMajorAxis),inverse_Flattening:P(r.InvFlattening),semi_Minor_Axis:P(r.SemiMinorAxis),description:L(r.Description)}}function y(r){if(w(r))return{dx:P(r.dx)??0,dy:P(r.dy)??0,dz:P(r.dz)??0,rx:P(r.rx)??0,ry:P(r.ry)??0,rz:P(r.rz)??0,sf:P(r.sf)??0}}function _(r){if(!Array.isArray(r))return;const e=[];for(const i of r){const r=P(i);if(void 0===r)return;e.push(r)}return e}function S(r){if(Array.isArray(r))return r.filter(r=>Array.isArray(r)).map(r=>r.map(r=>P(r)).filter(r=>void 0!==r))}function T(r){if(null!=r)return"string"==typeof r?r:String(r)}function L(r){const e=T(r);if(void 0!==e)return e.trim()}function P(r){if(null==r)return;if("number"==typeof r)return Number.isFinite(r)?r:void 0;if("string"!=typeof r)return;const e=r.trim();if(""===e)return;const i=Number(e);return Number.isFinite(i)?i:void 0}function w(r){return null!=r&&"object"==typeof r&&!Array.isArray(r)}function M(e,i){if(!w(e))throw new r("geospatial-pdf-layer:parse",i);return e}export{t as parse};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"../../core/Error.js";import n from"../../geometry/SpatialReference.js";const t={OriginLatitude:"Origin_Latitude",CentralMeridian:"Central_Meridian",ScaleFactor:"Scale_Factor",FalseEasting:"False_Easting",FalseNorthing:"False_Northing",Zone:"Zone",Hemisphere:"Hemisphere",StandardParallelOne:"Standard_Parallel_One",StandardParallelTwo:"Standard_Parallel_Two"},r=/^(?:NAD83|NORTH AMERICAN 1983|NAR(?:-[A-Z])?)$/i,a=/^(?:NAD27|NORTH AMERICAN 1927|NAS(?:-[A-Z])?)$/i,i=/^(?:WGS84|WGS 84|WGE)$/i;function o(e){const t=s(e);if("projected"===t.kind){const{projectionType:r,datum:a}=t;return"SPCS"===r?D(e,a):new n({wkt:A(e,r,a)})}}function s(e){return l(e)}function l(n){const t=c(n.Type),r=_(n.Projection_Type);let a;if(r||(a="Projection is missing or has unsupported ProjectionType"),t||(a="Projection dictionary is missing or has invalid Type. Expected Projection or Display."),n.Datum||(a="Projection is missing a Datum"),a)throw new e("geospatial-pdf-layer:invalid-projection",a);return u(n,r),{kind:"projected",dictionaryType:t,projectionType:r,datum:n.Datum}}function c(e){switch(e){case"Projection":case"Display":return e;default:return}}function _(e){switch(e){case"TC":case"PH":case"UT":case"AC":case"LE":case"SPCS":return e;default:return}}function u(n,r){const a=d(r);for(const i of a){const a=n[t[i]];if(void 0===a||""===a)throw new e("geospatial-pdf-layer:invalid-projection",`Projection ${r} missing required parameter ${i}.`)}}function d(e){switch(e){case"TC":return["OriginLatitude","CentralMeridian","ScaleFactor","FalseEasting","FalseNorthing"];case"PH":return["OriginLatitude","CentralMeridian","FalseEasting","FalseNorthing"];case"UT":return["Zone","Hemisphere"];case"AC":case"LE":return["OriginLatitude","CentralMeridian","StandardParallelOne","StandardParallelTwo","FalseEasting","FalseNorthing"];case"SPCS":return["Zone"]}}function A(e,n,t){const r=E(e,n,t),a=p(n),i=f(t),o=g(e.Units??"M"),s=T(e,n);return`PROJCS["${r}",GEOGCS["${$(t)}",${i},PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]],PROJECTION["${a}"],${s.join(",\n ")},${o}]`}function p(e){switch(e){case"TC":case"UT":return"Transverse_Mercator";case"PH":return"Polyconic";case"AC":return"Albers";case"LE":return"Lambert_Conformal_Conic"}}function E(e,n,t){const r=P(t);switch(n){case"TC":return`${r}_GeospatialPDF_Transverse_Mercator`;case"PH":return`${r}_GeospatialPDF_Polyconic`;case"UT":return`${r}_GeospatialPDF_UTM_Zone_${e.Zone}_${e.Hemisphere}`;case"AC":return`${r}_GeospatialPDF_Albers_Equal_Area`;case"LE":return`${r}_GeospatialPDF_Lambert_Conformal_Conic`}}function P(e){const n=M(e);return n?F(n)?"NAD_1983":C(n)?"NAD_1927":h(n)?"WGS_1984":"geospatialPDF":"geospatialPDF"}function f(n){if("definition"===n.kind){const t=n.ellipsoid;if(!t?.semi_Major_Axis)throw new e("geospatial-pdf-layer:invalid-Datum","Datum definition requires semi-major axis");const r=R(t),a=n.name??"GeospatialPDF_Datum",i=`SPHEROID["${t.description??"GeospatialPDF_Spheroid"}",${t.semi_Major_Axis},${r}]`,o=n.to_WGS84;return`DATUM["${a}",${i}${o?`,TOWGS84[${o.dx??0},${o.dy??0},${o.dz??0},${o.rx??0},${o.ry??0},${o.rz??0},${o.sf??0}]`:""}]`}if(n.name){const e=n.name.toUpperCase();if(F(e))return'DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]]';if(C(e))return'DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]]';if(h(e))return'DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]]'}throw new e("geospatial-pdf-layer:invalid-Datum","Unsupported datum "+n.name)}function g(e){const n=e.toLowerCase();return["m","meter","meters","metre","metres"].includes(n)?'UNIT["Meter",1.0]':["ft","foot","feet"].includes(n)?'UNIT["Foot",0.3048]':`UNIT["${e}",1.0]`}function T(e,n){switch(n){case"TC":return[`PARAMETER["False_Easting",${e.False_Easting}]`,`PARAMETER["False_Northing",${e.False_Northing}]`,`PARAMETER["Central_Meridian",${e.Central_Meridian}]`,`PARAMETER["Latitude_Of_Origin",${e.Origin_Latitude}]`,`PARAMETER["Scale_Factor",${e.Scale_Factor}]`];case"PH":return[`PARAMETER["False_Easting",${e.False_Easting}]`,`PARAMETER["False_Northing",${e.False_Northing}]`,`PARAMETER["Central_Meridian",${e.Central_Meridian}]`,`PARAMETER["Latitude_Of_Origin",${e.Origin_Latitude}]`];case"AC":case"LE":return[`PARAMETER["False_Easting",${e.False_Easting}]`,`PARAMETER["False_Northing",${e.False_Northing}]`,`PARAMETER["Central_Meridian",${e.Central_Meridian}]`,`PARAMETER["Latitude_Of_Origin",${e.Origin_Latitude}]`,`PARAMETER["Standard_Parallel_1",${e.Standard_Parallel_One}]`,`PARAMETER["Standard_Parallel_2",${e.Standard_Parallel_Two}]`];case"UT":return m(e)}}function m(n){if(!n.Zone)throw new e("geospatial-pdf-layer:invalid-projection","No zone found for projection code UT");const t=6*n.Zone-183;return['PARAMETER["False_Easting",500000]',`PARAMETER["False_Northing",${/^s/i.test(n.Hemisphere??"")?1e7:0}]`,`PARAMETER["Central_Meridian",${t}]`,'PARAMETER["Latitude_Of_Origin",0]','PARAMETER["Scale_Factor",0.9996]']}function R(n){if(null!=n.inverse_Flattening)return n.inverse_Flattening;const t=n.semi_Major_Axis,r=n.semi_Minor_Axis;if(null==t||null==r)throw new e("geospatial-pdf-layer:invalid-Datum","Ellipsoid definition missing InvFlattening or SemiMinorAxis.");return t===r?0:t/(t-r)}function $(e){const n=M(e);return n?F(n)?"GCS_North_American_1983":C(n)?"GCS_North_American_1927":h(n)?"GCS_WGS_1984":"GCS_GeospatialPDF":"GCS_GeospatialPDF"}function M(e){return e.name?S(e.name):null}function S(e){return e.trim().toUpperCase().replace(/_/g," ").replace(/\s+/g," ")}function F(e){return r.test(e)}function C(e){return a.test(e)}function h(e){return i.test(e)}function D(t,r){const a=M(r);if(2800===t.Zone&&a&&F(a))return new n({wkid:32110});throw new e("geospatial-pdf-layer:invalid-projection",`Unsupported State Plane projection: datum ${r.name}, zone ${t.Zone}`)}export{o as projectionToSpatialReference,s as validateProjection};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"../../core/Error.js";import"../../core/has.js";import{onAbort as o,throwIfAborted as n}from"../../core/promiseUtils.js";import{fromValues as r,create as e}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{multiply as a}from"../../core/libs/gl-matrix-2/math/mat2d.js";async function i(r,i,m,l,f,p,x,h,v){const d=s(r,i,m),g=e();a(g,d,l);const u=e();a(u,g,x);const w=new OffscreenCanvas(i,m),y=w.getContext("2d");if(!y)throw new t("geospatial-pdf-layer:
|
|
2
|
+
import t from"../../core/Error.js";import"../../core/has.js";import{onAbort as o,throwIfAborted as n}from"../../core/promiseUtils.js";import{fromValues as r,create as e}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import{multiply as a}from"../../core/libs/gl-matrix-2/math/mat2d.js";async function i(r,i,m,l,f,p,x,h,v){const d=s(r,i,m),g=e();a(g,d,l);const u=e();a(u,g,x);const w=new OffscreenCanvas(i,m),y=w.getContext("2d");if(!y)throw new t("geospatial-pdf-layer:invalid-canvas","Failed to create bitmap canvas context.");if(h.length){const t=c(h,r,i,m);y.save(),y.fillStyle="white",y.fill(t),y.restore()}const b=f.render({canvas:null,canvasContext:y,viewport:p,transform:u,annotationMode:0,background:"rgba(0,0,0,0)"}),j=o(v?.signal,()=>{b.cancel()});try{await b.promise}catch(C){throw n(v),C}finally{j?.remove()}return w}function s(t,o,n){const e=(t.xmax-t.xmin)/o,a=(t.ymax-t.ymin)/n;return r(1/e,0,0,-1/a,-t.xmin/e,t.ymax/a)}function c(t,o,n,r){const e=new Path2D,a=s(o,n,r);for(let i=0;i<t.length;i++){const[o,n]=t[i],r=a[0]*o+a[2]*n+a[4],s=a[1]*o+a[3]*n+a[5];0===i?e.moveTo(r,s):e.lineTo(r,s)}return e.closePath(),e}export{i as renderBitmap};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import r from"../../core/Error.js";import{fromValues as e}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import o from"../../geometry/Point.js";import t from"../support/ControlPointsGeoreference.js";function n(r,e,n,i){const m=Math.min(r.length,e.length,3),a=r.slice(0,m).map((r,t)=>({sourcePoint:{x:r[0],y:r[1]},mapPoint:new o({x:e[t][0],y:e[t][1],spatialReference:n})}));return new t({controlPoints:a,width:i.xmax-i.xmin,height:i.ymax-i.ymin})}function i(e){if(!e?.transform||e.transform.length<6)throw new r("geospatial-pdf-layer:
|
|
2
|
+
import r from"../../core/Error.js";import{fromValues as e}from"../../core/libs/gl-matrix-2/factories/mat2df64.js";import o from"../../geometry/Point.js";import t from"../support/ControlPointsGeoreference.js";function n(r,e,n,i){const m=Math.min(r.length,e.length,3),a=r.slice(0,m).map((r,t)=>({sourcePoint:{x:r[0],y:r[1]},mapPoint:new o({x:e[t][0],y:e[t][1],spatialReference:n})}));return new t({controlPoints:a,width:i.xmax-i.xmin,height:i.ymax-i.ymin})}function i(e){if(!e?.transform||e.transform.length<6)throw new r("geospatial-pdf-layer:georefrencer","created georeferencer does not have valid transform");return e.transform}function m(r){return e(r[0],-r[1],-r[3],r[4],r[2],r[5])}function a(r){return[[r[0],r[1]],[r[0],r[3]],[r[2],r[3]],[r[2],r[1]]]}export{m as affineTransformationFromGeoreference,n as createGeoreferencer,a as expandMediaBox,i as validateTransform};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import s from"../../../core/Collection.js";import r from"../../../core/Error.js";import has from"../../../core/has.js";import{clone as a}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{destroyMaybe as n,removeMaybe as o,abortMaybe as h}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,watch as m,syncAndInitial as f,sync as y}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as g,subclass as F}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as C}from"../../support/layerUtils.js";import b from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S,virtualSnapshotTileId as E,virtualDisplayFilterHighlightTileId as T}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as V}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as H}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as I}from"../../../views/3d/support/debugFlags.js";let L=class extends(u(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void l.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get memoryForUnusedFeatures(){return null!=this._tileFetcher?this._tileFetcher.memoryForUnusedFeatures:0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get snappingComplexityExceeded(){return this._tileFetcher?.snappingComplexityExceeded??!0}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===M.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===M.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,s=i?.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&s){const t=this._approximateExtentSizeAtScale(e.minScale,s);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>M.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,s=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),r=t.levels[0];return s*((r.tileSize[0]/(r.scale/e)+r.tileSize[1]/(r.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,null,E);return new s([e])}const e=this.layerView.view.featureTiles;if(!e)return new s;const t=e.tiles;if(this.layerView.displayFilterEnabled&&null!=this.layerView.effectiveDisplayFilterClause&&"1=1"!==this.layerView.effectiveDisplayFilterClause&&this.layerView.highlightIds?.length>0){const e=new S(0,0,0,this.layerView.view.featureTiles?.tilingScheme,T);return new s([...t,e])}return t}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=M.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add(()=>this.displayFeatureLimit,e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal))),this._updatingHandles.add(()=>this.mode,()=>this._modeChanged(),p),this._updatingHandles.add(()=>this.mode,(e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)},p),this.addResolvingPromise(Promise.resolve().then(()=>this._verifyCapabilities()).then(()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo())).then(()=>this._initializeTileFetcher()))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!C(e)?.operations.supportsQuery)throw new r("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=n(this._tileFetcher),this._tilesHandle=o(this._tilesHandle),this._lifeCycleAbortController=h(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const{layerView:t,tileDescriptors:i}=this,s=t.layer,r=new V({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=r,this._suspended?r.suspend():r.resume(),e&&this.addHandles(m(()=>e.quality,e=>r.memoryFactor=e,f));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(m(()=>this.layerView.view?.qualitySettings?.graphics3D?.[a],e=>r.lodFactor=e||1,p));const l=e=>{r.maximumNumberOfFeatures=e,r.useTileCount=this.serviceDataCount>e},o=e=>{r.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==s.type&&this._updatingHandles.add(()=>s.createQueryVersion,()=>this._dataFilterChanged()),this._updatingHandles.add(()=>this.layerView.effectiveDisplayFilter,()=>this._effectiveDisplayFilterChanged()),this._updatingHandles.add(()=>this.layerView.highlightIds,()=>this._displayFilterHighlightIdsChanged()),this._updatingHandles.add(()=>t.availableFields,(e,t)=>this._availableFieldsChanged(t,e)),this._updatingHandles.add(()=>t.requiredFields,(e,t)=>this._requiredFieldsChanged(t,e)),"customParameters"in s&&this._updatingHandles.add(()=>s.customParameters,()=>this.restart()),this.addHandles([s.on("apply-edits",e=>this._applyEdits(e)),m(()=>this.extent,e=>r.filterExtent=e,y),m(()=>this.tileDescriptors,e=>r.tileDescriptors=e,y),m(()=>this.maximumNumberOfFeatures,l,f),m(()=>this.serviceDataCount,o,f),m(()=>({featureTiles:e.featureTiles,show:I.FEATURE_TILE_FETCH_SHOW_TILES}),({show:t,featureTiles:i})=>{t&&r&&i?r.debugger??=new H(r,i.tilingScheme.toTileInfo(),e):r.debugger=n(r.debugger)},p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add(()=>this.maxTotalSnapshotVertices,()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal)))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.enableFeatureTiles());break;default:l.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_displayFilterHighlightIdsChanged(){"snapshot"!==this.mode&&null!=this._tileFetcher&&this._tileFetcher.refetchDisplayFilterHighlightTile()}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then(e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.consumePromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}}).catch(e=>{if(!d(e))throw e})}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new b({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=_(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,s=i.capabilities?.query.supportsExtent??!1,r=a(t.fullExtentInLocalViewSpatialReference),l=i.fullExtent,n=this._fullExtentIsAccurate(),o=this.serviceDataCount;if(s&&o<=M.maxFeatureCountForExtent&&(!r||!n)&&"queryExtent"in i){const t=this._createDataInfoQuery(),s=await i.queryExtent(t,{timeout:M.queryExtentTimeout,signal:e});this._set("serviceDataExtent",s.extent)}else if(r)this._set("serviceDataExtent",r);else if(null!=l){const e=l.spatialReference?await v(l,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",M.noServiceDataCount);const s=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:M.queryStatisticsTimeout,signal:e}));if(!0===s.ok)this._set("serviceDataCount",s.value);else{if(d(s.error))throw s.error;this._set("serviceDataCount",M.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,s){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:r,averageSymbolComplexity:a}=e,{verticesPerFeature:l,verticesPerCoordinate:n}=a,o=l<=0,h=this._minimumNumberOfVerticesForGeometry>1;if(!o&&!h)return void(this._snapshotLimitExceeded=!1);0!==l&&null!=t&&await t;const u=Math.min(r,A),c=this.serviceDataCount,p=c!==M.noServiceDataCount;let m=p?Math.ceil((u-c*l)/(n||1)):Math.ceil(u/(n||1));if(h&&(m=Math.min(m,N)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:M.queryStatisticsTimeout,signal:s}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),s=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),r=s.then(()=>this._updateServiceDataExtent(t)).catch(e=>{d(e)||l.getLogger(this).error("#fetchServiceDataInfo()",e)}).then(()=>{r===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null});return e&&(this._fetchDataInfoPromise=r),this._fetchDataInfoAbortController=e,s.then(()=>{},()=>{})}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"memoryForUnusedFeatures",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g()],L.prototype,"snappingComplexityExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,A=1e6,q=12e3,j=1e4,N=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}class M{static{this.noServiceDataCount=1/0}static{this.maxSnapshotMinScaleFactor=5}static reset(){M.maxFeatureCountForExtent=O,M.queryStatisticsTimeout=q,M.queryExtentTimeout=j}}M.reset();export{L as FeatureTileController3D,M as FeatureTileController3DConstants};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{result as i}from"../../../core/asyncUtils.js";import r from"../../../core/Collection.js";import s from"../../../core/Error.js";import has from"../../../core/has.js";import{clone as a}from"../../../core/lang.js";import l from"../../../core/Logger.js";import{destroyMaybe as o,removeMaybe as n,abortMaybe as h}from"../../../core/maybe.js";import{EsriPromiseMixin as u}from"../../../core/Promise.js";import{createAbortError as c,isAbortError as d}from"../../../core/promiseUtils.js";import{initial as p,watch as m,syncAndInitial as f,sync as y}from"../../../core/reactiveUtils.js";import{sqlAnd as _}from"../../../core/sql.js";import{property as g,subclass as F}from"../../../core/accessorSupport/decorators.js";import{UpdatingHandles as x}from"../../../core/support/UpdatingHandles.js";import{projectAsync as v}from"../../../geometry/projectionUtils.js";import{isHostedAgolService as w}from"../../support/arcgisLayerUrl.js";import{checkServiceCurrentUserSupport as D}from"../../support/featureLayerUtils.js";import{getEffectiveLayerCapabilities as C}from"../../support/layerUtils.js";import b from"../../../rest/support/StatisticDefinition.js";import{FeatureTileDescriptor as S,virtualSnapshotTileId as E,virtualDisplayFilterHighlightTileId as T}from"../../../views/3d/layers/support/FeatureTileDescriptor.js";import{FeatureTileFetcher3D as V}from"../../../views/3d/layers/support/FeatureTileFetcher3D.js";import{FeatureTileFetcher3DDebugger as H}from"../../../views/3d/layers/support/FeatureTileFetcher3DDebugger.js";import{debugFlags as I}from"../../../views/3d/support/debugFlags.js";let L=class extends(u(t)){get dataUpdating(){return this._tileFetcher?.dataUpdating??!1}set extent(e){if(null!=e&&!e.spatialReference.equals(this.layerView.view.spatialReference))return void l.getLogger(this).error("#extent=","extent needs to be in the same spatial reference as the view");const t=this._get("extent");if(t===e)return;if(null!=t&&e&&t.equals(e))return;const i=null!=e?e.clone():null;this._set("extent",i)}get updating(){return!!(this._tileFetcher?.updating||null!=this._fetchDataInfoPromise||"tiles"===this.mode&&this.layerView.view.featureTiles?.updating||this._updatingHandles?.updating)}get updatingTotal(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingTotal:0}get updatingRemaining(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.updatingRemaining:0}get expectedFeatureDiff(){return this.updating&&null!=this._tileFetcher?this._tileFetcher.expectedFeatureDiff:0}get usedMemory(){return this._tileFetcher?.usedMemory??0}get usedMemoryPerFeature(){return this._tileFetcher?.usedMemoryPerFeature??0}get maximumNumberOfFeaturesExceeded(){return!(null==this._tileFetcher||!this._tileFetcher.maximumNumberOfFeaturesExceeded)}get snappingComplexityExceeded(){return this._tileFetcher?.snappingComplexityExceeded??!0}get maximumNumberOfFeatures(){return this.displayFeatureLimit?.maximumNumberOfFeatures??0}set maximumNumberOfFeatures(e){e!==this.maximumNumberOfFeatures&&this._overrideIfSome("maximumNumberOfFeatures",e)}get hasMaximumNumberOfFeaturesOverride(){return this._isOverridden("maximumNumberOfFeatures")}get hasAllFeatures(){return this.serviceDataCount===N.noServiceDataCount&&"snapshot"===this.mode&&this.hasAllFeaturesInView||this.serviceDataCount===this.graphics.length}get hasAllFeaturesInView(){const e=this.context.effectiveDisplayFilter?.where||null,t=null!=e&&"1=1"!==e;return("tiles"!==this.mode||!t)&&(this._tileFetcher?.showsAllFeatures??!1)}get hasFullGeometries(){return this._tileFetcher?.hasFullGeometries??!1}get mode(){const e=this.layerView.layer;if("feature"===e.type&&null!=e.infoFor3D)return"snapshot";if("catalog-footprint"===e.type)return"tiles";if(this._forceTilesMode)return"tiles";const t=this.layerView.view;if(!1===t.qualitySettings?.graphics3D?.snapshotAvailable||this.serviceDataCount===N.noServiceDataCount||this._snapshotLimitExceeded||this.maximumNumberOfFeaturesExceeded||t.quality<1)return"tiles";const i=t&&t.featureTiles,r=i?.tilingScheme;if(e&&e.minScale&&this.serviceDataExtent&&r){const t=this._approximateExtentSizeAtScale(e.minScale,r);if((this.serviceDataExtent.width/t+this.serviceDataExtent.height/t)/2>N.maxSnapshotMinScaleFactor)return"tiles"}return!this.maximumNumberOfFeatures||this.serviceDataCount<=this.maximumNumberOfFeatures?"snapshot":"tiles"}get maxTotalSnapshotVertices(){const e=this._get("maxTotalSnapshotVertices")||0,t="snapshot"===this.mode&&this._tileFetcher?.totalVertices||0;return Math.max(e,t)}_approximateExtentSizeAtScale(e,t){const i=this.layerView.view,r=Math.ceil((i.width/t.pixelSize+i.height/t.pixelSize)/2),s=t.levels[0];return r*((s.tileSize[0]/(s.scale/e)+s.tileSize[1]/(s.scale/e))/2)}get tileDescriptors(){if("snapshot"===this.mode){const e=new S(0,0,0,null,E);return new r([e])}const e=this.layerView.view.featureTiles;if(!e)return new r;const t=e.tiles;if(this.layerView.displayFilterEnabled&&null!=this.layerView.effectiveDisplayFilterClause&&"1=1"!==this.layerView.effectiveDisplayFilterClause&&this.layerView.highlightIds?.length>0){const e=new S(0,0,0,this.layerView.view.featureTiles?.tilingScheme,T);return new r([...t,e])}return t}get test(){}constructor(e){super(e),this.type="feature-tile-3d",this._updatingHandles=new x,this.serviceDataExtent=null,this.serviceDataCount=N.noServiceDataCount,this._snapshotLimitExceeded=!1,this.displayFeatureLimit=null,this._forceTilesMode=!1,this._suspended=!1,this._tileFetcher=null,this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null,this._lifeCycleAbortController=new AbortController}initialize(){this._updatingHandles.add(()=>this.displayFeatureLimit,e=>this._updatingHandles.addPromise(this._updateSnapshotLimit(e,null,this._lifeCycleAbortController.signal))),this._updatingHandles.add(()=>this.mode,()=>this._modeChanged(),p),this._updatingHandles.add(()=>this.mode,(e,t)=>{"tiles"===e&&"snapshot"===t&&(this._forceTilesMode=!0)},p),this.addResolvingPromise(Promise.resolve().then(()=>this._verifyCapabilities()).then(()=>this._updatingHandles.addPromise(this._fetchServiceDataInfo())).then(()=>this._initializeTileFetcher()))}_verifyCapabilities(){const e=this.layerView.layer;if("ogc-feature"!==e.type&&!C(e)?.operations.supportsQuery)throw new s("graphicscontroller:query-capability-required","Service requires query capabilities to be used as a feature layer",{layer:e})}destroy(){this._cancelFetchServiceDataInfo(),this._tileFetcher=o(this._tileFetcher),this._tilesHandle=n(this._tilesHandle),this._lifeCycleAbortController=h(this._lifeCycleAbortController),this._updatingHandles.destroy(),this._set("_updatingHandles",null)}suspend(){this._suspended||(this._suspended=!0,null!=this._tileFetcher&&this._tileFetcher.suspend())}resume(){this._suspended&&(this._suspended=!1,null!=this._tileFetcher&&this._tileFetcher.resume())}restart(){const e=()=>{null!=this._tileFetcher&&this._tileFetcher.restart()};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(e,e))}refetch(){this._refetch({resetForceTilesMode:!1})}getMissingAttributesForFeature(e){return this._tileFetcher?.getMissingAttributesForFeature(e)}_refetch(e){const t=()=>{null!=this._tileFetcher&&(e.resetForceTilesMode&&(this._forceTilesMode=!1),this._tileFetcher.refetch())};this._updatingHandles.consumePromise(this._fetchServiceDataInfo().then(t,t))}_initializeTileFetcher(){const e=this.layerView.view;if(!e)return;const{layerView:t,tileDescriptors:i}=this,r=t.layer,s=new V({context:this.context,filterExtent:this.extent,tileDescriptors:i,features:this.graphics});this._tileFetcher=s,this._suspended?s.suspend():s.resume(),e&&this.addHandles(m(()=>e.quality,e=>s.memoryFactor=e,f));const a="polygon"===this.context.geometryType?"polygonLodFactor":"polyline"===this.context.geometryType?"polylineLodFactor":null;a&&this.addHandles(m(()=>this.layerView.view?.qualitySettings?.graphics3D?.[a],e=>s.lodFactor=e||1,p));const l=e=>{s.maximumNumberOfFeatures=e,s.useTileCount=this.serviceDataCount>e},n=e=>{s.useTileCount=e>this.maximumNumberOfFeatures};"ogc-feature"!==r.type&&this._updatingHandles.add(()=>r.createQueryVersion,()=>this._dataFilterChanged()),this._updatingHandles.add(()=>this.layerView.effectiveDisplayFilter,()=>this._effectiveDisplayFilterChanged()),this._updatingHandles.add(()=>this.layerView.highlightIds,()=>this._displayFilterHighlightIdsChanged()),this._updatingHandles.add(()=>t.availableFields,(e,t)=>this._availableFieldsChanged(t,e)),this._updatingHandles.add(()=>t.requiredFields,(e,t)=>this._requiredFieldsChanged(t,e)),"customParameters"in r&&this._updatingHandles.add(()=>r.customParameters,()=>this.restart()),this.addHandles([r.on("apply-edits",e=>this._applyEdits(e)),m(()=>this.extent,e=>s.filterExtent=e,y),m(()=>this.tileDescriptors,e=>s.tileDescriptors=e,y),m(()=>this.maximumNumberOfFeatures,l,f),m(()=>this.serviceDataCount,n,f),m(()=>({featureTiles:e.featureTiles,show:I.FEATURE_TILE_FETCH_SHOW_TILES}),({show:t,featureTiles:i})=>{t&&s&&i?s.debugger??=new H(s,i.tilingScheme.toTileInfo(),e):s.debugger=o(s.debugger)},p)]),this._supportsExceedsLimitQuery||this._updatingHandles.add(()=>this.maxTotalSnapshotVertices,()=>this._updatingHandles.addPromise(this._updateSnapshotLimit(this.displayFeatureLimit,null,this._lifeCycleAbortController.signal)))}_modeChanged(){switch(this.mode){case"tiles":this._tilesHandle||(this._tilesHandle=this.layerView.view.enableFeatureTiles());break;default:l.getLogger(this).warn("Unhandled feature layer mode "+this.mode);case"snapshot":null!=this._tilesHandle&&(this._tilesHandle.remove(),this._tilesHandle=null)}}_dataFilterChanged(){this._set("maxTotalSnapshotVertices",0),this.notifyChange("maxTotalSnapshotVertices"),this._refetch({resetForceTilesMode:!0})}_effectiveDisplayFilterChanged(){"snapshot"!==this.mode&&this._refetch({resetForceTilesMode:!1})}_displayFilterHighlightIdsChanged(){"snapshot"!==this.mode&&null!=this._tileFetcher&&this._tileFetcher.refetchDisplayFilterHighlightTile()}_applyEdits(e){const t=this.layerView.layer;null!=this._tileFetcher&&this._tileFetcher.applyEdits(e).then(e=>{if(e){if(!this._lifeCycleAbortController)throw c();e.exceededTransferLimit&&"refresh"in t?t.refresh():(e.deletedFeatures.length||e.updatedFeatures.length||e.addedFeatures.length)&&this._updatingHandles.consumePromise(this._updateServiceDataExtent(this._lifeCycleAbortController.signal))}}).catch(e=>{if(!d(e))throw e})}_availableFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this._refetch({resetForceTilesMode:!1})}_requiredFieldsChanged(e,t){null!=this._tileFetcher&&P(this._tileFetcher.availableFields,t)&&this.restart()}_createVertexLimitExceededQuery(e){const t=this.layerView.layer,i=t.createQuery();return i.returnGeometry=!1,i.outStatistics=[new b({statisticType:"exceedslimit",maxVertexCount:e,outStatisticFieldName:"exceedslimit",maxPointCount:1e8,maxRecordCount:1e8})],t.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),i}_createDataInfoQuery(){const e=this.layerView.layer,t=this.layerView,i=e.createQuery();return i.returnGeometry=!1,i.outSpatialReference=this.layerView.view.spatialReference,e.capabilities?.query.supportsCacheHint&&(i.cacheHint=!0),t.effectiveDisplayFilter&&(i.where=_(i.where,t.effectiveDisplayFilter.where)),i}_fullExtentIsAccurate(){const e=this.layerView.layer;if("definitionExpression"in e&&e.definitionExpression)return!1;switch(e.type){case"feature":case"catalog-footprint":case"oriented-imagery":return w(e.url);case"csv":case"geojson":case"ogc-feature":case"wfs":return!0;default:return}}async _updateServiceDataExtent(e){try{await this._tryUpdateServiceDataExtent(e)}catch(t){d(t)||this._set("serviceDataExtent",a(this.layerView.fullExtentInLocalViewSpatialReference)??null)}}async _tryUpdateServiceDataExtent(e){const t=this.layerView,i=t.layer,r=i.capabilities?.query.supportsExtent??!1,s=a(t.fullExtentInLocalViewSpatialReference),l=i.fullExtent,o=this._fullExtentIsAccurate(),n=this.serviceDataCount;if(r&&n<=N.maxFeatureCountForExtent&&(!s||!o)&&"queryExtent"in i){const t=this._createDataInfoQuery(),r=await i.queryExtent(t,{timeout:N.queryExtentTimeout,signal:e});this._set("serviceDataExtent",r.extent)}else if(s)this._set("serviceDataExtent",s);else if(null!=l){const e=l.spatialReference?await v(l,t.view.spatialReference):null;this._set("serviceDataExtent",e??null)}else this._set("serviceDataExtent",null)}async _updateServiceDataCount(e){const t=this.layerView.layer;if(!("queryFeatureCount"in t)||!has("featurelayer-snapshot-enabled"))return void this._set("serviceDataCount",N.noServiceDataCount);const r=await i(t.queryFeatureCount(this._createDataInfoQuery(),{timeout:N.queryStatisticsTimeout,signal:e}));if(!0===r.ok)this._set("serviceDataCount",r.value);else{if(d(r.error))throw r.error;this._set("serviceDataCount",N.noServiceDataCount)}}get _supportsExceedsLimitQuery(){const e=this.layerView.layer;return null!=e.capabilities&&e.capabilities.operations&&e.capabilities.operations.supportsExceedsLimitStatistics}get _minimumNumberOfVerticesForGeometry(){switch(this.layerView.layer.geometryType){case"point":case"multipoint":return 1;case"polygon":return 4;case"polyline":return 2;case"multipatch":case"mesh":return 3;default:return 0}}async _updateSnapshotLimit(e,t,r){if(null==e?.averageSymbolComplexity)return void(this._snapshotLimitExceeded=!1);const{maximumTotalNumberOfVertices:s,averageSymbolComplexity:a}=e,{verticesPerFeature:l,verticesPerCoordinate:o}=a,n=l<=0,h=this._minimumNumberOfVerticesForGeometry>1;if(!n&&!h)return void(this._snapshotLimitExceeded=!1);0!==l&&null!=t&&await t;const u=Math.min(s,A),c=this.serviceDataCount,p=c!==N.noServiceDataCount;let m=p?Math.ceil((u-c*l)/(o||1)):Math.ceil(u/(o||1));if(h&&(m=Math.min(m,j)),p&&this._minimumNumberOfVerticesForGeometry*c>m)return void(this._snapshotLimitExceeded=!0);if(!this._supportsExceedsLimitQuery||!has("featurelayer-snapshot-enabled"))return void(this._snapshotLimitExceeded=this.maxTotalSnapshotVertices>m);const f=await i(this.layerView.layer.queryFeatures(this._createVertexLimitExceededQuery(m),{timeout:N.queryStatisticsTimeout,signal:r}));if(!1===f.ok){if(d(f.error))throw f.error;return void(this._snapshotLimitExceeded=!1)}const y=f.value.features[0];this._snapshotLimitExceeded=!!y?.attributes&&!!y.attributes.exceedslimit}async _fetchServiceDataInfo(){this._cancelFetchServiceDataInfo(),await D(this.layerView.layer);let e=new AbortController;const t=e.signal,i=this._updateServiceDataCount(t),r=Promise.allSettled([i,this._updateSnapshotLimit(this.displayFeatureLimit,i,t)]),s=r.then(()=>this._updateServiceDataExtent(t)).catch(e=>{d(e)||l.getLogger(this).error("#fetchServiceDataInfo()",e)}).then(()=>{s===this._fetchDataInfoPromise&&(this._fetchDataInfoPromise=null,this._fetchDataInfoAbortController=null),e=null});return e&&(this._fetchDataInfoPromise=s),this._fetchDataInfoAbortController=e,r.then(()=>{},()=>{})}_cancelFetchServiceDataInfo(){const e=this._fetchDataInfoAbortController;e&&(this._fetchDataInfoAbortController=null,this._fetchDataInfoPromise=null,e.abort())}get performanceInfo(){return{storedFeatures:this._tileFetcher?.storedFeatures??0,totalFeatures:this._tileFetcher?.totalFeatures??0,totalVertices:this._tileFetcher?.totalVertices??0,missingTiles:this._tileFetcher?.missingTiles??0}}};e([g({readOnly:!0})],L.prototype,"type",void 0),e([g({constructOnly:!0})],L.prototype,"graphics",void 0),e([g({constructOnly:!0})],L.prototype,"layerView",void 0),e([g({constructOnly:!0})],L.prototype,"context",void 0),e([g({readOnly:!0})],L.prototype,"dataUpdating",null),e([g()],L.prototype,"extent",null),e([g()],L.prototype,"updating",null),e([g({readOnly:!0})],L.prototype,"_updatingHandles",void 0),e([g()],L.prototype,"updatingTotal",null),e([g()],L.prototype,"updatingRemaining",null),e([g()],L.prototype,"expectedFeatureDiff",null),e([g()],L.prototype,"usedMemory",null),e([g()],L.prototype,"usedMemoryPerFeature",null),e([g()],L.prototype,"maximumNumberOfFeaturesExceeded",null),e([g()],L.prototype,"snappingComplexityExceeded",null),e([g({readOnly:!0})],L.prototype,"serviceDataExtent",void 0),e([g({readOnly:!0})],L.prototype,"serviceDataCount",void 0),e([g()],L.prototype,"_snapshotLimitExceeded",void 0),e([g()],L.prototype,"displayFeatureLimit",void 0),e([g({type:Number})],L.prototype,"maximumNumberOfFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeatures",null),e([g({readOnly:!0})],L.prototype,"hasAllFeaturesInView",null),e([g({readOnly:!0})],L.prototype,"hasFullGeometries",null),e([g()],L.prototype,"_forceTilesMode",void 0),e([g({readOnly:!0})],L.prototype,"mode",null),e([g({readOnly:!0})],L.prototype,"maxTotalSnapshotVertices",null),e([g({readOnly:!0})],L.prototype,"tileDescriptors",null),e([g()],L.prototype,"_tileFetcher",void 0),e([g()],L.prototype,"_fetchDataInfoPromise",void 0),L=e([F("esri.layers.graphics.controllers.FeatureTileController3D")],L);const O=1e4,A=1e6,q=12e3,M=1e4,j=5e6;function P(e,t){if(!t)return!1;for(const i of t)if(!e.has(i))return!0;return!1}class N{static{this.noServiceDataCount=1/0}static{this.maxSnapshotMinScaleFactor=5}static reset(){N.maxFeatureCountForExtent=O,N.queryStatisticsTimeout=q,N.queryExtentTimeout=M}}N.reset();export{L as FeatureTileController3D,N as FeatureTileController3DConstants};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{baseObjectMemory as e,estimateNumberArrayMemory as t,estimateNestedObjectMemory as s,estimateAttributesMemory as n}from"../../core/memoryEstimations.js";import{generateUID as r}from"../../core/uid.js";import i from"../../geometry/SpatialReference.js";import{empty as o,expandWithNestedArray as a}from"../../geometry/support/aaBoundingBox.js";import{empty as l,expandWithNestedArray as u}from"../../geometry/support/aaBoundingRect.js";import{unquantizePolyline as c,unquantizePolygon as p,unquantizeMultipoint as m,unquantizePoint as h}from"../../geometry/support/quantizationUtils.js";import{featureGeometryTypeKebabDictionary as f}from"../../geometry/support/typeUtils.js";import y from"../support/Field.js";import{getApproximateMaxDensificationSegments as g}from"../../views/2d/layers/graphics/densificationConstants.js";export{equals}from"./dehydratedFeatureComparison.js";class d{constructor(e,t,s){this.uid=e,this.geometry=t,this.attributes=s,this.visible=!0,this.objectId=null,this.centroid=null}}function b(e){return null!=e.geometry}class x{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}function j(e,t){const s=f.fromJSON(e.geometryType),n=i.fromJSON(e.spatialReference),r=e.transform,o=e.objectIdFieldName,a=t?.maxStringAttributeLength,l=t?.maxStringAttributeFields;let u;const g=e.features.map(t=>{const i=N(t,s,n,e.objectIdFieldName),f=i.geometry;if(
|
|
2
|
+
import{baseObjectMemory as e,estimateNumberArrayMemory as t,estimateNestedObjectMemory as s,estimateAttributesMemory as n}from"../../core/memoryEstimations.js";import{generateUID as r}from"../../core/uid.js";import i from"../../geometry/SpatialReference.js";import{empty as o,expandWithNestedArray as a}from"../../geometry/support/aaBoundingBox.js";import{empty as l,expandWithNestedArray as u}from"../../geometry/support/aaBoundingRect.js";import{unquantizePolyline as c,unquantizePolygon as p,unquantizeMultipoint as m,unquantizePoint as h}from"../../geometry/support/quantizationUtils.js";import{featureGeometryTypeKebabDictionary as f}from"../../geometry/support/typeUtils.js";import y from"../support/Field.js";import{getApproximateMaxDensificationSegments as g}from"../../views/2d/layers/graphics/densificationConstants.js";export{equals}from"./dehydratedFeatureComparison.js";class d{constructor(e,t,s){this.uid=e,this.geometry=t,this.attributes=s,this.visible=!0,this.objectId=null,this.centroid=null}}function b(e){return null!=e.geometry}class x{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}function j(e,t){const s=f.fromJSON(e.geometryType),n=i.fromJSON(e.spatialReference),r=e.transform,o=e.objectIdFieldName,a=t?.maxStringAttributeLength,l=t?.maxStringAttributeFields;let u;const g=e.features.map(t=>{const i=N(t,s,n,e.objectIdFieldName),f=i.geometry;if(A(i.attributes,l,a,e=>{u??=[];const t=w(i,o);null!=t&&u.push({objectId:t,attribute:e})}),null!=f&&r)switch(f.type){case"point":i.geometry=h(r,f,f);break;case"multipoint":i.geometry=m(r,f,f);break;case"polygon":i.geometry=p(r,f,f);break;case"polyline":i.geometry=c(r,f,f);break;case"extent":case"mesh":i.geometry=f}return i});return{geometryType:s,features:g,spatialReference:n,fields:e.fields?.map(e=>y.fromJSON(e))??[],objectIdFieldName:e.objectIdFieldName,globalIdFieldName:e.globalIdFieldName,geohashFieldName:e.geohashFieldName,geometryProperties:e.geometryProperties,hasZ:e.hasZ,hasM:e.hasM,exceededTransferLimit:e.exceededTransferLimit,transform:null,missingAttributes:u}}function N(e,t,s,n){return{uid:r(),objectId:n&&e.attributes?e.attributes[n]:null,attributes:e.attributes,geometry:Z(e.geometry,t,s),visible:!0}}function Z(e,t,s){if(null==e)return null;switch(t){case"point":{const t=e;return{x:t.x,y:t.y,z:t.z,m:t.m,hasZ:null!=t.z,hasM:null!=t.m,type:"point",spatialReference:s}}case"polyline":{const t=e;return{paths:t.paths,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polyline",spatialReference:s}}case"polygon":{const t=e;return{rings:t.rings,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"polygon",spatialReference:s}}case"multipoint":{const t=e;return{points:t.points,hasZ:!!t.hasZ,hasM:!!t.hasM,type:"multipoint",spatialReference:s}}}}function F(n){if(null==n)return 0;switch(n.type){case"point":return e+10+8+24;case"polyline":case"polygon":{let t=0;const r=2+(n.hasZ?1:0)+(n.hasM?1:0),i="polyline"===n.type?n.paths:n.rings,o="polyline"===n.type?n.curvePaths:n.curveRings;if(o?.length){const e=3*g()*128;t=8*e*r+128*e+32*(i.length+1)}else t=s(i);return e+64+t+34}case"multipoint":{const t=s(n.points);return e+t+64+34+32}case"extent":return e+10+64+34;case"mesh":{const s=n.vertexAttributes;return e+t(s.position,s.normal,s.uv,s.tangent)}default:return e}}const I=43;function k(e){return I+n(e.attributes)+F(e.geometry)}function M(e){if(null==e)return 0;switch(e.type){case"point":return 1;case"polyline":{let t=0;for(const s of e.paths)t+=s.length;return t}case"polygon":{let t=0;for(const s of e.rings)t+=s.length;return t}case"multipoint":return e.points.length;case"extent":return 2;case"mesh":{const t=e.vertexAttributes&&e.vertexAttributes.position;return t?t.length/3:0}default:return}}function v(e){if(null==e)return!1;switch(e.type){case"extent":case"point":return!0;case"polyline":for(const t of e.paths)if(t.length>0)return!0;return!1;case"polygon":for(const t of e.rings)if(t.length>0)return!0;return!1;case"multipoint":return e.points.length>0;case"mesh":return!e.loaded||e.vertexAttributes.position.length>0}}function z(e,t){switch(o(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[3]=e.x,t[1]=t[4]=e.y,e.hasZ&&(t[2]=t[5]=e.z);break;case"polyline":for(let s=0;s<e.paths.length;s++)a(t,e.paths[s],!!e.hasZ);break;case"polygon":for(let s=0;s<e.rings.length;s++)a(t,e.rings[s],!!e.hasZ);break;case"multipoint":a(t,e.points,!!e.hasZ);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[3]=e.xmax,t[4]=e.ymax,null!=e.zmin&&(t[2]=e.zmin),null!=e.zmax&&(t[5]=e.zmax)}return t}function R(e,t){switch(l(t),"mesh"===e.type&&(e=e.extent),e.type){case"point":t[0]=t[2]=e.x,t[1]=t[3]=e.y;break;case"polyline":for(let s=0;s<e.paths.length;s++)u(t,e.paths[s]);break;case"polygon":for(let s=0;s<e.rings.length;s++)u(t,e.rings[s]);break;case"multipoint":u(t,e.points);break;case"extent":t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax}}function w(e,t){return null!=e.objectId?e.objectId:e.attributes&&t?e.attributes[t]:null}function A(e,t,s,n){if(t?.size&&null!=s&&e)for(const r in e){if(!t.has(r))continue;const i=e[r];"string"==typeof i&&i.length>s&&(n(r),e[r]="")}}export{d as DehydratedFeatureClass,x as DehydratedFeatureSetClass,I as baseDehydratedGraphicMemory,z as computeAABB,R as computeAABR,F as estimateGeometryMemory,k as estimateSize,j as fromFeatureSetJSON,Z as fromJSONGeometry,w as getObjectId,b as hasGeometry,v as hasVertices,M as numVertices,A as removeLargeStringAttributes};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isArrayLike as e}from"../../../core/arrayUtils.js";import{deg2rad as t}from"../../../core/mathUtils.js";import{clone as r,zeros as a}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import i from"../../../geometry/Point.js";import{
|
|
2
|
+
import{isArrayLike as e}from"../../../core/arrayUtils.js";import{deg2rad as t}from"../../../core/mathUtils.js";import{clone as r,zeros as a}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import i from"../../../geometry/Point.js";import{rectifyMapPointPanoramic as n,rectifyMapPoint as o}from"./rectifyMapPoint.js";import{getWebMercatorScalingFactor as c,hasAngles as s,convertPixelToHeadingPitch as f,adjustHorizonAngles as l,reducerFn as p,scaleAndAddWithFactor as m,validatePixelsToTransform as h,validateRotationMatrix as u,computeFarplaneVertices as y,computeHFOVAndVFOV as d,vecToPoint as w,or as g,isUpdateElevationWithElevationSource as x,computeNewReferenceCoordinates as v,projectiveTransform as R}from"./utils.js";import{worldToImage as M}from"./worldToImage.js";import{viewingLimit as P}from"../../../widgets/OrientedImageryViewer/constants.js";async function A(e,t,r){const{verticalFieldOfView:a,imageBoundaries:i,scalingFactor:n,farPlaneVertices:o,cameraLocation:c,pixelsToTransform:s,vecToPoint:f,pixelDepths:l}=D(e,t),p=new Array;return await V(s,o,i,f,t,p,c,n,a,r,l),Array.isArray(e)?p:p[0]}async function V(e,t,r,a,n,c,s,f,l,p,m){let h=n.averageElevation;const u=e.length;for(let y=0;y<u;y+=1){const u=e.at(y),d=T(t,r,u,a,n),w=m?.at(y);if("number"==typeof w){const e=j(d,s,f),t=w*f,r=[s[0]+e[0]*t,s[1]+e[1]*t,s[2]+e[2]*w];c.push(new i(r,n.cameraLocation.spatialReference));continue}if(p&&g("elevationSample"in p,x(p))){h=(await o(a(d),{x:u[0],y:u[1]},{...n,...p,farPlaneVertices:t.map(a)}))[2]}c.push(a(F(d,s,f,h,n.cameraPitch,l)))}}function j(e,t,r){const i=e[0]-t[0],n=e[1]-t[1],o=e[2]-t[2],c=Math.hypot(i,n)/r,s=Math.hypot(o,c)*r,f=a();return f[0]=i/s,f[1]=n/s,f[2]=o/s,f[2]=f[2]*r,f}function F(e,t,a,i,n,o){let c=r(e);const s=j(e,t,a);if(b(e[2],i,n,o)){const e=Math.abs((t[2]-i)/-s[2])*a;c=m(t,s,e,a)}else c[2]=i;return c}function b(e,t,r,a){return e<t||r+a/2<P}function T(e,t,r,a,i){let n=null;const o=9;let c,s=0,f=e,l=t;for(;s<=o;){const e=O(r,l,f,i);if(c=e.error,n=e.transformedPoint,g(c<=1,s===o))break;f=v(f,c,r,t),l=L(f,a,i),s++}return n}function L(e,t,r){return M(e.map(t),r).map(({x:e,y:t})=>[e,t,1])}function O(e,t,r,a){const{cameraLocation:n}=a,o=R(e,t,r),{x:c,y:s}=M(new i(o,n.spatialReference),a);return{transformedPoint:o,error:z(e,[c,s,1])}}function z(e,t){return Math.abs(e[0]-t[0])+Math.abs(e[1]-t[1])}function D(t,r){const a=e(t)||"items"in t?t:[t],{cameraLocation:n,rotationMatrix:o}=r;if(h(a,n),u(o),9!==o?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix");const s=c(n.y,n.spatialReference),f=y({...r,scalingFactor:s}),l=M(f.map(e=>new i(e,n.spatialReference)),r),{vfov:p}=d(r.horizontalFieldOfView,r.verticalFieldOfView,r.cameraRoll);return{cameraLocation:n.toArray(),imageBoundaries:l.map(({x:e,y:t})=>[e,t,1]),verticalFieldOfView:p,farPlaneVertices:f,scalingFactor:s,pixelsToTransform:a.map(e=>[e.x,e.y,1]),vecToPoint:w(n.spatialReference),pixelDepths:a.map(e=>E(e)?e.depth:void 0)}}function E(e){return"depth"in e&&"number"==typeof e.depth}async function B(e,r,a){const{cameraLocation:o,farDistance:m,imageHeight:h,imageWidth:u,verticalFieldOfView:y,horizonPitch:d,horizonRoll:w,horizonYaw:g}=r,x=c(o.y,o.spatialReference),v=m*x,R=new Array,[M,P,A]=o.toArray(),V=Array.isArray(e)?e:[e];for(const c of V){let e,V;const j=E(c),b=j?c.depth*x:v;if(s(c))e=c.heading,V=c.pitch;else{const t=f({x:c.x,y:c.y},u,h),r=l(t.heading,t.pitch,[d,w,g],!0);e=r[0],V=r[1]}const T=[M+Math.sin(t(e))*Math.sin(t(V))*b,P+Math.cos(t(e))*Math.sin(t(V))*b,A+-Math.cos(t(V))*(j?c.depth:m)];if(j){R.push(new i(T,o.spatialReference));continue}let L=r.averageElevation;if(a){L=(await n(new i(T,o.spatialReference),{heading:e,pitch:V},{...r,...a,farPlaneVertices:p(m,m).map(([e,t])=>new i([o.x+e,o.y+t],o.spatialReference))}))[2]}R.push(new i(F(T,o.toArray(),x,L,V,y),o.spatialReference))}return Array.isArray(e)?R:R[0]}export{A as imageToWorld,B as imageToWorldPanoramic};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"../../../core/Error.js";import{rad2deg as n,deg2rad as a}from"../../../core/mathUtils.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as i,fromValues as o}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{zeros as r,create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as s}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{transpose as l,multiply as f}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{invertOrIdentity as u,mul as h}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{scale as m,sub as p,add as g}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{isSerializable as v}from"../../../core/support/jsonUtils.js";import M from"../../../geometry/Point.js";import{projectAsync as d}from"../../../geometry/projectionUtils.js";import{earth as x}from"../../../geometry/support/Ellipsoid.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{a as y}from"../../../chunks/vec3.js";import{isConstantElevation as b,ConstantElevation as j,isElevationSource as O}from"../core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as z}from"../core/utils.js";import{getElevationSampler as P}from"./updateElevationUtils.js";import{isNumber as R}from"../../../support/guards.js";import{defaultImageSphereSize as F}from"../../../widgets/PanoramicViewer/constants.js";function E(t,n,a){const[e,o,r,c]=n,[s,l,f,m]=a;S(e,o,r,c);const p=S(s,l,f,m),g=H(e,o,r,c),v=H(s,l,f,m),M=u(i(),g),d=h(i(),M,v),[x,w,y,b]=D(t,d);return[x/b,w/b,p?0:y/b]}function S(t,n,a,e){return 0===t[2]&&0===n[2]&&0===a[2]&&0===e[2]&&(t[2]=n[2]=a[2]=e[2]=1,!0)}function V(t){return 0===t?1:t}function D(t,n){const[a,e,i]=t,o=[0,0,0,0];return o[0]=a*n[0]+e*n[1]+i*n[2]+n[3],o[1]=a*n[4]+e*n[5]+i*n[6]+n[7],o[2]=a*n[8]+e*n[9]+i*n[10]+n[11],o[3]=V(a*n[12]+e*n[13]+i*n[14]+n[15]),o}function H(t,n,a,e){const r=I(s([...e,1]),u(new Array(16),o(t[0],n[0],a[0],0,t[1],n[1],a[1],0,t[2],n[2],a[2],0,1,1,1,1))),c=r[0],l=r[1],f=r[2],h=i();return h[0]=c*t[0],h[1]=l*n[0],h[2]=f*a[0],h[3]=0,h[4]=c*t[1],h[5]=l*n[1],h[6]=f*a[1],h[7]=0,h[8]=c*t[2],h[9]=l*n[2],h[10]=f*a[2],h[11]=0,h[12]=c,h[13]=l,h[14]=f,h[15]=1,h}function L(t,n,a,e,i=r()){return i[0]=t[0]+n[0]*a,i[1]=t[1]+n[1]*a,i[2]=t[2]+n[2]*(a/e),i}function N(t,n,a){const e=r();return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*(n/a),e}function A(t,n){const[a,e,i]=t,o=r();return o[0]=a*n[0]+e*n[3]+i*n[6],o[1]=a*n[1]+e*n[4]+i*n[7],o[2]=a*n[2]+e*n[5]+i*n[8],o}function I(t,n){const[a,e,i,o]=t,r=new Array(4);return r[0]=a*n[0]+e*n[1]+i*n[2]+o*n[3],r[1]=a*n[4]+e*n[5]+i*n[6]+o*n[7],r[2]=a*n[8]+e*n[9]+i*n[10]+o*n[11],r[3]=a*n[12]+e*n[13]+i*n[14]+o*n[15],r}function Y(n,i,o,r=!0){if(!Number.isFinite(n))throw new t("InvalidRotationAngle","Please specify a valid angle for rotation");const c=o*(r?a(n):n),s=Math.cos(c),l=Math.sin(c),f=e();switch(i){case 0:f[4]=s,f[5]=-l,f[7]=l,f[8]=s;break;case 1:f[0]=s,f[2]=l,f[6]=-l,f[8]=s;break;case 2:f[0]=s,f[1]=-l,f[3]=l,f[4]=s;break;default:throw new t("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return f}const k={HPR:[[2,-1],[0,1],[2,-1]],OPK:[[0,1],[1,1],[2,1]],YPR:[[0,-1],[1,-1],[2,-1]]};function q(n,a,i=!0){if(3!==n?.length||3!==a?.length)throw new t("InvalidRotationAngles","Please specify three angles with config for rotation");const o=e();for(let t=0;t<3;t++){const[e,r]=a[t],c=Y(n[t],e,r,i);f(o,c,o)}return o}function U(t,n=!0){return q(t,k.OPK,n)}function C(t,n=!0){return q(t,k.HPR,n)}function K(t,n,e){const i=Math.sin(a(e)),o=Math.cos(a(e)),r=[[t,0],[t,n],[0,n]];r.forEach((t,n)=>{r[n]=[o*t[0]-i*t[1],i*t[0]+o*t[1]]});const c={xmin:Math.min(0,r[0][0],r[1][0],r[2][0]),xmax:Math.max(0,r[0][0],r[1][0],r[2][0]),ymin:Math.min(0,r[0][1],r[1][1],r[2][1]),ymax:Math.max(0,r[0][1],r[1][1],r[2][1])};return{hfov:Math.abs(c.xmax-c.xmin),vfov:Math.abs(c.ymax-c.ymin)}}function T(t,e){const i=Number(t[0]),o=Number(t[1]),r=Number(t[2]),[c,s,l,f]=e,u=a(c),h=a(s),m=l/Math.sqrt(1-f*Math.sin(u)**2),p=i/m,g=o/m,v=r/m,M=Math.cos(u)-Math.sin(u)*g+Math.cos(u)*v,d=Math.sin(u)+Math.cos(u)*g+Math.sin(u)*v,x=Math.sqrt(M**2+p**2),w=f*m*Math.sin(u),y=(t,n=5)=>{if(0===n)return t;const a=y(t,n-1);return Math.atan(d/x-(w-f*(l/Math.sqrt(1-f*Math.sin(a)**2))*Math.sin(a))/(m*x))},b=y(u),j=Math.atan(i/(m*M))+h,O=n(b);return[n(j),O,i/(Math.cos(b)*Math.sin(j-h))-l/Math.sqrt(1-f*Math.sin(b)**2)]}function W(t,n,a){const e=360/n,i=180/a;return{heading:(t.x-n/2)*e,pitch:90-(t.y-a/2)*i}}function X(t,n,a,e,i=F/2){const{heading:o,pitch:r}=G(t,i),c=e?Rt(o,r,e):[o,r];return{heading:o,pitch:r,...Z(c[0],c[1],n,a)}}function Z(t,n,a,e){const i=t%360;return{x:a/2+(i<-180?i+360:i>180?i-360:i)/(360/a),y:e-n/(180/e)}}function G(t,a){const e=n(Math.acos(-t.z/a));return{heading:n(Math.atan2(t.x,t.y)),pitch:e}}function J(t,n){return[Math.sin(a(t))*Math.sin(a(n)),Math.cos(a(t))*Math.sin(a(n)),Math.cos(a(180-n))]}function $(t,n,a,e=F/2){const i=a?Rt(t,n,a,!0):[t,n];return m(c(),J(i[0],i[1]),e)}function B(t,n,a,e,i=F/2){const{heading:o,pitch:r}=W(t,n,a);return $(o,r,e,i)}async function Q(t,a,e){const i=await d(a,t.spatialReference,e);let o=n(Math.atan2(i.y-t.y,i.x-t.x));return o=o>=0&&o<=90?90-o:o>90&&o<=180?360-o+90:90+Math.abs(o),o}function _(t,n,a){const e=Math.cos(a),i=Math.sin(a),o=[1,0,0,1,0,0],r=o[0]*e+o[2]*i,c=o[1]*e+o[3]*i,s=-o[0]*i+o[2]*e,l=-o[1]*i+o[3]*e;o[0]=r,o[1]=c,o[2]=s,o[3]=l;return[t*o[0]+n*o[2]+o[4],t*o[1]+n*o[3]+o[5]]}const tt=t=>t.toArray(),nt=(...t)=>t.some(t=>t);function at(t,n){if(nt(0===t.length,t.some(({x:t,y:n})=>nt(null==t,null==n)),!n.hasZ))throw new Error("Input pixels must have x, y and camera location must have z value")}function et(t,n){if(t.some(t=>null==t.z)||null==n.z)throw new Error("Input points and camera location must have z value")}function it(t){if(9!==t?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix")}function ot(t,n){return w(n)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/x.radius))):1}const rt=t=>n=>new M({x:n[0],y:n[1],z:n[2],spatialReference:t}),ct=t=>null!=t&&"queryExtent"in t;function st(t,n,a,e){return[[-n,-n],[+n,-n],[+n,+n],[-n,+n]].map(([n,i])=>E(y(r(),a,[n,i,0]),e,t))}function lt({a0:t,a1:n,a2:a,b0:e,b1:i,b2:o},r,c,s){const l=[t??r/2-.5,n,a??0,e??c/2-.5,i??0,o].map(ft);return null!=s&&ut(l)?{affines:l,focalLength:s}:{affines:[r/2-.5,1,0,c/2-.5,0,-1]}}function ft(t,n){if(null==t)return null;const a=parseFloat(`${t}`);return isNaN(a)?null:a}function ut(t){return null!=t[1]&&null!=t[5]}function ht(t,n,a){const{cameraHeight:e,cameraPitch:i,cameraRoll:o,elevation:r,farDistance:c,horizontalFieldOfView:s,location:l,verticalFieldOfView:f}=zt(t,t.location.spatialReference),u=r??(l.z??0)-e;return{...gt(t,n,a),averageElevation:u,cameraPitch:i,cameraRoll:o??0,farDistance:c,horizontalFieldOfView:s,verticalFieldOfView:f}}function mt(t,n,a,e){return jt(e)?U([e.omega,e.phi,e.kappa]):Ot(e)?C([e.heading,e.pitch,e.roll]):C([t,n,a??0])}function pt(t,n,a){const{cameraHeading:e,cameraHeight:i,farDistance:o,horizontalFieldOfView:r,location:c,verticalFieldOfView:s}=zt(t,t.location.spatialReference),l=(c.z??0)-i;let f=-e,u=0,h=0;if(t?.matrix){const{matrix:n}=t;[u,h,f]=Pt(n)}return{averageElevation:l,cameraLocation:c,cameraHeading:e,farDistance:o,horizontalFieldOfView:r,imageHeight:a,imageWidth:n,verticalFieldOfView:s,horizonYaw:f,horizonPitch:u,horizonRoll:h}}function gt(t,n,a){const{a0:e,a1:i,a2:o,b0:r,b1:c,b2:s,cameraHeading:l,cameraOrientation:f,cameraPitch:u,cameraRoll:h,focalLength:m,horizontalFieldOfView:p,location:g,matrix:v,principalX:M,principalY:d,radial:x,tangential:w,verticalFieldOfView:y}=t,{affines:b,focalLength:j}=lt({a0:e,a1:i,a2:o,b0:r,b1:c,b2:s},n,a,m),O=v??mt(l,u,h,f),z=null!=M&&null!=d?[M,d]:void 0;return{affineTransformations:f?.affineTransformations??b,cameraLocation:g.clone(),focalLength:f?.focalLength??j,horizontalFieldOfView:p,imageHeight:a,imageWidth:n,principalOffsetPoint:f?.principalOffsetPoint??z,radialDistortionCoefficients:f?.radialDistortionCoefficients??x,rotationMatrix:O,tangentialDistortionCoefficients:f?.tangentialDistortionCoefficients??w,verticalFieldOfView:y}}const vt=t=>null!=t&&"elevationSample"in t&&null!=t.elevationSample,Mt=t=>O(t?.elevationSource)&&null!=t?.extent,dt=t=>b(t?.elevationSource),xt=async(t,n,a,e,i)=>{const o=z(t),r=n-a/o;return dt(e)?(e.elevationSource=new j({constantElevation:e.elevationSource.constantElevation/o}),e):vt(e)?e:Mt(e)?{elevationSample:await P({...v(e.elevationSource)?e.elevationSource.toJSON():e.elevationSource,extent:e.extent},i),elevationSource:new j({constantElevation:r})}:{averageGroundElevation:r,spatialReference:t}},wt=t=>R(t?.heading)&&R(t?.pitch),yt=(t,n)=>[[-t,-n],[t,-n],[t,n],[-t,n]];function bt(t){const{cameraLocation:n,farDistance:i,horizontalFieldOfView:o,rotationMatrix:c,scalingFactor:s,verticalFieldOfView:f}=t,u=e();l(u,c);const h=2*Math.tan(a(f)/2)*i*s,m=2*Math.tan(a(o)/2)*i*s,v=A([0,0,-1],u),M=L([n.x,n.y,n.z],v,t.farDistance*s,s),d=A([0,1,0],u),x=A([1,0,0],u),w=N(d,h/2,s),y=N(x,m/2,s),b=p(r(),w,y),j=g(r(),w,y);return[g(r(),M,b),g(r(),M,j),p(r(),M,b),p(r(),M,j)]}const jt=t=>2===t?.type,Ot=t=>1===t?.type;function zt(t,n,a=!0){const e=z(n),i=a?t.clone():t;return i.cameraHeight/=e,i.farDistance/=e,i.nearDistance/=e,b(i.elevationSource)&&(i.elevationSource.constantElevation/=e),i}function Pt(t){return[n(Math.asin(-t[6])),n(Math.atan(t[7]/t[8])),n(Math.atan2(t[3],t[0]))]}function Rt(t,n,a,e=!1){return Ft(J(t,n),a,e)}function Ft(t,a,i=!1){const o=i?l(e(),q(a,k.YPR)):q(a,k.YPR),r=t[0]*o[0]+t[1]*o[1]+t[2]*o[2],c=t[0]*o[3]+t[1]*o[4]+t[2]*o[5],s=t[0]*o[6]+t[1]*o[7]+t[2]*o[8],f=n(Math.acos(-s));return[n(Math.atan2(r,c)),f]}export{Rt as adjustHorizonAngles,Ft as adjustHorizonAnglesVec3,bt as computeFarplaneVertices,K as computeHFOVAndVFOV,st as computeNewReferenceCoordinates,$ as convertHeadingPitchToSphereVertex,Z as convertOrientationToPixelLocation,B as convertPixelLocationToSphereVertex,W as convertPixelToHeadingPitch,G as convertSphereVertexToOrientation,X as convertSphereVertexToPixelLocation,zt as convertToSRUnits,J as createMeshSpaceVector,q as createRotationMatrix,C as createRotationMatrixFromHPR,U as createRotationMatrixFromOPK,Pt as extractHorizonAngles,lt as getAffinesAndFocalLength,pt as getImageToWorldPanoramicProperties,ht as getImageToWorldProperties,Q as getInitialAngle,xt as getUpdateElevationProps,ot as getWebMercatorScalingFactor,gt as getWorldToImageProperties,wt as hasAngles,Ot as hasHeadingPitchRoll,jt as hasOmegaPhiKappa,ct as isElevationSampler,vt as isUpdateElevationWithElevationSampler,Mt as isUpdateElevationWithElevationSource,dt as isUpdateUsingConstantElevation,ut as isValidAffines,H as linearEquationSolve,T as ltpToGeographic,nt as or,tt as pointToArray,E as projectiveTransform,yt as reducerFn,_ as rotatePixel,L as scaleAndAddWithFactor,N as scaleWithFactor,A as transformMat3,I as transformMat4,at as validatePixelsToTransform,et as validatePointsToTransform,it as validateRotationMatrix,rt as vecToPoint};
|
|
2
|
+
import t from"../../../core/Error.js";import{rad2deg as n,deg2rad as a}from"../../../core/mathUtils.js";import{create as e}from"../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{create as i,fromValues as o}from"../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{zeros as r,create as c}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromArray as s}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{transpose as l,multiply as f}from"../../../core/libs/gl-matrix-2/math/mat3.js";import{invertOrIdentity as u,mul as h}from"../../../core/libs/gl-matrix-2/math/mat4.js";import{scale as m,sub as p,add as g}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{isSerializable as v}from"../../../core/support/jsonUtils.js";import M from"../../../geometry/Point.js";import{projectAsync as d}from"../../../geometry/projectionUtils.js";import{earth as x}from"../../../geometry/support/Ellipsoid.js";import{isWebMercator as w}from"../../../geometry/support/spatialReferenceUtils.js";import{a as y}from"../../../chunks/vec3.js";import{isConstantElevation as b,ConstantElevation as j,isElevationSource as O}from"../core/ElevationSourceDefinitions.js";import{getMetersPerUnitOfSR as z}from"../core/utils.js";import{getElevationSampler as P}from"./updateElevationUtils.js";import{isNumber as R}from"../../../support/guards.js";import{defaultImageSphereSize as F}from"../../../widgets/PanoramicViewer/constants.js";function E(t,n,a){const[e,o,r,c]=n,[s,l,f,m]=a;S(e,o,r,c);const p=S(s,l,f,m),g=H(e,o,r,c),v=H(s,l,f,m),M=u(i(),g),d=h(i(),M,v),[x,w,y,b]=D(t,d);return[x/b,w/b,p?0:y/b]}function S(t,n,a,e){return 0===t[2]&&0===n[2]&&0===a[2]&&0===e[2]&&(t[2]=n[2]=a[2]=e[2]=1,!0)}function V(t){return 0===t?1:t}function D(t,n){const[a,e,i]=t,o=[0,0,0,0];return o[0]=a*n[0]+e*n[1]+i*n[2]+n[3],o[1]=a*n[4]+e*n[5]+i*n[6]+n[7],o[2]=a*n[8]+e*n[9]+i*n[10]+n[11],o[3]=V(a*n[12]+e*n[13]+i*n[14]+n[15]),o}function H(t,n,a,e){const r=I(s([...e,1]),u(new Array(16),o(t[0],n[0],a[0],0,t[1],n[1],a[1],0,t[2],n[2],a[2],0,1,1,1,1))),c=r[0],l=r[1],f=r[2],h=i();return h[0]=c*t[0],h[1]=l*n[0],h[2]=f*a[0],h[3]=0,h[4]=c*t[1],h[5]=l*n[1],h[6]=f*a[1],h[7]=0,h[8]=c*t[2],h[9]=l*n[2],h[10]=f*a[2],h[11]=0,h[12]=c,h[13]=l,h[14]=f,h[15]=1,h}function L(t,n,a,e,i=r()){return i[0]=t[0]+n[0]*a,i[1]=t[1]+n[1]*a,i[2]=t[2]+n[2]*(a/e),i}function N(t,n,a){const e=r();return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*(n/a),e}function A(t,n){const[a,e,i]=t,o=r();return o[0]=a*n[0]+e*n[3]+i*n[6],o[1]=a*n[1]+e*n[4]+i*n[7],o[2]=a*n[2]+e*n[5]+i*n[8],o}function I(t,n){const[a,e,i,o]=t,r=new Array(4);return r[0]=a*n[0]+e*n[1]+i*n[2]+o*n[3],r[1]=a*n[4]+e*n[5]+i*n[6]+o*n[7],r[2]=a*n[8]+e*n[9]+i*n[10]+o*n[11],r[3]=a*n[12]+e*n[13]+i*n[14]+o*n[15],r}function Y(n,i,o,r=!0){if(!Number.isFinite(n))throw new t("InvalidRotationAngle","Please specify a valid angle for rotation");const c=o*(r?a(n):n),s=Math.cos(c),l=Math.sin(c),f=e();switch(i){case 0:f[4]=s,f[5]=-l,f[7]=l,f[8]=s;break;case 1:f[0]=s,f[2]=l,f[6]=-l,f[8]=s;break;case 2:f[0]=s,f[1]=-l,f[3]=l,f[4]=s;break;default:throw new t("InvalidRotationAxis","Please specify either 0, 1 or 2 for X, Y or Z axis respectively")}return f}const k={HPR:[[2,-1],[0,1],[2,-1]],OPK:[[0,1],[1,1],[2,1]],YPR:[[0,-1],[1,-1],[2,-1]]};function U(n,a,i=!0){if(3!==n?.length||3!==a?.length)throw new t("InvalidRotationAngles","Please specify three angles with config for rotation");const o=e();for(let t=0;t<3;t++){const[e,r]=a[t],c=Y(n[t],e,r,i);f(o,c,o)}return o}function q(t,n=!0){return U(t,k.OPK,n)}function C(t,n=!0){return U(t,k.HPR,n)}function K(t,n,e){const i=Math.sin(a(e)),o=Math.cos(a(e)),r=[[t,0],[t,n],[0,n]];r.forEach((t,n)=>{r[n]=[o*t[0]-i*t[1],i*t[0]+o*t[1]]});const c={xmin:Math.min(0,r[0][0],r[1][0],r[2][0]),xmax:Math.max(0,r[0][0],r[1][0],r[2][0]),ymin:Math.min(0,r[0][1],r[1][1],r[2][1]),ymax:Math.max(0,r[0][1],r[1][1],r[2][1])};return{hfov:Math.abs(c.xmax-c.xmin),vfov:Math.abs(c.ymax-c.ymin)}}function T(t,e){const i=Number(t[0]),o=Number(t[1]),r=Number(t[2]),[c,s,l,f]=e,u=a(c),h=a(s),m=l/Math.sqrt(1-f*Math.sin(u)**2),p=i/m,g=o/m,v=r/m,M=Math.cos(u)-Math.sin(u)*g+Math.cos(u)*v,d=Math.sin(u)+Math.cos(u)*g+Math.sin(u)*v,x=Math.sqrt(M**2+p**2),w=f*m*Math.sin(u),y=(t,n=5)=>{if(0===n)return t;const a=y(t,n-1);return Math.atan(d/x-(w-f*(l/Math.sqrt(1-f*Math.sin(a)**2))*Math.sin(a))/(m*x))},b=y(u),j=Math.atan(i/(m*M))+h,O=n(b);return[n(j),O,i/(Math.cos(b)*Math.sin(j-h))-l/Math.sqrt(1-f*Math.sin(b)**2)]}function W(t,n,a){const e=360/n,i=180/a;return{heading:(t.x-n/2)*e,pitch:90-(t.y-a/2)*i}}function X(t,n,a,e,i=F/2){const{heading:o,pitch:r}=G(t,i),c=e?Pt(o,r,e):[o,r];return{heading:o,pitch:r,...Z(c[0],c[1],n,a)}}function Z(t,n,a,e){const i=t%360;return{x:a/2+(i<-180?i+360:i>180?i-360:i)/(360/a),y:e-n/(180/e)}}function G(t,a){const e=n(Math.acos(-t.z/a));return{heading:n(Math.atan2(t.x,t.y)),pitch:e}}function J(t,n){return[Math.sin(a(t))*Math.sin(a(n)),Math.cos(a(t))*Math.sin(a(n)),Math.cos(a(180-n))]}function $(t,n,a,e=F/2){const i=a?Pt(t,n,a,!0):[t,n];return m(c(),J(i[0],i[1]),e)}function B(t,n,a,e,i=F/2){const{heading:o,pitch:r}=W(t,n,a);return $(o,r,e,i)}async function Q(t,a,e){const i=await d(a,t.spatialReference,e);let o=n(Math.atan2(i.y-t.y,i.x-t.x));return o=o>=0&&o<=90?90-o:o>90&&o<=180?360-o+90:90+Math.abs(o),o}function _(t,n,a){const e=Math.cos(a),i=Math.sin(a),o=[1,0,0,1,0,0],r=o[0]*e+o[2]*i,c=o[1]*e+o[3]*i,s=-o[0]*i+o[2]*e,l=-o[1]*i+o[3]*e;o[0]=r,o[1]=c,o[2]=s,o[3]=l;return[t*o[0]+n*o[2]+o[4],t*o[1]+n*o[3]+o[5]]}const tt=t=>t.toArray(),nt=(...t)=>t.some(t=>t);function at(t,n){if(nt(0===t.length,t.some(({x:t,y:n})=>nt(null==t,null==n)),!n.hasZ))throw new Error("Input pixels must have x, y and camera location must have z value")}function et(t,n){if(t.some(t=>null==t.z)||null==n.z)throw new Error("Input points and camera location must have z value")}function it(t){if(9!==t?.length)throw new Error("Rotation matrix is not provided or is not a valid 3x3 matrix")}function ot(t,n){return w(n)?1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/x.radius))):1}const rt=t=>n=>new M({x:n[0],y:n[1],z:n[2],spatialReference:t});function ct(t,n,a,e){return[[-n,-n],[+n,-n],[+n,+n],[-n,+n]].map(([n,i])=>E(y(r(),a,[n,i,0]),e,t))}function st({a0:t,a1:n,a2:a,b0:e,b1:i,b2:o},r,c,s){const l=[t??r/2-.5,n,a??0,e??c/2-.5,i??0,o].map(lt);return null!=s&&ft(l)?{affines:l,focalLength:s}:{affines:[r/2-.5,1,0,c/2-.5,0,-1]}}function lt(t,n){if(null==t)return null;const a=parseFloat(`${t}`);return isNaN(a)?null:a}function ft(t){return null!=t[1]&&null!=t[5]}function ut(t,n,a){const{cameraHeight:e,cameraPitch:i,cameraRoll:o,elevation:r,farDistance:c,horizontalFieldOfView:s,location:l,verticalFieldOfView:f}=Ot(t,t.location.spatialReference),u=r??(l.z??0)-e;return{...pt(t,n,a),averageElevation:u,cameraPitch:i,cameraRoll:o??0,farDistance:c,horizontalFieldOfView:s,verticalFieldOfView:f}}function ht(t,n,a,e){return bt(e)?q([e.omega,e.phi,e.kappa]):jt(e)?C([e.heading,e.pitch,e.roll]):C([t,n,a??0])}function mt(t,n,a){const{cameraHeading:e,cameraHeight:i,farDistance:o,horizontalFieldOfView:r,location:c,verticalFieldOfView:s}=Ot(t,t.location.spatialReference),l=(c.z??0)-i;let f=-e,u=0,h=0;if(t?.matrix){const{matrix:n}=t;[u,h,f]=zt(n)}return{averageElevation:l,cameraLocation:c,cameraHeading:e,farDistance:o,horizontalFieldOfView:r,imageHeight:a,imageWidth:n,verticalFieldOfView:s,horizonYaw:f,horizonPitch:u,horizonRoll:h}}function pt(t,n,a){const{a0:e,a1:i,a2:o,b0:r,b1:c,b2:s,cameraHeading:l,cameraOrientation:f,cameraPitch:u,cameraRoll:h,focalLength:m,horizontalFieldOfView:p,location:g,matrix:v,principalX:M,principalY:d,radial:x,tangential:w,verticalFieldOfView:y}=t,{affines:b,focalLength:j}=st({a0:e,a1:i,a2:o,b0:r,b1:c,b2:s},n,a,m),O=v??ht(l,u,h,f),z=null!=M&&null!=d?[M,d]:void 0;return{affineTransformations:f?.affineTransformations??b,cameraLocation:g.clone(),focalLength:f?.focalLength??j,horizontalFieldOfView:p,imageHeight:a,imageWidth:n,principalOffsetPoint:f?.principalOffsetPoint??z,radialDistortionCoefficients:f?.radialDistortionCoefficients??x,rotationMatrix:O,tangentialDistortionCoefficients:f?.tangentialDistortionCoefficients??w,verticalFieldOfView:y}}const gt=t=>null!=t&&"elevationSample"in t&&null!=t.elevationSample,vt=t=>O(t?.elevationSource)&&null!=t?.extent,Mt=t=>b(t?.elevationSource),dt=async(t,n,a,e,i)=>{const o=z(t),r=n-a/o;return Mt(e)?(e.elevationSource=new j({constantElevation:e.elevationSource.constantElevation/o}),e):gt(e)?e:vt(e)?{elevationSample:await P({...v(e.elevationSource)?e.elevationSource.toJSON():e.elevationSource,extent:e.extent},i),elevationSource:new j({constantElevation:r})}:{averageGroundElevation:r,spatialReference:t}},xt=t=>R(t?.heading)&&R(t?.pitch),wt=(t,n)=>[[-t,-n],[t,-n],[t,n],[-t,n]];function yt(t){const{cameraLocation:n,farDistance:i,horizontalFieldOfView:o,rotationMatrix:c,scalingFactor:s,verticalFieldOfView:f}=t,u=e();l(u,c);const h=2*Math.tan(a(f)/2)*i*s,m=2*Math.tan(a(o)/2)*i*s,v=A([0,0,-1],u),M=L([n.x,n.y,n.z],v,t.farDistance*s,s),d=A([0,1,0],u),x=A([1,0,0],u),w=N(d,h/2,s),y=N(x,m/2,s),b=p(r(),w,y),j=g(r(),w,y);return[g(r(),M,b),g(r(),M,j),p(r(),M,b),p(r(),M,j)]}const bt=t=>2===t?.type,jt=t=>1===t?.type;function Ot(t,n,a=!0){const e=z(n),i=a?t.clone():t;return i.cameraHeight/=e,i.farDistance/=e,i.nearDistance/=e,b(i.elevationSource)&&(i.elevationSource.constantElevation/=e),i}function zt(t){return[n(Math.asin(-t[6])),n(Math.atan(t[7]/t[8])),n(Math.atan2(t[3],t[0]))]}function Pt(t,n,a,e=!1){return Rt(J(t,n),a,e)}function Rt(t,a,i=!1){const o=i?l(e(),U(a,k.YPR)):U(a,k.YPR),r=t[0]*o[0]+t[1]*o[1]+t[2]*o[2],c=t[0]*o[3]+t[1]*o[4]+t[2]*o[5],s=t[0]*o[6]+t[1]*o[7]+t[2]*o[8],f=n(Math.acos(-s));return[n(Math.atan2(r,c)),f]}export{Pt as adjustHorizonAngles,Rt as adjustHorizonAnglesVec3,yt as computeFarplaneVertices,K as computeHFOVAndVFOV,ct as computeNewReferenceCoordinates,$ as convertHeadingPitchToSphereVertex,Z as convertOrientationToPixelLocation,B as convertPixelLocationToSphereVertex,W as convertPixelToHeadingPitch,G as convertSphereVertexToOrientation,X as convertSphereVertexToPixelLocation,Ot as convertToSRUnits,J as createMeshSpaceVector,U as createRotationMatrix,C as createRotationMatrixFromHPR,q as createRotationMatrixFromOPK,zt as extractHorizonAngles,st as getAffinesAndFocalLength,mt as getImageToWorldPanoramicProperties,ut as getImageToWorldProperties,Q as getInitialAngle,dt as getUpdateElevationProps,ot as getWebMercatorScalingFactor,pt as getWorldToImageProperties,xt as hasAngles,jt as hasHeadingPitchRoll,bt as hasOmegaPhiKappa,gt as isUpdateElevationWithElevationSampler,vt as isUpdateElevationWithElevationSource,Mt as isUpdateUsingConstantElevation,ft as isValidAffines,H as linearEquationSolve,T as ltpToGeographic,nt as or,tt as pointToArray,E as projectiveTransform,wt as reducerFn,_ as rotatePixel,L as scaleAndAddWithFactor,N as scaleWithFactor,A as transformMat3,I as transformMat4,at as validatePixelsToTransform,et as validatePointsToTransform,it as validateRotationMatrix,rt as vecToPoint};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{property as i,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"../../../geometry/Point.js";import{GeospatialPDFWorkerClient as n}from"../../geospatialPDF/GeospatialPDFWorkerClient.js";import a from"./BaseRaster.js";import o from"../../support/PixelBlock.js";import h from"../../support/RasterInfo.js";let l=class extends a{constructor(){super(...arguments),this._workerClient=new n,this._extent=null,this._ctm=null,this._neatlineRing=[],this._width=0,this._height=0,this._tileSize=512,this.datasetFormat="PDF",this.frame=null,this.neatlineExtent=null,this.page=1,this.tileType="Raster"}destroy(){this._workerClient.destroy(),this.neatlineExtent=null,this._extent=null,this._ctm=null,this._neatlineRing=[]}async fetchRawTile(t,e,i,s={}){const r=this._extent,n=this._ctm,a=this.getTileExtentPDF(t,e,i);if(!a.intersects(r))return null;return p(await this._workerClient.render(a,this._tileSize,this._tileSize,n,this._neatlineRing,s))}async _open(t){if(!this.url)throw new e("geospatial-pdf-raster:open","GeospatialPDFRaster requires a url.");const i=await this._workerClient.loadPDF({url:this.url,page:this.page},t);this.frame=i.frame;const s=this.frame.outerExtentMediabox;if(!s)throw new e("geospatial-pdf-raster:open","Failed to compute Geospatial PDF extent.");this.neatlineExtent=i.fullExtent,this._extent=s,this._ctm=this.frame.ctm,this._neatlineRing=this.frame.sourceMediaBoxPolygon.rings[0];const r=m(this.frame.ctm,this._extent);this._width=r[0],this._height=r[1];const n={x:s.width/this._width,y:s.height/this._height},a=new h({width:this._width,height:this._height,pixelType:"u8",extent:s,pixelSize:n,spatialReference:s.spatialReference,bandCount:3,keyProperties:{DataType:"Processed"}});this.createRemoteDatasetStorageInfo(a,this._tileSize,this._tileSize),this._set("rasterInfo",a),this.updateTileInfo()}getTileExtentPDF(t,e,i){const s=this._extent,n=2**t,a=s.width/this._width*n,o=s.height/this._height*n,h=new r({x:s.xmin,y:s.ymax});return this.getTileExtent({x:a,y:o},e,i,h,s.spatialReference,[512,512])}};function p(t){return new o({width:t.width,height:t.height,pixelType:"u8",pixels:[t.red,t.green,t.blue],mask:t.mask})}function m(t,
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Error.js";import{property as i,subclass as s}from"../../../core/accessorSupport/decorators.js";import r from"../../../geometry/Point.js";import{GeospatialPDFWorkerClient as n}from"../../geospatialPDF/GeospatialPDFWorkerClient.js";import a from"./BaseRaster.js";import o from"../../support/PixelBlock.js";import h from"../../support/RasterInfo.js";let l=class extends a{constructor(){super(...arguments),this._workerClient=new n,this._extent=null,this._ctm=null,this._neatlineRing=[],this._width=0,this._height=0,this._tileSize=512,this.datasetFormat="PDF",this.frame=null,this.neatlineExtent=null,this.page=1,this.tileType="Raster"}destroy(){this._workerClient.destroy(),this.neatlineExtent=null,this._extent=null,this._ctm=null,this._neatlineRing=[]}async fetchRawTile(t,e,i,s={}){const r=this._extent,n=this._ctm,a=this.getTileExtentPDF(t,e,i);if(!a.intersects(r))return null;return p(await this._workerClient.render(a,this._tileSize,this._tileSize,n,this._neatlineRing,s))}async _open(t){if(!this.url)throw new e("geospatial-pdf-raster:open","GeospatialPDFRaster requires a url.");const i=await this._workerClient.loadPDF({url:this.url,page:this.page},t);this.frame=i.frame;const s=this.frame.outerExtentMediabox;if(!s)throw new e("geospatial-pdf-raster:open","Failed to compute Geospatial PDF extent.");this.neatlineExtent=i.fullExtent,this._extent=s,this._ctm=this.frame.ctm,this._neatlineRing=this.frame.sourceMediaBoxPolygon.rings[0];const r=m(this.frame.ctm,this._extent);this._width=r[0],this._height=r[1];const n={x:s.width/this._width,y:s.height/this._height},a=new h({width:this._width,height:this._height,pixelType:"u8",extent:s,pixelSize:n,spatialReference:s.spatialReference,bandCount:3,keyProperties:{DataType:"Processed"}});this.createRemoteDatasetStorageInfo(a,this._tileSize,this._tileSize),this._set("rasterInfo",a),this.updateTileInfo()}getTileExtentPDF(t,e,i){const s=this._extent,n=2**t,a=s.width/this._width*n,o=s.height/this._height*n,h=new r({x:s.xmin,y:s.ymax});return this.getTileExtent({x:a,y:o},e,i,h,s.spatialReference,[512,512])}};function p(t){return new o({width:t.width,height:t.height,pixelType:"u8",pixels:[t.red,t.green,t.blue],mask:t.mask})}function m(t,i){const[s,r,n,a]=t,o=s*a-r*n;if(!Number.isFinite(o)||0===o)throw new e("geospatial-pdf-raster:open","Failed to derive raster dimensions from an invalid PDF CTM.");const h=10*Math.hypot(a,r)/Math.abs(o),l=10*Math.hypot(n,s)/Math.abs(o),p=Math.max(1,Math.ceil(i.width*h)),m=Math.max(1,Math.ceil(i.height*l));if(!Number.isFinite(p)||!Number.isFinite(m))throw new e("geospatial-pdf-raster:open","PDF CTM produced invalid raster dimensions.");return[p,m]}t([i({type:String,json:{write:!0}})],l.prototype,"datasetFormat",void 0),t([i({constructOnly:!0})],l.prototype,"page",void 0),t([i({readOnly:!0})],l.prototype,"tileType",void 0),l=t([s("esri.layers.raster.datasets.GeospatialPDFRaster")],l);export{l as default};
|
package/layers/raster/types.d.ts
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ClonableMixin } from "../../core/Clonable.js";
|
|
2
|
+
import type { JSONSupport } from "../../core/JSONSupport.js";
|
|
3
|
+
|
|
4
|
+
export interface TimeSeriesCalculationProperties extends Partial<Pick<TimeSeriesCalculation, "name" | "title" | "type">> {}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The calculation method by which to derive a data value for a time series. By default,
|
|
8
|
+
* each time series info includes the raw values returned from each field.
|
|
9
|
+
*
|
|
10
|
+
* @since 5.2
|
|
11
|
+
*/
|
|
12
|
+
export type TimeSeriesCalculationMethod = "change-from-first" | "change-from-previous" | "percent-change-from-first" | "percent-change-from-previous";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Defines a calculation method that can be used to derive data values for a time series.
|
|
16
|
+
*
|
|
17
|
+
* @since 5.2
|
|
18
|
+
*/
|
|
19
|
+
export default class TimeSeriesCalculation extends TimeSeriesCalculationSuperclass {
|
|
20
|
+
constructor(properties?: TimeSeriesCalculationProperties);
|
|
21
|
+
/**
|
|
22
|
+
* A unique identifier for the calculation method within the time series.
|
|
23
|
+
*
|
|
24
|
+
* @since 5.2
|
|
25
|
+
*/
|
|
26
|
+
accessor name: string | null | undefined;
|
|
27
|
+
/** A user-friendly name for the calculation method. */
|
|
28
|
+
accessor title: string | null | undefined;
|
|
29
|
+
/** The method by which to calculate a time series data value. */
|
|
30
|
+
accessor type: TimeSeriesCalculationMethod | null | undefined;
|
|
31
|
+
}
|
|
32
|
+
declare const TimeSeriesCalculationSuperclass: typeof JSONSupport & typeof ClonableMixin
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{__decorate as e}from"tslib";import{ClonableMixin as r}from"../../core/Clonable.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{property as o,subclass as i}from"../../core/accessorSupport/decorators.js";let s=class extends(r(t)){constructor(e){super(e),this.name=null,this.type=null,this.title=null}};e([o({type:String,json:{write:{isRequired:!0}}})],s.prototype,"name",void 0),e([o({type:["change-from-first","change-from-previous","percent-change-from-first","percent-change-from-previous"],json:{write:{isRequired:!0}}})],s.prototype,"type",void 0),e([o({type:String,json:{write:!0}})],s.prototype,"title",void 0),s=e([i("esri.layers.support.TimeSeriesCalculation")],s);const p=s;export{p as default};
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
+
import type TimeSeriesCalculation from "./TimeSeriesCalculation.js";
|
|
1
2
|
import type TimeSeriesFieldTimeMapping from "./TimeSeriesFieldTimeMapping.js";
|
|
2
3
|
import type TimeExtent from "../../time/TimeExtent.js";
|
|
3
4
|
import type { ClonableMixin } from "../../core/Clonable.js";
|
|
4
5
|
import type { JSONSupport } from "../../core/JSONSupport.js";
|
|
5
6
|
import type { TimeSeriesFieldTimeMappingProperties } from "./TimeSeriesFieldTimeMapping.js";
|
|
6
7
|
import type { TimeExtentProperties } from "../../time/TimeExtent.js";
|
|
8
|
+
import type { TimeSeriesCalculationProperties } from "./TimeSeriesCalculation.js";
|
|
7
9
|
|
|
8
10
|
/** @since 5.1 */
|
|
9
11
|
export interface TimeSeriesInfoProperties extends Partial<Pick<TimeSeriesInfo, "name" | "timeInterval" | "timeIntervalUnits" | "timeValueUnits" | "title">> {
|
|
12
|
+
/**
|
|
13
|
+
* Additional calculation methods that can be used to create time series data values. Value at instant
|
|
14
|
+
* behavior is implicit.
|
|
15
|
+
*
|
|
16
|
+
* @default null
|
|
17
|
+
* @since 5.2
|
|
18
|
+
*/
|
|
19
|
+
calculationMethods?: TimeSeriesCalculationProperties[] | null;
|
|
10
20
|
/** The mapping between field names and time values for the time series configuration. */
|
|
11
21
|
fieldTimeMappings?: TimeSeriesFieldTimeMappingProperties[] | null;
|
|
12
22
|
/**
|
|
@@ -96,6 +106,15 @@ export interface TimeSeriesInfoProperties extends Partial<Pick<TimeSeriesInfo, "
|
|
|
96
106
|
*/
|
|
97
107
|
export default class TimeSeriesInfo extends TimeSeriesInfoSuperclass {
|
|
98
108
|
constructor(properties?: TimeSeriesInfoProperties);
|
|
109
|
+
/**
|
|
110
|
+
* Additional calculation methods that can be used to create time series data values. Value at instant
|
|
111
|
+
* behavior is implicit.
|
|
112
|
+
*
|
|
113
|
+
* @default null
|
|
114
|
+
* @since 5.2
|
|
115
|
+
*/
|
|
116
|
+
get calculationMethods(): TimeSeriesCalculation[] | null | undefined;
|
|
117
|
+
set calculationMethods(value: TimeSeriesCalculationProperties[] | null | undefined);
|
|
99
118
|
/** The mapping between field names and time values for the time series configuration. */
|
|
100
119
|
get fieldTimeMappings(): TimeSeriesFieldTimeMapping[] | null | undefined;
|
|
101
120
|
set fieldTimeMappings(value: TimeSeriesFieldTimeMappingProperties[] | null | undefined);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as t}from"tslib";import{ClonableMixin as e}from"../../core/Clonable.js";import{JSONSupport as i}from"../../core/JSONSupport.js";import{property as o,subclass as r}from"../../core/accessorSupport/decorators.js";import s from"./TimeSeriesCalculation.js";import p from"./TimeSeriesFieldTimeMapping.js";import n from"../../time/TimeExtent.js";let l=class extends(e(i)){constructor(t){super(t),this.name=null,this.fieldTimeMappings=null,this.timeExtent=null,this.timeInterval=null,this.timeIntervalUnits=null,this.timeValueUnits=null,this.title=null,this.calculationMethods=null,this.type="time-series-fields"}};t([o({type:String,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),t([o({type:[p],json:{write:{isRequired:!0}}})],l.prototype,"fieldTimeMappings",void 0),t([o({type:n,json:{write:!0}})],l.prototype,"timeExtent",void 0),t([o({type:Number,json:{write:{isRequired:!0}}})],l.prototype,"timeInterval",void 0),t([o({type:String,json:{write:{isRequired:!0}}})],l.prototype,"timeIntervalUnits",void 0),t([o({type:String,json:{write:{isRequired:!0}}})],l.prototype,"timeValueUnits",void 0),t([o({type:String,json:{write:!0}})],l.prototype,"title",void 0),t([o({type:[s],json:{write:!0}})],l.prototype,"calculationMethods",void 0),t([o({type:String,readOnly:!0,json:{write:{isRequired:!0}}})],l.prototype,"type",void 0),l=t([r("esri.layers.support.TimeSeriesInfo")],l);export{l as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{JSONMap as e}from"../../core/jsonMap.js";import{excludeTables as r}from"../../core/accessorSupport/layerContainerType.js";import n from"../../geometry/Extent.js";import i from"../../geometry/SpatialReference.js";import{w as
|
|
2
|
+
import{JSONMap as e}from"../../core/jsonMap.js";import{excludeTables as r}from"../../core/accessorSupport/layerContainerType.js";import n from"../../geometry/Extent.js";import i from"../../geometry/SpatialReference.js";import a from"./TimeInfo.js";import{w as o}from"../../chunks/persistableUrlUtils.js";import t from"../../symbols/support/ElevationInfo.js";import s from"../../tables/AttributeTableTemplate.js";import{transparencyToOpacity as l}from"../../webdoc/support/opacityUtils.js";const p={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:r}}},y={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,r)=>!r.disablePopup},write:{enabled:!0,writer(e,r,n){r[n]=!e}}}},d={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:r}}},m={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:o}}},c={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:r}}},f={value:null,type:t,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:r}}};function w(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const g={write:{enabled:!0,layerContainerTypes:r},read:!0},u={type:Number,json:{origins:{"web-document":g,"portal-item":{write:{layerContainerTypes:r}}}}},b={...u,json:{...u.json,origins:{"web-document":{...g,write:{enabled:!0,layerContainerTypes:r,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,r,n)=>n&&"service"!==n.origin||!r.drawingInfo||void 0===r.drawingInfo.transparency?r.layerDefinition?.drawingInfo&&void 0!==r.layerDefinition.drawingInfo.transparency?l(r.layerDefinition.drawingInfo.transparency):void 0:l(r.drawingInfo.transparency)}}},j={type:n,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,r)=>{const a=n.fromJSON(e);return null!=r.spatialReference&&"object"==typeof r.spatialReference&&(a.spatialReference=i.fromJSON(r.spatialReference)),a}}}},read:!1}},v={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},I={type:Number,json:{origins:{service:{write:{enabled:!1}}},name:"layerDefinition.minScale",write:{layerContainerTypes:r}}},T={type:Number,json:{origins:{service:{write:{enabled:!1}}},name:"layerDefinition.maxScale",write:{layerContainerTypes:r}}},C={json:{write:{ignoreOrigin:!0,layerContainerTypes:r},origins:{"web-map":{read:!1,write:!1}}}},D={type:s,json:{name:"attributeTableInfo",write:!0}},N=new e({High:"high",Medium:"medium",Low:"low",None:"none"}),O={type:N.apiValues,json:{name:"layerDefinition.barrierWeight",default:"high",read:N.read,write:N.write,origins:{service:{read:!1}}}};function h(e){return{name:"layerDefinition.timeInfo",read:!0,write:{enabled:!0,overridePolicy(r,n){return{enabled:!0,ignoreOrigin:!!e&&this.originIdOf(n)<3}}}}}function S(e){const r=e?.alwaysWriteNonItemOrigin,n=e?.webDocumentOrigin??"web-document",i={[n]:h(r),"portal-item":h(r)};return e?.disableServiceOrigin&&(i.service={read:!1,write:!1}),{type:a,json:{name:e?.name,origins:i}}}export{D as attributeTableTemplate,O as barrierWeight,f as elevationInfo,v as id,d as labelsVisible,c as legendEnabled,C as listMode,T as maxScale,I as minScale,u as opacity,b as opacityDrawingInfo,y as popupEnabled,w as readOnlyService,j as sceneLayerFullExtent,p as screenSizePerspectiveEnabled,S as timeInfo,m as url};
|
|
@@ -6,15 +6,39 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type TimeSeriesInfo from "./TimeSeriesInfo.js";
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* Options for creating a time series Arcade expression.
|
|
11
|
+
*
|
|
12
|
+
* @since 5.2
|
|
13
|
+
*/
|
|
14
|
+
export interface CreateTimeSeriesExpressionOptions {}
|
|
15
|
+
|
|
9
16
|
/**
|
|
10
17
|
* Creates an [Arcade expression](https://developers.arcgis.com/javascript/latest/arcade/) that resolves values from a time series data series using the
|
|
11
18
|
* current [Map element](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-map/) time.
|
|
12
19
|
*
|
|
13
20
|
* @param dataSeriesInfo - The data series definition used to build the expression.
|
|
21
|
+
* @param options - Options used to create the expression.
|
|
14
22
|
* @returns An [Arcade expression](https://developers.arcgis.com/javascript/latest/arcade/) string.
|
|
15
23
|
* @since 5.1
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* import TimeSeriesInfo from "@arcgis/core/layers/support/TimeSeriesInfo.js";
|
|
27
|
+
* import { createTimeSeriesExpression } from "@arcgis/core/layers/support/timeSeriesUtils.js";
|
|
28
|
+
*
|
|
29
|
+
* const info = new TimeSeriesInfo({
|
|
30
|
+
* name: "visitationNumbers",
|
|
31
|
+
* fieldTimeMappings: [
|
|
32
|
+
* { fieldName: "visitationNumbers_2020", timeValue: "2020" },
|
|
33
|
+
* { fieldName: "visitationNumbers_2021", timeValue: "2021" },
|
|
34
|
+
* ],
|
|
35
|
+
* timeValueUnits: "years",
|
|
36
|
+
* });
|
|
37
|
+
*
|
|
38
|
+
* const expression = createTimeSeriesExpression(info, { calculationMethod: "change-from-previous" });
|
|
39
|
+
* ```
|
|
16
40
|
*/
|
|
17
|
-
export function createTimeSeriesExpression(dataSeriesInfo: TimeSeriesInfo): string;
|
|
41
|
+
export function createTimeSeriesExpression(dataSeriesInfo: TimeSeriesInfo, options?: CreateTimeSeriesExpressionOptions): string;
|
|
18
42
|
|
|
19
43
|
/**
|
|
20
44
|
* Maps a data series time value unit to the corresponding Arcade string that dictates time formatting.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
function e(e){const
|
|
2
|
+
function e(e,n){const{calculationMethod:t}=n??{},a=e.fieldTimeMappings??[];if(!a.length)return"return null;";const u=r(e.timeValueUnits??"years");if(!t){const e=a.map(({fieldName:e,timeValue:r})=>` "${r}", $feature.${e},`);return`var timeFormat = "${u}";\n\nvar hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);\nvar hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);\n\nif (!hasCurrentStart && !hasCurrentEnd) {\n return $feature.${a[0].fieldName};\n}\n\nvar currentTime = DefaultValue($view.timeProperties.currentEnd, $view.timeProperties.currentStart);\nvar formattedCurrentTime = Text(currentTime, timeFormat);\n\nreturn Decode(formattedCurrentTime,\n${e.join("\n")}\n null\n);`}const i=a.map(({timeValue:e},r)=>` "${e}", ${r},`),s="percent-change-from-first"===t||"percent-change-from-previous"===t,c=`${"change-from-first"===t||"percent-change-from-first"===t?"var comparisonValue = fieldValues[0];":"if (currentIndex == 0) {\n return null;\n}\nvar comparisonValue = fieldValues[currentIndex - 1];"}\n\nif (IsEmpty(comparisonValue)${s?" || comparisonValue == 0":""}) {\n return null;\n}\n\nreturn ${s?"Round(((currentValue - comparisonValue) / comparisonValue) * 100, 2)":"currentValue - comparisonValue"};`;return`var timeFormat = "${u}";\nvar fieldValues = [\n${a.map(({fieldName:e})=>` $feature.${e},`).join("\n")}\n];\n\nfunction getCurrentIndex() {\n var hasCurrentStart = HasValue($view, ["timeProperties", "currentStart"]);\n var hasCurrentEnd = HasValue($view, ["timeProperties", "currentEnd"]);\n\n if (!hasCurrentStart && !hasCurrentEnd) {\n return ${a.length>1?1:"null"};\n }\n\n var currentTime = DefaultValue($view.timeProperties.currentEnd, $view.timeProperties.currentStart);\n var formattedCurrentTime = Text(currentTime, timeFormat);\n\n return Decode(formattedCurrentTime,\n${i.join("\n")}\n null\n );\n}\n\nvar currentIndex = getCurrentIndex();\nif (currentIndex == null) {\n return null;\n}\n\nvar currentValue = fieldValues[currentIndex];\nif (IsEmpty(currentValue)) {\n return null;\n}\n\n${c}`}function r(e){switch(e){case"centuries":case"decades":case"years":default:return"Y";case"months":return"Y-M";case"weeks":case"days":return"Y-M-D";case"hours":case"minutes":return"Y-M-D-H-mm";case"seconds":return"Y-M-D-H-mm-ss"}}export{e as createTimeSeriesExpression,r as getArcadeTimeFormatString};
|
package/layers/types.d.ts
CHANGED
|
@@ -398,6 +398,7 @@ export interface QueryCapabilities {
|
|
|
398
398
|
* for the individual features contributing to each [aggregated](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#returnStatisticsAggregatedIds)
|
|
399
399
|
* statistics query result.
|
|
400
400
|
*
|
|
401
|
+
* @internal
|
|
401
402
|
* @since 5.1
|
|
402
403
|
* @see [Query.returnStatisticsAggregatedIds](https://developers.arcgis.com/javascript/latest/references/core/rest/support/Query/#returnStatisticsAggregatedIds)
|
|
403
404
|
* @see [Graphic.statisticsAggregatedIds](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#statisticsAggregatedIds)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.2.0-next.
|
|
3
|
+
"version": "5.2.0-next.127",
|
|
4
4
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@amcharts/amcharts5": "~5.20.8",
|
|
23
|
-
"@arcgis/toolkit": "5.2.0-next.
|
|
24
|
-
"@esri/arcgis-html-sanitizer": "~4.
|
|
23
|
+
"@arcgis/toolkit": "5.2.0-next.127",
|
|
24
|
+
"@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
|
|
25
25
|
"@esri/calcite-components": "^5.2.0-next.80",
|
|
26
26
|
"@vaadin/grid": "~25.3.0",
|
|
27
27
|
"@zip.js/zip.js": "~2.18.2",
|