Hi guys,(adsbygoogle = window.adsbygoogle || []).push({});

I have a really tricky problem here and I'm hoping that there is a math guru here who can help.

The problem

Using Google maps, I need to allow a user to draw a line. This line can be in any direction and basically, I need to determine if the user has drawn the line over a road and if so, how many.

Below is an example:

The image doesn't seem to be showing so here is the link: http://postimg.org/image/iuj9e8jfj [Broken]

With Google Directions service, I am able to get the nearest road of the dropped marker (markers indicated by arrow in image).

For a single road, I believe that I can do this with Pythagoras, but for multiple roads by brain starts to boil.

If anyone here could help, I'd really appreciate it. I appreciate it is pretty tough so I'm open to all suggestions.

Thanks!

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Calculate number of roads/lines a line crosses

Loading...

Similar Threads - Calculate number roads | Date |
---|---|

Finding a cube root of a number without using calculator . | Apr 27, 2015 |

How to calculate the possible number of combinations | Mar 10, 2015 |

Calculating mean from 5 number summary | Jan 14, 2015 |

Need digital root calculation for large numbers | Jul 11, 2014 |

Calculating the number of terms in sequences | Nov 13, 2013 |

**Physics Forums - The Fusion of Science and Community**