Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 51 lines (33 sloc) 1.407 kB
70f4b20 @joto Refactoring: rolled contents of src/HandlerStatistics.cpp into includ…
authored
1 /*
2
3 This is a small tool to try the Statistics handler
4
5 */
6
7586c1e @joto Switched license. Removed build of PBF stuff.
authored
7 /*
8
8df37df @joto Update copyright year
authored
9 Copyright 2012 Jochen Topf <jochen@topf.org> and others (see README).
7586c1e @joto Switched license. Removed build of PBF stuff.
authored
10
11 This file is part of Osmium (https://github.com/joto/osmium).
12
13 Osmium is free software: you can redistribute it and/or modify it under the
14 terms of the GNU Lesser General Public License or (at your option) the GNU
15 General Public License as published by the Free Software Foundation, either
16 version 3 of the Licenses, or (at your option) any later version.
17
18 Osmium is distributed in the hope that it will be useful, but WITHOUT ANY
19 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0e2ed08 @joto typo: Licanse -> License
authored
20 PARTICULAR PURPOSE. See the GNU Lesser General Public License and the GNU
7586c1e @joto Switched license. Removed build of PBF stuff.
authored
21 General Public License for more details.
22
23 You should have received a copy of the Licenses along with Osmium. If not, see
24 <http://www.gnu.org/licenses/>.
25
26 */
27
d794dfc @joto Fixed includes in examples
authored
28 #include <iostream>
d7748ba @joto Cleanup of #include's
authored
29
cfe4cb8 @joto Changed the way OSM input/output is done.
authored
30 #define OSMIUM_WITH_PBF_INPUT
31 #define OSMIUM_WITH_XML_INPUT
32
d7748ba @joto Cleanup of #include's
authored
33 #include <osmium.hpp>
a0edd3b @joto Reorganisation of include files
authored
34 #include <osmium/handler/statistics.hpp>
70f4b20 @joto Refactoring: rolled contents of src/HandlerStatistics.cpp into includ…
authored
35
36 /* ================================================== */
37
38 int main(int argc, char *argv[]) {
39 if (argc != 2) {
40 std::cerr << "Usage: " << argv[0] << " OSMFILE" << std::endl;
41 exit(1);
42 }
43
9547ca7 @joto Great reorganisation of file handling.
authored
44 Osmium::OSMFile infile(argv[1]);
ea1fcef @joto Refactoring input classes.
authored
45 Osmium::Handler::Statistics handler;
cfe4cb8 @joto Changed the way OSM input/output is done.
authored
46 Osmium::Input::read(infile, handler);
627f226 @joto Add protobuf cleanup call.
authored
47
48 google::protobuf::ShutdownProtobufLibrary();
70f4b20 @joto Refactoring: rolled contents of src/HandlerStatistics.cpp into includ…
authored
49 }
50
Something went wrong with that request. Please try again.