[osmium-tool] 40/97: Only output time range for fileinfo if there are objects in the file.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Jul 21 20:15:33 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 588b62942535afd4c1bb40bd325cb88419437a76
Author: Jochen Topf <jochen at topf.org>
Date:   Thu Oct 9 14:25:01 2014 +0200

    Only output time range for fileinfo if there are objects in the file.
---
 src/command_fileinfo.cpp | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/command_fileinfo.cpp b/src/command_fileinfo.cpp
index 57226ad..ef67b35 100644
--- a/src/command_fileinfo.cpp
+++ b/src/command_fileinfo.cpp
@@ -180,8 +180,11 @@ bool CommandFileinfo::run() {
             osmium::apply(reader, info_handler);
             std::cout << "Data: " << "\n";
             std::cout << "  Bounding box: " << info_handler.bounds << "\n";
-            std::cout << "  First timestamp: " << info_handler.first_timestamp << "\n";
-            std::cout << "  Last timestamp: " << info_handler.last_timestamp << "\n";
+
+            if (info_handler.first_timestamp != osmium::end_of_time()) {
+                std::cout << "  First timestamp: " << info_handler.first_timestamp << "\n";
+                std::cout << "  Last timestamp: " << info_handler.last_timestamp << "\n";
+            }
 
             unsigned char digest[CryptoPP::SHA::DIGESTSIZE];
             info_handler.hash.Final(digest);

-- 
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