Пример #1
0
 void write_meta(const osmium::OSMObject& object) {
     output_int(object.id());
     if (m_options.add_metadata) {
         *m_out += ' ';
         write_field_int('v', object.version());
         *m_out += " d";
         *m_out += (object.visible() ? 'V' : 'D');
         *m_out += ' ';
         write_field_int('c', object.changeset());
         *m_out += ' ';
         write_field_timestamp('t', object.timestamp());
         *m_out += ' ';
         write_field_int('i', object.uid());
         *m_out += " u";
         append_encoded_string(object.user());
     }
     write_tags(object.tags());
 }
 void write_meta(const osmium::OSMObject& object) {
     output_formatted("%" PRId64 " v%d d", object.id(), object.version());
     *m_out += (object.visible() ? 'V' : 'D');
     output_formatted(" c%d t", object.changeset());
     *m_out += object.timestamp().to_iso();
     output_formatted(" i%d u", object.uid());
     append_encoded_string(object.user());
     *m_out += " T";
     bool first = true;
     for (const auto& tag : object.tags()) {
         if (first) {
             first = false;
         } else {
             *m_out += ',';
         }
         append_encoded_string(tag.key());
         *m_out += '=';
         append_encoded_string(tag.value());
     }
 }
Пример #3
0
 bool operator()(const osmium::OSMObject& lhs, const osmium::OSMObject& rhs) const noexcept {
     return const_tie(lhs.type(), lhs.id() < 0, lhs.positive_id(), rhs.version(), rhs.timestamp()) <
            const_tie(rhs.type(), rhs.id() < 0, rhs.positive_id(), lhs.version(), lhs.timestamp());
 }
Пример #4
0
 /**
  * Return the timestamp when the current version of the object is
  * not valid any more, ie the time when the next version of the object
  * is valid. If this is the last version of the object, this will
  * return a special "end of time" timestamp that is guaranteed to
  * be larger than any normal timestamp.
  */
 const osmium::Timestamp end_time() const noexcept {
     return last() ? osmium::end_of_time() : m_next->timestamp();
 }
Пример #5
0
 const osmium::Timestamp start_time() const noexcept {
     return m_curr->timestamp();
 }
Пример #6
0
 const osmium::Timestamp end_time() const {
     return last() ? osmium::Timestamp() : m_next->timestamp();
 }