Commit acd6b46
committed
Improve handling of multiple input files
Osm2pgsql can handle any number of input files. The old code will just
read the files one after the other which will not work if there is any
overlap between the files, i.e. if the same object is in two input
files.
The new code will read the files in parallel. We construct a priority
queue feeding in the next objects from all input files, taking off the
"smallest" one by one. If the same object is in multiple files, we
only process it once.
If there is only a single input file a shortcut is taken which basically
behaves like the old code.
Note that the input files have to be from the same point in time. If
there are multiple versions of the same object in the input, this will
still not magically work.
This commit removes support for unsorted input files which were already
deprecated.
See #1167
This commit removes support for negative ids which were already
deprecated.
Fixes #10971 parent f2a866c commit acd6b46
10 files changed
Lines changed: 437 additions & 158 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
52 | 86 | | |
53 | 87 | | |
54 | 88 | | |
| |||
61 | 95 | | |
62 | 96 | | |
63 | 97 | | |
| 98 | + | |
| 99 | + | |
64 | 100 | | |
65 | 101 | | |
66 | 102 | | |
| |||
81 | 117 | | |
82 | 118 | | |
83 | 119 | | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | 120 | | |
98 | | - | |
| 121 | + | |
99 | 122 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
106 | 128 | | |
107 | 129 | | |
108 | 130 | | |
| |||
0 commit comments