Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

More visual feedback when merging ways leads to non-rendering tags #924

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 5 comments
Closed

Comments

@openstreetmap-trac
Copy link

Reporter: richard
[Submitted to the original trac issue database at 12.15pm, Tuesday, 27th May 2008]

Make it a bit clearer when a user merges two ways and the result is "highway=trunk;primary" or similar. Maybe have a little '!' in the tag, or an unhappy face, or something.

(Would need to have a list of tags where a ';' is expected, e.g. description=, note=, to avoid false positives.)

@openstreetmap-trac
Copy link
Author

Author: openstreetmap[at]rational.co.za
[Added to the original trac issue at 8.45pm, Friday, 19th September 2008]

When users shift click roads with different names, Potlatch will happily assume it's one way with multiple names and separate the names with semicolons. Roads with multiple names are quite rare, so the default behavior should be to prompt the user, like JOSM does.

I'm changing it to a major defect, because an end user product should not make it easy to make mistakes.

For example, johng has been an OSM member for more than a year and it still happened to him :
http://www.openstreetmap.org/browse/way/4948937/history

He did not even knew what happened :
http://lists.openstreetmap.org/pipermail/talk-za/2008-September/000279.html

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 9.29pm, Friday, 19th September 2008]

You can change it to 'critical' for all you like - it won't get it fixed any faster unless you are prepared to contribute a patch. Are you?

@openstreetmap-trac
Copy link
Author

Author: openstreetmap[at]rational.co.za
[Added to the original trac issue at 11.10pm, Friday, 19th September 2008]

Well, the simplest will just be to change mergeWay in way.as so that it refuses to merge ways when any of the tags are in conflict.

   OSMWay.prototype.mergeWay=function(topos,otherway,frompos) {
                var i,z;

+z=otherway.attr;
+for (i in z) {

  • if (otherway.attr[i].substr(0,6)=='(type ') {}
  • else if (this.attr[i].substr(0,6)=='(type ') {}
  • else if (this.attr[i]) {
  • if (this.attr[i]!=otherway.attr[i] && otherway.attr[i]) { return; }
  • }
    +}
    if (this.oldversion>0 || otherway.oldversion>0) { return; }

So

  • I have reported it on trac and not to osm-talk, as you requested earlier.
  • I've presented a patch
  • I haven't tested it.
  • I haven't documented it.
  • I haven't added a friendly error message. But there isn't one for trying to merge ways that are not sharing an end point either.
  • I haven't checked it in.

4 reasons why this bug will stay open I guess.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 6.34am, Saturday, 20th September 2008]

No, that's utterly great and you have very pleasantly surprised me. :)

Testing and checking in is no problem; documentation to the level of the rest of Potlatch would be about two comments, so that's fine. Friendly error message - well, yes, I'd like one; but tbh actually having someone make the effort, for once, to contribute a patch makes me so much more likely to want to "complete the job", if you see what I mean. So the bug won't stay open - not for long anyway.

Cheers.

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 11.36am, Saturday, 20th September 2008]

Fixed in 0.10c (well, the second version thereof) with friendly error message.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant