Welcome to MapForums!

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

## get street numbers of crossing lines

This is a discussion on get street numbers of crossing lines within the MapPoint Desktop Discussion forums, part of the Map Forums category; I want to draw a line or polyline within a map and figure out the street numbers where this line ...

1. Junior Member Yellow Belt
Join Date
Dec 2005
Posts
17

## get street numbers of crossing lines

I want to draw a line or polyline within a map and figure out the street numbers where this line crosses a road (within a radius of a few metres from this crossing point). Maybe there's someone who's got an idea - I've got no one.

2. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi,

Looks easy. You know starting point and end point. Find addrss restults every 10 meter on the line. Streets are normlly wider so this resolution must go.

3. Junior Member Yellow Belt
Join Date
Dec 2005
Posts
17

## linestep

... every 10 meter on the line...

thank you for suggestion, - something like this was on my mind, but it failed by this point. I've got the start and end as geographical coordinates and don't know how to go along this line...
regards
martin

4. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi,

See following drawing:

Code:
B
/ |
/   |
/     |
/       |
c /         | a
/           |
/             |
/               |
/_________________|
A         b          C
you know from both points latitude and longitude. Substract them from each other and you know a (delta latitude) and b (delta longitude). First we calculate c (the distance between the points:
Code:
c &#58;= Sqrt&#40;Power&#40;a, 2&#41; + Power&#40;b, 2&#41;&#41;;
Now we calcualte A (the Angle):
Code:
A &#58;= ArcSin&#40;a / c&#41;;
Now the only thing that rest, is calculate a and b in steps of c until we are at the length of c.

Code:
a &#58;= Sin&#40;A&#41; * c_step;
b &#58;= Cos&#40;A&#41; * c_step;
So you have to add a and b by the latitude and longitude of the from A and you have the new point on the line.

Note that this is from the top of my head and I could mistake here and there. I also did not check these (Delphi) functions for degree or radians because you could have it idfferent in your programming language.

I also think we have to correct longitude for the latitude because this only count on the equator. Someone has a better view on this ? When I have some spare time I want to check, but difficult at the moment.

I hope this let you in the right direction

5. Junior Member Yellow Belt
Join Date
Dec 2005
Posts
17
Thank you very much, - of course it's a simple math function. I was thinking about formulas for eliptical bodys an so and had forgotten that I can neglect that for the short of the distance.
Sometimes there are knots in my head.
regards
martin

6. Senior Member Black Belt
Join Date
Nov 2004
Location
Belgium
Posts
2,433
Hi,

Sometime a solution is very simple. Ofthen we think too complicatied