(you may need to do a view source to see the actual RDF for that).Which is great, but you know, still a bit of pain to parse, what we need is some good old fashion JSON.First lets throw the geonames.org rdf file at triplr, as it says “Stuff in, triples out” and we all love triples!http://triplr.org/html/http://sws.geonames.org/5352844/about.rdfThat looks kinda neat, Golden Gate Bridge, in all sorts of languages (even if it’s not translated into all of them yet), the location and nearby stuff, that we’ll come back to in a tick.Now the magic, JSONifyed …http://triplr.org/json/http://sws.geonames.org/5352844/about.rdfHere’s a snippet of what you get:{ “triples” : [ { "subject" : { "value" : "http://sws.geonames.org/5352844/" , "type" : "uri" } , "predicate" : { "value" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#type" , "type" : "uri" } , "object" : { "value" : "http://www.geonames.org/ontology#Feature" , "type" : "uri" } },[... snip ...]{ “subject” : { “value” : “http://sws.geonames.org/5352844/” , “type” : “uri” } , “predicate” : { “value” : “http://www.w3.org/2003/01/geo/wgs84_pos#lat” , “type” : “uri” } , “object” : { “value” : “37.8196506″ , “type” : “literal” } }, { “subject” : { “value” : “http://sws.geonames.org/5352844/” , “type” : “uri” } , “predicate” : { “value” : “http://www.w3.org/2003/01/geo/wgs84_pos#long” , “type” : “uri” } , “object” : { “value” : “-122.4788612″ , “type” : “literal” } }, ], “count” : “48″,}So by using triplr.org, we can convert the lovely information from geonames.org into JSON.
Filed under: general, geotags | 3 Comments »