gpt4 book ai didi

ArcGIS Server RESTAPI 查询某个 FeatureLayer 的要素个数

转载 作者:知者 更新时间:2024-03-13 05:32:03 26 4
gpt4 key购买 nike

以前学生的时候只知道 Server 能做个分析,能返回个图或者要素 JSON,RESTAPI 也是工作之后才逐渐知道的。

MapServer 和 FeatureServer 都能容纳 FeatureLayer,访问 FeatureLayer 的 RESTAPI 即

MapServer/{featureLayerIndex}
FeatureServer/{featureLayerIndex}

使用 query 接口查询要素个数

MapServer/{featureLayerIndex}/query?where=1%3D1&returnCountOnly=true&f=json
FeatureServer/{featureLayerIndex}/query?where=1%3D1&returnCountOnly=true&f=json

以官方 FeatureServer 为例(直接把下面的地址粘贴到浏览器窗口):

https://www.geosceneonline.cn/server/rest/services/2006%E8%87%B32021%E5%B9%B4%E4%B8%AD%E5%9B%BD%E5%9B%BD%E5%AE%B6%E7%BA%A7%E9%9D%9E%E7%89%A9%E8%B4%A8%E6%96%87%E5%8C%96%E9%81%97%E4%BA%A7%E7%A9%BA%E9%97%B4%E5%88%86%E5%B8%83/MapServer/0/query?where=1%3D1&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&distance=&units=esriSRUnit_Foot&relationParam=&outFields=&returnGeometry=false&returnTrueCurves=false&maxAllowableOffset=&geometryPrecision=&outSR=&havingClause=&returnIdsOnly=false&returnCountOnly=true&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&historicMoment=&returnDistinctValues=false&resultOffset=&resultRecordCount=&returnExtentOnly=false&datumTransformation=&parameterValues=&rangeValues=&quantizationParameters=&featureEncoding=esriDefault&f=json

返回

{
  "count": 3610
}

或者

https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/applyedits_fieldsTest/FeatureServer/0/query?where=1%3D1&returnCountOnly=true&f=pjson

返回

{
  "count": 16,
  "serverGens": {
    "minServerGen": 1848376,
    "serverGen": 4380974
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com