osm2pgsql-dev / osm2pgsql

OpenStreetMap data to PostgreSQL converter
https://osm2pgsql.org
GNU General Public License v2.0
1.5k stars 474 forks source link

Progress display of relation processing adding new lines #1404

Closed mboeringa closed 3 years ago

mboeringa commented 3 years ago

Hi,

This is something I have seen for a long time with different versions of osm2pgsql (currently at 1.4.0): once the processing gets to the "relations" stage, instead of updating the existing textline in the Terminal window of Ubuntu, I see it adding a new line. This doesn't happen with the "node" and "way" loading stages. Maybe it is good to fix this, and only update the existing progress line like with nodes and ways.

afbeelding

joto commented 3 years ago

There isn't much we can do about that. This is just the way the consolde behaves when the line wraps around to the next line. Make your window a bit larger and the problem goes away. You can also set --log-progress=false to disable this display entirely.

mboeringa commented 3 years ago

@joto , thanks for the explanation. Just one other thing I noticed now by the way. Maybe make the number of decimals consistent, or removing decimal altogether, would make the display a bit clearer. There is not much use for 31.78k/s versus 31.8 or simply 32k/s.

Having whole numbers should be OK here.

joto commented 3 years ago

The display is the way it is because the number of nodes, ways, and relations are very different and the speed at which they are processed is also very different. It is inconsistent, but arguably more useful this way. Anyway, this display has been around for years and the old-timers have developed an intuition by now how these numbers should look like, so we do not want to change it.