Modify

Opened 8 months ago

Closed 8 months ago

Last modified 8 months 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 8 months ago.
small example
19451.patch (1.5 KB) - added by GerdP 8 months ago.
only update selectable elements
popup.PNG (13.9 KB) - added by GerdP 8 months ago.
19451.2.patch (2.3 KB) - added by GerdP 8 months ago.

Download all attachments as: .zip

Change History (15)

Changed 8 months ago by skyper

small example

Changed 8 months ago by GerdP

Attachment: 19451.patch added

only update selectable elements

comment:1 Changed 8 months ago by 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.

comment:2 Changed 8 months ago by GerdP

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

comment:3 in reply to:  1 Changed 8 months ago by skyper

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 8 months ago by skyper (previous) (diff)

comment:4 Changed 8 months ago by 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.

comment:5 Changed 8 months ago by 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...

comment:6 in reply to:  4 Changed 8 months ago by skyper

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?

Changed 8 months ago by GerdP

Attachment: popup.PNG added

comment:7 Changed 8 months ago by GerdP

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.

comment:8 in reply to:  7 Changed 8 months ago by skyper

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.

Changed 8 months ago by GerdP

Attachment: 19451.2.patch added

comment:9 Changed 8 months ago by GerdP

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 Changed 8 months ago by GerdP

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 Changed 8 months ago by GerdP

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.