Skip to content

Commit

Permalink
Merge pull request #11 from OPTITOOL/removeTurnRestrictions
Browse files Browse the repository at this point in the history
Remove turn restrictions
  • Loading branch information
Venator2013 authored Jul 11, 2024
2 parents 76d1cfe + 76c8c50 commit 002c5a2
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 319 deletions.
42 changes: 19 additions & 23 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@

{
"name": "DevContainer for morturi",

// Sets the run context to one level up instead of the .devcontainer folder.
"context": ".",

// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "Dockerfile",


"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"piotrkosek.vscode-gtest-test-adapter-with-code-lens",
"xaver.clang-format",
"twxs.cmake",
// "josetr.cmake-language-support-vscode",
"ms-vscode.cmake-tools",
"donjayamanne.git-extension-pack"
]
}
"name": "DevContainer for morturi",
// Sets the run context to one level up instead of the .devcontainer folder.
"context": ".",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"extensions": [
"ms-vscode.cpptools",
"piotrkosek.vscode-gtest-test-adapter-with-code-lens",
"xaver.clang-format",
"twxs.cmake",
// "josetr.cmake-language-support-vscode",
"ms-vscode.cmake-tools",
"donjayamanne.git-extension-pack"
]
}
}
},
"remoteUser": "root"
}
14 changes: 5 additions & 9 deletions comm2osm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "plugins/navteq/navteq_plugin.hpp"

boost::filesystem::path input_path, output_file;
static bool withTrunRestrictions = false;
std::vector<double> boundingBox;
std::vector<std::string> countries;
static bool debug = false;
Expand All @@ -29,12 +28,11 @@ void check_args_and_setup(int argc, char *argv[]) {

// options
boost::program_options::options_description desc{"Options"};
desc.add_options()("help,h", "print usage message") //
("turn-restrictions,tr",
boost::program_options::value<bool>(&withTrunRestrictions)
->default_value(false),
"enable turn restrictions")
//("bounding-box,bb", boost::program_options::value(&bb), "bounding box")
desc.add_options()(
"help,h", "print usage message") //
//("bounding-box,bb",
// boost::program_options::value(&bb),
//"bounding box")
("countries,c",
boost::program_options::value<std::string>(&countriesString),
"list of countries (Iso codes seperate by space)") //
Expand Down Expand Up @@ -118,8 +116,6 @@ int main(int argc, char *argv[]) {
boundingBox[3]);

if (plugin->check_input(input_path, output_file)) {
plugin->setWithTurnRestrictions(withTrunRestrictions);

BOOST_LOG_TRIVIAL(info) << "executing plugin " << plugin->get_name();
plugin->execute();
}
Expand Down
5 changes: 0 additions & 5 deletions plugins/base_plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,6 @@ class base_plugin {
* */
virtual void execute() = 0;

/**
* \brief Also convert turn restrictions
* */
virtual void setWithTurnRestrictions(bool withTurnRestrictions) = 0;

/**
* \brief Only convert elements in the given bounding box
* */
Expand Down
2 changes: 0 additions & 2 deletions plugins/dummy/dummy_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,3 @@ bool dummy_plugin::check_input(boost::filesystem::path,
void dummy_plugin::execute() {
std::cout << "dummy has nothing to execute" << std::endl;
}

void dummy_plugin::setWithTurnRestrictions(bool) {}
2 changes: 0 additions & 2 deletions plugins/dummy/dummy_plugin.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ class dummy_plugin : public base_plugin {
check_input(boost::filesystem::path input_path,
boost::filesystem::path output_path = boost::filesystem::path());
void execute();

void setWithTurnRestrictions(bool withTurnRestrictions);
};

#endif /* DUMMYPLUGIN_HPP_ */
Loading

0 comments on commit 002c5a2

Please sign in to comment.