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
79              Call fsync after writing the output file to force flushing  buf‐
80              fers to disk.
81
82       --generator=NAME
83              The  name and version of the program generating the output file.
84              It will be added to the header of the output file.   Default  is
85osmium/” and the version of osmium.
86
87       -o, --output=FILE
88              Name of the output file.  Default is `-' (STDOUT).
89
90       -O, --overwrite
91              Allow  an  existing  output  file  to  be overwritten.  Normally
92              osmium will refuse to write over an existing file.
93
94       --output-header=OPTION=VALUE
95              Add output header option.  This command line option can be  used
96              multiple  times for different OPTIONs.  See the libosmium manual
97              for a list of available header options.  For some  commands  you
98              can  use  the special format “OPTION!” (ie.  an exclamation mark
99              after the OPTION and no value set) to set the value to the  same
100              as in the input file.
101

DIAGNOSTICS

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

MEMORY USAGE

112       osmium  sort  keeps the contents of all the input files in main memory.
113       This will take roughly 10 times as much memory as  the  files  take  on
114       disk in .osm.bz2 or osm.pbf format.
115

EXAMPLES

117       Sort in.osm.bz2 and write out to sorted.osm.pbf:
118
119              osmium sort -o sorted.osm.pbf in.osm.bz2
120

SEE ALSO

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

CONTACT

135       If you have any questions or  want  to  report  a  bug,  please  go  to
136       https://osmcode.org/contact.html
137

AUTHORS

139       Jochen Topf <jochen@topf.org>.
140
141
142
143                                    1.11.1                      OSMIUM-SORT(1)
Impressum