[osmium-tool] 07/97: Some subcommands can't handle changesets, so make sure we don't read any.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Jul 21 20:15:28 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to tag v1.0.0
in repository osmium-tool.

commit 8c14f3c601bdd4bce089f6d8a8473d34890d41c6
Author: Jochen Topf <jochen at topf.org>
Date:   Thu Jun 19 14:49:20 2014 +0200

    Some subcommands can't handle changesets, so make sure we don't read any.
---
 src/command_apply_changes.cpp | 6 +++---
 src/command_merge_changes.cpp | 2 +-
 src/command_time_filter.cpp   | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/command_apply_changes.cpp b/src/command_apply_changes.cpp
index 9b86cdc..483cf80 100644
--- a/src/command_apply_changes.cpp
+++ b/src/command_apply_changes.cpp
@@ -123,14 +123,14 @@ bool CommandApplyChanges::run() {
     osmium::ObjectPointerCollection objects;
 
     for (const std::string& change_file_name : m_change_filenames) {
-        osmium::io::Reader reader(change_file_name);
+        osmium::io::Reader reader(change_file_name, osmium::osm_entity_bits::object);
         while (osmium::memory::Buffer buffer = reader.read()) {
             osmium::apply(buffer, objects);
             changes.push_back(std::move(buffer));
         }
     }
 
-    osmium::io::Reader reader(m_input_filename);
+    osmium::io::Reader reader(m_input_filename, osmium::osm_entity_bits::object);
 
     osmium::io::Header header = reader.header();
     header.set("generator", m_generator);
@@ -165,7 +165,7 @@ bool CommandApplyChanges::run() {
     } else {
         // If the --simplify option was not given, this
         // is a straightforward sort of the change files
-        // and the a merge with the input file.
+        // and then a merge with the input file.
         objects.sort(osmium::object_order_type_id_version());
 
         std::set_union(objects.begin(),
diff --git a/src/command_merge_changes.cpp b/src/command_merge_changes.cpp
index 8f367db..c1b8a4e 100644
--- a/src/command_merge_changes.cpp
+++ b/src/command_merge_changes.cpp
@@ -125,7 +125,7 @@ bool CommandMergeChanges::run() {
     // read all input files, keep the buffers around and add pointer
     // to each object to objects collection.
     for (const std::string& change_file_name : m_input_filenames) {
-        osmium::io::Reader reader(change_file_name);
+        osmium::io::Reader reader(change_file_name, osmium::osm_entity_bits::object);
         while (osmium::memory::Buffer buffer = reader.read()) {
             osmium::apply(buffer, objects);
             changes.push_back(std::move(buffer));
diff --git a/src/command_time_filter.cpp b/src/command_time_filter.cpp
index 3100170..43a20b8 100644
--- a/src/command_time_filter.cpp
+++ b/src/command_time_filter.cpp
@@ -143,7 +143,7 @@ bool CommandTimeFilter::setup(const std::vector<std::string>& arguments) {
 }
 
 bool CommandTimeFilter::run() {
-    osmium::io::Reader reader(m_input_file);
+    osmium::io::Reader reader(m_input_file, osmium::osm_entity_bits::object);
 
     osmium::io::Header header = reader.header();
     header.set("generator", m_generator);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git



More information about the Pkg-grass-devel mailing list