Open justdave opened 9 years ago
OK, so this turns out to be a hard problem. In order to pull data for a county, I need a three-digit number for the county to give the NWS. These code numbers are pretty much arbitrarily defined (looks like they may have been numbered in alphabetical order in some cases). They have a mapping on their site of county names to code numbers, which the app uses to convert from the county you picked in the settings (the list of counties is also taken from their site, so they match). However I can find nothing for mapping from GPS coordinates to those NWS code numbers. I have found a few free services that'll let me throw GPS coordinates at them and they'll tell me what county those coordinates are in, but I've already noticed a few discrepancies (mostly in semantics or formatting) between the county names returned by those services and the ones in the lookup table on the NWS's website. That means if I use one of these services I'm going to have to make it do some intelligent guessing on which county from the NWS's table is the best match :|
Anyhow, this looks promising: http://www.silverbiology.com/blog/2009/01/26/county-lookup-from-coordinates/
And all of the above is no longer necessary. NWS now has direct support for this in their own API. #36 will fix this.
Correction, #36 will not fix this, but will make the fix substantially easier to implement. :-)
requested by Ben Spears via Play Store review.