访问arcserver中的featureServer服务

时间:2021-12-23 07:45:04

1、在arcmap中加载图层,并发布成arcser服务(服务名dizhi),记住勾选FeatureServer服务

访问arcserver中的featureServer服务

2、在arcserver manger中查看刚才发布的服务

访问arcserver中的featureServer服务

访问arcserver中的featureServer服务

3、访问featureServer服务,点击你需要查询的图层,点击query

访问arcserver中的featureServer服务

访问arcserver中的featureServer服务

4、进行空间/属性查询

4.1 矩形查询,

1)不同geometry type对应的请求json体不同

2)注意wkid要与图层的实际坐标系一致

3)注意选对spatial relationShip

{
"xmin" : -39.72230000048876, "ymin" : 39.4294999986887, "xmax" : 117.51159999892116, "ymax" : 116.2474999986589, "spatialReference" : {"wkid" : 4326}
}

访问arcserver中的featureServer服务

访问arcserver中的featureServer服务

4.2 多边形查询

{"spatialReference":{"wkid":4326},"rings":[[[116.384364986,40.039909],[116.388749997,40.031357008],[116.344674008,40.025381008],[116.374935,39.976876],[116.374177985,39.966799],[116.363942007,39.966545008],[116.365736999,39.947788],[116.350887981,39.943271992],[116.349236007,39.950297992],[116.344225991,39.941639992],[116.321923009,39.941117008],[116.332123985,39.896072008],[116.307264997,39.895385992],[116.288962993,39.885485992],[116.288986987,39.895201],[116.246967989,39.896041],[116.245899998,39.919738],[116.200652001,39.916631008],[116.21386001,39.942016],[116.179902007,39.968564008],[116.178847002,39.984368008],[116.172802019,39.986765992],[116.163747982,39.975508],[116.161237986,39.985751992],[116.15215802,39.982583008],[116.144892009,39.992270008],[116.169415984,40.004894992],[116.127775988,40.029275992],[116.070831991,40.031969008],[116.064728012,40.060328992],[116.042608984,40.085131],[116.077815019,40.117957],[116.123925983,40.113464008],[116.126868,40.120393],[116.164493,40.122776992],[116.15800602,40.138400992],[116.171509998,40.143125992],[116.176315979,40.156936],[116.19604898,40.160159992],[116.203419997,40.139378008],[116.240920985,40.134947008],[116.234223004,40.107223],[116.250273012,40.103438008],[116.256816021,40.109501008],[116.256590013,40.095524008],[116.267295981,40.094390008],[116.273849009,40.078694008],[116.284293021,40.082093008],[116.296847,40.058915008],[116.337135979,40.054],[116.340725017,40.062374008],[116.363762009,40.068056992],[116.37613599,40.059959008],[116.360202985,40.051757008],[116.363239,40.045489]]]}

访问arcserver中的featureServer服务

 备注:空间请求json格式参考:

https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm