I understand very little of this, but am using genomes to geocode photos with a Ruby script and wondered why different formats are returned and if a standard format could be requested.
For example neighbourhood returns:
Code:
{"adminName2"=>"Los Angeles County", "adminCode2"=>"037", "adminCode1"=>"CA", "countryName"=>"United States", "name"=>"Hollywood Riviera", "countryCode"=>"US", "city"=>"Torrance", "adminName1"=>"California"}
Nice and simple.
But findNearbyPlaceNameJSON returns:
Code:
{"geonames":[{"countryId":"6252001","adminCode1":"CA","countryName":"United States","fclName":"city, village,...","countryCode":"US","lng":"-118.3798","fcodeName":"populated place","distance":"1.02747","toponymName":"Clifton","fcl":"P","name":"Clifton","fcode":"PPL","geonameId":5338011,"lat":"33.82752","adminName1":"California","population":0}]}
with the (to me) superfluous {"geonames":[ and closing extras at the end. This has to be stripped away. Actually I don't yet know how to strip it away without turning it into a string, then can't use array methods to retrieve the desired data.
I think geonames is great, and maybe this isn't the place to discuss my issues. If so where?
Thanks