ArcGIS特征层提取所有记录

发布于 2025-02-10 08:15:24 字数 439 浏览 0 评论 0 原文

我正在使用请求库查询ArcGIS功能服务URL。查询数据时,我只收到2000个记录,但是我的ArcGIS REST API包含90000条记录。如何在ArcGIS特征层中提取所有记录。我使用了以下代码。

import requests
params = {
    "token": token,
    "f": "json",  
    "where": "1=1",
    "returnGeometry": "false",
    "outFields": "*",
    "returnCountOnly":"true",
    "outSR": 4326
    }
url = FEATURE_LAYER_URL
feature_layer_responce = requests.post(url, params=params)
feature_layer_responce.json()

I am querying ARCGIS feature service URL using requests library. when querying the data i got only 2000 records but my arcgis rest api contains 90000 records. How to extract all the records in the arcgis feature layer. I have used the following code.

import requests
params = {
    "token": token,
    "f": "json",  
    "where": "1=1",
    "returnGeometry": "false",
    "outFields": "*",
    "returnCountOnly":"true",
    "outSR": 4326
    }
url = FEATURE_LAYER_URL
feature_layer_responce = requests.post(url, params=params)
feature_layer_responce.json()

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽袖吟 2025-02-17 08:15:24

您的ArcGIS功能服务限制了每个请求的记录数量。您需要更改其余端点的 maxRecordCount 值:


以防万一您只需要ID:

虽然响应中包含的功能数量有限制(请参阅功能服务的 maxRecordCount 属性),但ID数组中返回的对象ID的数量没有限制回复。客户端可以通过指定 returnIdsonly = true 并随后请求对象ID子集的功能集来利用它以获取所有查询对象ID。

Your ArcGIS feature service limits the number of records for each request. You would need to change the maxRecordCount value for the REST endpoint:


In case if you only need the IDs:

While there is a limit to the number of features included in the response (see the maxRecordCount property of the feature service), there is no limit to the number of object IDs returned in the ID array response. Clients can exploit this to get all the query conforming object IDs by specifying returnIdsOnly=true and subsequently requesting feature sets for subsets of object IDs.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文