First I should say that I've never gotten past high school algebra and that was many years ago. This is part of why I'm taking the approach that I am but also because of data structure limitations.
I'm trying to figure out a simple, or at least understandable, calculation to determine the variance in Longitude based on the given Latitude. I've spent hours online and found a lot of information but it is all either calculating distance or is far beyond me.
I have a zip code table that includes lat/long coordinates and am writing a store locator type solution in a web site. The user will enter a postal code and a distance resulting in a list of businesses in that range. If I try to create a radius search, the results take about 45 seconds to return because of the database that I'm using and the inability to store certain values during the calculation.
As an alternate approach, I've figured that I can simply calculate a quadrangle based on the lat/long of the users postal code and the distance they enter. So the result I'm looking for is the distance in miles and kilometers for 1 degree in longitude. Once I have that, I can apply the formula to stored lat/long values thus resulting in a fast calculation. Initially this will be used for the U.S. including Alaska and will later be applied to other countries at various latitudes.
Although the math is way beyond me, I do have all the basic functions available such as pi, cos, etc.
Thanks in advance for any help.
I'm trying to figure out a simple, or at least understandable, calculation to determine the variance in Longitude based on the given Latitude. I've spent hours online and found a lot of information but it is all either calculating distance or is far beyond me.
I have a zip code table that includes lat/long coordinates and am writing a store locator type solution in a web site. The user will enter a postal code and a distance resulting in a list of businesses in that range. If I try to create a radius search, the results take about 45 seconds to return because of the database that I'm using and the inability to store certain values during the calculation.
As an alternate approach, I've figured that I can simply calculate a quadrangle based on the lat/long of the users postal code and the distance they enter. So the result I'm looking for is the distance in miles and kilometers for 1 degree in longitude. Once I have that, I can apply the formula to stored lat/long values thus resulting in a fast calculation. Initially this will be used for the U.S. including Alaska and will later be applied to other countries at various latitudes.
Although the math is way beyond me, I do have all the basic functions available such as pi, cos, etc.
Thanks in advance for any help.