Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix oneway #65

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-fstandalone-debug)
endif()

#include(cmake/StandardSettings.cmake)
#include(cmake/rootutils.cmake)
message("\nStarted CMake for ${PROJECT_NAME} v${PROJECT_VERSION}...\n")
Expand Down
6 changes: 4 additions & 2 deletions dev/osm2gmns_dev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@ int main(int /*argc*/, char* /*argv*/[]) {
absl::SetStderrThreshold(absl::LogSeverityAtLeast::kInfo);

// const auto map_folder = std::filesystem::path("maps/Texas");
const auto map_folder = std::filesystem::path("maps/Dallas");
// const auto map_folder = std::filesystem::path("maps/Dallas");
const auto map_folder = std::filesystem::path("maps/Columbus Ohio Data");

// const std::string map_filename = "map.osm.pbf";
// const std::string map_filename = "northwest-latest.osm.pbf";
const std::string map_filename = "map_sub.osm";
// const std::string map_filename = "map_sub.osm";
const std::string map_filename = "Columbus, Franklin County, Ohio, United States.pbf";

Network* network = getNetFromFile(map_folder / map_filename,
{ModeType::AUTO, ModeType::BIKE, ModeType::RAILWAY, ModeType::AEROWAY},
Expand Down
2 changes: 2 additions & 0 deletions src/osmnetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,8 @@ void OsmWay::configAttributes() {
if (!is_oneway_.has_value()) {
is_oneway_ = getDefaultOneWayFlag(highway_link_type_);
}
} else {
is_oneway_ = true;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/osmnetwork.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class OsmWay {
std::optional<int32_t> lanes_;
std::optional<int32_t> forward_lanes_;
std::optional<int32_t> backward_lanes_;
std::optional<bool> is_oneway_{true};
std::optional<bool> is_oneway_;
bool is_reversed_{false}; // ToDo: use when generating segments
std::optional<float> max_speed_;
std::string toll_;
Expand Down
Loading