我想获取一些天气数据通过纬度和经度使用雅虎查询。但这个查询现在似乎不可用。查询如下:
select * from weather.forecast where woeid in (SELECT woeid FROM geo.placefinder WHERE text="{lat},{lon}" and gflags="R")此查询是否已更改为新查询或其他查询?或者它已经不复存在了?我上一次使用这种格式是在大约2个月前,它工作得很好。但是现在它不能获取任何数据。YQL控制台结果如下:
{
"error": {
"lang": "en-US",
"description": "Tenant 'query_yahooapis_com' access to 'Resource [tenantName=query_yahooapis_com, type=TABLE, name=geo.placefinder, locatorType=FILE, url=/home/y/share/manhattan/application/tenantBundles/yql_query_yahooapis_com_manhattan_v2/YQL-INF/restdefs/geo.placefinder.xml, useUrl=false]' is denied."
}
}我已经做了一些研究,包括这篇文章:How to get Yahoo's woeid by location?
雅虎真的已经终止了这个获取天气的纬度经度查询了吗?
发布于 2016-02-17 18:54:11
根据对this answer的最新回复,您应该切换到表geo.places并删除gflags="R"部件。我在YQL控制台中尝试了一下,它似乎起作用了:
select * from weather.forecast where woeid in (SELECT woeid FROM geo.places WHERE text="(latitude,longitude)")发布于 2018-08-01 19:43:22
这适用于我(您应该切换到表geo.places(1)):
..。
query = "SELECT * FROM weather.forecast " +
"WHERE woeid in (" +
"SELECT woeid " +
"FROM geo.places(1) " +
"WHERE text=\"(%1$s, %2$s)\") " +
"AND u='c'";..。然后:
query = String.format(query, location.getLatitude(), location.getLongitude());https://stackoverflow.com/questions/35220361
复制相似问题