If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Radius Search
Hello,
I am looking for methods either custom or commercial to select cities in an Access database along with the cites in the database within a selected radius. For example if the user selected Chicago Ill and and a 100 miles radius, all of the cities within 100 miles of Chicago would be returned and could be directed to a table. If anyone has done this or knows of a website I can check out which orfers it, I would appreciate the lead. God Bless, Mark A. Sam |
#2
|
|||
|
|||
Hi,
Even if the question seems simple, there are many cases, such as do you use geological or spherical coordinates for your cities, or just a so call 2D plane (x, y), or even else, do you use a list of path (roads) between points and want to know what you can reach traveling less than 100 miles? The easiest one is the 2D case (the path can be easy if you already have the "tableau" of minimum distances between any point to any point): you remove those outside the square with sides of 200 miles, centered on the point, which is a simple comparison, then, use the equation of the circle to remove the few extra points that are in the square, but not in the circle: SELECT a.* FROM Cities As a WHERE a.x BETWEEN givenX-100 AND givenX + 100 AND a.y BETWEEN givenY-100 AND givenY + 100 AND (a.x-givenX)^2 + ( a.y-givenY) ^2 = 100^2 That assumes you have the (x, y) value for all cities (or point of interest). The WHERE clause is generally evaluated as supplied, from left to right, and optimized so that if u AND v is to be evaluated, and u is false, then v is not evaluated since the conjunction would be false (short-circuit evaluation). Place the more complex expression last should help (for the speed of execution). Hoping it may help, Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Hello, I am looking for methods either custom or commercial to select cities in an Access database along with the cites in the database within a selected radius. For example if the user selected Chicago Ill and and a 100 miles radius, all of the cities within 100 miles of Chicago would be returned and could be directed to a table. If anyone has done this or knows of a website I can check out which orfers it, I would appreciate the lead. God Bless, Mark A. Sam |
#3
|
|||
|
|||
Hello Michel,
It does help, greatly and it seems like 2D plane case is sufficient, adding 5 or 10% to the selected radius. It is to list available loads for Truckers in an area they are interested in, so I am just looking to include loads from the surrounding areas. I guess with that, the question is where does one get the table data? Is it available from the government? Try to find out if they even have the information is like pulling teeth from a chicken...lol. Thank you for your response and God Bless, Mark "Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message ... Hi, Even if the question seems simple, there are many cases, such as do you use geological or spherical coordinates for your cities, or just a so call 2D plane (x, y), or even else, do you use a list of path (roads) between points and want to know what you can reach traveling less than 100 miles? The easiest one is the 2D case (the path can be easy if you already have the "tableau" of minimum distances between any point to any point): you remove those outside the square with sides of 200 miles, centered on the point, which is a simple comparison, then, use the equation of the circle to remove the few extra points that are in the square, but not in the circle: SELECT a.* FROM Cities As a WHERE a.x BETWEEN givenX-100 AND givenX + 100 AND a.y BETWEEN givenY-100 AND givenY + 100 AND (a.x-givenX)^2 + ( a.y-givenY) ^2 = 100^2 That assumes you have the (x, y) value for all cities (or point of interest). The WHERE clause is generally evaluated as supplied, from left to right, and optimized so that if u AND v is to be evaluated, and u is false, then v is not evaluated since the conjunction would be false (short-circuit evaluation). Place the more complex expression last should help (for the speed of execution). Hoping it may help, Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Hello, I am looking for methods either custom or commercial to select cities in an Access database along with the cites in the database within a selected radius. For example if the user selected Chicago Ill and and a 100 miles radius, all of the cities within 100 miles of Chicago would be returned and could be directed to a table. If anyone has done this or knows of a website I can check out which orfers it, I would appreciate the lead. God Bless, Mark A. Sam |
#4
|
|||
|
|||
Michel,
Can I email you personally with a question? If yes, send me your email address to msam AT Truckloads DOT net Thanks "Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message ... Hi, Even if the question seems simple, there are many cases, such as do you use geological or spherical coordinates for your cities, or just a so call 2D plane (x, y), or even else, do you use a list of path (roads) between points and want to know what you can reach traveling less than 100 miles? The easiest one is the 2D case (the path can be easy if you already have the "tableau" of minimum distances between any point to any point): you remove those outside the square with sides of 200 miles, centered on the point, which is a simple comparison, then, use the equation of the circle to remove the few extra points that are in the square, but not in the circle: SELECT a.* FROM Cities As a WHERE a.x BETWEEN givenX-100 AND givenX + 100 AND a.y BETWEEN givenY-100 AND givenY + 100 AND (a.x-givenX)^2 + ( a.y-givenY) ^2 = 100^2 That assumes you have the (x, y) value for all cities (or point of interest). The WHERE clause is generally evaluated as supplied, from left to right, and optimized so that if u AND v is to be evaluated, and u is false, then v is not evaluated since the conjunction would be false (short-circuit evaluation). Place the more complex expression last should help (for the speed of execution). Hoping it may help, Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Hello, I am looking for methods either custom or commercial to select cities in an Access database along with the cites in the database within a selected radius. For example if the user selected Chicago Ill and and a 100 miles radius, all of the cities within 100 miles of Chicago would be returned and could be directed to a table. If anyone has done this or knows of a website I can check out which orfers it, I would appreciate the lead. God Bless, Mark A. Sam |
#5
|
|||
|
|||
Hi,
Have you ever take a look at Microsoft MapPoint 2002 as example? you get graphical representation, not a "data" representation (but you can write VBA code). "Mark A. Sam" wrote in message ... Hello Michel, It does help, greatly and it seems like 2D plane case is sufficient, adding 5 or 10% to the selected radius. It is to list available loads for Truckers in an area they are interested in, so I am just looking to include loads from the surrounding areas. I guess with that, the question is where does one get the table data? Is it available from the government? Try to find out if they even have the information is like pulling teeth from a chicken...lol. Thank you for your response and God Bless, Mark "Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message ... Hi, Even if the question seems simple, there are many cases, such as do you use geological or spherical coordinates for your cities, or just a so call 2D plane (x, y), or even else, do you use a list of path (roads) between points and want to know what you can reach traveling less than 100 miles? The easiest one is the 2D case (the path can be easy if you already have the "tableau" of minimum distances between any point to any point): you remove those outside the square with sides of 200 miles, centered on the point, which is a simple comparison, then, use the equation of the circle to remove the few extra points that are in the square, but not in the circle: SELECT a.* FROM Cities As a WHERE a.x BETWEEN givenX-100 AND givenX + 100 AND a.y BETWEEN givenY-100 AND givenY + 100 AND (a.x-givenX)^2 + ( a.y-givenY) ^2 = 100^2 That assumes you have the (x, y) value for all cities (or point of interest). The WHERE clause is generally evaluated as supplied, from left to right, and optimized so that if u AND v is to be evaluated, and u is false, then v is not evaluated since the conjunction would be false (short-circuit evaluation). Place the more complex expression last should help (for the speed of execution). Hoping it may help, Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Hello, I am looking for methods either custom or commercial to select cities in an Access database along with the cites in the database within a selected radius. For example if the user selected Chicago Ill and and a 100 miles radius, all of the cities within 100 miles of Chicago would be returned and could be directed to a table. If anyone has done this or knows of a website I can check out which orfers it, I would appreciate the lead. God Bless, Mark A. Sam |
#6
|
|||
|
|||
Hi,
It is preferable to ask here, so if I don't know the answer, maybe someone else do. Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Michel, Can I email you personally with a question? If yes, send me your email address to msam AT Truckloads DOT net Thanks "Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message ... Hi, Even if the question seems simple, there are many cases, such as do you use geological or spherical coordinates for your cities, or just a so call 2D plane (x, y), or even else, do you use a list of path (roads) between points and want to know what you can reach traveling less than 100 miles? The easiest one is the 2D case (the path can be easy if you already have the "tableau" of minimum distances between any point to any point): you remove those outside the square with sides of 200 miles, centered on the point, which is a simple comparison, then, use the equation of the circle to remove the few extra points that are in the square, but not in the circle: SELECT a.* FROM Cities As a WHERE a.x BETWEEN givenX-100 AND givenX + 100 AND a.y BETWEEN givenY-100 AND givenY + 100 AND (a.x-givenX)^2 + ( a.y-givenY) ^2 = 100^2 That assumes you have the (x, y) value for all cities (or point of interest). The WHERE clause is generally evaluated as supplied, from left to right, and optimized so that if u AND v is to be evaluated, and u is false, then v is not evaluated since the conjunction would be false (short-circuit evaluation). Place the more complex expression last should help (for the speed of execution). Hoping it may help, Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Hello, I am looking for methods either custom or commercial to select cities in an Access database along with the cites in the database within a selected radius. For example if the user selected Chicago Ill and and a 100 miles radius, all of the cities within 100 miles of Chicago would be returned and could be directed to a table. If anyone has done this or knows of a website I can check out which orfers it, I would appreciate the lead. God Bless, Mark A. Sam |
#7
|
|||
|
|||
Michel,
It isn't a technical question. "Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message ... Hi, It is preferable to ask here, so if I don't know the answer, maybe someone else do. Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Michel, Can I email you personally with a question? If yes, send me your email address to msam AT Truckloads DOT net Thanks "Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message ... Hi, Even if the question seems simple, there are many cases, such as do you use geological or spherical coordinates for your cities, or just a so call 2D plane (x, y), or even else, do you use a list of path (roads) between points and want to know what you can reach traveling less than 100 miles? The easiest one is the 2D case (the path can be easy if you already have the "tableau" of minimum distances between any point to any point): you remove those outside the square with sides of 200 miles, centered on the point, which is a simple comparison, then, use the equation of the circle to remove the few extra points that are in the square, but not in the circle: SELECT a.* FROM Cities As a WHERE a.x BETWEEN givenX-100 AND givenX + 100 AND a.y BETWEEN givenY-100 AND givenY + 100 AND (a.x-givenX)^2 + ( a.y-givenY) ^2 = 100^2 That assumes you have the (x, y) value for all cities (or point of interest). The WHERE clause is generally evaluated as supplied, from left to right, and optimized so that if u AND v is to be evaluated, and u is false, then v is not evaluated since the conjunction would be false (short-circuit evaluation). Place the more complex expression last should help (for the speed of execution). Hoping it may help, Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Hello, I am looking for methods either custom or commercial to select cities in an Access database along with the cites in the database within a selected radius. For example if the user selected Chicago Ill and and a 100 miles radius, all of the cities within 100 miles of Chicago would be returned and could be directed to a table. If anyone has done this or knows of a website I can check out which orfers it, I would appreciate the lead. God Bless, Mark A. Sam |
#8
|
|||
|
|||
Mappoint is for realtime location tracking. I need data for calulation to
display results. I am not interested where a truck is at any particular time, becuase the data pertains to where it will be unloading and where it needs to go. A database of distances between cites is what I need, but that may be expansive. I am thinking that some type of routing algorithm needs to be involved. Thanks again. "Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message ... Hi, Have you ever take a look at Microsoft MapPoint 2002 as example? you get graphical representation, not a "data" representation (but you can write VBA code). "Mark A. Sam" wrote in message ... Hello Michel, It does help, greatly and it seems like 2D plane case is sufficient, adding 5 or 10% to the selected radius. It is to list available loads for Truckers in an area they are interested in, so I am just looking to include loads from the surrounding areas. I guess with that, the question is where does one get the table data? Is it available from the government? Try to find out if they even have the information is like pulling teeth from a chicken...lol. Thank you for your response and God Bless, Mark "Michel Walsh" vanderghast@VirusAreFunnierThanSpam wrote in message ... Hi, Even if the question seems simple, there are many cases, such as do you use geological or spherical coordinates for your cities, or just a so call 2D plane (x, y), or even else, do you use a list of path (roads) between points and want to know what you can reach traveling less than 100 miles? The easiest one is the 2D case (the path can be easy if you already have the "tableau" of minimum distances between any point to any point): you remove those outside the square with sides of 200 miles, centered on the point, which is a simple comparison, then, use the equation of the circle to remove the few extra points that are in the square, but not in the circle: SELECT a.* FROM Cities As a WHERE a.x BETWEEN givenX-100 AND givenX + 100 AND a.y BETWEEN givenY-100 AND givenY + 100 AND (a.x-givenX)^2 + ( a.y-givenY) ^2 = 100^2 That assumes you have the (x, y) value for all cities (or point of interest). The WHERE clause is generally evaluated as supplied, from left to right, and optimized so that if u AND v is to be evaluated, and u is false, then v is not evaluated since the conjunction would be false (short-circuit evaluation). Place the more complex expression last should help (for the speed of execution). Hoping it may help, Vanderghast, Access MVP "Mark A. Sam" wrote in message ... Hello, I am looking for methods either custom or commercial to select cities in an Access database along with the cites in the database within a selected radius. For example if the user selected Chicago Ill and and a 100 miles radius, all of the cities within 100 miles of Chicago would be returned and could be directed to a table. If anyone has done this or knows of a website I can check out which orfers it, I would appreciate the lead. God Bless, Mark A. Sam |
#9
|
|||
|
|||
Actually, I was looking at Mappoint 2004 information which I assumed would
give me the same details, but after reading a review of Mappoint 2002, I see what you mean and will look at this more closely. God Bless, Mark A. Sam |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Search Form | Jon Barker | Using Forms | 1 | August 17th, 2004 05:03 PM |
Search Facility Word | KW | New Users | 2 | August 17th, 2004 08:07 AM |
Search Engine | Scott Matheny | New Users | 1 | July 28th, 2004 08:39 PM |
Search Function | Matthew DeAngelis | General Discussion | 0 | July 21st, 2004 06:05 PM |
Search facility on an access database | [email protected] | Database Design | 0 | June 15th, 2004 04:57 PM |