void print_meta(const osmium::OSMObject& object) { *m_out << m_prefix << " id=" << object.id() << "\n"; *m_out << m_prefix << " version=" << object.version() << "\n"; *m_out << m_prefix << " uid=" << object.uid() << "\n"; *m_out << m_prefix << " user=|" << object.user() << "|\n"; *m_out << m_prefix << " changeset=" << object.changeset() << "\n"; *m_out << m_prefix << " timestamp=" << object.timestamp().to_iso() << "\n"; *m_out << m_prefix << " visible=" << (object.visible() ? "yes" : "no") << "\n"; Dump dump(*m_out, m_with_size, m_prefix + " "); osmium::apply(object.cbegin(), object.cend(), dump); }
void write_meta(const osmium::OSMObject& object) { oprintf(m_out, " id=\"%" PRId64 "\"", object.id()); if (object.version()) { oprintf(m_out, " version=\"%d\"", object.version()); } if (object.timestamp()) { m_out += " timestamp=\""; m_out += object.timestamp().to_iso(); m_out += "\""; } if (!object.user_is_anonymous()) { oprintf(m_out, " uid=\"%d\" user=\"", object.uid()); xml_string(m_out, object.user()); m_out += "\""; } if (object.changeset()) { oprintf(m_out, " changeset=\"%d\"", object.changeset()); } if (m_write_visible_flag) { if (object.visible()) { m_out += " visible=\"true\""; } else { m_out += " visible=\"false\""; } } }
void operator()(const osmium::OSMObject& obj) { if (obj.id() != id) { if (keep_deleted || obj.visible()) { *out = obj; } id = obj.id(); } }
void update(const osmium::OSMObject& object) { update_int64(object.id()); update_bool(object.visible()); update_int32(object.version()); update(object.timestamp()); update_int32(object.uid()); update_string(object.user()); update(object.tags()); }
/** * Initialize area attributes from the attributes of the given object. */ void initialize_from_object(const osmium::OSMObject& source) { osmium::Area& area = object(); area.set_id(osmium::object_id_to_area_id(source.id(), source.type())); area.set_version(source.version()); area.set_changeset(source.changeset()); area.set_timestamp(source.timestamp()); area.set_visible(source.visible()); area.set_uid(source.uid()); add_user(source.user()); }
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()); } }
/** * Current object version is visible at the given timestamp. */ bool is_visible_at(const osmium::Timestamp& timestamp) const noexcept { return start_time() <= timestamp && end_time() > timestamp && m_curr->visible(); }