• 0

[VB.NET] Detect if an address is within an area


Question

Hey gang,

I hope that everyone says goodbye to 2008 and hello to 2009 in a fun way!

Q: I am going to need to see if an address is within a specificed area based on street names. In the image attached I have drawn (in Paint) the boundaries on 7th Ave, 38th Street, 5th Ave, and 33rd street. I would need to know if the address stated, in this case 1 W 34th street would be the within that boundary, but how would I programatically find this info. I was taking a peek at MS MapPoint and Google's site. However I am open to all forms, but this cannot cost too much. My current gig does not have LOTS of cash.

Thanks, and I hope we all have a better 2009 than 2008 (not MY fav year)

post-45653-1230740582.jpg

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

::BUMP::

I know this is New Years week, and it's Friday so I also know that bumping this tread might be a bit of a waste... but I thought I'd see if anyone had ANY thoughts about this issue.

Thanks.

Link to comment
Share on other sites

  • 0

The best you will most likely be able to do without selling your left leg is check if it is within a zip code.

edit: well, the other ungodly annoying thing you could do would be making an array of EVERY address in that area and check if they entered an address from the array.

Link to comment
Share on other sites

  • 0

The ZIP code idea won't work because, for example, here in NYC the area shown in my example could be two zip codes (I live less than a mile from work, but my home and work zip code are different)

The array of address is.... well, a thought. And I will seriously consider it.

Thank you very much for the input.

I'm trying to push our company to purchase MSDN, then I can call MS about how to achieve this in MapPoint.

Link to comment
Share on other sites

  • 0

Seems like there is an easier solution. I haven't attempted this but was just thinking about how i would solve this. Find the latitude and longitude points of the 4 corners of the boundary you want to test the address for (you would need to go down to seconds for the coordinates) and then do some simple if statements to determine if coordinates of the address are within the coordinates of the boundary.

Link to comment
Share on other sites

  • 0

Delta5,

Thanks for the idea. I will give it some thought. I do know that I can get the Lat/Long of a specific address, I just have to think about the issue of the start and end address of each street.

The issue is we have to give our users a number of ways to state what area that the will deliver within:

1) Radius. This is easy to figure out

2) ZIP Code. Also easy

3) Within given street addresses. The example I show in my first post is the easy example where 4 streets create a box, (wonderful Manhattan!) but most cities and towns do not have this semitry. We HAVE to allow the end-users to choose the selection of streets that are their boundary, and then find out if a given address is within that boundary.

You're idea of the lat/long of the begining and ending of each street is worth thinking about. Thank you kindly.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.