Opened 8 years ago
Last modified 4 years ago
#13538 new defect
Missing "Cannot add node outside of the world" message
Reported by: | GerdP | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | template_report | Cc: | Bjoeni |
Description
What steps will reproduce the problem?
- Create new Layer (Ctrl+N)
- Zoom out so the the planet bounding box is shown
- Try to add a note above or below the box: The message "Cannot add node outside of the world" pops up
- Try the same on left or right side
What is the expected result?
Same message box
What happens instead?
You can add nodes and draw lines
Please provide any additional information below. Attach a screenshot if possible.
URL:http://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2016-09-06 00:16:07 +0200 (Tue, 06 Sep 2016) Build-Date:2016-09-05 22:21:00 Revision:10966 Relative:URL: ^/trunk Identification: JOSM/1.5 (10966 en) Windows 10 64-Bit Memory Usage: 715 MB / 1803 MB (224 MB allocated, but free) Java version: 1.8.0_102-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM Screen: \Display0 1920x1080 Maximum Screen Size: 1920x1080 Dataset consistency test: No problems found Plugins: + FastDraw (32773) + apache-commons (32699) + buildings_tools (32796) + ejml (32680) + geotools (32813) + jts (32699) + o5m (32857) + opendata (32898) + pbf (32865) + poly (32699) + reverter (32796) + utilsplugin2 (32815) Map paint styles: + https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 Last errors/warnings: - W: Update plugins - org.openstreetmap.josm.plugins.PluginHandler$UpdatePluginsMessagePanel[,0,0,0x0,invalid,layout=java.awt.GridBagLayout,alignmentX=0.0,alignmentY=0.0,border=,flags=9,maximumSize=,minimumSize=,preferredSize=]
Attachments (4)
Change History (17)
by , 6 years ago
Attachment: | 13538.patch added |
---|
comment:1 by , 6 years ago
Summary: | Missing "Cannot add node outside of the world" message → [Patch] Missing "Cannot add node outside of the world" message |
---|
by , 6 years ago
Attachment: | no_move_right_sample.osm added |
---|
by , 6 years ago
Attachment: | 13538-v2.patch added |
---|
comment:2 by , 6 years ago
Priority: | minor → normal |
---|
There are quite a lot of places where LatLon.isOutSideWorld()
is used and most of them simply don't work near the 180° longitude.
I wonder if those tests were added before the code for the projection classes was changed to normalize the LatLon to be in the -180..180 interval?
Without the patch you can move a way which ends close to the 180 longitude west and thus destroy the geometry. You can also use the Create Circle Action
The attached patch fixes the places in core.
Important:
I've not only changed the test, in some cases I've also changed the reaction. I think when the "Cannot move objects outside of the world." popup appears the corresponding action should be undone, not stopped.
There is still more to do, for example I can enter 180 for longitude in the "Move Node" dialog and this results in a node displayed at
180 but the stored value is -179.99999. Quite confusing...
by , 6 years ago
Attachment: | 13538-deprecate.patch added |
---|
follow-up: 7 comment:5 by , 6 years ago
@Vincent: Do you agree that I should deprecate LatLon.isOutSideWorld()
?
The attached patch would do that.
I'm also not sure if that should be done now or after milestone 19.4?
comment:6 by , 6 years ago
Cc: | added |
---|
comment:7 by , 5 years ago
Replying to GerdP:
@Vincent: Do you agree that I should deprecate
LatLon.isOutSideWorld()
?
Yes. Don't forget to update plugins after you do.
comment:9 by , 5 years ago
See [o35182:35184]
TODO: more plugins that still use LatLon.isOutSideWorld()
alignways
autotools (easy)
commandline
dxfimport
fastdraw (easy)
improveway
measurement
Splinex
comment:10 by , 5 years ago
A note: to reference josm tickets from osm svn you need to use #josm12345
.
comment:12 by , 4 years ago
comment:13 by , 4 years ago
Summary: | [Patch] Missing "Cannot add node outside of the world" message → Missing "Cannot add node outside of the world" message |
---|
I stumbled again over this problem. When you create such a node and use "zoom to data" you'll not get to the place where the node was created. The attached patch uses this knowledge to produce the missing warning for the add node action.
If someone knows a more elegant solution for this please let me know, else I'll add a similar code to other actions like MoveAction.