1OSMIUM-SORT(1)                                                  OSMIUM-SORT(1)
2
3
4

NAME

6       osmium-sort - sort OSM files
7

SYNOPSIS

9       osmium sort [OPTIONS] OSM-FILE...
10

DESCRIPTION

12       Merges  the  content  of  all input files given on the command line and
13       sort the result.
14
15       Objects are sorted by type, ID, and version.  IDs are  sorted  negative
16       IDs first, the positive IDs, both ordered by their absolute values.  So
17       the sort order for types and IDs is:
18
19       node -1, node -2, ..., node 1, node 2, ..., way -1, way -2, ..., way 1,
20       way 2, ..., relation -1, relation -2, ..., relation 1, relation 2, ...
21
22       If there are several objects of the same type and with the same ID they
23       are ordered by ascending version.
24
25       This command works with normal  OSM  data  files,  history  files,  and
26       change files.
27
28       This  commands  reads its input file(s) only once and writes its output
29       file in one go so it can be streamed, ie.  it can read from  STDIN  and
30       write to STDOUT.  (Unless the multipass strategy is used.)
31

OPTIONS

33       -s, –strategy=STRATEGY
34              Sorting  strategy.   The “simple” strategy reads all input files
35              into memory, does the sorting and writes  everything  out.   The
36              “multipass”  strategy reads the input files in three passes, one
37              for nodes, one for ways, and one for relations.   After  reading
38              all objects of each type, they are sorted and written out.  This
39              is a bit slower than the “simple” strategy, but uses  less  mem‐
40              ory.  The “multi” strategy doesn't work when reading from STDIN.
41              Default: “simple”.
42

COMMON OPTIONS

44       -h, –help
45              Show usage help.
46
47       -v, –verbose
48              Set verbose mode.  The program  will  output  information  about
49              what it is doing to STDERR.
50
51       –progress
52              Show  progress bar.  Usually a progress bar is only displayed if
53              STDOUT and STDERR are detected to be TTY.  With  this  option  a
54              progress  bar  is  always  shown.  Note that a progress bar will
55              never be shown when reading from STDIN or a pipe.
56
57       –no-progress
58              Do not show progress bar.  Usually a progress bar  is  displayed
59              if STDOUT and STDERR are detected to be a TTY.  With this option
60              the progress bar is suppressed.  Note that a progress  bar  will
61              never be shown when reading from STDIN or a pipe.
62

INPUT OPTIONS

64       -F, –input-format=FORMAT
65              The  format  of the input file(s).  Can be used to set the input
66              format if it can't be autodetected from the file name(s).   This
67              will  set the format for all input files, there is no way to set
68              the format for some  input  files  only.   See  osmium-file-for‐
69              mats(5) or the libosmium manual for details.
70

OUTPUT OPTIONS

72       -f, –output-format=FORMAT
73              The  format  of  the output file.  Can be used to set the output
74              file format if it can't be autodetected  from  the  output  file
75              name.   See  osmium-file-formats(5)  or the libosmium manual for
76              details.
77
78       –fsync Call fsync after writing the output file to force flushing  buf‐
79              fers to disk.
80
81       –generator=NAME
82              The  name and version of the program generating the output file.
83              It will be added to the header of the output file.   Default  is
84osmium/” and the version of osmium.
85
86       -o, –output=FILE
87              Name of the output file.  Default is `-' (STDOUT).
88
89       -O, –overwrite
90              Allow  an  existing  output  file  to  be overwritten.  Normally
91              osmium will refuse to write over an existing file.
92
93       –output-header=OPTION=VALUE
94              Add output header option.  This command line option can be  used
95              multiple  times for different OPTIONs.  See the libosmium manual
96              for a list of available header options.
97

DIAGNOSTICS

99       osmium sort exits with exit code
100
101       0      if everything went alright,
102
103       1      if there was an error processing the data, or
104
105       2      if there was a problem with the command line arguments.
106

MEMORY USAGE

108       osmium sort keeps the contents of all the input files in  main  memory.
109       This  will  take  roughly  10 times as much memory as the files take on
110       disk in .osm.bz2 or osm.pbf format.
111

EXAMPLES

113       Sort in.osm.bz2 and write out to sorted.osm.pbf:
114
115              osmium sort -o sorted.osm.pbf in.osm.bz2
116

SEE ALSO

118       · osmium(1), osmium-file-formats(5)
119
120       · Osmium website (https://osmcode.org/osmium-tool/)
121
123       Copyright (C) 2013-2018 Jochen Topf <jochen@topf.org>.
124
125       License     GPLv3+:     GNU     GPL     version     3     or      later
126       <https://gnu.org/licenses/gpl.html>.   This  is  free software: you are
127       free to change and redistribute it.   There  is  NO  WARRANTY,  to  the
128       extent permitted by law.
129

CONTACT

131       If  you  have  any  questions  or  want  to  report a bug, please go to
132       https://osmcode.org/contact.html
133

AUTHORS

135       Jochen Topf <jochen@topf.org>.
136
137
138
139                                    1.10.0                      OSMIUM-SORT(1)
Impressum