It is currently July 21st, 2019, 9:39 am

free open geocoding apis

Tips and Tricks from the Rainmeter Community
User avatar
moshi
Posts: 1851
Joined: November 13th, 2012, 9:53 pm

Re: free open geocoding apis

moshi » April 21st, 2013, 5:34 pm

moshi wrote: but the Yahoo! api returns Rostock instead of Stockholm, other apis like Yandex or Google work fine. somehow Yahoo! seems to shuffle the letters. :?
i think i know why this happens. other geocoding services do have the Russian (or Bulgarian, etc.) names in their database in Cyrillic. Yahoo! does not and probably transcribes the Cyrillic letters to the Latin alphabet, results are rather mixed.
User avatar
moshi
Posts: 1851
Joined: November 13th, 2012, 9:53 pm

Re: free open geocoding apis

moshi » September 6th, 2013, 1:40 pm

jsmorley wrote:Looks like the api doesn't support it, but what would be really cool would be to enter a Lat/Long and have it "find" the nearest valid weather location code. Sometimes the closest "town/city" seems like it should be correct, but many folks could get even more accurate weather results since there are actually defined locations Yahoo knows about that are not intuitive to the user. For instance, my mailing address is "Fairfax", but "Chantilly" works better for accurate weather.

Lat and Long most folks can get from their phones...
if you are still interested in this you might want to have a look at the OpenWeatherMap api, they recently added that: http://openweathermap.org/API

now get me a Rainmeter plugin that returns the coordinates from a GPS sensor. i might grab a Surface Pro when the firesale starts :)
User avatar
moshi
Posts: 1851
Joined: November 13th, 2012, 9:53 pm

Re: free open geocoding apis

moshi » January 27th, 2014, 6:47 pm

as an addition to this thread, YQL's geo.concordance table is nice when you need a GeoNames id, Wikipedia article id, FIPS id, etc

the YQL console code should look like this:
http://developer.yahoo.com/yql/console/

Code: Select all

select * from geo.concordance where namespace="woeid" and text in (select woeid from geo.places(0,1) where text="London")
this will return a GeoNames id of 2643743 which is used in the BBC weather feeds for example:
http://open.live.bbc.co.uk/weather/feeds/en/2643743/observations.rss

or a Wikipedia id of 17867:
https://en.wikipedia.org/w/index.php?curid=17867
User avatar
moshi
Posts: 1851
Joined: November 13th, 2012, 9:53 pm

Re: free open geocoding apis

moshi » January 27th, 2014, 7:04 pm

jsmorley wrote:Looks like the api doesn't support it, but what would be really cool would be to enter a Lat/Long and have it "find" the nearest valid weather location code. Sometimes the closest "town/city" seems like it should be correct, but many folks could get even more accurate weather results since there are actually defined locations Yahoo knows about that are not intuitive to the user. For instance, my mailing address is "Fairfax", but "Chantilly" works better for accurate weather.

Lat and Long most folks can get from their phones...

Code: Select all

select * from yahoo.maps.findLocation where q="38.8942786,-77.4310992" and gflags="R"
:)
User avatar
moshi
Posts: 1851
Joined: November 13th, 2012, 9:53 pm

Re: free open geocoding apis

moshi » January 27th, 2014, 7:09 pm

or even better:

Code: Select all

select * from weather.forecast where woeid in (select ResultSet.Results.woeid from yahoo.maps.findLocation where q="38.8942786,-77.4310992" and gflags="R") and u="f"

Code: Select all

http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20weather.forecast%20where%20woeid%20in%20(select%20ResultSet.Results.woeid%20from%20yahoo.maps.findLocation%20where%20q%3D%2238.8942786%2C-77.4310992%22%20and%20gflags%3D%22R%22)%20and%20u%3D%22f%22&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys
Last edited by moshi on February 17th, 2014, 10:55 am, edited 1 time in total.
User avatar
moshi
Posts: 1851
Joined: November 13th, 2012, 9:53 pm

Re: free open geocoding apis

moshi » February 17th, 2014, 10:55 am

this is just something i did using an example for the Yandex Maps API. maybe somebody familiar with Javascript could add WOEID finding capabilities.
screenshot-Internet Explorer (Microsoft (R)-HTML-Anwendungshost) [mshta]-17.02.2014 , 11_42_05-001.png
CoordinatesFinder.zip
You do not have the required permissions to view the files attached to this post.