Hi Frederik,<br><br><div><span class="gmail_quote">On 6/12/07, <b class="gmail_sendername">Frederik Ramm</b> <<a href="mailto:frederik@remote.org">frederik@remote.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Quico,<br><br>> * Check for crossing roads: ways with the tag "highway" that crosses in<br>> same layer. Fix: none<br><br>Perhaps one could also add waterways and railways to this? They should<br>not cross in the same layer either (and should not cross each other in
<br>the same layer), with the exception of level railways crossings but<br>these should always have a node "railway=level_crossing".</blockquote><div><br>Yes, It could be added to. I'll do it when I have some spare time.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have the impression that checking gets slow quickly if you have a lot<br>of segments. Do you perhaps check each segment against every other
<br>segment and suffer from O(n^2) because of that? Maybe this can be solved<br>in a tricky way by dividing up the area and then doing checks for those<br>segments in each bounding box only or so.</blockquote><div><br>Yes, the O(n^2) is the problem, as each segments of a road is compared against all the segments of all roads in the same cell, which is a 1/100 of grade right now. I did a basic implementation, which scans n^2 cells along the segment, if it is very long, but have implemented a Bresenham algorithm for this case. I suppose there are no so many long segments, but anyway it should help a bit. However the Bresenham algorithm can skip the detection of corner cases. Other change should be reducing the cell size... I'm still testing.
<br><br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> As always, you can download it from [1], and look for information in the
<br>> wiki [2]<br><br>I may have missed an earlier post but is the source available somewhere?<br>Would you perhaps consider putting in in SVN? I can see the validator<br>plugin becoming quite important and I think it would be good if
<br>everybody could at least add their own checks or make modifications.</blockquote><div><br>Yes, it is in SVN, in </div><a href="http://svn.openstreetmap.org/applications/editors/josm/plugins/validator">http://svn.openstreetmap.org/applications/editors/josm/plugins/validator
</a><br><br>I can submit the changes I have right now if you want to look at it (and a new check for similar named ways, for detecting typos, that also suffer for O(n^2), though this is notably faster), because I won't be able to do anything in the next few weeks.
<br><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Bye<br>Frederik<br><br>--<br>Frederik Ramm ## eMail <a href="mailto:frederik@remote.org">
frederik@remote.org</a> ## N49°00.09' E008°23.33'<br></blockquote></div><br>