osmcode / osmium-tool

Command line tool for working with OpenStreetMap data based on the Osmium library.
https://osmcode.org/osmium-tool/
GNU General Public License v3.0
509 stars 107 forks source link

Missing progress bar #231

Closed sphoto closed 3 years ago

sphoto commented 3 years ago

Since 7f9c48654ed90a8ebabe907ed97146be56eafaaf the progress bar does not appear on most of the osmium modules. It seems to work on osmium sort, but not on apply-changes, cat or tags-filter. I did not check the other ones. I am using osmium on Win10 (built with VS2019).

joto commented 3 years ago

I have moved this issue to the osmium-tool repo where it belongs.

There are two different questions here:

  1. The progress bar does not work on all commands. That is a known issue and difficult to fix for those where it doesn't work.
  2. It seems the progress bar used to work for you before on some commands and doesn't any more. I need to know exactly which commands (with which options) used to work and doesn't work any more and on which versions this worked/not worked. (Please post output of osmium version in both cases.
sphoto commented 3 years ago

I made some tests with different combinations of osmium-tool/libosmium and found that the issue is related to libosmium. The progress bar disappears since https://github.com/osmcode/libosmium/commit/7f9c48654ed90a8ebabe907ed97146be56eafaaf. The last commit of osmium-tool (https://github.com/osmcode/osmium-tool/commit/537ca6d2a54930405a7f1dacb3e61b50d0b83854) and libosmium up to https://github.com/osmcode/libosmium/commit/cd7d5fa457e29a13b7fc74dd0a59ad2e8104b8fa works fine.

No progress bar for the following commands:

osmium tags-filter map.pbf -O -o map_saddles.osm n/natural=saddle,notch,col n/mountain_pass=yes
osmium tags-filter map.pbf -O -o map_peaks.osm n/natural=peak,volcano
osmium tags-filter map.pbf -O -o map_network.pbf r/network=hcw,mtb,ucn,lcn,rcn,ncn,icn,uwn,lwn,rwn,nwn,iwn

osmium cat -O -o map_network_nodes.osm map_network.pbf -t node
osmium cat -O -o map_network_ways.osm map_network.pbf -t way
osmium cat -O -o map_network_relations.osm map_network.pbf -t relation

osmium apply-changes -O -o map_osmdata_network.pbf map_processed.pbf map_saddles_updated.osc map_peaks_updated.osc map_network_nodes_ways_updated.osc

Progress bar appears:

osmium sort -O -o map_complete.pbf map_osmdata_network.pbf map_contours_20m.pbf map_land.osm map_sea.osm map_polynodes.pbf

joto commented 3 years ago

Damn, you are right. A change in libosmium in something, I thought, totally unrelated. Should be fixed now in libosmium master.

sphoto commented 3 years ago

The progress bars are back again! Great support, thank you!