/* The code in this file is released into the Public Domain. */ #include #include #include #include #include #include #include #include using index_type = osmium::index::map::Map; using location_handler_type = osmium::handler::NodeLocationsForWays; int main(int argc, char* argv[]) { if (argc != 3) { std::cerr << "Usage: " << argv[0] << " OSMFILE FORMAT\n"; std::exit(1); } const std::string input_filename{argv[1]}; const std::string location_store{argv[2]}; osmium::io::Reader reader{input_filename}; const auto& map_factory = osmium::index::MapFactory::instance(); std::unique_ptr index = map_factory.create_map(location_store); location_handler_type location_handler{*index}; location_handler.ignore_errors(); osmium::apply(reader, location_handler); reader.close(); }