@arcgis/core 4.33.0-next.20250401 → 4.33.0-next.20250403
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/SceneViewer/sceneViewerUtils.d.ts +1 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0cd5f15b8558b23e5fcd.js +1 -0
- package/assets/esri/core/workers/chunks/0cec53e6f1464c69448d.js +1 -0
- package/assets/esri/core/workers/chunks/48fbf887da6d19838bf0.js +1 -0
- package/assets/esri/core/workers/chunks/{ba4d91816f6a0bf0d812.js → 4dc135e0133d58a06d67.js} +1 -1
- package/assets/esri/core/workers/chunks/{322cb1b1871d03b69f0a.js → 5beb525b4adde1d98532.js} +33 -33
- package/assets/esri/core/workers/chunks/{3577909b8e84959d415b.js → 6a8cf1f51cc4adc268d3.js} +1 -1
- package/assets/esri/core/workers/chunks/6b0a6469673417563616.js +1 -0
- package/assets/esri/core/workers/chunks/{bdeac9196f28aff93e68.js → 93d06a1a0b700ddb3807.js} +1 -1
- package/assets/esri/core/workers/chunks/b28b699de6deb7e9fa53.js +1 -0
- package/assets/esri/core/workers/chunks/{1a5f96b1b892ecceb36a.js → b4a1f3f3a036226d6810.js} +1 -1
- package/assets/esri/core/workers/chunks/{738e4f46feb3758456e0.js → baa9fd23414f03ef90bc.js} +1 -1
- package/assets/esri/core/workers/chunks/c977a47cabc419610277.js +1 -0
- package/assets/esri/core/workers/chunks/{7e00122014d0a55363a8.js → ccb289911e7445b17763.js} +1 -1
- package/assets/esri/core/workers/chunks/{e2029267cddb8e2effab.js → d58fae2fc9d148e015ae.js} +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/buffer/internals/Vec2.js +1 -1
- package/interfaces.d.ts +112 -27
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/ElevationInfo.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainAttributes.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/ChangeSet.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/ITexture.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/TextureUpdater.js +5 -0
- package/views/3d/webgl-engine/lib/rendererUtils.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
- package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
- package/views/layers/PointCloudLayerView.d.ts +1 -1
- package/views/layers/PointCloudLayerView.js +5 -0
- package/views/webgl/renderState.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/assets/esri/core/workers/chunks/093421648cc61afdeb3c.js +0 -1
- package/assets/esri/core/workers/chunks/4816cf647eca2f4cecc2.js +0 -1
- package/assets/esri/core/workers/chunks/8725580f6d2a495051b5.js +0 -1
- package/assets/esri/core/workers/chunks/a56da688088404259481.js +0 -1
- package/assets/esri/core/workers/chunks/e6469173c65531d6524a.js +0 -1
- package/assets/esri/core/workers/chunks/e9e517a2141e504eec64.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../request.js";import r from"../../core/Accessor.js";import{makeHandle as o}from"../../core/handleUtils.js";import{getOrCreateMapValue as s}from"../../core/MapUtils.js";import{abortMaybe as i}from"../../core/maybe.js";import{onAbort as a,throwIfAborted as l,createAbortError as n,throwIfAbortError as c,createResolver as p}from"../../core/promiseUtils.js";import{watch as u}from"../../core/reactiveUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{isSharedGroupTemplate as m,isSharedPresetTemplate as h,isSharedFeatureTemplate as y}from"../templateUtils.js";import{SharedTemplateMissingTemplatesError as w,SharedTemplateLayerResolverError as v,SharedTemplateUtilityNetworkResolverError as k,SharedTemplateRequestError as g,SharedTemplateLayerUnavailableError as S}from"./support/sharedTemplateErrors.js";import{isFeatureLayer as _,isSubtypeGroupLayer as b}from"../../layers/support/layerUtils.js";import{
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../request.js";import r from"../../core/Accessor.js";import{makeHandle as o}from"../../core/handleUtils.js";import{getOrCreateMapValue as s}from"../../core/MapUtils.js";import{abortMaybe as i}from"../../core/maybe.js";import{onAbort as a,throwIfAborted as l,createAbortError as n,throwIfAbortError as c,createResolver as p}from"../../core/promiseUtils.js";import{watch as u}from"../../core/reactiveUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{isSharedGroupTemplate as m,isSharedPresetTemplate as h,isSharedFeatureTemplate as y}from"../templateUtils.js";import{SharedTemplateMissingTemplatesError as w,SharedTemplateLayerResolverError as v,SharedTemplateUtilityNetworkResolverError as k,SharedTemplateRequestError as g,SharedTemplateLayerUnavailableError as S}from"./support/sharedTemplateErrors.js";import{isFeatureLayer as _,isSubtypeGroupLayer as b}from"../../layers/support/layerUtils.js";import{getServices as j}from"../../undoredo/support/Services.js";import{isWebMap as N}from"../../webmap/utils.js";const R=new Map;function T(e,t){return s(R,e,(()=>{const r=new C({layerResolver:t?.layerResolver??A(e),makeSharedTemplateFromJSON:t.makeSharedTemplateFromJSON,utilityNetworkResolver:t?.utilityNetworkResolver??F(e),view:e});return e.addHandles(o((()=>{R.delete(e),r.destroy()}))),r}))}let C=class extends r{constructor(e){super(e),this._abortController=null,this._cache=new Map,this._pending=new Map,this._utilityNetworkLookupHelperCache=new Map,this.layerResolver=null,this.makeSharedTemplateFromJSON=null,this.utilityNetworkResolver=null,this.view=null}initialize(){this.addHandles(u((()=>this.view.spatialReference),(()=>this._reset())))}destroy(){this._abortController=i(this._abortController)}async getTemplates({templateIds:e,featureService:t,signal:r}){const o=this._cache,s=this._pending,i=[],n=new Set,c=new Set,p=Symbol();for(const a of new Set(e)){const e=U(t,a);if(o.has(e))i.push(o.get(e));else if(s.has(e)){const t=s.get(e);t.subscribers.add(p),c.add(t)}else n.add(a),s.set(e,L())}if(i.length===e.length)return i;const u=()=>{for(const{subscribers:e}of c)e.delete(p)},d=a(r,u);try{const e=await this._loadTemplates({templateIds:Array.from(n),featureService:t,signal:r}),o=await Promise.all(Array.from(c).map((({resolver:e})=>e.promise)));i.push(...e),i.push(...o)}catch(f){u();for(const e of n){const r=U(t,e),o=s.get(r);o?.resolver.reject(f),s.delete(r)}throw f}finally{d?.remove()}return l(r),i}async _loadTemplates({templateIds:e,featureService:t,signal:r}){if(0===e.length)return[];const o=this._cache,s=this._pending,i=this._abortController=new AbortController,l=a(r,(()=>{for(const r of e){if(H(s.get(U(t,r))))return}i.abort()})),c=await I({featureService:t,templateIds:e,signal:i.signal,spatialReference:this.view.spatialReference});if(c.length<e.length)throw new w(e,c);const p=await Promise.all(c.map((e=>this._makeTemplate({json:e,featureService:t}))));for(const a of p){const e=U(t,a.templateId),i=s.get(e);!r?.aborted||H(i)?(o.set(e,a),i?.resolver.resolve(a)):i?.resolver.reject(n()),s.delete(e)}return l?.remove(),p}async _makeTemplate({json:e,featureService:t}){const{view:r}=this,o=this.makeSharedTemplateFromJSON(e);o.featureService=t,o.view=r;const{layerIds:s,subtypeCode:i}=o;try{o.layer=await this.layerResolver({featureService:t,layerIds:s,subtypeCode:i})}catch(a){throw new v(o.templateId,a)}if(m(o)&&o.definition?.createUtilityNetworkAssociations){let e=null;try{e=await this.utilityNetworkResolver(t)}catch(a){throw new k(o.templateId,a)}if(e){o.definition.utilityNetwork=await this._getOrCreateUtilityNetworkLookupHelper(e);const t=await e.loadAssociationsTable();o.definition.utilityNetworkAssociationsTable=t,j(r).additionalLayers.add(t)}}if(h(o)&&o.definition){o.definition.spatialReference=r.spatialReference;for(const e of o.definition.allParts)e.geometry&&(e.geometry.spatialReference=r.spatialReference)}if(y(o)&&o.definition?.defaultValues){const e=o.definition.defaultValues,t={},{fieldsIndex:r}=o.layer;for(const s in o.definition.defaultValues)t[r.get(s)?.name??s]=e[s];o.definition.defaultValues=t}return o}async _getOrCreateUtilityNetworkLookupHelper(e){const t=this._utilityNetworkLookupHelperCache.get(e);if(t)return t;const{UtilityNetworkLookupHelper:r}=await import("../../networks/support/UtilityNetworkLookupHelper.js"),s=await new r({utilityNetwork:e}).load();this._utilityNetworkLookupHelperCache.set(e,s);const i=o((()=>{s.destroy(),this._utilityNetworkLookupHelperCache.delete(e)}));return e.addHandles(i),this.addHandles(i),s}_reset(){this._abortController?.abort(),this._cache.clear(),this._pending.clear()}};async function I({templateIds:e,featureService:r,spatialReference:o,signal:s}){const i=`${r.url}/sharedTemplates/templates`,a=await t(i,{query:{f:"json",outSR:o,ids:e.join(",")},signal:s}).catch((t=>{throw c(t),new g(e,t)}));return a.data?.templates??[]}function H(e){return null!=e&&e.subscribers.size>0}function L(){return{resolver:p(),subscribers:new Set}}function U(e,t){return`${e.url}/${t}`}function O(e){return _(e)||b(e)}function A(e){return async({featureService:t,layerIds:r})=>{const o=new Set(r),{allLayers:s,allTables:i}=e.map,a=s.concat(i).find((e=>e.url===t.url&&O(e)&&o.has(e.layerId)));if(null==a)throw new S(r);return a}}function F(e){return async t=>{const{map:r}=e;if(!N(r)||!r.utilityNetworks)return null;for(const e of r.utilityNetworks)if(e.featureServiceUrl===t.url)return e.load();return null}}e([d()],C.prototype,"_abortController",void 0),e([d()],C.prototype,"_cache",void 0),e([d()],C.prototype,"_pending",void 0),e([d({constructOnly:!0})],C.prototype,"layerResolver",void 0),e([d({constructOnly:!0})],C.prototype,"makeSharedTemplateFromJSON",void 0),e([d({constructOnly:!0})],C.prototype,"utilityNetworkResolver",void 0),e([d({constructOnly:!0})],C.prototype,"view",void 0),C=e([f("esri.editing.sharedTemplates.SharedTemplateProvider")],C);export{C as SharedTemplateProvider,T as getSharedTemplateProvider};
|
package/geometry/Polygon.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../chunks/tslib.es6.js";import{equals as e}from"../core/arrayUtils.js";import{
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import{equals as e}from"../core/arrayUtils.js";import{deprecatedProperty as r}from"../core/deprecate.js";import{clone as s}from"../core/lang.js";import i from"../core/Logger.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import{writer as a}from"../core/accessorSupport/decorators/writer.js";import l from"./Extent.js";import p from"./Geometry.js";import c from"./Point.js";import h from"./SpatialReference.js";import{polygonCentroid as u}from"./support/centroid.js";import{polygonContainsPoint as m}from"./support/contains.js";import{isClockwise as f}from"./support/coordsUtils.js";import{getPolygonExtent as g}from"./support/extentUtils.js";import{isSelfIntersecting as y}from"./support/intersectsBase.js";import{project as R}from"./support/webMercatorUtils.js";import{updateSupportFromPoint as d}from"./support/zmUtils.js";var w;function v(t){return!Array.isArray(t[0])}function j(t){return"number"==typeof t[0]?.[0]}function x(t){if(!t)return;let{rings:e,hasM:r,hasZ:s,spatialReference:i}=t;switch(e??=[],j(e)&&(e=[e]),e[0]?.[0]?.length){case 4:s??=!0,r??=!0;break;case 3:s??=!0!==r,r??=!s;break;default:s??=!1,r??=!1}return i??=h.WGS84,{...t,hasM:r,hasZ:s,rings:e,spatialReference:i}}let P=w=class extends p{static fromExtent(t){const e=t.clone().normalize(),{spatialReference:r}=t;let s=!1,i=!1;for(const o of e)o.hasZ&&(s=!0),o.hasM&&(i=!0);const n={rings:e.map((t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(s&&t.hasZ){const r=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<e.length;t++)e[t].push(r)}if(i&&t.hasM){const r=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<e.length;t++)e[t].push(r)}return e})),spatialReference:r};return s&&(n.hasZ=!0),i&&(n.hasM=!0),new w(n)}constructor(t){super(x(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){const t=u(this);if(!t||isNaN(t[0])||isNaN(t[1])||this.hasZ&&isNaN(t[2]))return null;const e=new c;return e.x=t[0],e.y=t[1],e.spatialReference=this.spatialReference,this.hasZ&&(e.z=t[2]),e}writeCurveRings(t,e){e.curveRings=s(t)}get extent(){const t=g(this),{spatialReference:e}=this;return t?new l({...t,spatialReference:e}):null}get isSelfIntersecting(){return r(i.getLogger(this),"isSelfIntersecting",{replacement:"Please use simplifyOperator.isSimple() instead.",version:"4.33",warnOnce:!0}),y(this.rings)}writeRings(t,e){e.rings=s(this.rings)}addRing(t){if(!t)return;const e=this.rings,r=e.length;if(v(t)){const s=[];for(let e=0,r=t.length;e<r;e++)s[e]=t[e].toArray();e[r]=s}else e[r]=t.slice();return this.notifyChange("rings"),this}clone(){const t=new w;return t.spatialReference=this.spatialReference,t.rings=s(this.rings),t.curveRings=s(this.curveRings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const r=this.spatialReference,s=t.spatialReference;if(null!=r!=(null!=s))return!1;if(null!=r&&null!=s&&!r.equals(s))return!1;if(this.rings.length!==t.rings.length)return!1;const i=([t,e,r,s],[i,n,o,a])=>t===i&&e===n&&(null==r&&null==o||r===o)&&(null==s&&null==a||s===a);for(let n=0;n<this.rings.length;n++){const r=this.rings[n],s=t.rings[n];if(!e(r,s,i))return!1}return!0}contains(t){if(!t)return!1;const e=R(t,this.spatialReference);return m(this,null!=e?e:t)}isClockwise(t){const e=v(t)?t.map((t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y])):t;return f(e)}getPoint(t,e){if(!this._validateInputs(t,e))return null;const r=this.rings[t][e],s=this.hasZ,i=this.hasM;return s&&!i?new c(r[0],r[1],r[2],void 0,this.spatialReference):i&&!s?new c(r[0],r[1],void 0,r[2],this.spatialReference):s&&i?new c(r[0],r[1],r[2],r[3],this.spatialReference):new c(r[0],r[1],this.spatialReference)}insertPoint(t,e,r){return this._validateInputs(t,e,!0)?(d(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t].splice(e,0,r),this.notifyChange("rings"),this):this}removePoint(t,e){if(!this._validateInputs(t,e))return null;const r=new c(this.rings[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("rings"),r}removeRing(t){if(!this._validateInputs(t,null))return null;const e=this.rings.splice(t,1)[0],r=this.spatialReference,s=e.map((t=>new c(t,r)));return this.notifyChange("rings"),s}setPoint(t,e,r){return this._validateInputs(t,e)?(d(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t][e]=r,this.notifyChange("rings"),this):this}_validateInputs(t,e,r=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=e){const s=this.rings[t];if(r&&(e<0||e>s.length))return!1;if(!r&&(e<0||e>=s.length))return!1}return!0}toJSON(t){return this.write({},t)}};t([n({readOnly:!0})],P.prototype,"cache",null),t([n({readOnly:!0})],P.prototype,"centroid",null),t([n({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],P.prototype,"curveRings",void 0),t([a("curveRings")],P.prototype,"writeCurveRings",null),t([n({readOnly:!0})],P.prototype,"extent",null),t([n({readOnly:!0})],P.prototype,"isSelfIntersecting",null),t([n({type:[[[Number]]],json:{write:{isRequired:!0}}})],P.prototype,"rings",void 0),t([a("rings")],P.prototype,"writeRings",null),P=w=t([o("esri.geometry.Polygon")],P);const S=P;P.prototype.toJSON.isDefaultToJSON=!0;export{S as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{Float16Array as e}from"@petamoriken/float16";import{BufferViewMat3Impl as t}from"./internals/Mat3.js";import{BufferViewMat4Impl as r}from"./internals/Mat4.js";import{BufferViewScalarImpl as s}from"./internals/Scalar.js";import{BufferViewVec2Impl as f}from"./internals/Vec2.js";import{BufferViewVec3Impl as n}from"./internals/Vec3.js";import{BufferViewVec4Impl as i}from"./internals/Vec4.js";class y extends s{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}static fromTypedArray(e,t){return new y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class c extends s{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}static fromTypedArray(e,t){return new c(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class u extends f{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(u,e,t)}static fromTypedArray(e,t){return new u(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class a extends f{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(a,e,t)}static fromTypedArray(e,t){return new a(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class l extends n{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(l,e,t)}static fromTypedArray(e,t){return new l(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class p extends n{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class b extends i{constructor(t,r=0,s,f){super(e,t,r,s,f),this.elementType="f16"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f16"}}class h extends i{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(h,e,t)}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class o extends t{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(o,e,t)}static fromTypedArray(e,t){return new o(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class m extends t{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class T extends r{constructor(e,t=0,r,s){super(Float32Array,e,t,r,s),this.elementType="f32"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class d extends r{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(d,e,t)}static fromTypedArray(e,t){return new d(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class O extends s{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class A extends f{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class x extends n{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class g extends i{constructor(e,t=0,r,s){super(Float64Array,e,t,r,s),this.elementType="f64"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class w extends s{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class E extends f{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class L extends n{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class B extends i{constructor(e,t=0,r,s){super(Uint8Array,e,t,r,s),this.elementType="u8"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class F extends s{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class I extends f{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class U extends n{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class j extends i{constructor(e,t=0,r,s){super(Uint16Array,e,t,r,s),this.elementType="u16"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u16"}}class V extends s{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class M extends f{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class k extends n{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class S extends i{constructor(e,t=0,r,s){super(Uint32Array,e,t,r,s),this.elementType="u32"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u32"}}class q extends s{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class v extends f{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class z extends n{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class C extends i{constructor(e,t=0,r,s){super(Int8Array,e,t,r,s),this.elementType="i8"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i8"}}class D extends s{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(D,e,t)}static fromTypedArray(e,t){return new D(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class G extends f{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class H extends n{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(H,e,t)}static fromTypedArray(e,t){return new H(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class J extends i{constructor(e,t=0,r,s){super(Int16Array,e,t,r,s),this.elementType="i16"}slice(e,t){return this.sliceBuffer(J,e,t)}static fromTypedArray(e,t){return new J(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i16"}}class K extends s{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static fromTypedArray(e,t){return new K(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class N extends f{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(N,e,t)}static fromTypedArray(e,t){return new N(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class P extends n{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}class Q extends i{constructor(e,t=0,r,s){super(Int32Array,e,t,r,s),this.elementType="i32"}slice(e,t){return this.sliceBuffer(Q,e,t)}static fromTypedArray(e,t){return new Q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="i32"}}export{c as BufferViewFloat,y as BufferViewFloat16,O as BufferViewFloat64,D as BufferViewInt16,K as BufferViewInt32,q as BufferViewInt8,o as BufferViewMat3f,m as BufferViewMat3f64,T as BufferViewMat4f,d as BufferViewMat4f64,F as BufferViewUint16,V as BufferViewUint32,w as BufferViewUint8,a as BufferViewVec2f,u as BufferViewVec2f16,A as BufferViewVec2f64,G as BufferViewVec2i16,N as BufferViewVec2i32,v as BufferViewVec2i8,I as BufferViewVec2u16,M as BufferViewVec2u32,E as BufferViewVec2u8,p as BufferViewVec3f,l as BufferViewVec3f16,x as BufferViewVec3f64,H as BufferViewVec3i16,P as BufferViewVec3i32,z as BufferViewVec3i8,U as BufferViewVec3u16,k as BufferViewVec3u32,L as BufferViewVec3u8,h as BufferViewVec4f,b as BufferViewVec4f16,g as BufferViewVec4f64,J as BufferViewVec4i16,Q as BufferViewVec4i32,C as BufferViewVec4i8,j as BufferViewVec4u16,S as BufferViewVec4u32,B as BufferViewVec4u8};
|
|
5
|
+
import{Float16Array as e}from"@petamoriken/float16";import{BufferViewMat3Impl as t}from"./internals/Mat3.js";import{BufferViewMat4Impl as s}from"./internals/Mat4.js";import{BufferViewScalarImpl as r}from"./internals/Scalar.js";import{BufferViewVec2Impl as i}from"./internals/Vec2.js";import{BufferViewVec3Impl as n}from"./internals/Vec3.js";import{BufferViewVec4Impl as c}from"./internals/Vec4.js";class l extends r{constructor(t,s=0,r,i){super(e,t,s,r,i),this.elementType="f16"}static{this.ElementType="f16"}}class u extends r{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}static{this.ElementType="f32"}}class a extends i{constructor(t,s=0,r,i){super(e,t,s,r,i),this.elementType="f16"}slice(e,t){return this.sliceBuffer(a,e,t)}static{this.ElementType="f16"}}class f extends i{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(f,e,t)}static{this.ElementType="f32"}}class p extends n{constructor(t,s=0,r,i){super(e,t,s,r,i),this.elementType="f16"}slice(e,t){return this.sliceBuffer(p,e,t)}static{this.ElementType="f16"}}class y extends n{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(y,e,t)}static fromTypedArray(e,t){return new y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f32"}}class h extends c{constructor(t,s=0,r,i){super(e,t,s,r,i),this.elementType="f16"}slice(e,t){return this.sliceBuffer(h,e,t)}static{this.ElementType="f16"}}class o extends c{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(o,e,t)}static{this.ElementType="f32"}}class m extends t{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(m,e,t)}static{this.ElementType="f32"}}class T extends t{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(T,e,t)}static{this.ElementType="f64"}}class d extends s{constructor(e,t=0,s,r){super(Float32Array,e,t,s,r),this.elementType="f32"}slice(e,t){return this.sliceBuffer(d,e,t)}static{this.ElementType="f32"}}class x extends s{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(x,e,t)}static{this.ElementType="f64"}}class E extends r{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(E,e,t)}static{this.ElementType="f64"}}class A extends i{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static{this.ElementType="f64"}}class B extends n{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="f64"}}class b extends c{constructor(e,t=0,s,r){super(Float64Array,e,t,s,r),this.elementType="f64"}slice(e,t){return this.sliceBuffer(b,e,t)}static{this.ElementType="f64"}}class F extends r{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(F,e,t)}static{this.ElementType="u8"}}class I extends i{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(I,e,t)}static{this.ElementType="u8"}}class U extends n{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}static{this.ElementType="u8"}}class j extends c{constructor(e,t=0,s,r){super(Uint8Array,e,t,s,r),this.elementType="u8"}slice(e,t){return this.sliceBuffer(j,e,t)}static{this.ElementType="u8"}}class O extends r{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(O,e,t)}static{this.ElementType="u16"}}class g extends i{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(g,e,t)}static{this.ElementType="u16"}}class w extends n{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(w,e,t)}static{this.ElementType="u16"}}class L extends c{constructor(e,t=0,s,r){super(Uint16Array,e,t,s,r),this.elementType="u16"}slice(e,t){return this.sliceBuffer(L,e,t)}static{this.ElementType="u16"}}class V extends r{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(V,e,t)}static{this.ElementType="u32"}}class M extends i{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(M,e,t)}static{this.ElementType="u32"}}class k extends n{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(k,e,t)}static{this.ElementType="u32"}}class S extends c{constructor(e,t=0,s,r){super(Uint32Array,e,t,s,r),this.elementType="u32"}slice(e,t){return this.sliceBuffer(S,e,t)}static{this.ElementType="u32"}}class q extends r{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static{this.ElementType="i8"}}class v extends i{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(v,e,t)}static{this.ElementType="i8"}}class z extends n{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(z,e,t)}static{this.ElementType="i8"}}class C extends c{constructor(e,t=0,s,r){super(Int8Array,e,t,s,r),this.elementType="i8"}slice(e,t){return this.sliceBuffer(C,e,t)}static{this.ElementType="i8"}}class D extends r{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(D,e,t)}static{this.ElementType="i16"}}class G extends i{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(G,e,t)}static{this.ElementType="i16"}}class H extends n{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(H,e,t)}static{this.ElementType="i16"}}class J extends c{constructor(e,t=0,s,r){super(Int16Array,e,t,s,r),this.elementType="i16"}slice(e,t){return this.sliceBuffer(J,e,t)}static{this.ElementType="i16"}}class K extends r{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static{this.ElementType="i32"}}class N extends i{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(N,e,t)}static{this.ElementType="i32"}}class P extends n{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(P,e,t)}static{this.ElementType="i32"}}class Q extends c{constructor(e,t=0,s,r){super(Int32Array,e,t,s,r),this.elementType="i32"}slice(e,t){return this.sliceBuffer(Q,e,t)}static{this.ElementType="i32"}}export{u as BufferViewFloat,l as BufferViewFloat16,E as BufferViewFloat64,D as BufferViewInt16,K as BufferViewInt32,q as BufferViewInt8,m as BufferViewMat3f,T as BufferViewMat3f64,d as BufferViewMat4f,x as BufferViewMat4f64,O as BufferViewUint16,V as BufferViewUint32,F as BufferViewUint8,f as BufferViewVec2f,a as BufferViewVec2f16,A as BufferViewVec2f64,G as BufferViewVec2i16,N as BufferViewVec2i32,v as BufferViewVec2i8,g as BufferViewVec2u16,M as BufferViewVec2u32,I as BufferViewVec2u8,y as BufferViewVec3f,p as BufferViewVec3f16,B as BufferViewVec3f64,H as BufferViewVec3i16,P as BufferViewVec3i32,z as BufferViewVec3i8,w as BufferViewVec3u16,k as BufferViewVec3u32,U as BufferViewVec3u8,o as BufferViewVec4f,h as BufferViewVec4f16,b as BufferViewVec4f64,J as BufferViewVec4i16,Q as BufferViewVec4i32,C as BufferViewVec4i8,L as BufferViewVec4u16,S as BufferViewVec4u32,j as BufferViewVec4u8};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{set as t}from"../../../../core/libs/gl-matrix-2/math/vec2.js";class e{static{this.ElementCount=2}constructor(t,e,r=0,f,s){this.TypedArrayConstructor=t,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===f&&(f=2*i.BYTES_PER_ELEMENT);const d=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,d):new i(e,d,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=f/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const f=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,f,this.stride,f+r*this.stride)}getVec(e,r){return e*=this.typedBufferStride,t(r,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r}copyFrom(t,e,r){const f=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,d=r*e.typedBufferStride;f[i++]=s[d++],f[i]=s[d]}get buffer(){return this.typedBuffer.buffer}}export{e as BufferViewVec2Impl};
|
|
5
|
+
import{set as t}from"../../../../core/libs/gl-matrix-2/math/vec2.js";class e{static{this.ElementCount=2}constructor(t,e,r=0,f,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===f&&(f=2*i.BYTES_PER_ELEMENT);const d=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,d):new i(e,d,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=f/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const f=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,f,this.stride,f+r*this.stride)}getVec(e,r){return e*=this.typedBufferStride,t(r,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r}copyFrom(t,e,r){const f=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,d=r*e.typedBufferStride;f[i++]=s[d++],f[i]=s[d]}get buffer(){return this.typedBuffer.buffer}}export{e as BufferViewVec2Impl};
|
package/interfaces.d.ts
CHANGED
|
@@ -2039,6 +2039,15 @@ declare namespace __esri {
|
|
|
2039
2039
|
* @param viewModel view model.
|
|
2040
2040
|
*/
|
|
2041
2041
|
editorNavigateBack(viewModel: EditorViewModel): Promise<void>;
|
|
2042
|
+
/**
|
|
2043
|
+
* Note: reserved for internal use only, this is not part of the stable public API.
|
|
2044
|
+
*
|
|
2045
|
+
* Helper function to retrieve a popup feature from a LayerView or the underlying FeatureLayer.
|
|
2046
|
+
*
|
|
2047
|
+
* @param layerView
|
|
2048
|
+
* @param graphics
|
|
2049
|
+
*/
|
|
2050
|
+
fetchPopupFeaturesFromGraphics(layerView: LayerView, graphics: Graphic[]): Promise<Graphic[]>;
|
|
2042
2051
|
/**
|
|
2043
2052
|
* Note: reserved for internal use only, this is not part of the stable public API.
|
|
2044
2053
|
*
|
|
@@ -8952,7 +8961,7 @@ declare namespace __esri {
|
|
|
8952
8961
|
}
|
|
8953
8962
|
|
|
8954
8963
|
/**
|
|
8955
|
-
* Returns the planar area of a 2D geometry
|
|
8964
|
+
* Returns the planar area of a 2D geometry.
|
|
8956
8965
|
*
|
|
8957
8966
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-areaOperator.html Read more...}
|
|
8958
8967
|
*/
|
|
@@ -8963,7 +8972,7 @@ declare namespace __esri {
|
|
|
8963
8972
|
*
|
|
8964
8973
|
* @param geometry The geometry to calculate the area from.
|
|
8965
8974
|
* @param options Additional options.
|
|
8966
|
-
* @param options.unit The area unit of the return value.
|
|
8975
|
+
* @param options.unit The area unit of the return value. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
8967
8976
|
*
|
|
8968
8977
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-areaOperator.html#execute Read more...}
|
|
8969
8978
|
*/
|
|
@@ -9036,7 +9045,7 @@ declare namespace __esri {
|
|
|
9036
9045
|
* @param geometry The input geometry to be buffered.
|
|
9037
9046
|
* @param distance The buffer distance for the geometry. Unless the `unit` option is set, the default is the geometry's spatial reference unit.
|
|
9038
9047
|
* @param options Additional options.
|
|
9039
|
-
* @param options.unit The length unit of the buffer distance. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9048
|
+
* @param options.unit The length unit of the buffer distance. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9040
9049
|
*
|
|
9041
9050
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-bufferOperator.html#execute Read more...}
|
|
9042
9051
|
*/
|
|
@@ -9050,7 +9059,7 @@ declare namespace __esri {
|
|
|
9050
9059
|
* @param options.maxDeviation The max deviation of the result buffer from the true buffer. When the value is NaN, internal logic is used to select deviation based on the buffer distance. Unless the `unit` option is set, the default is the geometries spatial reference unit.
|
|
9051
9060
|
* @param options.maxVerticesInFullCircle The maximum number of vertices in the polygon produced from a buffered point.
|
|
9052
9061
|
* @param options.union Indicates if the buffer geometries should be unioned. When set to `true`, the output will be a single geometry.
|
|
9053
|
-
* @param options.unit The length unit of the buffer distances and max deviation. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9062
|
+
* @param options.unit The length unit of the buffer distances and max deviation. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9054
9063
|
*
|
|
9055
9064
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-bufferOperator.html#executeMany Read more...}
|
|
9056
9065
|
*/
|
|
@@ -9250,7 +9259,7 @@ declare namespace __esri {
|
|
|
9250
9259
|
* @param options Additional options.
|
|
9251
9260
|
* @param options.maxAngleInDegrees The maximum angle that a new vertex can deviate from the original geometry. The number must be greater than or equal to zero. Applicable only on curves. The default value of `0` disables densification by angle. The value will be capped at 90.
|
|
9252
9261
|
* @param options.maxDeviation The maximum distance a newly placed vertex on a densified polyline can deviate from the original location on the curve. The number must be greater than or equal to zero. Applicable only on curves. The default of passing `0` disables densification by deviation. Unless the `unit` option is set, the default is the geometry's spatial reference unit.
|
|
9253
|
-
* @param options.unit The length unit of `maxSegmentLength` and `maxDeviation`. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9262
|
+
* @param options.unit The length unit of `maxSegmentLength` and `maxDeviation`. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9254
9263
|
*
|
|
9255
9264
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-densifyOperator.html#execute Read more...}
|
|
9256
9265
|
*/
|
|
@@ -9263,7 +9272,7 @@ declare namespace __esri {
|
|
|
9263
9272
|
* @param options Additional options.
|
|
9264
9273
|
* @param options.maxAngleInDegrees The maximum angle allowed. The number must be greater than or equal to zero. Applicable only on curves. The default of passing `0` disables densification by angle. The value will be capped at pi/2.
|
|
9265
9274
|
* @param options.maxDeviation The maximum deviation allowed. The number must be greater than or equal to zero. Applicable only on curves. The default of passing `0` disables densification by deviation.
|
|
9266
|
-
* @param options.unit The length unit of `maxSegmentLength` and `maxDeviation`. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9275
|
+
* @param options.unit The length unit of `maxSegmentLength` and `maxDeviation`. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9267
9276
|
*
|
|
9268
9277
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-densifyOperator.html#executeMany Read more...}
|
|
9269
9278
|
*/
|
|
@@ -9354,7 +9363,7 @@ declare namespace __esri {
|
|
|
9354
9363
|
* @param geometry1 The first input geometry.
|
|
9355
9364
|
* @param geometry2 The second input geometry.
|
|
9356
9365
|
* @param options Additional options.
|
|
9357
|
-
* @param options.unit The length unit of the distance. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9366
|
+
* @param options.unit The length unit of the distance. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9358
9367
|
*
|
|
9359
9368
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-distanceOperator.html#execute Read more...}
|
|
9360
9369
|
*/
|
|
@@ -9443,7 +9452,7 @@ declare namespace __esri {
|
|
|
9443
9452
|
* @param maxDeviation The maximum allowed deviation from the generalized geometry to the original geometry. If maxDeviation <= 0 the operator returns the input geometry. Unless the `unit` option is set, the default is the spatial reference unit of `geometry`.
|
|
9444
9453
|
* @param options Additional options.
|
|
9445
9454
|
* @param options.removeDegenerateParts Preserves degenerate parts. The operator will try to output three distinct vertices for closed polyline paths and polygon rings, and it will output two distinct vertices for open polyline paths. When set to `true`, the degenerate parts of the geometry will be removed from the output. This may not be desirable for displaying the geometry.
|
|
9446
|
-
* @param options.unit The length unit of `maxDeviation`. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9455
|
+
* @param options.unit The length unit of `maxDeviation`. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9447
9456
|
*
|
|
9448
9457
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-generalizeOperator.html#execute Read more...}
|
|
9449
9458
|
*/
|
|
@@ -9455,7 +9464,7 @@ declare namespace __esri {
|
|
|
9455
9464
|
* @param maxDeviation The maximum allowed deviation from the generalized geometry to the original geometry. If the value is less than or equal to zero, then the operator returns the input geometries. Unless the `unit` option is set, the default is the spatial reference unit of `geometries`.
|
|
9456
9465
|
* @param options Additional options.
|
|
9457
9466
|
* @param options.removeDegenerateParts Preserves degenerate parts. The operator will try to output three distinct vertices for closed polyline paths and polygon rings, and it will output two distinct vertices for open polyline paths. When set to `true`, the degenerate parts of the geometries will be removed from the output. This may not be desirable for displaying the geometries.
|
|
9458
|
-
* @param options.unit The length unit of `maxDeviation`. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9467
|
+
* @param options.unit The length unit of `maxDeviation`. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9459
9468
|
*
|
|
9460
9469
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-generalizeOperator.html#executeMany Read more...}
|
|
9461
9470
|
*/
|
|
@@ -9826,7 +9835,7 @@ declare namespace __esri {
|
|
|
9826
9835
|
* @param options.maxVerticesInFullCircle The maximum number of vertices in the polygon produced from a buffered point.
|
|
9827
9836
|
* @param options.miterLimit Defines when miter joins are replaced with bevel joins.
|
|
9828
9837
|
* @param options.union Indicates if the buffer geometries should be unioned. When set to `true`, the output will be a single geometry.
|
|
9829
|
-
* @param options.unit The length unit of the buffer distances and max deviation. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9838
|
+
* @param options.unit The length unit of the buffer distances and max deviation. The default is the input geometries spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9830
9839
|
*
|
|
9831
9840
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-graphicBufferOperator.html#executeMany Read more...}
|
|
9832
9841
|
*/
|
|
@@ -9941,7 +9950,7 @@ declare namespace __esri {
|
|
|
9941
9950
|
* @param geometry2 The second geometry.
|
|
9942
9951
|
* @param distance The distance (must be positive). Unless the `unit` option is set, the default is the geometry's spatial reference unit.
|
|
9943
9952
|
* @param options Additional options.
|
|
9944
|
-
* @param options.unit The length unit of the distance. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9953
|
+
* @param options.unit The length unit of the distance. Unless the `unit` option is set, the default is the geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9945
9954
|
*
|
|
9946
9955
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-isNearOperator.html#execute Read more...}
|
|
9947
9956
|
*/
|
|
@@ -9993,7 +10002,7 @@ declare namespace __esri {
|
|
|
9993
10002
|
*
|
|
9994
10003
|
* @param geometry The geometry to calculate the length from.
|
|
9995
10004
|
* @param options Additional options.
|
|
9996
|
-
* @param options.unit The length unit of the return value. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10005
|
+
* @param options.unit The length unit of the return value. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
9997
10006
|
*
|
|
9998
10007
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-lengthOperator.html#execute Read more...}
|
|
9999
10008
|
*/
|
|
@@ -10120,7 +10129,7 @@ declare namespace __esri {
|
|
|
10120
10129
|
* @param options.flattenError The maximum distance of the resulting segments compared to the true circular arc (used only when `joins` is set to `"round"`). The algorithm never produces more than around 180 vertices for each round join.
|
|
10121
10130
|
* @param options.joins Defines the join type of the offset geometry.
|
|
10122
10131
|
* @param options.miterLimit Defines when miter joins are replaced with bevel joins.
|
|
10123
|
-
* @param options.unit The length unit of the offset distance. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10132
|
+
* @param options.unit The length unit of the offset distance. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10124
10133
|
*
|
|
10125
10134
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-offsetOperator.html#execute Read more...}
|
|
10126
10135
|
*/
|
|
@@ -10134,7 +10143,7 @@ declare namespace __esri {
|
|
|
10134
10143
|
* @param options.flattenError The maximum distance of the resulting segments compared to the true circular arc (used only when joins is round). The algorithm never produces more than around 180 vertices for each round join.
|
|
10135
10144
|
* @param options.joins Defines the join type of the offset geometry.
|
|
10136
10145
|
* @param options.miterLimit Defines when miter joins are replaced with bevel joins.
|
|
10137
|
-
* @param options.unit The length unit of the offset distance. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10146
|
+
* @param options.unit The length unit of the offset distance. The default is the input geometries spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10138
10147
|
*
|
|
10139
10148
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-offsetOperator.html#executeMany Read more...}
|
|
10140
10149
|
*/
|
|
@@ -10243,7 +10252,7 @@ declare namespace __esri {
|
|
|
10243
10252
|
* @param remainingArea The size of the remaining piece of the uncut polygon. Pass zero, if you want to slice the whole polygon. Unless the `unit` option is set, the default is the spatial reference unit of `polygon`.
|
|
10244
10253
|
* @param options Additional options.
|
|
10245
10254
|
* @param options.transform The affine transformation to apply to the polygon before slicing. When applying the transformation, the slicing starts from the bottom and proceeds to the top. The default is the identity transformation. For horizontal slices, use {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-support-Transformation.html#setIdentity Transformation.setIdentity()}. To slice vertically, apply {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-support-Transformation.html#setSwapCoordinates Transformation.setSwapCoordinates()} that swaps x and y coordinate values, and for an arbitrary angle, use {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-support-Transformation.html#rotate Transformation.rotate()}.
|
|
10246
|
-
* @param options.unit The area unit of the remaining area.
|
|
10255
|
+
* @param options.unit The area unit of the remaining area. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10247
10256
|
*
|
|
10248
10257
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-polygonSlicerOperator.html#findSlicesByArea Read more...}
|
|
10249
10258
|
*/
|
|
@@ -10359,7 +10368,7 @@ declare namespace __esri {
|
|
|
10359
10368
|
* @param options Additional options.
|
|
10360
10369
|
* @param options.calculateLeftRightSide When the parameter is set to true, this function will calculate the left/right side of a polyline or polygon. Look for the result in the `rightSide` property of the returned `ProximityResult` object.
|
|
10361
10370
|
* @param options.testPolygonInterior When `geometry` is a polygon, the function will test if `point` is inside of the polygon. Points that are inside of the polygon have zero distance to the polygon. When set to false, the function will not check if the point is inside of the polygon, but will only determine proximity to the boundary.
|
|
10362
|
-
* @param options.unit The length unit of the result distance. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10371
|
+
* @param options.unit The length unit of the result distance. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10363
10372
|
*
|
|
10364
10373
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-proximityOperator.html#getNearestCoordinate Read more...}
|
|
10365
10374
|
*/
|
|
@@ -10370,7 +10379,7 @@ declare namespace __esri {
|
|
|
10370
10379
|
* @param geometry The input geometry.
|
|
10371
10380
|
* @param point The point used to search for the nearest coordinate in the input `geometry`.
|
|
10372
10381
|
* @param options Additional options.
|
|
10373
|
-
* @param options.unit The length unit of the result distance. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10382
|
+
* @param options.unit The length unit of the result distance. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10374
10383
|
*
|
|
10375
10384
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-proximityOperator.html#getNearestVertex Read more...}
|
|
10376
10385
|
*/
|
|
@@ -10383,7 +10392,7 @@ declare namespace __esri {
|
|
|
10383
10392
|
* @param searchRadius The planar distance from the `inputPoint` to search for vertices. Unless the `unit` option is set, the default is the geometry's spatial reference unit.
|
|
10384
10393
|
* @param maxVertexCountToReturn The maximum number of vertices that will be returned. Must be a positive number.
|
|
10385
10394
|
* @param options Additional options.
|
|
10386
|
-
* @param options.unit The length unit of the search radius and result distances. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10395
|
+
* @param options.unit The length unit of the search radius and result distances. The default is the input geometry's spatial reference unit. An error will be thrown if this is set for Geographic Coordinate Systems.
|
|
10387
10396
|
*
|
|
10388
10397
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-proximityOperator.html#getNearestVertices Read more...}
|
|
10389
10398
|
*/
|
|
@@ -11074,6 +11083,8 @@ declare namespace __esri {
|
|
|
11074
11083
|
* Checks to see if polygon rings cross each other and indicates if the polygon is
|
|
11075
11084
|
* self-intersecting, which means the ring of the polygon crosses itself.
|
|
11076
11085
|
*
|
|
11086
|
+
* @deprecated since 4.33. Please use {@link module:esri/geometry/operators/simplifyOperator#isSimple simplifyOperator.isSimple()} instead.
|
|
11087
|
+
*
|
|
11077
11088
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Polygon.html#isSelfIntersecting Read more...}
|
|
11078
11089
|
*/
|
|
11079
11090
|
readonly isSelfIntersecting: boolean;
|
|
@@ -26942,7 +26953,23 @@ declare namespace __esri {
|
|
|
26942
26953
|
}
|
|
26943
26954
|
|
|
26944
26955
|
export class OpenStreetMapLayer extends WebTileLayer {
|
|
26956
|
+
/**
|
|
26957
|
+
* The subdomains used to access the tile service.
|
|
26958
|
+
*
|
|
26959
|
+
* @default ["a", "b", "c"]
|
|
26960
|
+
*
|
|
26961
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html#subDomains Read more...}
|
|
26962
|
+
*/
|
|
26963
|
+
readonly subDomains: string[];
|
|
26945
26964
|
readonly type: "open-street-map";
|
|
26965
|
+
/**
|
|
26966
|
+
* The URL template used to access the tile service.
|
|
26967
|
+
*
|
|
26968
|
+
* @default "https://{subDomain}.tile.openstreetmap.org/{level}/{col}/{row}.png"
|
|
26969
|
+
*
|
|
26970
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-OpenStreetMapLayer.html#urlTemplate Read more...}
|
|
26971
|
+
*/
|
|
26972
|
+
readonly urlTemplate: string;
|
|
26946
26973
|
/**
|
|
26947
26974
|
* Allows you to use [basemaps](http://wiki.openstreetmap.org/wiki/List_of_OSM-based_services) from [OpenStreetMap](http://www.openstreetmap.org/).
|
|
26948
26975
|
*
|
|
@@ -96936,13 +96963,19 @@ declare namespace __esri {
|
|
|
96936
96963
|
|
|
96937
96964
|
export class PointCloudLayerView extends LayerView {
|
|
96938
96965
|
/**
|
|
96939
|
-
* A list of attribute fields fetched for each
|
|
96940
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-
|
|
96941
|
-
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-
|
|
96966
|
+
* A list of attribute fields fetched for each point including fields required for layer
|
|
96967
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html#renderer rendering} and additional fields defined on the
|
|
96968
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html#outFields outFields}.
|
|
96942
96969
|
*
|
|
96943
96970
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html#availableFields Read more...}
|
|
96944
96971
|
*/
|
|
96945
96972
|
readonly availableFields: string[];
|
|
96973
|
+
/**
|
|
96974
|
+
* The point cloud layer being viewed.
|
|
96975
|
+
*
|
|
96976
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html#layer Read more...}
|
|
96977
|
+
*/
|
|
96978
|
+
readonly layer: PointCloudLayer;
|
|
96946
96979
|
/**
|
|
96947
96980
|
* Represents the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-LayerView.html LayerView} of a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-PointCloudLayer.html PointCloudLayer}
|
|
96948
96981
|
* after it has been added to a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html Map} in a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-SceneView.html SceneView}.
|
|
@@ -96950,6 +96983,13 @@ declare namespace __esri {
|
|
|
96950
96983
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html Read more...}
|
|
96951
96984
|
*/
|
|
96952
96985
|
constructor(properties?: PointCloudLayerViewProperties);
|
|
96986
|
+
/**
|
|
96987
|
+
* Creates query parameter object that can be used to fetch points as they are being
|
|
96988
|
+
* displayed.
|
|
96989
|
+
*
|
|
96990
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html#createQuery Read more...}
|
|
96991
|
+
*/
|
|
96992
|
+
createQuery(): Query;
|
|
96953
96993
|
/**
|
|
96954
96994
|
* Highlights the given point(s).
|
|
96955
96995
|
*
|
|
@@ -96960,6 +97000,39 @@ declare namespace __esri {
|
|
|
96960
97000
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html#highlight Read more...}
|
|
96961
97001
|
*/
|
|
96962
97002
|
highlight(target: Graphic | Graphic[] | Collection<Graphic>, options?: PointCloudLayerViewHighlightOptions): Handle;
|
|
97003
|
+
/**
|
|
97004
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against points in the layer view and
|
|
97005
|
+
* returns the 3D {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html Extent} of points that satisfy the query.
|
|
97006
|
+
*
|
|
97007
|
+
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all points on the client are returned.
|
|
97008
|
+
* @param options An object with the following properties.
|
|
97009
|
+
* @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html Error} named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals.
|
|
97010
|
+
*
|
|
97011
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html#queryExtent Read more...}
|
|
97012
|
+
*/
|
|
97013
|
+
queryExtent(query?: QueryProperties, options?: PointCloudLayerViewQueryExtentOptions): Promise<any>;
|
|
97014
|
+
/**
|
|
97015
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against points in the layer view
|
|
97016
|
+
* and returns the number of points that satisfy the query.
|
|
97017
|
+
*
|
|
97018
|
+
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all points on the client are returned. To only return points visible in the view, set the `geometry` parameter in the query object to the view's visible area.
|
|
97019
|
+
* @param options An object with the following properties.
|
|
97020
|
+
* @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html Error} named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals.
|
|
97021
|
+
*
|
|
97022
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html#queryFeatureCount Read more...}
|
|
97023
|
+
*/
|
|
97024
|
+
queryFeatureCount(query?: QueryProperties, options?: PointCloudLayerViewQueryFeatureCountOptions): Promise<number>;
|
|
97025
|
+
/**
|
|
97026
|
+
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against points in the layer view
|
|
97027
|
+
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
97028
|
+
*
|
|
97029
|
+
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all points on the client are returned along with their attributes specified in {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html#availableFields availableFields}. To only return points visible in the view, set the `geometry` parameter in the query object to the view's visible area.
|
|
97030
|
+
* @param options An object with the following properties.
|
|
97031
|
+
* @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html Error} named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals.
|
|
97032
|
+
*
|
|
97033
|
+
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-PointCloudLayerView.html#queryFeatures Read more...}
|
|
97034
|
+
*/
|
|
97035
|
+
queryFeatures(query?: QueryProperties, options?: PointCloudLayerViewQueryFeaturesOptions): Promise<FeatureSet>;
|
|
96963
97036
|
}
|
|
96964
97037
|
|
|
96965
97038
|
interface PointCloudLayerViewProperties extends LayerViewProperties {
|
|
@@ -96969,6 +97042,18 @@ declare namespace __esri {
|
|
|
96969
97042
|
name?: string;
|
|
96970
97043
|
}
|
|
96971
97044
|
|
|
97045
|
+
export interface PointCloudLayerViewQueryExtentOptions {
|
|
97046
|
+
signal?: AbortSignal | nullish;
|
|
97047
|
+
}
|
|
97048
|
+
|
|
97049
|
+
export interface PointCloudLayerViewQueryFeatureCountOptions {
|
|
97050
|
+
signal?: AbortSignal | nullish;
|
|
97051
|
+
}
|
|
97052
|
+
|
|
97053
|
+
export interface PointCloudLayerViewQueryFeaturesOptions {
|
|
97054
|
+
signal?: AbortSignal | nullish;
|
|
97055
|
+
}
|
|
97056
|
+
|
|
96972
97057
|
export class SceneLayerView extends LayerView {
|
|
96973
97058
|
/**
|
|
96974
97059
|
* A list of attribute fields fetched for each feature including fields required for layer
|
|
@@ -97031,7 +97116,7 @@ declare namespace __esri {
|
|
|
97031
97116
|
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features in the layer view and
|
|
97032
97117
|
* returns the 3D {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-Extent.html Extent} of features that satisfy the query.
|
|
97033
97118
|
*
|
|
97034
|
-
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features
|
|
97119
|
+
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features on the client are returned.
|
|
97035
97120
|
* @param options An object with the following properties.
|
|
97036
97121
|
* @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html Error} named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals.
|
|
97037
97122
|
*
|
|
@@ -97042,7 +97127,7 @@ declare namespace __esri {
|
|
|
97042
97127
|
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features in the layer view
|
|
97043
97128
|
* and returns the number of features that satisfy the query.
|
|
97044
97129
|
*
|
|
97045
|
-
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features
|
|
97130
|
+
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features on the client are returned. To only return features visible in the view, set the `geometry` parameter in the query object to the view's visible area.
|
|
97046
97131
|
* @param options An object with the following properties.
|
|
97047
97132
|
* @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html Error} named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals.
|
|
97048
97133
|
*
|
|
@@ -97053,7 +97138,7 @@ declare namespace __esri {
|
|
|
97053
97138
|
* Executes a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-Query.html Query} against features in the layer view
|
|
97054
97139
|
* and returns a {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-FeatureSet.html FeatureSet}.
|
|
97055
97140
|
*
|
|
97056
|
-
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features
|
|
97141
|
+
* @param query Specifies the attributes and spatial filter of the query. When no parameters are passed to this method, all features on the client are returned along with their attributes specified in {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-views-layers-SceneLayerView.html#availableFields availableFields}. To only return features visible in the view, set the `geometry` parameter in the query object to the view's visible area.
|
|
97057
97142
|
* @param options An object with the following properties.
|
|
97058
97143
|
* @param options.signal Signal object that can be used to abort the asynchronous task. The returned promise will be rejected with an {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-core-Error.html Error} named `AbortError` when an abort is signaled. See also [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController) for more information on how to construct a controller that can be used to deliver abort signals.
|
|
97059
97144
|
*
|
|
@@ -131108,8 +131193,8 @@ declare namespace __esri {
|
|
|
131108
131193
|
*
|
|
131109
131194
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GridControls-GridControlsViewModel.html#gridColor Read more...}
|
|
131110
131195
|
*/
|
|
131111
|
-
get gridColor(): Color;
|
|
131112
|
-
set gridColor(value: ColorProperties);
|
|
131196
|
+
get gridColor(): Color | nullish;
|
|
131197
|
+
set gridColor(value: ColorProperties | nullish);
|
|
131113
131198
|
/**
|
|
131114
131199
|
* This is the snapping options object that will be configured by the 'enable snapping' property.
|
|
131115
131200
|
*
|
|
@@ -131139,7 +131224,7 @@ declare namespace __esri {
|
|
|
131139
131224
|
*
|
|
131140
131225
|
* {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-support-GridControls-GridControlsViewModel.html#gridColor Read more...}
|
|
131141
131226
|
*/
|
|
131142
|
-
gridColor?: ColorProperties;
|
|
131227
|
+
gridColor?: ColorProperties | nullish;
|
|
131143
131228
|
/**
|
|
131144
131229
|
* Sets the interactive placement state, either starting or ending a draw operation that implicitly adjusts the grid.
|
|
131145
131230
|
*
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clone as e}from"../../../core/lang.js";import{millisecondsPerTimeUnit as t}from"../../../core/timeUtils.js";import{polygonCentroid as i,extentCentroid as s}from"../../../geometry/support/centroid.js";import{getPolygonExtent as a,getGeometryExtent as r}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as n}from"../../../geometry/support/quantizationUtils.js";import{isValid as o,equals as l}from"../../../geometry/support/spatialReferenceUtils.js";import u from"./AttributesBuilder.js";import{cleanFromGeometryEngine as c,getGeometry as m,transformCentroid as d}from"./geometryUtils.js";import{project as h}from"./projectionSupport.js";import{getDateInNumber as p}from"./queryUtils.js";import{makeEdgeCandidate as f,makeVertexCandidate as y}from"./SnappingCandidate.js";import{isDateField as g,isDateOnlyField as x,isTimestampOffsetField as T,isStringField as I,isTimeOnlyField as F}from"../../support/fieldUtils.js";import _ from"../../../rest/support/AutoIntervalBinParameters.js";import V from"../../../rest/support/DateBinParameters.js";import v from"../../../rest/support/FixedBoundariesBinParameters.js";import b from"../../../rest/support/FixedIntervalBinParameters.js";import{isNullCountSupported as S,calculateStringStatistics as R,calculateStatistics as B,processSummaryStatisticsResult as z,calculateUniqueValuesCount as A,createUVResult as w,calculateClassBreaks as M,resolveCBResult as P,calculateHistogram as D,getAttributeComparator as q,calculatePercentile as N,binIndex as Z,getBinParams as j}from"../../../statistics/utils.js";const G="bin";class C{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new u(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,o=new Set;for(const l of s){const{statisticType:s}=l,a="exceedslimit"!==s?l.onStatisticField:void 0;if(!n.has(a)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}n.set(a,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:s,items:a}=u[t],r=s.join(",");i&&!e.validateItems(a,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(this.query.outStatistics){e=this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items)}else e=this._createFeatureQueryResponse(this.query);if(this.query.returnQueryGeometry){const t=this.query.geometry;o(this.query.outSR)&&!l(t.spatialReference,this.query.outSR)?e.queryGeometry=c({spatialReference:this.query.outSR,...h(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=c({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const i=this.featureAdapter,s=O(this.hasZ,this.hasM),{point:a,mode:r}=e,n="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,m=this._getPointCreator(r,this.spatialReference,t),d=new H(null,0),h=new H(null,0),p={x:0,y:0,z:0};for(const g of this.items){const t=i.getGeometry(g);if(null==t)continue;const{coords:r}=t,x=t.isPoint?Q:t.lengths;if(d.coords=r,h.coords=r,e.returnEdge){let e=0;for(let t=0;t<x.length;t++){const r=x[t],c=e;for(let t=0;t<r;t++,e+=s){if(!u&&t===r-1)continue;const y=d;y.coordsIndex=e;const x=h;x.coordsIndex=t===r-1?c:e+s;const T=p;if(!E(p,a,y,x))continue;const I=(a.x-T.x)/n,F=(a.y-T.y)/o,_=I*I+F*F;_<=1&&l.candidates.push(f(i.getObjectId(g),m(T),Math.sqrt(_),m(y),m(x)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<x.length;t++){const r=x[t],c=e,p=h;p.coordsIndex=c;for(let t=0;t<r;t++,e+=s){const s=d;if(s.coordsIndex=e,u&&t===r-1&&s.x===p.x&&s.y===p.y)continue;const c=(a.x-s.x)/n,h=(a.y-s.y)/o,f=c*c+h*h;f<=1&&l.candidates.push(y(i.getObjectId(g),m(s),Math.sqrt(f)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<x.length;i++){t.push(e);const a=x[i];e+=a*s,!u&&a>1&&t.push(e-s)}for(const s of t){const e=d;e.coordsIndex=s;const t=(a.x-e.x)/n,r=(a.y-e.y)/o,u=t*t+r*r;u<=1&&l.candidates.push(y(i.getObjectId(g),m(e),Math.sqrt(u)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,i){const s=null==i||l(t,i)?e=>e:e=>h(e,t,i),{hasZ:a}=this,r=0;return"3d"===e?a?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:r}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,m=this.fieldsIndex.get(t),d=g(m)||x(m)||T(m),h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u},this.items),p=S({normalizationType:a,normalizationField:s,minValue:n,maxValue:o}),f={value:.5,fieldType:m?.type},y=I(m)?R({values:h,supportsNullCount:p,percentileParams:f,outStatisticTypes:c}):B({values:h,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:p,percentileParams:f,outStatisticTypes:c});return z(y,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:n},this.items,!1),l=A(o);return w(l,s,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:m,timeZone:d}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items),p=M(h,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return P(p,n)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:m,timeZone:d}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items);return D(h,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),a=t[0],r=this.fieldsIndex.get(a),n=!!t[1]&&"desc"===t[1].toLowerCase(),o=q(r?.type,n);e.sort(((e,t)=>{const s=i(e,a,r),n=i(t,a,r);return o(s,n)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:a,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:m,resultRecordCount:d,resultOffset:h,returnZ:p,returnM:f}=e,y=null!=d&&t.length>(h||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&f,hasZ:a&&p,objectIdFieldName:r,spatialReference:c(u||o),transform:m&&n(m)||null}}_createFeatures(e,t){const i=new u(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:a}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:h,resultOffset:p,resultRecordCount:f,returnZ:y=!1,returnM:g=!1}=e,x=a&&y,T=s&&g;let I=[],F=0;const _=[...t];if(this._sortFeatures(_,r,((e,t,s)=>i.getFieldValue(e,t,s))),this.geometryType&&(l||c)){const e=n(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!c)for(const s of _){const a=this.featureAdapter.getGeometry(s),r={attributes:i.getAttributes(s),geometry:m(this.geometryType,this.hasZ,this.hasM,a,h,e,x,T)};t&&a&&!r.geometry&&(r.centroid=d(this,this.featureAdapter.getCentroid(s,this),e)),I[F++]=r}else if(!l&&c)for(const s of _)I[F++]={attributes:i.getAttributes(s),centroid:d(this,this.featureAdapter.getCentroid(s,this),e)};else for(const s of _)I[F++]={attributes:i.getAttributes(s),centroid:d(this,this.featureAdapter.getCentroid(s,this),e),geometry:m(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(s),h,e,x,T)}}else for(const n of _){const e=i.getAttributes(n);e&&(I[F++]={attributes:e})}const V=p||0;if(null!=f){const e=V+f;I=I.slice(V,Math.min(I.length,e))}return I}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const a of this.query.outStatistics??[])if("exceedslimit"===a.statisticType){t=null!=a.maxPointCount?a.maxPointCount:Number.POSITIVE_INFINITY,i=null!=a.maxRecordCount?a.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=a.maxVertexCount?a.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=O(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce(((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)}),0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],a=new Map,r=new Map,n=new Map,o=new Map,l=new u(e,this.featureAdapter,this.fieldsIndex),c=e.outStatistics,{groupByFieldsForStatistics:m,having:d,orderByFields:h,resultRecordCount:p}=e,f=m?.length,y=!!f,g=y?m[0]:null,x=y&&!this.fieldsIndex.get(g);for(const u of c??[]){const{outStatisticFieldName:e,statisticType:c}=u,h=u,p="exceedslimit"!==c?u.onStatisticField:void 0,T="percentile_disc"===c||"percentile_cont"===c,F="EnvelopeAggregate"===c||"CentroidAggregate"===c||"ConvexHullAggregate"===c,_=y&&1===f&&(p===g||x)&&"count"===c;if(y){if(!n.has(p)){const e=[];for(const i of m){const s=this._getAttributeValues(l,i,t,a);e.push(s)}n.set(p,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const i=n.get(p);if(!i)continue;const s=Object.keys(i);for(const r of s){const{count:s,data:n,items:u,itemPositions:c}=i[r],f=n.join(",");if(!d||l.validateItems(u,d)){const i=o.get(f)||{attributes:{}};if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(h,u);i.aggregateGeometries[t]=e}else{let r=null;if(_)r=s;else{const e=this._getAttributeValues(l,p,t,a),i=c.map((t=>e[t]));r=T&&"statisticParameters"in h?this._getPercentileValue(h,i):this._getStatisticValue(h,i,null,l.returnDistinctValues)}i.attributes[e]=r}let r=0;m.forEach(((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++r]=n[t])),o.set(f,i)}}}else if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(h,t);i.aggregateGeometries[s]=e}else{const s=this._getAttributeValues(l,p,t,a);i.attributes[e]=T&&"statisticParameters"in h?this._getPercentileValue(h,s):this._getStatisticValue(h,s,r,l.returnDistinctValues)}const V="min"!==c&&"max"!==c||!I(this.fieldsIndex.get(p))&&!this._isAnyDateField(p)?null:this.fieldsIndex.get(p)?.type;s.push({name:e,alias:e,type:V||"esriFieldTypeDouble"})}const T=y?Array.from(o.values()):[i];return this._sortFeatures(T,h,((e,t)=>e.attributes[t])),p&&(T.length=Math.min(p,T.length)),{fields:s,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return g(t)||x(t)||T(t)||F(t)}async _getAggregateGeometry(e,t){const{convexHull:n,union:o}=await import("../../../geometry/geometryEngineJSON.js"),{statisticType:l,outStatisticFieldName:u}=e,{featureAdapter:c,spatialReference:d,geometryType:h,hasZ:p,hasM:f}=this,y=t.map((e=>m(h,p,f,c.getGeometry(e)))),g=n(d,y,!0)[0],x={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===l){const e=g?a(g):r(o(d,y));x.aggregateGeometries={...e,spatialReference:d},x.outStatisticFieldName=u||"extent"}else if("CentroidAggregate"===l){const e=g?i(g):s(r(o(d,y)));x.aggregateGeometries={x:e[0],y:e[1],spatialReference:d},x.outStatisticFieldName=u||"centroid"}else"ConvexHullAggregate"===l&&(x.aggregateGeometries=g,x.outStatisticFieldName=u||"convexHull");return x}_getStatisticValue(e,t,i,s){const{onStatisticField:a,statisticType:r}=e;let n=null;n=i?.has(a)?i.get(a):I(this.fieldsIndex.get(a))||this._isAnyDateField(a)?R({values:t,returnDistinct:s}):B({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:a}=e,{value:r,orderBy:n}=s,o=this.fieldsIndex.get(i);return N(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const a=this.fieldsIndex.get(t),r=i.map((i=>e.getFieldValue(i,t,a)));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},a=t.length;for(let r=0;r<a;r++){const a=t[r],n=[];for(const t of e)n.push(t[r]);const o=n.join(",");null==s[o]?s[o]={count:1,data:n,items:[a],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(a),s[o].itemPositions.push(r))}return s}async _getDataValues(t,i,s=!0){const a=new u(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:n,timeZone:o}=t;return r?a.getExpressionValues(i,r,{viewingMode:"map",scale:n,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):a.getDataValues(i,e(t),s)}async _calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,a=t.min??0,r=t.max??0,n=s.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let o=0;o<e.length;o++){const t=e[o],l=i[o];if(null!=t&&t>=a&&t<=r){const e=Z(s,t);e>-1&&(n[e].count++,n[e].items.push(l))}}return n}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:a}=t,r=[],n=[{name:s??i,alias:s??i,type:a??"esriFieldTypeString"},{name:G,alias:G,type:"esriFieldTypeInteger"}],o=new u(e,this.featureAdapter,this.fieldsIndex),l=new Map,c=[...this.items];this._sortFeatures(c,[i],((e,t,i)=>o.getFieldValue(e,t,i)));const m=this._getAttributeValues(o,i,c,l),d=this._calculateUniqueValues([m],c,o.returnDistinctValues);for(const u in d){const{items:t}=d[u],a=await this._createBinsResponse(e,t);if(r.push(...a.features.map((e=>({...e,attributes:{...e.attributes,[s??i]:u}})))),a.fields)for(const e of a.fields)n.some((t=>t.name===e.name))||n.push(e)}return{fields:n,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(_.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(V.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(v.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(b.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:a,numBins:r,normalizationType:n,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),m=j(c,{field:s,normalizationField:a,normalizationType:n,normalizationTotal:o,numBins:r,minValue:p(l,!1),maxValue:p(u,!1)}),d=await this._calculateHistogramBins(c,m,i);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,i,s){const{field:a,interval:r,start:n,end:o}=e,l=r.unit,u="quarters"===l?3*t.months:t[l],c=r.value*u/t.milliseconds,m=await this._getDataValues({field:e.field,timeZone:i.outTimeReference?.ianaTimeZone},s),d=F(this.fieldsIndex.get(a)),h=j(m,{field:a,classificationMethod:"defined-interval",definedInterval:c,minValue:p(n,d),maxValue:p(o,d)},!0),f=await this._calculateHistogramBins(m,h,s);return this._createFeaturesFromHistogramBins(f,i)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,a=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),r=F(this.fieldsIndex.get(s)),n=e.boundaries.map((e=>p(e,r))).sort(((e,t)=>e-t)),o=[];for(let c=0;c<n.length-1;c++)o.push([n[c],n[c+1]]);const l={intervals:o,min:n.at(0),max:n.at(-1)},u=await this._calculateHistogramBins(a,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:a,start:r,end:n}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=F(this.fieldsIndex.get(s)),u=j(o,{field:s,classificationMethod:"defined-interval",definedInterval:a,minValue:p(r,l),maxValue:p(n,l)},!0),c=await this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,a=s||"lowerBoundary",r=i||"upperBoundary",n=[],o=[{name:a,alias:a,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:G,alias:G,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const m of e){const{minValue:e,maxValue:i,items:s}=m,d={attributes:{}};let h;if(d.attributes[a]=e,d.attributes[r]=i,l?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},s),d.attributes[G]=++c,"flat"===t.bin.jsonStyle?n.push(...h.features.map((({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...d.attributes}:{...t,...d.attributes}})))):(d.stackedAttributes=h.features.map((({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t)),n.push(d))):(t.bin?.splitBy&&(d.attributes[G]=++c),h=await this._createStatisticsQueryResponse(t,s,d),n.push(d)),h.fields)for(const t of h.fields)o.some((e=>e.name===t.name))||o.push(t)}return"desc"===t.binOrder&&n.reverse(),{fields:o,features:n}}}function E(e,t,i,s){const a=s.x-i.x,r=s.y-i.y,n=t.x-i.x,o=t.y-i.y,l=a*a+r*r;if(0===l)return!1;const u=n*a+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+a*c,e.y=i.y+r*c,!0}function O(e,t){return e?t?4:3:t?3:2}class H{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const Q=[1];export{C as QueryEngineResult};
|
|
5
|
+
import{clone as e}from"../../../core/lang.js";import{millisecondsPerTimeUnit as t}from"../../../core/timeUtils.js";import{polygonCentroid as i,extentCentroid as s}from"../../../geometry/support/centroid.js";import{getPolygonExtent as a,getGeometryExtent as r}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as n}from"../../../geometry/support/quantizationUtils.js";import{isValid as o,equals as l}from"../../../geometry/support/spatialReferenceUtils.js";import u from"./AttributesBuilder.js";import{cleanFromGeometryEngine as c,getGeometry as m,transformCentroid as d}from"./geometryUtils.js";import{project as h}from"./projectionSupport.js";import{getDateInNumber as p}from"./queryUtils.js";import{makeEdgeCandidate as f,makeVertexCandidate as y}from"./SnappingCandidate.js";import{isDateField as g,isDateOnlyField as x,isTimestampOffsetField as T,isStringField as I,isTimeOnlyField as F}from"../../support/fieldUtils.js";import _ from"../../../rest/support/AutoIntervalBinParameters.js";import V from"../../../rest/support/DateBinParameters.js";import v from"../../../rest/support/FixedBoundariesBinParameters.js";import b from"../../../rest/support/FixedIntervalBinParameters.js";import{isNullCountSupported as S,calculateStringStatistics as R,calculateStatistics as B,processSummaryStatisticsResult as z,calculateUniqueValuesCount as A,createUVResult as w,calculateClassBreaks as M,resolveCBResult as P,calculateHistogram as D,getAttributeComparator as q,calculatePercentile as N,binIndex as Z,getBinParams as j}from"../../../statistics/utils.js";const G="bin";class C{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasM=i.hasM,this.hasZ=i.hasZ,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new u(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,o=new Set;for(const l of s){const{statisticType:s}=l,a="exceedslimit"!==s?l.onStatisticField:void 0;if(!n.has(a)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}n.set(a,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:s,items:a}=u[t],r=s.join(",");i&&!e.validateItems(a,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(this.query.outStatistics){e=this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items)}else e=this._createFeatureQueryResponse(this.query);if(this.query.returnQueryGeometry){const t=this.query.geometry;o(this.query.outSR)&&!l(t.spatialReference,this.query.outSR)?e.queryGeometry=c({spatialReference:this.query.outSR,...h(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=c({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const i=this.featureAdapter,s=O(this.hasZ,this.hasM),{point:a,mode:r}=e,n="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,m=this._getPointCreator(r,this.spatialReference,t),d=new H(null,0),h=new H(null,0),p={x:0,y:0,z:0};for(const g of this.items){const t=i.getGeometry(g);if(null==t)continue;const{coords:r}=t,x=t.isPoint?Q:t.lengths;if(d.coords=r,h.coords=r,e.returnEdge){let e=0;for(let t=0;t<x.length;t++){const r=x[t],c=e;for(let t=0;t<r;t++,e+=s){if(!u&&t===r-1)continue;const y=d;y.coordsIndex=e;const x=h;x.coordsIndex=t===r-1?c:e+s;const T=p;if(!E(p,a,y,x))continue;const I=(a.x-T.x)/n,F=(a.y-T.y)/o,_=I*I+F*F;_<=1&&l.candidates.push(f(i.getObjectId(g),m(T),Math.sqrt(_),m(y),m(x)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<x.length;t++){const r=x[t],c=e,p=h;p.coordsIndex=c;for(let t=0;t<r;t++,e+=s){const s=d;if(s.coordsIndex=e,u&&t===r-1&&s.x===p.x&&s.y===p.y)continue;const c=(a.x-s.x)/n,h=(a.y-s.y)/o,f=c*c+h*h;f<=1&&l.candidates.push(y(i.getObjectId(g),m(s),Math.sqrt(f)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<x.length;i++){t.push(e);const a=x[i];e+=a*s,!u&&a>1&&t.push(e-s)}for(const s of t){const e=d;e.coordsIndex=s;const t=(a.x-e.x)/n,r=(a.y-e.y)/o,u=t*t+r*r;u<=1&&l.candidates.push(y(i.getObjectId(g),m(e),Math.sqrt(u)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,i){const s=null==i||l(t,i)?e=>e:e=>h(e,t,i),{hasZ:a}=this,r=0;return"3d"===e?a?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:r}):({x:e,y:t})=>s({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,m=this.fieldsIndex.get(t),d=g(m)||x(m)||T(m),h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u},this.items),p=S({normalizationType:a,normalizationField:s,minValue:n,maxValue:o}),f={value:.5,fieldType:m?.type},y=I(m)?R({values:h,supportsNullCount:p,percentileParams:f,outStatisticTypes:c}):B({values:h,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:p,percentileParams:f,outStatisticTypes:c});return z(y,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:n},this.items,!1),l=A(o);return w(l,s,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:m,timeZone:d}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items),p=M(h,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return P(p,n)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:m,timeZone:d}=e,h=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items);return D(h,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const t=s.split(" "),a=t[0],r=this.fieldsIndex.get(a),n=!!t[1]&&"desc"===t[1].toLowerCase(),o=q(r?.type,n);e.sort(((e,t)=>{const s=i(e,a,r),n=i(t,a,r);return o(s,n)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:a,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:m,resultRecordCount:d,resultOffset:h,returnZ:p,returnM:f}=e,y=null!=d&&t.length>(h||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&f,hasZ:a&&p,objectIdFieldName:r,spatialReference:c(u||o),transform:m&&n(m)||null}}_createFeatures(e,t){const i=new u(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:a}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:c,maxAllowableOffset:h,resultOffset:p,resultRecordCount:f,returnZ:y=!1,returnM:g=!1}=e,x=a&&y,T=s&&g;let I=[],F=0;const _=[...t];if(this._sortFeatures(_,r,((e,t,s)=>i.getFieldValue(e,t,s))),this.geometryType&&(l||c)){const e=n(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!c)for(const s of _){const a=this.featureAdapter.getGeometry(s),r={attributes:i.getAttributes(s),geometry:m(this.geometryType,this.hasZ,this.hasM,a,h,e,x,T),metadata:this.featureAdapter.getMetadata?.(s)};t&&a&&!r.geometry&&(r.centroid=d(this,this.featureAdapter.getCentroid(s,this),e)),I[F++]=r}else if(!l&&c)for(const s of _)I[F++]={attributes:i.getAttributes(s),centroid:d(this,this.featureAdapter.getCentroid(s,this),e)};else for(const s of _)I[F++]={attributes:i.getAttributes(s),centroid:d(this,this.featureAdapter.getCentroid(s,this),e),geometry:m(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(s),h,e,x,T),metadata:this.featureAdapter.getMetadata?.(s)}}else for(const n of _){const e=i.getAttributes(n);e&&(I[F++]={attributes:e})}const V=p||0;if(null!=f){const e=V+f;I=I.slice(V,Math.min(I.length,e))}return I}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const a of this.query.outStatistics??[])if("exceedslimit"===a.statisticType){t=null!=a.maxPointCount?a.maxPointCount:Number.POSITIVE_INFINITY,i=null!=a.maxRecordCount?a.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=a.maxVertexCount?a.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{const t=O(this.hasZ,this.hasM),i=this.featureAdapter;e=this.items.reduce(((e,t)=>{const s=i.getGeometry(t);return e+(null!=s&&s.coords.length||0)}),0)/t>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],a=new Map,r=new Map,n=new Map,o=new Map,l=new u(e,this.featureAdapter,this.fieldsIndex),c=e.outStatistics,{groupByFieldsForStatistics:m,having:d,orderByFields:h,resultRecordCount:p}=e,f=m?.length,y=!!f,g=y?m[0]:null,x=y&&!this.fieldsIndex.get(g);for(const u of c??[]){const{outStatisticFieldName:e,statisticType:c}=u,h=u,p="exceedslimit"!==c?u.onStatisticField:void 0,T="percentile_disc"===c||"percentile_cont"===c,F="EnvelopeAggregate"===c||"CentroidAggregate"===c||"ConvexHullAggregate"===c,_=y&&1===f&&(p===g||x)&&"count"===c;if(y){if(!n.has(p)){const e=[];for(const i of m){const s=this._getAttributeValues(l,i,t,a);e.push(s)}n.set(p,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const i=n.get(p);if(!i)continue;const s=Object.keys(i);for(const r of s){const{count:s,data:n,items:u,itemPositions:c}=i[r],f=n.join(",");if(!d||l.validateItems(u,d)){const i=o.get(f)||{attributes:{}};if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(h,u);i.aggregateGeometries[t]=e}else{let r=null;if(_)r=s;else{const e=this._getAttributeValues(l,p,t,a),i=c.map((t=>e[t]));r=T&&"statisticParameters"in h?this._getPercentileValue(h,i):this._getStatisticValue(h,i,null,l.returnDistinctValues)}i.attributes[e]=r}let r=0;m.forEach(((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++r]=n[t])),o.set(f,i)}}}else if(F){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(h,t);i.aggregateGeometries[s]=e}else{const s=this._getAttributeValues(l,p,t,a);i.attributes[e]=T&&"statisticParameters"in h?this._getPercentileValue(h,s):this._getStatisticValue(h,s,r,l.returnDistinctValues)}const V="min"!==c&&"max"!==c||!I(this.fieldsIndex.get(p))&&!this._isAnyDateField(p)?null:this.fieldsIndex.get(p)?.type;s.push({name:e,alias:e,type:V||"esriFieldTypeDouble"})}const T=y?Array.from(o.values()):[i];return this._sortFeatures(T,h,((e,t)=>e.attributes[t])),p&&(T.length=Math.min(p,T.length)),{fields:s,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return g(t)||x(t)||T(t)||F(t)}async _getAggregateGeometry(e,t){const{convexHull:n,union:o}=await import("../../../geometry/geometryEngineJSON.js"),{statisticType:l,outStatisticFieldName:u}=e,{featureAdapter:c,spatialReference:d,geometryType:h,hasZ:p,hasM:f}=this,y=t.map((e=>m(h,p,f,c.getGeometry(e)))),g=n(d,y,!0)[0],x={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===l){const e=g?a(g):r(o(d,y));x.aggregateGeometries={...e,spatialReference:d},x.outStatisticFieldName=u||"extent"}else if("CentroidAggregate"===l){const e=g?i(g):s(r(o(d,y)));x.aggregateGeometries={x:e[0],y:e[1],spatialReference:d},x.outStatisticFieldName=u||"centroid"}else"ConvexHullAggregate"===l&&(x.aggregateGeometries=g,x.outStatisticFieldName=u||"convexHull");return x}_getStatisticValue(e,t,i,s){const{onStatisticField:a,statisticType:r}=e;let n=null;n=i?.has(a)?i.get(a):I(this.fieldsIndex.get(a))||this._isAnyDateField(a)?R({values:t,returnDistinct:s}):B({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:a}=e,{value:r,orderBy:n}=s,o=this.fieldsIndex.get(i);return N(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const a=this.fieldsIndex.get(t),r=i.map((i=>e.getFieldValue(i,t,a)));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},a=t.length;for(let r=0;r<a;r++){const a=t[r],n=[];for(const t of e)n.push(t[r]);const o=n.join(",");null==s[o]?s[o]={count:1,data:n,items:[a],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(a),s[o].itemPositions.push(r))}return s}async _getDataValues(t,i,s=!0){const a=new u(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:n,timeZone:o}=t;return r?a.getExpressionValues(i,r,{viewingMode:"map",scale:n,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):a.getDataValues(i,e(t),s)}async _calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,a=t.min??0,r=t.max??0,n=s.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let o=0;o<e.length;o++){const t=e[o],l=i[o];if(null!=t&&t>=a&&t<=r){const e=Z(s,t);e>-1&&(n[e].count++,n[e].items.push(l))}}return n}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:a}=t,r=[],n=[{name:s??i,alias:s??i,type:a??"esriFieldTypeString"},{name:G,alias:G,type:"esriFieldTypeInteger"}],o=new u(e,this.featureAdapter,this.fieldsIndex),l=new Map,c=[...this.items];this._sortFeatures(c,[i],((e,t,i)=>o.getFieldValue(e,t,i)));const m=this._getAttributeValues(o,i,c,l),d=this._calculateUniqueValues([m],c,o.returnDistinctValues);for(const u in d){const{items:t}=d[u],a=await this._createBinsResponse(e,t);if(r.push(...a.features.map((e=>({...e,attributes:{...e.attributes,[s??i]:u}})))),a.fields)for(const e of a.fields)n.some((t=>t.name===e.name))||n.push(e)}return{fields:n,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(_.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(V.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(v.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(b.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:a,numBins:r,normalizationType:n,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),m=j(c,{field:s,normalizationField:a,normalizationType:n,normalizationTotal:o,numBins:r,minValue:p(l,!1),maxValue:p(u,!1)}),d=await this._calculateHistogramBins(c,m,i);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,i,s){const{field:a,interval:r,start:n,end:o}=e,l=r.unit,u="quarters"===l?3*t.months:t[l],c=r.value*u/t.milliseconds,m=await this._getDataValues({field:e.field,timeZone:i.outTimeReference?.ianaTimeZone},s),d=F(this.fieldsIndex.get(a)),h=j(m,{field:a,classificationMethod:"defined-interval",definedInterval:c,minValue:p(n,d),maxValue:p(o,d)},!0),f=await this._calculateHistogramBins(m,h,s);return this._createFeaturesFromHistogramBins(f,i)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,a=await this._getDataValues({field:s,timeZone:t.outTimeReference?.ianaTimeZone},i),r=F(this.fieldsIndex.get(s)),n=e.boundaries.map((e=>p(e,r))).sort(((e,t)=>e-t)),o=[];for(let c=0;c<n.length-1;c++)o.push([n[c],n[c+1]]);const l={intervals:o,min:n.at(0),max:n.at(-1)},u=await this._calculateHistogramBins(a,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:a,start:r,end:n}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),l=F(this.fieldsIndex.get(s)),u=j(o,{field:s,classificationMethod:"defined-interval",definedInterval:a,minValue:p(r,l),maxValue:p(n,l)},!0),c=await this._calculateHistogramBins(o,u,i);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,a=s||"lowerBoundary",r=i||"upperBoundary",n=[],o=[{name:a,alias:a,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:G,alias:G,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const m of e){const{minValue:e,maxValue:i,items:s}=m,d={attributes:{}};let h;if(d.attributes[a]=e,d.attributes[r]=i,l?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},s),d.attributes[G]=++c,"flat"===t.bin.jsonStyle?n.push(...h.features.map((({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...d.attributes}:{...t,...d.attributes}})))):(d.stackedAttributes=h.features.map((({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t)),n.push(d))):(t.bin?.splitBy&&(d.attributes[G]=++c),h=await this._createStatisticsQueryResponse(t,s,d),n.push(d)),h.fields)for(const t of h.fields)o.some((e=>e.name===t.name))||o.push(t)}return"desc"===t.binOrder&&n.reverse(),{fields:o,features:n}}}function E(e,t,i,s){const a=s.x-i.x,r=s.y-i.y,n=t.x-i.x,o=t.y-i.y,l=a*a+r*r;if(0===l)return!1;const u=n*a+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+a*c,e.y=i.y+r*c,!0}function O(e,t){return e?t?4:3:t?3:2}class H{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const Q=[1];export{C as QueryEngineResult};
|