Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I have a database that has all zip codes in the US plus the lat and long of each zip code. I am trying to come with a way to get all zip codes within a certain distance of a zip code. I have figured the best way is to get a sqare around the origin (zip code) and then if then if the lat or long falls outside of this box, then reject it and if it falls within, then get it. I am having a problem though trying to establish a latitude and longitude from the starting point based on miles. If I could do this, then I could pass these two the database and retrieve all the zip codes in the area.

 

Does anyone have an idea of how to go about getting latitudes and longitudes of certain miles from a starting point?

 

Thanks, Chester

____________________________________________

http://www.pophamcafe.com

I am starting a developers section, more tutorials than anything.

Posted
Look up the haversine formula... im using it on two of my gps trackers. it calculates the distance between two points. in my search for that i found exactly what your looking for... do a google search the answers rigght in front of ya.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...