Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#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?

  1. Have an incomplete, (modified) route relation with no or only a few downloaded children ways. See incomplete_modified_relation_update.osm
  2. 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)

incomplete_modified_relation_update.osm (11.7 KB ) - added by skyper 4 years ago.
small example
19451.patch (1.5 KB ) - added by GerdP 4 years ago.
only update selectable elements
popup.PNG (13.9 KB ) - added by GerdP 4 years ago.
19451.2.patch (2.3 KB ) - added by GerdP 4 years ago.

Download all attachments as: .zip

Change History (15)

by skyper, 4 years ago

small example

by GerdP, 4 years ago

Attachment: 19451.patch added

only update selectable elements

comment:1 by GerdP, 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?

  1. Ctrl+A (select all elements)
  2. Update selection

The attached patch implements this.

comment:2 by GerdP, 4 years ago

Cc: GerdP removed
Milestone: 20.07
Owner: changed from team to GerdP
Status: newassigned

in reply to:  1 comment:3 by skyper, 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?

  1. Ctrl+A (select all elements)
  2. 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?

Last edited 4 years ago by skyper (previous) (diff)

comment:4 by GerdP, 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 GerdP, 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...

in reply to:  4 comment:6 by skyper, 4 years ago

Replying to GerdP:

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.

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 GerdP, 4 years ago

Attachment: popup.PNG added

comment:7 by GerdP, 4 years ago

Sorry, got it wrong. If the layer contains download area(s) and further downloaded objects Updata Data shows a popup. The text is a bit confusing but unless you ignore this popup it will update the data as expected.


So I think my small patch is all that is needed.

in reply to:  7 comment:8 by skyper, 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 GerdP, 4 years ago

Attachment: 19451.2.patch added

comment:9 by GerdP, 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:10 by GerdP, 4 years ago

Resolution: fixed
Status: assignedclosed

In 16770/josm:

fix #19451: Update data: Do not download incomplete ways

  • if no download areas exist download again all objects with are neither new nor incomplete
  • don't stop post processing of downloaded data if one or more download areas are empty

comment:11 by GerdP, 4 years ago

Compared to 19451.2.patch I changed the logic again because method isSelectable() depends on filters.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.