[OSM-talk] Announce: new version of Validator plugin

Francisco R. Santos frsantos at gmail.com
Wed Jun 13 09:29:08 BST 2007


Hi Frederik,

On 6/12/07, Frederik Ramm <frederik at remote.org> wrote:
>
> Quico,
>
> > * Check for crossing roads: ways with the tag "highway" that crosses in
> > same layer. Fix: none
>
> Perhaps one could also add waterways and railways to this? They should
> not cross in the same layer either (and should not cross each other in
> the same layer), with the exception of level railways crossings but
> these should always have a node "railway=level_crossing".


Yes, It could be added to. I'll do it when I  have some spare time.

I have the impression that checking gets slow quickly if you have a lot
> of segments. Do you perhaps check each segment against every other
> segment and suffer from O(n^2) because of that? Maybe this can be solved
> in a tricky way by dividing up the area and then doing checks for those
> segments in each bounding box only or so.


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.


> As always, you can download it from [1], and look for information in the
> > wiki [2]
>
> I may have missed an earlier post but is the source available somewhere?
> Would you perhaps consider putting in in SVN? I can see the validator
> plugin becoming quite important and I think it would be good if
> everybody could at least add their own checks or make modifications.


Yes, it is in SVN, in
http://svn.openstreetmap.org/applications/editors/josm/plugins/validator

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.

Bye
> Frederik
>
> --
> Frederik Ramm  ##  eMail frederik at remote.org  ##  N49°00.09' E008°23.33'
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20070613/b206df24/attachment.html>


More information about the talk mailing list