void CommandRenumber::set_start_ids(const std::string& str) {
    const auto start_ids = osmium::split_string(str, ',');
    if (start_ids.size() == 1) {
        const auto id = get_start_id(start_ids[0]);
        m_id_map(osmium::item_type::node).set_start_id(id);
        m_id_map(osmium::item_type::way).set_start_id(id);
        m_id_map(osmium::item_type::relation).set_start_id(id);
    } else if (start_ids.size() == 3) {
        m_id_map(osmium::item_type::node).set_start_id(get_start_id(start_ids[0]));
        m_id_map(osmium::item_type::way).set_start_id(get_start_id(start_ids[1]));
        m_id_map(osmium::item_type::relation).set_start_id(get_start_id(start_ids[2]));
    } else {
        throw argument_error{"The --start-id/s option must be followed by exactly 1 ID or 3 IDs separated by commas"};
    }
}
Exemple #2
0
 int ObLogBuffer::dump_for_debug() const
 {
   int err = OB_SUCCESS;
   TBSYS_LOG(INFO, "pos=[%ld, %ld), id=[%ld, %ld)", start_pos_, end_pos_, get_start_id(), end_id_);
   ObRingDataBuffer::dump_for_debug();
   return err;
 }