You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
2.9 KiB
9 lines
2.9 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
define("exports ./geohashUtils ../geometry/SpatialReference ../layers/graphics/featureConversionUtils ../layers/graphics/OptimizedGeometry ../layers/graphics/data/projectionSupport ../views/2d/layers/features/aggregation/AAggregateCell ../views/2d/layers/features/aggregation/AccumulatedStatistics".split(" "),function(m,v,n,h,k,p,w,x){class l extends w.AAggregateCell{static create(a,b,g,e){a=x.AccumulatedStatistics.create(a);const d=Array(32);for(let f=0;f<d.length;f++)d[f]=null;return new l(a,b,g, |
|
e,d)}constructor(a,b,g,e,d){super(a);this.xNode=b;this.yNode=g;this.depth=e;this.children=d;this._objectIds=new Set;this._yGeohashTotal=this._xGeohashTotal=this._yWorldTotal=this._xWorldTotal=this._count=0;this.next=null}get id(){return`${this.xNode}.${this.yNode}`}get containedObjectIds(){return this._objectIds}get count(){return this._count}clone(){const a=new l(this._statistics.clone(),this.xNode,this.yNode,this.depth,this.children);a._count=this._count;a._xWorldTotal=this._xWorldTotal;a._yWorldTotal= |
|
this._yWorldTotal;a._xGeohashTotal=this._xGeohashTotal;a._yGeohashTotal=this._yGeohashTotal;a.next=this.next;a._objectIds=new Set(this._objectIds);return a}insert(a,b,g,e,d,f){this._count+=1;this._xWorldTotal+=b;this._yWorldTotal+=g;this._xGeohashTotal+=e;this._yGeohashTotal+=d;this._statistics.insert(a,f);this._objectIds.add(a.getObjectId())}merge(a){if(0!==a._count){this._count+=a._count;this._xWorldTotal+=a._xWorldTotal;this._yWorldTotal+=a._yWorldTotal;this._xGeohashTotal+=a._xWorldTotal;this._yGeohashTotal+= |
|
a._yWorldTotal;this._statistics.merge(a._statistics);for(const b of a._objectIds.values())this._objectIds.add(b)}}getCentroid(a){throw Error("getCentroid not supported for GeohashNode");}getGeometry(a,b){const g=this._getLngLatBounds(),[e,d,f,c]=g;a=p.project({rings:[[[e,d],[e,c],[f,c],[f,d],[e,d]]]},n.WGS84,a);a=h.convertFromPolygon(new k,a,!1,!1);return null!=b?h.quantizeOptimizedGeometry(new k,a,!1,!1,"esriGeometryPolygon",b,!1,!1):a}getGeometricCentroid(a,b){const g=this._getLngLatBounds(),[e, |
|
d,f,c]=g;a=p.project({x:(e+f)/2,y:(d+c)/2},n.WGS84,a);a=h.convertFromPoint(new k,a);return null!=b?h.quantizeOptimizedGeometry(new k,a,!1,!1,"esriGeometryPoint",b,!1,!1):a}getAttributes(){const a={aggregateId:this.id};for(const b of this._statistics.values())a[b.field.name]=b.value;a.aggregateCount=this._count;return a}find(a,b,g,e,d,f){if(e>=g)return this;var c=1-e%2;const q=3*c+2*(1-c),r=2*c+3*(1-c),t=30-d-q,u=30-f-r;c=this.children[((a&7*c+3*(1-c)<<t)>>t)+((b&3*c+7*(1-c)<<u)>>u)*(8*c+4*(1-c))]; |
|
return null==c?null:c.find(a,b,g,e+1,d+q,f+r)}_getLngLatBounds(){var a=this.depth;const b=Math.ceil(a/2);a=Math.floor(a/2);return v.decodeGeohashXY({geohashX:this.xNode<<30-(3*b+2*a),geohashY:this.yNode<<30-(2*b+3*a)},this.depth)}}m.GeohashCell=l;Object.defineProperty(m,Symbol.toStringTag,{value:"Module"})}); |