Hi, I have array which has driving directions from point A to point B to point C ... point Z+1000 This means that I could potentially have hundreds or thousands of instructions like "turn right in 500 feet". Each array element that I have in the array has attributes, such as the distance of each step, and the time. However, if the directions are from New york city, to chicago, to florida, to texas and to california, I am obviously driving through many other states. What I need you to do is iterate through my array of directions (which is very detailed) and create a function that will return another array. The returned array should have the state two letter abbreviation as the element key, and an array as the value. The value should be time and distance. You can use mysql geospatial tool or a php geospatial tool to load the kml boundaries here is a link : [login to view URL]
## Deliverables
I also have a SECOND array. The second array contains all the lat/lng coordinates of EVERY SINGLE turn in the entire route (there are thousands).
What the final array should look like is this:
$arrTravelByState = array (
"NJ" => array ("distance" => 250, "time" => 493),
"PA" => array ("distance" => 300, "time" => 600)
)
This means that you should iterate through each step of directions, determine where the segment distances intersect with state boundaries (perhaps using the lat/lng positions of each turn maneuver) and then aggregate by that.
We have alot of tools available for you, so if you need geocoding, reverse gecoding, etc. we can give it to you.
You can use the state lat/lng boundaries csv or kml file:
[login to view URL]
Once you determine which points fall into which state boundary section, you can just add the straight line distances between all the points in a state's boundary.
1) All deliverables will be considered "work made for hire" under U.S. Copyright law. Employer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the employer on the site per the worker's Worker Legal Agreement).
2) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
3) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Employer's environment--Deliverables must be installed by the Worker in ready-to-run condition in the Employer's environment.
b) For all others including desktop software or software the employer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this project.
## Platform
php 5.3