I have a MS SQL database with a table that stores geocoded "PICKUP" locations which I eventually may or may not want to display depending on search filters the user selects. These are not static like a brick and mortar store locations. They are added by the applications users 24 hrs a day. The life of a "LOAD" is less than 24 Hrs. Once it has been picked up, the load is removed from the table. A "LOAD" is defined in the table with some basic demographic details along with specific LAT and LONG.
I am planning on using OpenStreetMaps to provide my base maps and also my interstate/roadway information. I am planning to use OpenLayers to display the map in my web App.
Truck Drivers refer to major interstates often as "Shipping Lanes". So I would like for my users to be able to search for "LOADS" that are that going be along the "SHIPPING LANE" they are going to be traveling. For example, I-95.
So if a user selects the I-95 "Shipping Lane" as a search filter, I only want the map to display "LOADS" that meet the following criteria:
- The "LOAD" is along the shipping lane defined.
- The "LOAD" is within a specific proximity of the shipping lane (for example, the load is located 3 miles off of I-95 in Richmond, VA). Ideally this would be based off of an actual interstate exit not just randomly along the highway somewhere.
All this leads me 开发者_如何学Pythonto 2 questions....
Q1: When a user posts a "LOAD" to the database, how bounce the LAT and LONG off something(?) to determine what "Shipping Lanes" (could be more than depending where interstates cross each other) it is along? (this could also be done at the time of searching but I think it would save processing to define this ahead of time unless it can not be done that way.)
Q2: How can I tell if the "LOAD" is located X miles off of a given "Shipping Lane"?
Check out geoserver, as it might make your life a bit easier. Perhaps, Couple Geoserver with openstreet map or bing maps and you'll be fine. A benefit to using geoserver, is that they got the mapping figured out, but if you know java or python, then it'll be easy for you to step in and add your functionality.
GeoEXt, adds functionality to geoserver, so it'll be worthwhile considering.
精彩评论