用途:在 ArcGIS Maps SDK for JavaScript 中执行空间分析、几何运算、调用 ArcGIS REST 服务,以及做要素聚合(聚类/分箱)。
主要能力:
- 几何运算:bufferOperator、geodesicBufferOperator、intersectOperator、unionOperator、differenceOperator、clipOperator、convexHullOperator、centroidOperator、containsOperator、withinOperator、intersectsOperator、distanceOperator、geodeticLengthOperator、geodeticAreaOperator、simplifyOperator、densifyOperator、projectOperator。多数运算需先 await operator.load() 再 execute。
- 三维分析对象:ElevationProfileAnalysis、LineOfSightAnalysis、ViewshedAnalysis、ShadowCastAnalysis、SliceAnalysis,通过 view.analyses.add() 加入 SceneView。
- REST 服务:route.solve 路径规划、locator.addressToLocations 与 locationToAddress 地理编码/逆编码、geoprocessor.execute 地理处理、print.execute 打印、places.queryPlacesNearPoint 与 fetchPlace 地点查询。
- 要素查询统计:outStatistics 支持 sum、avg、max、min、count、stddev,可 groupByFieldsForStatistics 分组,也可结合 geometry 与 spatialRelationship 做空间统计。
- 要素聚合:featureReduction 设为 cluster 或 binning 配置,可聚合字段、渲染与弹窗;聚类中要素数量用 cluster_count。
使用方式:按需从 @arcgis/core 导入对应模块,加载运算符后调用 execute;REST 服务传入服务 URL 与参数对象并 await 结果。TypeScript 下聚合配置建议用 as const 保证类型安全。
适用场景:缓冲区、相交、投影等客户端空间运算;三维视域、通视、阴影、剖面、剖切分析;路径规划、地址解析、地理处理与地图打印;地点检索;要素统计与聚类/分箱可视化。
限制:多数运算符使用前必须 load;部分 REST 服务(路径、地理编码)需要 API key;视域、通视等分析仅在 SceneView(三维)中可用;统计查询返回的是带计算属性的要素而非原始数值。资料未提供收费、价格与平台信息。