查询第 1000-1200 行的地理名称
我一直在向 Geonames 查询每个州的公园。大多数情况下,每个州有不到 1000 个公园,但我刚刚查询了康涅狄格州,那里只有不到 1200 个公园。
我已经通过此查询获得了 1-1000:
但增加maxRows 到 1200 给出一个错误,我一次查询太多。有没有办法查询 1000-1200 行?
我真的不知道如何使用他们的 API 来做到这一点。
谢谢!
I have been querying Geonames for parks per state. Mostly there are under 1000 parks per state, but I just queried Conneticut, and there are just under 1200 parks there.
I already got the 1-1000 with this query:
But increasing the maxRows to 1200 gives an error that I am querying for too many at once. Is there a way to query for rows 1000-1200 ?
I don't really see how to do it with their API.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该在查询中使用
startRow
参数到页面结果。文档指出它采用整数值(基于0
的索引)并且应该是因此,要获取接下来的 1000 个数据点 (1000-1999),您应该将查询更改为
我建议将
maxRows
减少到可管理的范围 - 这样会减少他们的服务器上的负载和有助于更快地响应您的查询。You should be using the
startRow
parameter in the query to page results. The documentation notes that it takes an integer value (0
based indexing) and should beSo to get the next 1000 data points (1000-1999), you should change your query to
I'd suggest reducing the
maxRows
to something manageable as well - something that will put less of a load on their servers and make for quicker responses to your queries.