We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed last year.
The community reviewed whether to reopen this question last year and left it closed:
Original close reason(s) were not resolved
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
另一种选择:
优点:
缺点:
Another option:
Advantages:
Disadvantages:
您可能想看看 Tiger data 并查看其属性中是否包含包含县名的多边形。如果它是 Java Geotools API 可让您处理这些数据。您将对县多边形执行多边形中的点查询,然后进行要素属性查找。
You may want to have look at Tiger data and see if it has polygons containing the county name in an attribute. If it does the Java Geotools API lets you work with this data. You will be performing point in polygon queries for the county polygons followed by a feature attribute look-up.
也许这是一个很好的解决方案。它是 json 格式。我总是在我的项目中使用它。
http://maps.google.com/maps/geo?ll=10.345561,123.896932
并使用php简单地提取信息。
Maybe this is a great solution.It is in a json format.I always use this in my projects.
http://maps.google.com/maps/geo?ll=10.345561,123.896932
And simply extract the information using php.
为了完整起见,我找到了另一个非常简单的 API 来获取这些数据,所以我想分享一下。
https://geo.fcc.gov/api/census/
FCC 提供了一个 Block API正是针对这个问题,它使用人口普查数据来执行查找。
他们的使用限制政策是(来自[电子邮件受保护])
Just for completeness, I found another API to get this data that is quite simple, so I thought I'd share.
https://geo.fcc.gov/api/census/
The FCC provides an Block API for exactly this problem and it uses census data to perform the look up.
Their usage limit policy is (From [email protected])
Google 确实会为您的示例填充县,
http://maps.googleapis.com/maps/api/geocode/json?latlng=39.76144296429947,-104.8011589050293&sensor=false
在响应中,查看键
下方地址组件
其中包含代表“Adams”
县的对象,这里是来自地理编码 API 的文档,
Google does populate the county for your example,
http://maps.googleapis.com/maps/api/geocode/json?latlng=39.76144296429947,-104.8011589050293&sensor=false
In the response, look under the key
address_components
which contains this object representing"Adams"
county,Here's from the Geocoding API's docs,