[英]AGOL hosted feature service returns more features than maxRecordCount
I'm doing some experiments with ArcGIS Online hosted feature services in R using the sf package. 我正在使用sf包对R中的ArcGIS Online托管要素服务进行一些实验。
I cannot figure out why the response of this request contains more than 60k features: https://services.arcgis.com/nSZVuSZjHpEZZbRo/ArcGIS/rest/services/Rijksmonumenten/FeatureServer/0/query?where=1%3D1&outFields=%2A&returnCountOnly=false&f=geojson 我无法弄清楚为什么此请求的响应包含超过60k的功能: https ://services.arcgis.com/nSZVuSZjHpEZZbRo/ArcGIS/rest/services/Rijksmonumenten/FeatureServer/0/query ? where = 1%3D1 & outFields =% 2A & returnCountOnly = false&f = geojson
According to the service parameters maxRecordCount is 10000: https://services.arcgis.com/nSZVuSZjHpEZZbRo/ArcGIS/rest/services/Rijksmonumenten/FeatureServer/0?f=json 根据服务参数maxRecordCount为10000: https ://services.arcgis.com/nSZVuSZjHpEZZbRo/ArcGIS/rest/services/Rijksmonumenten/FeatureServer/0?f = json
I thought I had to use pagination, but that does not seem to be the case. 我以为我必须使用分页,但事实并非如此。 Thus I'm supprised. 因此我感到惊讶。 Can somebody please explain. 有人可以解释一下。
This is a link to my gist containing the R code: https://gist.github.com/FrieseWoudloper/47f4dcf68be39bff9dfaf2cd57610db3 这是包含R代码的我的要点的链接: https : //gist.github.com/FrieseWoudloper/47f4dcf68be39bff9dfaf2cd57610db3
Regards, Willy 问候,威利
Using the wireshark
network packet inspector, and changing the protocol scheme to http
from https
, you can see that st_read
is doing the pagination for you, and doing 7 requests to the server to get all the data. 使用wireshark
网络数据包检查器,并将协议方案从https
更改为http
,您可以看到st_read
正在为您进行分页,并向服务器发出了7个请求以获取所有数据。 Each request has a different request offset and then the resulting sets of 10,000 records plus the last few are concatenated. 每个请求具有不同的请求偏移量,然后将10,000条记录和最后几条记录的结果集串联在一起。
The GeoJSON driver of OGR is doing this so sf
gets it for free. OGR的GeoJSON驱动程序正在执行此操作,因此sf
可免费获得它。 I suspect its controlled by the FEATURE_SERVER_PAGING option documented here: 我怀疑它受此处记录的FEATURE_SERVER_PAGING选项控制:
https://www.gdal.org/drv_geojson.html# https://www.gdal.org/drv_geojson.html#
(Note I switched to http since its clearer to see what's going on with an unencrypted channel, the same thing happens with https) (请注意,我切换到http是因为它更清晰,可以看到未加密通道的情况,https也会发生同样的情况)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.