Register to reply

Calculate number of roads/lines a line crosses

by Rich2020
Tags: crosses, line, number, roads or lines
Share this thread:
Rich2020
#1
Jun18-14, 03:45 AM
P: 4
Hi guys,

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: View image: map basic

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!
Phys.Org News Partner Mathematics news on Phys.org
'Moral victories' might spare you from losing again
Fair cake cutting gets its own algorithm
Effort to model Facebook yields key to famous math problem (and a prize)
adjacent
#2
Jun18-14, 03:53 AM
PF Gold
adjacent's Avatar
P: 1,463
I really don't understand what you want to do. Do you want to calculate he number of roads the line is intersecting?
Rich2020
#3
Jun18-14, 04:08 AM
P: 4
Quote Quote by adjacent View Post
I really don't understand what you want to do. Do you want to calculate he number of roads the line is intersecting?
Yes, exactly that :)


Register to reply

Related Discussions
Calculate the wave number corresponding to the most energetic spectral line Biology, Chemistry & Other Homework 3
Orthogonal Lines and their line element General Math 2
Calculate point on line, perpendicular and intersecting another line in 3d space Differential Geometry 1
Looking for a method to calculate what number are used to make a number General Math 5
Adding two lines, what is the equation of the new line? Precalculus Mathematics Homework 5