views:

89

answers:

1

(Sorry, I couldn't come up with a better title - please feel free to suggest a better one in the comments.)

I'm looking for a way to provide a set of rules, and have specific areas/locations included/excluded based on these rules.

The ideal end result of the rules being a map showing excluded areas, and perhaps a way to extract to text information such as streetname, postcode (zip code), and so on.

As an example of some rules that could be applied:

  • Upto 20 minute drive to Specified Long/Lat.
  • Upto 30 minute cycling to Specified Location.
  • Upto 30 minute drive to a supermarket.
  • At least 2km from major airports.
  • At least 500m from railway tracks.
  • At least 200m from dual carriageways.
  • At least 100m from major roads.

An added bonus would be being able to check/filter on data not shown on traditional maps (broadband speeds, light pollution, crime rate, etc) and also allow rules to be specified for those.


Obviously this can all be done manually, but is a long-winded process which would really benefit from automation.

So, can this be done with Google Maps API, or any other similar mapping service?
(and if so, please provide basic examples on how to get started)

+1  A: 

Walk Score seems to work along these lines. It is arguable they solve the inverse problem - given a point of the map, where are the closest train station/bookstore/etc.? Please see how it works for the general idea.

Algorithmically, part of what you specify can be done using Dijkstra's Algorithm. Dijkstra suffices for distances from point locations. For non-point objects like airports, roads or railway tracks, you need algorithms from computational geometry for generating envelopes of these objects.

Here's a Youtube introduction lecture to the Google Map API. I believe that the API supports the needed atomic actions, but you will need to build the non-trivial logic around it.

The final point is getting proper data - This seems to be the toughest of them all.

Yuval F