MarcusWolschon / osmeditor4android

Vespucci is a OpenStreetMap editor for Android

Home Page:http://vespucci.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"Export to JOSM" slows it down

AntoninDelFabbro opened this issue · comments

Vespucci Version

19.3.1

Download source

F-Droid

Device (Manufacturer and Model)

Samsung Galaxy S9+

Android Version

/e/OS, Android 10

Behaviour/Symptoms

Opening the .osm file slows down JOSM.

Expected Behaviour

It doesn't slows down JOSM.

How to recreate

  1. On Vespucci, click ↕️ → Files → Save into a JOSM file
  2. Open the file on JOSM

Crash dump submitted (no or yes + date)

no

Any other potentially relevant information

YES! When exporting, Vespucci seems to keep included lot of lines like this:
<bounds minlat='47.1549737' minlon='6.2780588' maxlat='47.1549775' maxlon='6.2780635' origin='' />
On my file, I counted almost 5000 of those lines.
Once all removed, JOSM is totally smooth.


  • OSM.osm — my edits/a file I've exported from Vespucci (and edited a bit in JOSM). Almost raw.
  • OSM2.osm — the same file, but edited as explained below.

OSM.txt
OSM2.txt

Thanks for the report. That looks as if the pruning of the bounding box list is not working. I'm assuming you have one of the auto-download options active, can you tell me which one?

Yes! And it's auto-downloading based on my location.

I think I can understand what is happening (essentially "bad luck" :-)).

Further question do you have the size of the downloaded bounding box and the limit for auto-pruning unchanged?

See http://vespucci.io/help/en/Advanced%20preferences/#auto-download-settings

Great! (Yeah I'm good at this 😇)

It's unchanged. Well, I've recently reinstalled Vespucci, so those settings are the default settings, but I don't remember having edited them previously.
But if needed, I can do new surveys and let you know if the issue occurs again.

The issue is due to a couple of things:

  • in the auto-download mode you selected the downloaded areas can be quite small (and so the associated stored bounding boxes), this in particular because it will try to avoid downloading the same area twice and just download bits that it hasn't retrieved yet. This can be somewhat reduced by making the download radius larger.
  • We currently don't merge adjacent bounding boxes, but rely on pruning to remove data and associated bounding boxes that are unused.
  • the default limit at which pruning runs automatically is 5'000 nodes, at least the session above was just under that limit. Lowering the limit will cause pruning to run more often and will remove lots of the bounding boxes (note that this will speed up Vespucci too). Alternatively you can run pruning manually (see the data layer menu).

I've added a display of the current number of bounding boxes to the data layer information modal so that this can be tracked better and will add an issue to look at an algorithm to merge the bounding boxes.