void rut_asset_set_inferred_tags (RutAsset *asset, const GList *inferred_tags) { asset->inferred_tags = g_list_concat (asset->inferred_tags, copy_tags (inferred_tags)); }
// The relation handler is called for each node in the input data. void relation(const osmium::Relation& relation) { { osmium::builder::RelationBuilder builder{m_buffer}; copy_attributes(builder, relation); copy_tags(builder, relation.tags()); // Copy the relation member list over to the new way. builder.add_item(relation.members()); } m_buffer.commit(); }
// The way handler is called for each node in the input data. void way(const osmium::Way& way) { { osmium::builder::WayBuilder builder{m_buffer}; copy_attributes(builder, way); copy_tags(builder, way.tags()); // Copy the node list over to the new way. builder.add_item(way.nodes()); } m_buffer.commit(); }
// The node handler is called for each node in the input data. void node(const osmium::Node& node) { // Open a new scope, because the NodeBuilder we are creating has to // be destructed, before we can call commit() below. { // To create a node, we need a NodeBuilder object. It will create // the node in the given buffer. osmium::builder::NodeBuilder builder{m_buffer}; // Copy common object attributes over to the new node. copy_attributes(builder, node); // Copy the location over to the new node. builder.set_location(node.location()); // Copy (changed) tags. copy_tags(builder, node.tags()); } // Once the object is written to the buffer completely, we have to call // commit(). m_buffer.commit(); }