[OSM-dev] tools to detect if a pbf is a historic/attic ou classic pbf

Jochen Topf jochen at remote.org
Fri Jan 28 20:26:46 UTC 2022


Hi!

Also: If you only need one "field" from the "osmium fileinfo" output,
the -g option is your friend. :-)

An the topic of handling OSM history files: Most tools will not work
correctly with them and silently do wrong things. This is because there
really is no difference internally between a normal OSM file and a
history OSM file, the latter just has several versions of the same
object in it (and most tools will expect only one). The man pages for
all the Osmium commands (https://docs.osmcode.org/osmium/latest/) will
tell you in each case whether the command can work with history files
and if there are any restrictions on use etc.

Jochen

On Fri, Jan 28, 2022 at 07:21:30PM +0100, Imre Samu wrote:
> Date: Fri, 28 Jan 2022 19:21:30 +0100
> From: Imre Samu <pella.samu at gmail.com>
> To: Marc_marc <marc_marc at mailo.com>
> Cc: "dev at openstreetmap.org" <dev at openstreetmap.org>
> Subject: Re: [OSM-dev] tools to detect if a pbf is a historic/attic ou
>  classic pbf
> 
> >  i'm looking for a tool to display if a pbf is a history file or not.
> 
> Check the "osmium" tool :
> 
> $ osmium fileinfo hungary-internal.osh.pbf | grep history
>   With history: yes
> 
> $ osmium fileinfo hungary-latest-internal.osm.pbf | grep history
>   With history: no
> 
> Regards,
>  Imre
> 
> Marc_marc <marc_marc at mailo.com> ezt írta (időpont: 2022. jan. 28., P,
> 18:51):
> 
> > Hello,
> >
> > in order to debug a small script that doesn't seem to handle osh.pbf
> > files, i'm looking for a tool to display if a pbf is a history file or
> > not. any advice?
> >
> > toolchain is download osh.pbf from geofabrik, osmosis, osmconvert (with
> > a clipping) osmfilter taginfo with chronology (it complain that the file
> > isn't a osh anymore)
> >
> > Regards,
> > Marc
> >
> >
> >
> > _______________________________________________
> > dev mailing list
> > dev at openstreetmap.org
> > https://lists.openstreetmap.org/listinfo/dev
> >

> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/dev


-- 
Jochen Topf  jochen at remote.org  https://www.jochentopf.com/  +49-351-31778688



More information about the dev mailing list