Receive a WOEID by Lat, Long with Yahoos API

后端 未结 11 1904
北荒
北荒 2020-12-07 17:57

i searched a while but found nothing, thats simular to my problem.

i\'m trying to use the YAHOO Weather API, for example: http://weather.yahooapis.com/forecastrss?w=

11条回答
  •  一整个雨季
    2020-12-07 18:40

    It is somewhat ridiculous that Yahoo doesn't provide a lookup method for WOEIDs via lat/lon--it's been on their todo list since 2008--but that's the state of things.

    I would caution you against using the suggested workaround implemented at Geomojo. If it works for your data, great, but the Yahoo service that Geomojo relies on is unpredictable. Geomojo uses Yahoo's PlaceMaker, which extracts location information from unstructured text to get a WOEID. It does this by creating a microformat containing your lat/lon pair and submitting it to PlaceMaker. However, since PlaceMaker returns WOEIDs for zip codes there's a loss of resolution and you will sometimes not be able to identify even the town for submitted coordinates. I have a number of example points on the east coast of the U.S. where the PlaceMaker WOEIDs do not correspond to the submitted lat/lon pairs.

    Strangely, as HD writes, only Flickr's API provides a simple way to lookup a WOEID from lat/lon. Flickr's findByLatLon method has great resolution. It will usually return a neighborhood (one level below town) for a pair of coordinates.

提交回复
热议问题