#21315 closed defect (fixed)
[Patch]Using buildings_tools with a double click produces invalid buildings
Reported by: | ff5722 | Owned by: | GerdP |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin buildings_tools | Version: | |
Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
See also attached .osm file with annotations
- Draw a building using buildings_tools
- Double click at the end so that the building is shaped like a one-dimensional line
...
What is the expected result?
A building with width zero is automatically converted to a line object having only 2 nodes. When the user would try to upload, they will be warned for having 'unclosed way - building' anyways, which is easier to fix than duplicated nodes (that requires first merging the nodes and then extruding the building, 2 steps instead of 1).
What happens instead?
...
- Check the result using JOSM validator and note the duplicated nodes error
- Use the create areas tool (shortcut: X) to fix the 'line' building)
- The building will still have duplicated nodes, the only way to solve it is to manually merge the dupes
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-09-03 03:12:33 +0200 (Fri, 03 Sep 2021) Build-Date:2021-09-03 01:31:19 Revision:18193 Relative:URL: ^/trunk Identification: JOSM/1.5 (18193 en) Windows 10 64-Bit OS Build number: Windows 10 Pro 2009 (19042) Memory Usage: 396 MB / 1820 MB (85 MB allocated, but free) Java version: 1.8.0_301-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Look and Feel: com.sun.java.swing.plaf.windows.WindowsLookAndFeel Screen: \Display0 1920×1080 (scaling 1.00×1.00) Maximum Screen Size: 1920×1080 Best cursor sizes: 16×16→32×32, 32×32→32×32 System property file.encoding: Cp1252 System property sun.jnu.encoding: Cp1252 Locale info: en_US Numbers with default locale: 1234567890 -> 1234567890 Dataset consistency test: No problems found Plugins: + EasyPresets (1623509627) + FastDraw (35640) + buildings_tools (35756) + terracer (35640) + touchscreenhelper (35640) + utilsplugin2 (35792) Tagging presets: + <josm.pref>/EasyPresets.xml Last errors/warnings: - 00012.432 W: Update plugins - You updated your JOSM software. To prevent problems the plugins should be updated as well. Update plugins now?
Attachments (3)
Change History (19)
by , 4 years ago
Attachment: | Example.osm added |
---|
comment:1 by , 4 years ago
Summary: | Drawing building using buildings_tools with zero width produces duplicated nodes → Drawing building with zero width using buildings_tools produces duplicated nodes |
---|
comment:2 by , 4 years ago
comment:3 by , 4 years ago
There is no use case, but it can happen by accident, for example when not zooming in far enough.
follow-up: 5 comment:4 by , 4 years ago
But in case of an accident the warning about a "strange building" (with duplicate nodes and ways) would be helpful. And the warning about duplicated nodes is in my opinion better than a warning about unclosed way.
You can use the "create area [x]" tool also on the closed way created above. Only one of the two overlapping segments will be extruded.
Maybe it would make sense to prevent building_tools from creating such illegal buildings when performing a double-click.
comment:5 by , 4 years ago
Type: | enhancement → defect |
---|
Replying to mdk:
Maybe it would make sense to prevent building_tools from creating such illegal buildings when performing a double-click.
Yes, creating invalid objects is a bug.
comment:6 by , 4 years ago
Summary: | Drawing building with zero width using buildings_tools produces duplicated nodes → Using buildings_tools with a double click produces invalid buildings |
---|
comment:7 by , 4 years ago
Owner: | changed from | to
---|
comment:8 by , 4 years ago
I agree. The plugin should either ignore a (double) click when this would produce an invalid object and continue in draw mode or stop the draw mode without creating an object (as with Esc button).
Any preference?
by , 4 years ago
Attachment: | 21315.patch added |
---|
continue drawing if building width is extremely small
comment:9 by , 4 years ago
Patch implements the first alternative.
This is only solving the mentioned issue. There are more special cases, e.g.
- start building-mode
- left click somewhere, note that the instruction on the bottom line changes from "Point on the corner of the building to start drawing" to "Point on opposite end of the building"
- left click again without moving the mouse, note that the text changes to "Set width of the building" but no (invalid) building is drawn.
by , 4 years ago
Attachment: | 21315-2.patch added |
---|
don't switch mode if length or width are too small
comment:10 by , 4 years ago
Hmm, this is a bit tricky. Maybe JOSM allows to zoom in "too much". In max. zoom it is possible to draw all kinds of "invalid" objects. E.g. a simple line short is rendered with two distinct points but Validator may complain about duplicated points, same for areas.
OTOH JOSM might be used to produce data that is not uploaded to OSM, so rounding to the OSM limits might not happen.
The 2nd patch fixes the problems caused by unintended double clicks but still allows to produce such invalid objects.
If nobody suggests a better solution I'll commit this tomorrow.
comment:11 by , 4 years ago
Summary: | Using buildings_tools with a double click produces invalid buildings → [Patch]Using buildings_tools with a double click produces invalid buildings |
---|
follow-up: 16 comment:13 by , 4 years ago
draw a building.
now select it.
try and draw another building... you can't finish it.
comment:14 by , 4 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:16 by , 4 years ago
Replying to anonym:
draw a building.
now select it.
try and draw another building... you can't finish it.
In some cases it worked, depending on the relative position of the first and second node. Seems I tested only the working way before...
What is the use case of drawing a "building" with the building_tools which should result in a line with two nodes (and a tag
building=yes
)?