[OSM-dev] I've done some work on JOSM...
eAi at opencoding.net
Fri Apr 27 13:13:51 BST 2007
Frederik sent me some notes and I've used this to fix a few things which
should make this more useful.
The command now will make all the segments face the same direction as
the average for that way. This means that it will only reverse at most n
/ 2 - 1 segments in a way. This, combined with a "reverse way direction"
command should make things much easier to use. It will also only produce
a 'change command' if it does actually change anything, so if you select
200 roads and run it on all of them, you won't have to upload all 200 of
them, just the ones that have been fixed.
The main issue with the code as it is, is that it can't really cope with
ways that fork/branch properly. I'll look into solving this at some point.
I've attached the new code.
Martijn van Oosterhout wrote:
> On 4/27/07, Ed <eAi at opencoding.net> wrote:
>> What it essentially does is to Sort all the segments in a way
>> irresepective of the direction they're facing, it then makes all of them
>> face the same direction as the one on the end, it then reorders the
>> segments in the way. I think this is considerably easier than the
>> previous method which involved selecting each segment, switching it then
>> reordering them.
> Do you think it could try to minimize the number of reversed segments?
> It would be irritating it a 400 segment freeway got reversed because
> one segment at the end happened to be pointing the wrong way. Sure,
> easy to fix but it's would be nice if it didn't happen. Way order *is*
> somewhat important.
> Have a nice day,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6188 bytes
Desc: not available
More information about the dev