arcgis_rest_services_query.txt
参考:https://developers.arcgis.com/rest/services-reference/query-feature-service-layer-.htm
1.字段 Where:
1.0.查询所有:
input: 1=1
input: true (我猜的)
1.1.等于。
input: 管理情况 = '物业管理'
查询实例:
http://60.28.130.xxx:6080/arcgis/rest/services/HBFG/YFQ_Building_buffer/MapServer/0/query?where=%E7%AE%A1%E7%90%86%E6%83%85%E5%86%B5+%3D+%27%E7%89%A9%E4%B8%9A%E7%AE%A1%E7%90%86%27&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=4326&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=pjson
?where=管理情况+%3D+'物业管理'
1.2.包含。
input: 管理情况 like '%物业管理%'
查询实例:
http://60.28.130.xxx:6080/arcgis/rest/services/HBFG/YFQ_Building_buffer/MapServer/0/query?where=%E7%AE%A1%E7%90%86%E6%83%85%E5%86%B5+like+%27%25%E7%89%A9%E4%B8%9A%E7%AE%A1%E7%90%86%25%27&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=4326&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=pjson
1.3.多个字段 and:
input: 实际面积 = 3615.8 AND 房屋结构 like '%混合%' AND 地上层数 = 6
查询实例:
http://60.28.130.xxx:6080/arcgis/rest/services/HBFG/YFQ_Building_buffer/MapServer/0/query?where=%E5%AE%9E%E9%99%85%E9%9D%A2%E7%A7%AF+%3D+3615.8+AND+%E6%88%BF%E5%B1%8B%E7%BB%93%E6%9E%84+like+%27%25%E6%B7%B7%E5%90%88%25%27+AND+%E5%9C%B0%E4%B8%8A%E5%B1%82%E6%95%B0+%3D+6&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=4326&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=pjson
1.4.多个字段 and or:
input: 实际面积 = 3615.8 OR 地上层数 = 6
查询实例:
http://60.28.130.xxx:6080/arcgis/rest/services/HBFG/YFQ_Building_buffer/MapServer/0/query?where=%E5%AE%9E%E9%99%85%E9%9D%A2%E7%A7%AF+%3D+3615.8+OR+%E5%9C%B0%E4%B8%8A%E5%B1%82%E6%95%B0+%3D+6&text=&objectIds=&time=&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=4326&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=pjson
1.5.查询范围:
input:
// 查询范围。
let ringsStr = JSON.stringify(this.rings);
// %25的意思是,%。详见URL编码表。
// 需要注意的是,二三维的dataStr的rings有区别。二维的rings多一对[],
// 所以在dataStr中,不再需要额外加这对[]。
let dataStr = "?where=" + this.currentField + "+like+'%25" + this.currentContent + "%25'&text=&objectIds=&time=" +
"&geometry={'rings':[" + ringsStr + "]}" +
"&geometryType=esriGeometryPolygon&inSR=4326&spatialRel=esriSpatialRelIntersects&relationParam=&outFields=*&returnGeometry=true&maxAllowableOffset=&geometryPrecision=&outSR=4326&returnIdsOnly=false&returnCountOnly=false&orderByFields=&groupByFieldsForStatistics=&outStatistics=&returnZ=false&returnM=false&gdbVersion=&returnDistinctValues=false&f=pjson";
2.查询特定字段的唯一值(所有可能的值)
可以通过查询所有 feature 的特定字段的结果,自己编码挑选出来。
arcgis_rest_services_query.txt
最新推荐文章于 2021-01-18 09:43:17 发布