Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3391838
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:50:58+00:00 2026-05-18T03:50:58+00:00

I have a location (latitude & longitude). How can I get a list of

  • 0

I have a location (latitude & longitude). How can I get a list of zipcodes that are either partially or fully within the 10 mile radius of my location?

The solution could be a call to a well known web service (google maps, bing maps, etc…) or a local database solution (the client has sql server 2005) or an algorithm.

I have seen the somewhat similar question, but all the answers there pretty much pertain to using SQL Server 2008 geography functionality which is unavailable to me.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:50:59+00:00Added an answer on May 18, 2026 at 3:50 am

    Firstly, you’ll need a database of all zipcodes and their corresponding latitudes and longitudes. In Australia, there are only a few thousand of these (and the information is easily available), however I assume it’s probably a more difficult task in the US.

    Secondly, given you know where you are, and you know the radius you are looking for, you can look up all zipcodes that fall within that radius. Something simple written in PHP would be as follows: (apologies it’s not in C#)

    function distanceFromTo($latitude1,$longitude1,$latitude2,$longitude2,$km){
      $latitude1  = deg2rad($latitude1);
      $longitude1 = deg2rad($longitude1);
      $latitude2  = deg2rad($latitude2);
      $longitude2 = deg2rad($longitude2);
      $delta_latitude  = $latitude2  - $latitude1;
      $delta_longitude = $longitude2 - $longitude1;
      $temp = pow(sin($delta_latitude/2.0),2) + cos($latitude1) * cos($latitude2) * pow(sin($delta_longitude/2.0),2);
      $earth_radius = 3956;
      $distance = $earth_radius * 2 * atan2(sqrt($temp),sqrt(1-$temp));
      if ($km)
        $distance = $distance * 1.609344;
      return $distance;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have latitude and longitude of a location and i want to find nearby
i have latitude and longitude columns in location table in PostgreSQL database, and I
I have model with a location, which itself has a latitude and longitude. What
I have an application called Location. Location has Country, State, City, Big_City_Nearby, Longitude, latitude.
I have a Location that can have Events. I want to have an upcoming_events
I have a database table of all zipcodes in the US that includes city,state,latitude
I have the longitude and latitude from a location manager, now I am trying
I have country and address. How can I retrieve latitude and longitude from Google
I am having Current Location Latitude & Longitude with me. I am getting the
I have a latitude and longitude that is fixed, so I used that and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.