diff --git a/CMakeLists.txt b/CMakeLists.txt index 5ec73da99..aa0c0171f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,13 +51,13 @@ configure_file( ${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp.in ${CMAKE_SOURCE_DIR}/Util/GitDescription.cpp ) -file(GLOB ExtractorGlob Extractor/*.cpp) +file(GLOB ExtractorGlob extractor/*.cpp) file(GLOB ImporterGlob data_structures/import_edge.cpp data_structures/external_memory_node.cpp) add_library(IMPORT OBJECT ${ImporterGlob}) add_library(LOGGER OBJECT Util/simple_logger.cpp) add_library(PHANTOMNODE OBJECT data_structures/phantom_node.cpp) -set(ExtractorSources extractor.cpp ${ExtractorGlob}) +set(ExtractorSources extract.cpp ${ExtractorGlob}) add_executable(osrm-extract ${ExtractorSources} $ $ $ $ $) file(GLOB PrepareGlob contractor/*.cpp data_structures/hilbert_value.cpp data_structures/restriction_map.cpp Util/compute_angle.cpp) diff --git a/Extractor/Extractor.cpp b/Extractor/Extractor.cpp index c22210f7e..cf3ebdc88 100644 --- a/Extractor/Extractor.cpp +++ b/Extractor/Extractor.cpp @@ -25,15 +25,15 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "Extractor.h" +#include "extractor.hpp" -#include "ExtractionContainers.h" -#include "ExtractionNode.h" -#include "ExtractionWay.h" -#include "ExtractorCallbacks.h" -#include "ExtractorOptions.h" -#include "RestrictionParser.h" -#include "ScriptingEnvironment.h" +#include "extraction_containers.hpp" +#include "extraction_node.hpp" +#include "extraction_way.hpp" +#include "extractor_callbacks.hpp" +#include "extractor_options.hpp" +#include "restriction_parser.hpp" +#include "scripting_environment.hpp" #include "../Util/GitDescription.h" #include "../Util/IniFileUtil.h" diff --git a/extractor.cpp b/extract.cpp similarity index 94% rename from extractor.cpp rename to extract.cpp index 43a0296b1..2ad1f7af8 100644 --- a/extractor.cpp +++ b/extract.cpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2014, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -25,7 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "Extractor/Extractor.h" +#include "extractor/extractor.hpp" #include "Util/simple_logger.hpp" int main (int argc, char *argv[]) diff --git a/Extractor/ExtractionContainers.cpp b/extractor/extraction_containers.cpp similarity index 99% rename from Extractor/ExtractionContainers.cpp rename to extractor/extraction_containers.cpp index 466df324b..414d087a5 100644 --- a/Extractor/ExtractionContainers.cpp +++ b/extractor/extraction_containers.cpp @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "ExtractionContainers.h" -#include "ExtractionWay.h" +#include "extraction_containers.hpp" +#include "extraction_way.hpp" #include "../data_structures/node_id.hpp" #include "../data_structures/range_table.hpp" diff --git a/Extractor/ExtractionContainers.h b/extractor/extraction_containers.hpp similarity index 93% rename from Extractor/ExtractionContainers.h rename to extractor/extraction_containers.hpp index b96cbb8c7..8a1df8c36 100644 --- a/Extractor/ExtractionContainers.h +++ b/extractor/extraction_containers.hpp @@ -25,11 +25,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EXTRACTIONCONTAINERS_H_ -#define EXTRACTIONCONTAINERS_H_ +#ifndef EXTRACTION_CONTAINERS_HPP +#define EXTRACTION_CONTAINERS_HPP -#include "InternalExtractorEdge.h" -#include "FirstAndLastSegmentOfWay.h" +#include "internal_extractor_edge.hpp" +#include "first_and_last_segment_of_way.hpp" #include "../data_structures/external_memory_node.hpp" #include "../data_structures/restriction.hpp" #include "../Util/FingerPrint.h" @@ -67,4 +67,4 @@ class ExtractionContainers const std::string &restrictions_file_name); }; -#endif /* EXTRACTIONCONTAINERS_H_ */ +#endif /* EXTRACTION_CONTAINERS_HPP */ diff --git a/Extractor/ExtractionHelperFunctions.h b/extractor/extraction_helper_functions.hpp similarity index 96% rename from Extractor/ExtractionHelperFunctions.h rename to extractor/extraction_helper_functions.hpp index ea021ba18..d2a73c9c9 100644 --- a/Extractor/ExtractionHelperFunctions.h +++ b/extractor/extraction_helper_functions.hpp @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EXTRACTION_HELPER_FUNCTIONS_H -#define EXTRACTION_HELPER_FUNCTIONS_H +#ifndef EXTRACTION_HELPER_FUNCTIONS_HPP +#define EXTRACTION_HELPER_FUNCTIONS_HPP #include "../Util/cast.hpp" @@ -87,4 +87,4 @@ unsigned parseDuration(const std::string &s) return std::numeric_limits::max(); } -#endif // EXTRACTION_HELPER_FUNCTIONS_H_ +#endif // EXTRACTION_HELPER_FUNCTIONS_HPP diff --git a/Extractor/ExtractionNode.h b/extractor/extraction_node.hpp similarity index 94% rename from Extractor/ExtractionNode.h rename to extractor/extraction_node.hpp index 3f9e38e99..defd33394 100644 --- a/Extractor/ExtractionNode.h +++ b/extractor/extraction_node.hpp @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EXTRACTION_NODE_H -#define EXTRACTION_NODE_H +#ifndef EXTRACTION_NODE_HPP +#define EXTRACTION_NODE_HPP struct ExtractionNode { @@ -38,4 +38,4 @@ struct ExtractionNode bool traffic_lights; bool barrier; }; -#endif // EXTRACTION_NODE_H +#endif // EXTRACTION_NODE_HPP diff --git a/Extractor/ExtractionWay.h b/extractor/extraction_way.hpp similarity index 97% rename from Extractor/ExtractionWay.h rename to extractor/extraction_way.hpp index 8e509942a..9808d9cd3 100644 --- a/Extractor/ExtractionWay.h +++ b/extractor/extraction_way.hpp @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EXTRACTION_WAY_H -#define EXTRACTION_WAY_H +#ifndef EXTRACTION_WAY_HPP +#define EXTRACTION_WAY_HPP #include "../data_structures/travel_mode.hpp" #include "../typedefs.h" @@ -117,4 +117,4 @@ struct ExtractionWay TravelMode backward_travel_mode : 4; }; -#endif // EXTRACTION_WAY_H +#endif // EXTRACTION_WAY_HPP diff --git a/extractor/extractor.cpp b/extractor/extractor.cpp new file mode 100644 index 000000000..cf3ebdc88 --- /dev/null +++ b/extractor/extractor.cpp @@ -0,0 +1,263 @@ +/* + +Copyright (c) 2014, Project OSRM, Dennis Luxen, others +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "extractor.hpp" + +#include "extraction_containers.hpp" +#include "extraction_node.hpp" +#include "extraction_way.hpp" +#include "extractor_callbacks.hpp" +#include "extractor_options.hpp" +#include "restriction_parser.hpp" +#include "scripting_environment.hpp" + +#include "../Util/GitDescription.h" +#include "../Util/IniFileUtil.h" +#include "../Util/OSRMException.h" +#include "../Util/simple_logger.hpp" +#include "../Util/TimingUtil.h" +#include "../Util/make_unique.hpp" + +#include "../typedefs.h" + +#include + +#include + +#include +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +int Extractor::Run(int argc, char *argv[]) +{ + ExtractorConfig extractor_config; + + try + { + LogPolicy::GetInstance().Unmute(); + TIMER_START(extracting); + + if (!ExtractorOptions::ParseArguments(argc, argv, extractor_config)) + { + return 0; + } + ExtractorOptions::GenerateOutputFilesNames(extractor_config); + + if (1 > extractor_config.requested_num_threads) + { + SimpleLogger().Write(logWARNING) << "Number of threads must be 1 or larger"; + return 1; + } + + if (!boost::filesystem::is_regular_file(extractor_config.input_path)) + { + SimpleLogger().Write(logWARNING) + << "Input file " << extractor_config.input_path.string() << " not found!"; + return 1; + } + + if (!boost::filesystem::is_regular_file(extractor_config.profile_path)) + { + SimpleLogger().Write(logWARNING) << "Profile " << extractor_config.profile_path.string() + << " not found!"; + return 1; + } + + const unsigned recommended_num_threads = tbb::task_scheduler_init::default_num_threads(); + const auto number_of_threads = std::min(recommended_num_threads, extractor_config.requested_num_threads); + tbb::task_scheduler_init init(number_of_threads); + + SimpleLogger().Write() << "Input file: " << extractor_config.input_path.filename().string(); + SimpleLogger().Write() << "Profile: " << extractor_config.profile_path.filename().string(); + SimpleLogger().Write() << "Threads: " << number_of_threads; + + // setup scripting environment + ScriptingEnvironment scripting_environment(extractor_config.profile_path.string().c_str()); + + std::unordered_map string_map; + string_map[""] = 0; + + ExtractionContainers extraction_containers; + auto extractor_callbacks = + osrm::make_unique(extraction_containers, string_map); + + osmium::io::File input_file(extractor_config.input_path.string()); + osmium::io::Reader reader(input_file); + osmium::io::Header header = reader.header(); + + unsigned number_of_nodes = 0; + unsigned number_of_ways = 0; + unsigned number_of_relations = 0; + unsigned number_of_others = 0; + + SimpleLogger().Write() << "Parsing in progress.."; + TIMER_START(parsing); + + std::string generator = header.get("generator"); + if (generator.empty()) + { + generator = "unknown tool"; + } + SimpleLogger().Write() << "input file generated by " << generator; + + // write .timestamp data file + std::string timestamp = header.get("osmosis_replication_timestamp"); + if (timestamp.empty()) + { + timestamp = "n/a"; + } + SimpleLogger().Write() << "timestamp: " << timestamp; + + boost::filesystem::ofstream timestamp_out(extractor_config.timestamp_file_name); + timestamp_out.write(timestamp.c_str(), timestamp.length()); + timestamp_out.close(); + + // initialize vectors holding parsed objects + tbb::concurrent_vector> resulting_nodes; + tbb::concurrent_vector> resulting_ways; + tbb::concurrent_vector> + resulting_restrictions; + + // setup restriction parser + RestrictionParser restriction_parser(scripting_environment.getLuaState()); + + while (osmium::memory::Buffer buffer = reader.read()) + { + // create a vector of iterators into the buffer + std::vector osm_elements; + osmium::memory::Buffer::iterator iter = std::begin(buffer); + while (iter != std::end(buffer)) + { + osm_elements.push_back(iter); + iter = std::next(iter); + } + + // clear resulting vectors + resulting_nodes.clear(); + resulting_ways.clear(); + resulting_restrictions.clear(); + + // parse OSM entities in parallel, store in resulting vectors + tbb::parallel_for(tbb::blocked_range(0, osm_elements.size()), + [&](const tbb::blocked_range &range) + { + for (auto x = range.begin(); x != range.end(); ++x) + { + auto entity = osm_elements[x]; + + ExtractionNode result_node; + ExtractionWay result_way; + + switch (entity->type()) + { + case osmium::item_type::node: + ++number_of_nodes; + luabind::call_function( + scripting_environment.getLuaState(), + "node_function", + boost::cref(static_cast(*entity)), + boost::ref(result_node)); + resulting_nodes.push_back(std::make_pair(x, result_node)); + break; + case osmium::item_type::way: + ++number_of_ways; + luabind::call_function( + scripting_environment.getLuaState(), + "way_function", + boost::cref(static_cast(*entity)), + boost::ref(result_way)); + resulting_ways.push_back(std::make_pair(x, result_way)); + break; + case osmium::item_type::relation: + ++number_of_relations; + resulting_restrictions.push_back( + restriction_parser.TryParse(static_cast(*entity))); + break; + default: + ++number_of_others; + break; + } + } + }); + + // put parsed objects thru extractor callbacks + for (const auto &result : resulting_nodes) + { + extractor_callbacks->ProcessNode( + static_cast(*(osm_elements[result.first])), result.second); + } + for (const auto &result : resulting_ways) + { + extractor_callbacks->ProcessWay( + static_cast(*(osm_elements[result.first])), result.second); + } + for (const auto &result : resulting_restrictions) + { + extractor_callbacks->ProcessRestriction(result); + } + } + TIMER_STOP(parsing); + SimpleLogger().Write() << "Parsing finished after " << TIMER_SEC(parsing) << " seconds"; + SimpleLogger().Write() << "Raw input contains " << number_of_nodes << " nodes, " + << number_of_ways << " ways, and " << number_of_relations + << " relations, and " << number_of_others << " unknown entities"; + + extractor_callbacks.reset(); + + if (extraction_containers.all_edges_list.empty()) + { + SimpleLogger().Write(logWARNING) << "The input data is empty, exiting."; + return 1; + } + + extraction_containers.PrepareData(extractor_config.output_file_name, + extractor_config.restriction_file_name); + TIMER_STOP(extracting); + SimpleLogger().Write() << "extraction finished after " << TIMER_SEC(extracting) << "s"; + SimpleLogger().Write() << "To prepare the data for routing, run: " + << "./osrm-prepare " << extractor_config.output_file_name + << std::endl; + } + catch (std::exception &e) + { + SimpleLogger().Write(logWARNING) << e.what(); + return 1; + } + return 0; +} diff --git a/Extractor/Extractor.h b/extractor/extractor.hpp similarity index 68% rename from Extractor/Extractor.h rename to extractor/extractor.hpp index 3f98b9776..e9edbea54 100644 --- a/Extractor/Extractor.h +++ b/extractor/extractor.hpp @@ -1,5 +1,5 @@ -#ifndef EXTRACTOR_H_ -#define EXTRACTOR_H_ +#ifndef EXTRACTOR_HPP +#define EXTRACTOR_HPP #include @@ -10,4 +10,4 @@ struct Extractor { int Run(int argc, char *argv[]); }; -#endif /* EXTRACTOR_H_ */ +#endif /* EXTRACTOR_HPP */ diff --git a/Extractor/ExtractorCallbacks.cpp b/extractor/extractor_callbacks.cpp similarity index 98% rename from Extractor/ExtractorCallbacks.cpp rename to extractor/extractor_callbacks.cpp index f2e955c13..87e4f4f0b 100644 --- a/Extractor/ExtractorCallbacks.cpp +++ b/extractor/extractor_callbacks.cpp @@ -25,10 +25,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "ExtractorCallbacks.h" -#include "ExtractionContainers.h" -#include "ExtractionNode.h" -#include "ExtractionWay.h" +#include "extractor_callbacks.hpp" +#include "extraction_containers.hpp" +#include "extraction_node.hpp" +#include "extraction_way.hpp" #include "../data_structures/external_memory_node.hpp" #include "../data_structures/restriction.hpp" diff --git a/Extractor/ExtractorCallbacks.h b/extractor/extractor_callbacks.hpp similarity index 92% rename from Extractor/ExtractorCallbacks.h rename to extractor/extractor_callbacks.hpp index 7f700afa1..0bb30104b 100644 --- a/Extractor/ExtractorCallbacks.h +++ b/extractor/extractor_callbacks.hpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2014, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -25,10 +25,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EXTRACTOR_CALLBACKS_H -#define EXTRACTOR_CALLBACKS_H +#ifndef EXTRACTOR_CALLBACKS_HPP +#define EXTRACTOR_CALLBACKS_HPP -#include "ExtractionWay.h" +#include "extraction_way.hpp" #include "../typedefs.h" #include @@ -65,4 +65,4 @@ class ExtractorCallbacks void ProcessWay(const osmium::Way ¤t_way, const ExtractionWay &result_way); }; -#endif /* EXTRACTOR_CALLBACKS_H */ +#endif /* EXTRACTOR_CALLBACKS_HPP */ diff --git a/Extractor/ExtractorOptions.cpp b/extractor/extractor_options.cpp similarity index 98% rename from Extractor/ExtractorOptions.cpp rename to extractor/extractor_options.cpp index 80e5772d3..bbf611577 100644 --- a/Extractor/ExtractorOptions.cpp +++ b/extractor/extractor_options.cpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2014, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -25,7 +25,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "ExtractorOptions.h" +#include "extractor_options.hpp" #include "../Util/GitDescription.h" #include "../Util/IniFileUtil.h" diff --git a/Extractor/ExtractorOptions.h b/extractor/extractor_options.hpp similarity index 91% rename from Extractor/ExtractorOptions.h rename to extractor/extractor_options.hpp index 60d93c7b7..796d439b5 100644 --- a/Extractor/ExtractorOptions.h +++ b/extractor/extractor_options.hpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2014, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -25,10 +25,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EXTRACTOR_OPTIONS_H__ -#define EXTRACTOR_OPTIONS_H__ +#ifndef EXTRACTOR_OPTIONS_HPP +#define EXTRACTOR_OPTIONS_HPP -#include "Extractor.h" +#include "extractor.hpp" struct ExtractorConfig { @@ -50,4 +50,4 @@ struct ExtractorOptions static void GenerateOutputFilesNames(ExtractorConfig &extractor_config); }; -#endif // EXTRACTOR_OPTIONS_H__ +#endif // EXTRACTOR_OPTIONS_HPP diff --git a/Extractor/FirstAndLastSegmentOfWay.h b/extractor/first_and_last_segment_of_way.hpp similarity index 96% rename from Extractor/FirstAndLastSegmentOfWay.h rename to extractor/first_and_last_segment_of_way.hpp index f8fcd2d33..8e8ad7276 100644 --- a/Extractor/FirstAndLastSegmentOfWay.h +++ b/extractor/first_and_last_segment_of_way.hpp @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef EXTRACTORSTRUCTS_H_ -#define EXTRACTORSTRUCTS_H_ +#ifndef FIRST_AND_LAST_SEGMENT_OF_WAY_HPP +#define FIRST_AND_LAST_SEGMENT_OF_WAY_HPP #include "../data_structures/external_memory_node.hpp" #include "../typedefs.h" @@ -85,4 +85,4 @@ struct FirstAndLastSegmentOfWayStxxlCompare value_type min_value() { return FirstAndLastSegmentOfWay::min_value(); } }; -#endif /* EXTRACTORSTRUCTS_H_ */ +#endif /* FIRST_AND_LAST_SEGMENT_OF_WAY_HPP */ diff --git a/Extractor/InternalExtractorEdge.h b/extractor/internal_extractor_edge.hpp similarity index 97% rename from Extractor/InternalExtractorEdge.h rename to extractor/internal_extractor_edge.hpp index 113817460..ffd2d4a36 100644 --- a/Extractor/InternalExtractorEdge.h +++ b/extractor/internal_extractor_edge.hpp @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef INTERNAL_EXTRACTOR_EDGE_H -#define INTERNAL_EXTRACTOR_EDGE_H +#ifndef INTERNAL_EXTRACTOR_EDGE_HPP +#define INTERNAL_EXTRACTOR_EDGE_HPP #include "../typedefs.h" #include "../data_structures/travel_mode.hpp" @@ -115,4 +115,4 @@ struct CmpEdgeByTargetID value_type min_value() { return InternalExtractorEdge::min_value(); } }; -#endif // INTERNAL_EXTRACTOR_EDGE_H +#endif // INTERNAL_EXTRACTOR_EDGE_HPP diff --git a/Extractor/RestrictionParser.cpp b/extractor/restriction_parser.cpp similarity index 96% rename from Extractor/RestrictionParser.cpp rename to extractor/restriction_parser.cpp index 8199c480b..c469204c5 100644 --- a/Extractor/RestrictionParser.cpp +++ b/extractor/restriction_parser.cpp @@ -25,9 +25,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "RestrictionParser.h" -#include "ExtractionWay.h" -#include "ScriptingEnvironment.h" +#include "restriction_parser.hpp" +#include "extraction_way.hpp" +#include "scripting_environment.hpp" #include "../data_structures/external_memory_node.hpp" #include "../Util/lua_util.hpp" diff --git a/Extractor/RestrictionParser.h b/extractor/restriction_parser.hpp similarity index 95% rename from Extractor/RestrictionParser.h rename to extractor/restriction_parser.hpp index c7c7b6045..02a5db9dd 100644 --- a/Extractor/RestrictionParser.h +++ b/extractor/restriction_parser.hpp @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef RESTRICTION_PARSER_H_ -#define RESTRICTION_PARSER_H_ +#ifndef RESTRICTION_PARSER_HPP +#define RESTRICTION_PARSER_HPP #include "../data_structures/restriction.hpp" @@ -58,4 +58,4 @@ class RestrictionParser bool use_turn_restrictions; }; -#endif /* RESTRICTION_PARSER_H_ */ +#endif /* RESTRICTION_PARSER_HPP */ diff --git a/Extractor/ScriptingEnvironment.cpp b/extractor/scripting_environment.cpp similarity index 97% rename from Extractor/ScriptingEnvironment.cpp rename to extractor/scripting_environment.cpp index 0f192f511..2a9f226ad 100644 --- a/Extractor/ScriptingEnvironment.cpp +++ b/extractor/scripting_environment.cpp @@ -25,11 +25,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "ScriptingEnvironment.h" +#include "scripting_environment.hpp" -#include "ExtractionHelperFunctions.h" -#include "ExtractionNode.h" -#include "ExtractionWay.h" +#include "extraction_helper_functions.hpp" +#include "extraction_node.hpp" +#include "extraction_way.hpp" #include "../data_structures/external_memory_node.hpp" #include "../Util/lua_util.hpp" #include "../Util/OSRMException.h" diff --git a/Extractor/ScriptingEnvironment.h b/extractor/scripting_environment.hpp similarity index 91% rename from Extractor/ScriptingEnvironment.h rename to extractor/scripting_environment.hpp index 8fee658b3..585302f56 100644 --- a/Extractor/ScriptingEnvironment.h +++ b/extractor/scripting_environment.hpp @@ -1,6 +1,6 @@ /* -Copyright (c) 2013, Project OSRM, Dennis Luxen, others +Copyright (c) 2014, Project OSRM, Dennis Luxen, others All rights reserved. Redistribution and use in source and binary forms, with or without modification, @@ -25,8 +25,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef SCRIPTINGENVIRONMENT_H_ -#define SCRIPTINGENVIRONMENT_H_ +#ifndef SCRIPTING_ENVIRONMENT_HPP +#define SCRIPTING_ENVIRONMENT_HPP #include #include @@ -49,4 +49,4 @@ class ScriptingEnvironment tbb::enumerable_thread_specific> script_contexts; }; -#endif /* SCRIPTINGENVIRONMENT_H_ */ +#endif /* SCRIPTING_ENVIRONMENT_HPP */