Skip to main content

Hi everybody!

I wrote some weeks ago about a new solution for our education department in order to get the nearest routes between one Adress and all the schools of the city.

thans your answers we could make a first version of it!

Now that we get more and more users we have seen 2 problems in our solution.

We have a point with the adress of the student and the lines of the streets (including the way from the door of the houses to the street). Usually you have some distance between the point and the vertex of the line. To get the point to the vertex of the line we use the AnchoredSnapper (snappint type: end point snapping; snapping distance 15, Add Additional vertex: never). And hier we get 2 problems.

  • If the point is on the line we get the result as “Untouched” instead of “Snapped”
  • If the point is too far away we get the same problem.

 

Is there any posibility to standarize it? I mean we want to cover all the posibilites: point is in a range of 15, is far away than 15 and is on the line.

 

Thanks in advance!

I’m not sure what your question is exactly?


Sorry! My Question is, how can I snap a point (Adress) to the nearest end of a line of my network of streets of the city.


My approach would be to first create a set of loose enpoints from the network lines. One way to do this is to use Snippers to get endpoints from lines and then get all not matching points using a Matcher. Then use this set as anchors in the AnchoreSnapper.

Personally I prefer to use the Neighbourfinder to do this, as this returns the distance to the closest candidate. This way it is more easy to see which points have to move big distance and analyse why.


Reply