示例#1
0
 void update(const osmium::Changeset& changeset) {
     update_int64(changeset.id());
     update(changeset.created_at());
     update(changeset.closed_at());
     update(changeset.bounds());
     update_int32(changeset.num_changes());
     update_int32(changeset.num_comments());
     update_int32(changeset.uid());
     update_string(changeset.user());
     update(changeset.tags());
     update(changeset.discussion());
 }
 void changeset(const osmium::Changeset& changeset) {
     write_field_int('c', changeset.id());
     *m_out += ' ';
     write_field_int('k', changeset.num_changes());
     *m_out += ' ';
     write_field_timestamp('s', changeset.created_at());
     *m_out += ' ';
     write_field_timestamp('e', changeset.closed_at());
     *m_out += ' ';
     write_field_int('d', changeset.num_comments());
     *m_out += ' ';
     write_field_int('i', changeset.uid());
     *m_out += " u";
     append_encoded_string(changeset.user());
     write_location(changeset.bounds().bottom_left(), 'x', 'y');
     write_location(changeset.bounds().top_right(), 'X', 'Y');
     write_tags(changeset.tags());
     *m_out += '\n';
 }
示例#3
0
                void changeset(const osmium::Changeset& changeset) {
                    output_formatted("c%d k%d s", changeset.id(), changeset.num_changes());
                    *m_out += changeset.created_at().to_iso();
                    *m_out += " e";
                    *m_out += changeset.closed_at().to_iso();
                    output_formatted(" d%d i%d u", changeset.num_comments(), changeset.uid());
                    append_encoded_string(changeset.user());
                    write_location(changeset.bounds().bottom_left(), 'x', 'y');
                    write_location(changeset.bounds().top_right(), 'X', 'Y');
                    *m_out += " T";
                    bool first = true;
                    for (const auto& tag : changeset.tags()) {
                        if (first) {
                            first = false;
                        } else {
                            *m_out += ',';
                        }
                        append_encoded_string(tag.key());
                        *m_out += '=';
                        append_encoded_string(tag.value());
                    }

                    *m_out += '\n';
                }