Jump to content

street address calculation


ainoy31

Recommended Posts

If you have a database that maps street addresses to long/lat coordinates it's fairly straight forward to calculate reasonably accurate distances as-the-crow-flys. Driving distance, I'm sure is very complicated - Not sure where it lies in their T&Cs but it might be possible to scrape Google Maps...

It would be nearly impossible to getting driving distance yourself.  You can't humanly possibly map out roads, and everything else yourself.  Google had literally THOUSANDS of people collecting data from around the world.  Collected street names, length's of street's, length's from street to street.  They did freeform calculations from one area to another to base other's off of.  That's not a solo 1 man project.

What you CAN do is make your "php script" visit www.mapquest.com or google maps, put in the 2 addresses, get the information and return it to your site without the use  knowing.

Maybe able to do it without it, but if you have problems, use curl.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.