Author |
Message |
24/06/2017 11:01:41
|
SearchSpecifics
Joined: 24/06/2017 02:49:31
Messages: 2
Offline
|
Hello Geonames Database Master.
For several years now the following geonames.org search URL has worked perfectly for me:
http://www.geonames.org/postalcode-search.html?q=14618&country=US
where q=0**** to q=9**** also worked as well returning a DECIMAL latitude/longitude coordinate pair. Which I used in my Python program with distance formula for any of you Pythonistas out there who may be interested for distances between two zip codes (decimal latitude / longitude coordinates)
Miles = Radius[0] * math.acos(math.sin(float(lat1)/57.29577951) * math.sin(float(lat2)/57.2957795) + math.cos(float(lat1)/57.29577951) * math.cos(float(lat2)/57.29577951) * math.cos(float(long2)/57.29577951 - float(long1)/57.29577951))
where Radius[0] = 3963 # 3437.74677 Nautical miles 6378.7 Kilometers
All joy, happiness and smiles until it didn't work anymore for all zip codes - depression, sadness and sorrow.
with a bleak, cryptic return of: No rows found for '14618'
On further examination I found this URL also worked/works
http://www.geonames.org/postalcode-search.html?q=Rochester&country=US
but returning only 0**** zip codes for little Rochester hamlets in New England.
Let's pick one Rochester, Vermont zip code 05767:
http://www.geonames.org/postalcode-search.html?q=05767&country=US
returning a nice: 43.88/-72.816 ... Beautiful!
But Aha!!, I found silver lining - a functional alternative!!!
http://www.geonames.org/search.html?q=14623&country=US
works but returns: Latitude: N 43° 9' 17'' Longitude: W 77° 36' 56''
Yeah, yeah I know, I guess I could program my own degree-minute-second to decimal conversion or better yet find a plug-n-chug code snippet on the Internet but from my view/opinion the "original" is more elegant and I feel really meant or intended for my purposes and those similar in a "production sense" so to speak: DECIMAL latitude/longitude coordinates.
I was wondering if a fix could be instituted in the near future so I could refer back to it from the band-aid work-around I found.
Thanks!
Joel S.
SearchSpecifics
|
|
|
24/06/2017 11:08:12
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4416
Offline
|
Hi Joel
There was a bug in the postal code search. It has just been fixed. Sorry for the inconvenience.
Best Regards
Marc
|
|
|
|
27/06/2017 09:44:22
|
SearchSpecifics
Joined: 24/06/2017 02:49:31
Messages: 2
Offline
|
Marc,
Thank you!! for your prompt attention to the issue I raised! Perhaps to the average guy on the street your geonames.org webpage and services may not seem that important.
Ha! Quite the contrary! A lot of people like myself tune their apps to your webpage / services and a change in format or worse a cessation of your webpage would mean major reworks and finding other sources which would be in my opinion a daunting task.
For instance without getting into too many specifics (no pun intended) my SearchSpecifics app in Clinical Trial (CT) Mode matches clinical trials for me with my prostate cancer and when I release it in the near future free in the public domain (no strings) other people can use it likewise for their diseases and maladies.
Where geonames.org comes in is generating a "ballpark - as the crow flies" mileage from my location to those of the clinical trials that post their location(s). Sometimes a given study/trial is being conducted concurrently in a few or more locations.
Anyway, I think you especially get the gist and a virtual tip of my hat and nod of appreciation directed your way! And no it was not too much of an inconvenience. Well done.
Regs,
SearchSpecifics
Joel S.
|
|
|
|