Skip to content

Commit c892a0b

Browse files
committed
Remove check for negative ids
The check is now elsewhere (osmdata.cpp).
1 parent 290d495 commit c892a0b

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

src/input-handler.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,8 @@ input_handler_t::input_handler_t(osmium::Box const &bbox, bool append,
1010
: m_data(osmdata), m_bbox(bbox), m_append(append)
1111
{}
1212

13-
void input_handler_t::negative_id_warning()
14-
{
15-
fmt::print(
16-
stderr,
17-
"\nWARNING: The input file contains at least one object with a\n"
18-
" negative id. Negative ids are not properly supported\n"
19-
" in osm2pgsql (and never were). They will not work in\n"
20-
" future versions at all. You can use the osmium tool to\n"
21-
" 'renumber' your file.\n\n");
22-
m_issued_warning_negative_id = true;
23-
}
24-
2513
void input_handler_t::node(osmium::Node const &node)
2614
{
27-
if (node.id() < 0 && !m_issued_warning_negative_id) {
28-
negative_id_warning();
29-
}
30-
3115
if (m_type != osmium::item_type::node) {
3216
m_type = osmium::item_type::node;
3317
m_data->flush();
@@ -62,10 +46,6 @@ void input_handler_t::node(osmium::Node const &node)
6246

6347
void input_handler_t::way(osmium::Way &way)
6448
{
65-
if (way.id() < 0 && !m_issued_warning_negative_id) {
66-
negative_id_warning();
67-
}
68-
6949
if (m_type != osmium::item_type::way) {
7050
m_type = osmium::item_type::way;
7151
m_data->flush();
@@ -89,10 +69,6 @@ void input_handler_t::way(osmium::Way &way)
8969

9070
void input_handler_t::relation(osmium::Relation const &rel)
9171
{
92-
if (rel.id() < 0 && !m_issued_warning_negative_id) {
93-
negative_id_warning();
94-
}
95-
9672
if (m_type != osmium::item_type::relation) {
9773
m_type = osmium::item_type::relation;
9874
m_data->flush();

src/input-handler.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class input_handler_t : public osmium::handler::Handler
3636
progress_display_t const &progress() const noexcept { return m_progress; }
3737

3838
private:
39-
void negative_id_warning();
40-
4139
osmdata_t const *m_data;
4240

4341
// Bounding box for node import (or invalid Box if everything should be
@@ -52,9 +50,6 @@ class input_handler_t : public osmium::handler::Handler
5250

5351
// Are we running in append mode?
5452
bool m_append;
55-
56-
// Has a warning about a negative id already been issued?
57-
bool m_issued_warning_negative_id = false;
5853
};
5954

6055
#endif // OSM2PGSQL_INPUT_HANDLER_HPP

0 commit comments

Comments
 (0)