简体   繁体   English

AGOL托管功能服务返回的功能比maxRecordCount多

[英]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.

相关问题 在 R 中使用 100 多个特性 lm 函数 - use more than 100 features lm function in R 硒返回的元素比预期的多 - Rselenium returns many more elements than expected 滚动返回一个以上值的函数 - rollapply with function that returns more than one value R xgb.importance 显示错误 - “feature_names 的元素少于模型中使用的特征” - R xgb.importance shows error - "feature_names has less elements than there are features used in the model" 如何从返回多个值的函数分配? - How to assign from a function which returns more than one value? 为什么在R中使用multinom()获得的系数多于特征? - Why I get more coefficients than I had features using multinom() in R? 在R中,脱字号包的RFE功能选择的功能超出尺寸允许的范围 - In R, caret package RFE function selects more features than allowed in size R:使用 Plot 绘制具有超过 15 个特征的 APcluster 结果的数据可视化 - R: Data visualization using Plot to plot APcluster result with more than 15 features R-caret createDataPartition返回的样本数多于预期 - R - caret createDataPartition returns more samples than expected geom_density返回的观察次数多于预期 - geom_density returns more observations than expected
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM