#19451 closed defect (fixed)
Update data: Do not download incomplete ways
Reported by: | skyper | Owned by: | GerdP |
---|---|---|---|
Priority: | normal | Milestone: | 20.07 |
Component: | Core | Version: | latest |
Keywords: | template_report update data incomplete way | Cc: |
Description
See #19124 which is the same problem in a similar situation.
What steps will reproduce the problem?
- Have an incomplete, (modified) route relation with no or only a few downloaded children ways. See incomplete_modified_relation_update.osm
- Update data
What is the expected result?
Only the relation and the downloaded ways are updated and downloaded.
What happens instead?
Tonnes of objects are downloaded. The relation is completely downloaded.
Please provide any additional information below. Attach a screenshot if possible.
This uses seldom resources of time and server bandwidth and traffic should be minimized.
I hit this with more data and OSM-server time-out several times.
It also looks like first nodes and than complete ways are downloaded where the ways children could be downloaded with the way and not in advance.
Tried r15810 which shows the same problem but #4666 shows that it used to be different some time in the past.
Relative:URL: ^/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-06-28 19:08:21 +0200 (Sun, 28 Jun 2020) Revision:16727 Build-Date:2020-06-29 01:30:50 URL:https://josm.openstreetmap.de/svn/trunk
Attachments (4)
Change History (15)
by , 4 years ago
Attachment: | incomplete_modified_relation_update.osm added |
---|
follow-up: 3 comment:1 by , 4 years ago
Normally Update Data
downloads the previously downloaded bounding boxes again. Your file doesn't contain download areas, so it falls back to update all elements.
Do you agree that the expected result should be the same as with these two steps?
- Ctrl+A (select all elements)
- Update selection
The attached patch implements this.
comment:2 by , 4 years ago
Cc: | removed |
---|---|
Milestone: | → 20.07 |
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 4 years ago
Replying to GerdP:
Normally
Update Data
downloads the previously downloaded bounding boxes again. Your file doesn't contain download areas, so it falls back to update all elements.
Do you agree that the expected result should be the same as with these two steps?
- Ctrl+A (select all elements)
- Update selection
The attached patch implements this.
+1
I continued and downloaded a small bbox without data. Now JOSM does not update anything.
What happens if you have some small downloaded areas but also unrelated data outside downloaded area? I fear the data outside of downloaded area is not updated or am I wrong?
follow-up: 6 comment:4 by , 4 years ago
You are right. Update Data
is a very misleading text. Maybe it should be changed to Update download areas
.
A mixture of areas and downloaded objects outside of the area(s) is not supported.
comment:5 by , 4 years ago
The algo should probably be changed so that it first re-downloads the areas. In a second step all selectable objects which were not updated by the first step should be downloaded. I don't yet know how to compute this...
comment:6 by , 4 years ago
Replying to GerdP:
You are right.
Update Data
is a very misleading text. Maybe it should be changed toUpdate download areas
.
A mixture of areas and downloaded objects outside of the area(s) is not supported.
Not sure if we need another upload action, but "Update Data" is needed.
Replying to GerdP:
The algo should probably be changed so that it first re-downloads the areas. In a second step all selectable objects which were not updated by the first step should be downloaded. I don't yet know how to compute this...
How about remembering the downloaded objects in the first step and only downloading objects which are not on the list in the second step?
by , 4 years ago
follow-up: 8 comment:7 by , 4 years ago
comment:8 by , 4 years ago
Replying to GerdP:
Sorry, got it wrong. If the layer contains download area(s) and further downloaded objects
Updata Data
shows a popup.
I know this pop up, though, yesterday, with a download area without data and some data outside download area, I only got a message on the bottom left about "No data to update". At least, in this special case, it does not work. Maybe, if all bboxes are empty, it should try to select all objects and only if there are no objects with positive id the message should be displayed.
by , 4 years ago
Attachment: | 19451.2.patch added |
---|
comment:9 by , 4 years ago
Your special case happens when at least one download area has no data. The new patch changes the logic so that this case doesn't stop the processing too early and thus the popup shown in comment:7 is still presented (in combination with the "no data in this area" notification).
comment:11 by , 4 years ago
Compared to 19451.2.patch I changed the logic again because method isSelectable()
depends on filters.
small example