From 2b195442ce08fadaaf118e6b34d11ef4ba69acae Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Mon, 11 Mar 2024 10:30:17 -0400 Subject: [PATCH 01/14] updated path location so that we don't share the same as utrecht.cc test --- test/graphparser.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/graphparser.cc b/test/graphparser.cc index 6038aaec4e..0e85f43c2f 100644 --- a/test/graphparser.cc +++ b/test/graphparser.cc @@ -533,6 +533,7 @@ void Bike(const std::string& config_file) { filesystem::remove(access_file); filesystem::remove(from_restriction_file); filesystem::remove(to_restriction_file); + filesystem::remove(bss_nodes_file); filesystem::remove(linguistic_node_file); } @@ -677,7 +678,7 @@ void DoConfig() { file << "{ \ \"mjolnir\": { \ \"id_table_size\": 1000, \ - \"tile_dir\": \"test/data/parser_tiles\" \ + \"tile_dir\": \"test/data/graph_parser_tiles\" \ } \ }"; } catch (...) {} @@ -828,7 +829,6 @@ TEST(GraphParser, TestImportBssNode) { filesystem::remove(ways_file); filesystem::remove(way_nodes_file); - filesystem::remove(bss_nodes_file); filesystem::remove(access_file); filesystem::remove(from_restriction_file); filesystem::remove(to_restriction_file); From ad2e534404c62533dc9a92922e5cbb62c905f99c Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Mon, 11 Mar 2024 10:41:30 -0400 Subject: [PATCH 02/14] updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8f15ea664..215ef54502 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,7 @@ * FIXED: Fixed roundoff issue in Tiles Row and Col methods [#4585](https://github.com/valhalla/valhalla/pull/4585) * ADDED: isochrone proper polygon support & pbf output for isochrone [#4575](https://github.com/valhalla/valhalla/pull/4575) * ADDED: return isotile grid as geotiff [#4594](https://github.com/valhalla/valhalla/pull/4594) + * FIXED: updated path location so that we don't share the same as utrecht.cc test [#4625](https://github.com/valhalla/valhalla/pull/4625) ## Release Date: 2023-05-11 Valhalla 3.4.0 * **Removed** From ae02884e06b7df3167ee9ad775f95f016f465d9e Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Mon, 11 Mar 2024 14:10:35 -0400 Subject: [PATCH 03/14] more cleanup --- test/graphparser.cc | 199 ++++++++++++++------------------------------ 1 file changed, 63 insertions(+), 136 deletions(-) diff --git a/test/graphparser.cc b/test/graphparser.cc index 0e85f43c2f..5c9498d24b 100644 --- a/test/graphparser.cc +++ b/test/graphparser.cc @@ -28,6 +28,16 @@ namespace { const std::string config_file = "test/test_config_gp"; +std::string ways_file = "test_ways.bin"; +std::string way_nodes_file = "test_way_nodes.bin"; +std::string nodes_file = "test_nodes.bin"; +std::string edges_file = "test_edges.bin"; +std::string access_file = "test_access.bin"; +std::string from_restriction_file = "test_from_complex_restrictions.bin"; +std::string to_restriction_file = "test_to_complex_restrictions.bin"; +std::string bss_nodes_file = "test_bss_nodes.bin"; +std::string linguistic_node_file = "test_linguistic_node.bin"; + const auto node_predicate = [](const OSMWayNode& a, const OSMWayNode& b) { return a.node.osmid_ < b.node.osmid_; }; @@ -48,18 +58,55 @@ OSMWay GetWay(uint32_t way_id, sequence& ways) { return *found; } +void DoConfig() { + std::ofstream file; + try { + file.open(config_file, std::ios_base::trunc); + file << "{ \ + \"mjolnir\": { \ + \"id_table_size\": 1000, \ + \"tile_dir\": \"test/data/graph_parser_tiles\" \ + } \ + }"; + } catch (...) {} + file.close(); +} + +// must do clean up here vs TearDown() as we are building data +// in the same directory multiple times +void CleanUp() { + if (filesystem::exists(ways_file)) + filesystem::remove(ways_file); + + if (filesystem::exists(way_nodes_file)) + filesystem::remove(way_nodes_file); + + if (filesystem::exists(nodes_file)) + filesystem::remove(nodes_file); + + if (filesystem::exists(edges_file)) + filesystem::remove(edges_file); + + if (filesystem::exists(access_file)) + filesystem::remove(access_file); + + if (filesystem::exists(from_restriction_file)) + filesystem::remove(from_restriction_file); + + if (filesystem::exists(to_restriction_file)) + filesystem::remove(to_restriction_file); + + if (filesystem::exists(bss_nodes_file)) + filesystem::remove(bss_nodes_file); + + if (filesystem::exists(linguistic_node_file)) + filesystem::remove(linguistic_node_file); +} + void BollardsGatesAndAccess(const std::string& config_file) { boost::property_tree::ptree conf; rapidjson::read_json(config_file, conf); - std::string ways_file = "test_ways.bin"; - std::string way_nodes_file = "test_way_nodes.bin"; - std::string access_file = "test_access.bin"; - std::string from_restriction_file = "test_from_complex_restrictions.bin"; - std::string to_restriction_file = "test_to_complex_restrictions.bin"; - std::string bss_nodes_file = "test_bss_nodes.bin"; - std::string linguistic_node_file = "test_linguistic_node.bin"; - auto osmdata = PBFGraphParser::ParseWays(conf.get_child("mjolnir"), {VALHALLA_SOURCE_DIR "test/data/liechtenstein-latest.osm.pbf"}, @@ -206,27 +253,13 @@ void BollardsGatesAndAccess(const std::string& config_file) { EXPECT_TRUE((bike_network & kMcn) && (bike_network & kRcn) && way_75786176.bike_network() == 0) << "rcn and mtb not marked on way 75786176."; - filesystem::remove(ways_file); - filesystem::remove(way_nodes_file); - filesystem::remove(access_file); - filesystem::remove(from_restriction_file); - filesystem::remove(to_restriction_file); - filesystem::remove(bss_nodes_file); - filesystem::remove(linguistic_node_file); + CleanUp(); } void RemovableBollards(const std::string& config_file) { boost::property_tree::ptree conf; rapidjson::read_json(config_file, conf); - std::string ways_file = "test_ways.bin"; - std::string way_nodes_file = "test_way_nodes.bin"; - std::string access_file = "test_access.bin"; - std::string from_restriction_file = "test_from_complex_restrictions.bin"; - std::string to_restriction_file = "test_to_complex_restrictions.bin"; - std::string bss_nodes_file = "test_bss_nodes.bin"; - std::string linguistic_node_file = "test_linguistic_node.bin"; - auto osmdata = PBFGraphParser::ParseWays(conf.get_child("mjolnir"), {VALHALLA_SOURCE_DIR "test/data/rome.osm.pbf"}, ways_file, way_nodes_file, access_file); @@ -250,27 +283,13 @@ void RemovableBollards(const std::string& config_file) { kEmergencyAccess | kPedestrianAccess | kWheelchairAccess | kBicycleAccess | kMopedAccess | kMotorcycleAccess); - filesystem::remove(ways_file); - filesystem::remove(way_nodes_file); - filesystem::remove(access_file); - filesystem::remove(from_restriction_file); - filesystem::remove(to_restriction_file); - filesystem::remove(bss_nodes_file); - filesystem::remove(linguistic_node_file); + CleanUp(); } void Exits(const std::string& config_file) { boost::property_tree::ptree conf; rapidjson::read_json(config_file, conf); - std::string ways_file = "test_ways.bin"; - std::string way_nodes_file = "test_way_nodes.bin"; - std::string access_file = "test_access.bin"; - std::string from_restriction_file = "test_from_complex_restrictions.bin"; - std::string to_restriction_file = "test_to_complex_restrictions.bin"; - std::string bss_nodes_file = "test_bss_nodes.bin"; - std::string linguistic_node_file = "test_linguistic_node.bin"; - auto osmdata = PBFGraphParser::ParseWays(conf.get_child("mjolnir"), {VALHALLA_SOURCE_DIR "test/data/harrisburg.osm.pbf"}, ways_file, way_nodes_file, access_file); @@ -302,27 +321,13 @@ void Exits(const std::string& config_file) { EXPECT_EQ(osmdata.node_names.name(node.exit_to_index()), "PA441") << "node exit_to not set correctly ."; - filesystem::remove(ways_file); - filesystem::remove(way_nodes_file); - filesystem::remove(access_file); - filesystem::remove(from_restriction_file); - filesystem::remove(to_restriction_file); - filesystem::remove(bss_nodes_file); - filesystem::remove(linguistic_node_file); + CleanUp(); } void Baltimore(const std::string& config_file) { boost::property_tree::ptree conf; rapidjson::read_json(config_file, conf); - std::string ways_file = "test_ways.bin"; - std::string way_nodes_file = "test_way_nodes.bin"; - std::string access_file = "test_access.bin"; - std::string from_restriction_file = "test_from_complex_restrictions.bin"; - std::string to_restriction_file = "test_to_complex_restrictions.bin"; - std::string bss_nodes_file = "test_bss_nodes.bin"; - std::string linguistic_node_file = "test_linguistic_node.bin"; - auto osmdata = PBFGraphParser::ParseWays(conf.get_child("mjolnir"), {VALHALLA_SOURCE_DIR "test/data/baltimore.osm.pbf"}, ways_file, way_nodes_file, access_file); @@ -430,27 +435,13 @@ void Baltimore(const std::string& config_file) { FAIL() << "98040438 restriction test failed."; } - filesystem::remove(ways_file); - filesystem::remove(way_nodes_file); - filesystem::remove(access_file); - filesystem::remove(from_restriction_file); - filesystem::remove(to_restriction_file); - filesystem::remove(bss_nodes_file); - filesystem::remove(linguistic_node_file); + CleanUp(); } void Bike(const std::string& config_file) { boost::property_tree::ptree conf; rapidjson::read_json(config_file, conf); - std::string ways_file = "test_ways.bin"; - std::string way_nodes_file = "test_way_nodes.bin"; - std::string access_file = "test_access.bin"; - std::string from_restriction_file = "test_from_complex_restrictions.bin"; - std::string to_restriction_file = "test_to_complex_restrictions.bin"; - std::string bss_nodes_file = "test_bss_nodes.bin"; - std::string linguistic_node_file = "test_linguistic_node.bin"; - auto osmdata = PBFGraphParser::ParseWays(conf.get_child("mjolnir"), {VALHALLA_SOURCE_DIR "test/data/bike.osm.pbf"}, ways_file, way_nodes_file, access_file); @@ -528,27 +519,13 @@ void Bike(const std::string& config_file) { EXPECT_TRUE(way_156539491.moped_forward()); EXPECT_TRUE(way_156539491.bike_backward()); - filesystem::remove(ways_file); - filesystem::remove(way_nodes_file); - filesystem::remove(access_file); - filesystem::remove(from_restriction_file); - filesystem::remove(to_restriction_file); - filesystem::remove(bss_nodes_file); - filesystem::remove(linguistic_node_file); + CleanUp(); } void Bus(const std::string& config_file) { boost::property_tree::ptree conf; rapidjson::read_json(config_file, conf); - std::string ways_file = "test_ways.bin"; - std::string way_nodes_file = "test_way_nodes.bin"; - std::string access_file = "test_access.bin"; - std::string from_restriction_file = "test_from_complex_restrictions.bin"; - std::string to_restriction_file = "test_to_complex_restrictions.bin"; - std::string bss_nodes_file = "test_bss_nodes.bin"; - std::string linguistic_node_file = "test_linguistic_node.bin"; - auto osmdata = PBFGraphParser::ParseWays(conf.get_child("mjolnir"), {VALHALLA_SOURCE_DIR "test/data/bus.osm.pbf"}, ways_file, way_nodes_file, access_file); @@ -611,27 +588,13 @@ void Bus(const std::string& config_file) { EXPECT_FALSE(way_225895737.bus_backward()); EXPECT_FALSE(way_225895737.bike_backward()); - filesystem::remove(ways_file); - filesystem::remove(way_nodes_file); - filesystem::remove(access_file); - filesystem::remove(from_restriction_file); - filesystem::remove(to_restriction_file); - filesystem::remove(bss_nodes_file); - filesystem::remove(linguistic_node_file); + CleanUp(); } void BicycleTrafficSignals(const std::string& config_file) { boost::property_tree::ptree conf; rapidjson::read_json(config_file, conf); - std::string ways_file = "test_ways.bin"; - std::string way_nodes_file = "test_way_nodes.bin"; - std::string access_file = "test_access.bin"; - std::string from_restriction_file = "test_from_complex_restrictions.bin"; - std::string to_restriction_file = "test_to_complex_restrictions.bin"; - std::string bss_nodes_file = "test_bss_nodes.bin"; - std::string linguistic_node_file = "test_linguistic_node.bin"; - auto osmdata = PBFGraphParser::ParseWays(conf.get_child("mjolnir"), {VALHALLA_SOURCE_DIR "test/data/nyc.osm.pbf"}, ways_file, way_nodes_file, access_file); @@ -662,27 +625,7 @@ void BicycleTrafficSignals(const std::string& config_file) { << "Bike rental at a shop not marked as intersection." */ - filesystem::remove(ways_file); - filesystem::remove(way_nodes_file); - filesystem::remove(access_file); - filesystem::remove(from_restriction_file); - filesystem::remove(to_restriction_file); - filesystem::remove(bss_nodes_file); - filesystem::remove(linguistic_node_file); -} - -void DoConfig() { - std::ofstream file; - try { - file.open(config_file, std::ios_base::trunc); - file << "{ \ - \"mjolnir\": { \ - \"id_table_size\": 1000, \ - \"tile_dir\": \"test/data/graph_parser_tiles\" \ - } \ - }"; - } catch (...) {} - file.close(); + CleanUp(); } TEST(GraphParser, TestBollardsGatesAndAccess) { @@ -727,16 +670,6 @@ TEST(GraphParser, TestImportBssNode) { conf.put("mjolnir.import_bike_share_stations", true); - std::string ways_file = "test_ways.bin"; - std::string way_nodes_file = "test_way_nodes.bin"; - std::string nodes_file = "test_nodes.bin"; - std::string edges_file = "test_edges.bin"; - std::string access_file = "test_access.bin"; - std::string from_restriction_file = "test_from_complex_restrictions.bin"; - std::string to_restriction_file = "test_to_complex_restrictions.bin"; - std::string bss_nodes_file = "test_bss_nodes.bin"; - std::string linguistic_node_file = "test_linguistic_node.bin"; - auto osmdata = PBFGraphParser::ParseWays(conf.get_child("mjolnir"), {VALHALLA_SOURCE_DIR "test/data/rome.osm.pbf"}, ways_file, way_nodes_file, access_file); @@ -827,13 +760,7 @@ TEST(GraphParser, TestImportBssNode) { check_edge_attribute(local_tile->directededge(edge_idx_2 + count_2 - 2), kPedestrianAccess, kBicycleAccess); - filesystem::remove(ways_file); - filesystem::remove(way_nodes_file); - filesystem::remove(access_file); - filesystem::remove(from_restriction_file); - filesystem::remove(to_restriction_file); - filesystem::remove(bss_nodes_file); - filesystem::remove(linguistic_node_file); + CleanUp(); } } // namespace From c0adc5be084893676ee526993bd7835394ac9337 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Mon, 11 Mar 2024 14:45:35 -0400 Subject: [PATCH 04/14] try cout --- src/mjolnir/pbfgraphparser.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/mjolnir/pbfgraphparser.cc b/src/mjolnir/pbfgraphparser.cc index 24663c5fbb..4b9af6ebf5 100644 --- a/src/mjolnir/pbfgraphparser.cc +++ b/src/mjolnir/pbfgraphparser.cc @@ -1895,9 +1895,8 @@ struct graph_callback : public OSMPBF::Callback { bool is_toll_node = is_barrier_toll_booth || is_highway_toll_gantry; bool named_toll_node = false; - OSMNode n; + OSMNode n{osmid}; OSMNodeLinguistic linguistics; - n.set_id(osmid); n.set_latlng(lng, lat); bool intersection = false; if (is_highway_junction) { From 6c77dcf22e20a3704f9aa4a653c747d93d01ee92 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Mon, 11 Mar 2024 15:29:20 -0400 Subject: [PATCH 05/14] revert back. --- src/mjolnir/pbfgraphparser.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mjolnir/pbfgraphparser.cc b/src/mjolnir/pbfgraphparser.cc index 4b9af6ebf5..24663c5fbb 100644 --- a/src/mjolnir/pbfgraphparser.cc +++ b/src/mjolnir/pbfgraphparser.cc @@ -1895,8 +1895,9 @@ struct graph_callback : public OSMPBF::Callback { bool is_toll_node = is_barrier_toll_booth || is_highway_toll_gantry; bool named_toll_node = false; - OSMNode n{osmid}; + OSMNode n; OSMNodeLinguistic linguistics; + n.set_id(osmid); n.set_latlng(lng, lat); bool intersection = false; if (is_highway_junction) { From 3361d47cbbd12ec6edc81b5d3440d5a70e92a4ae Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Mon, 11 Mar 2024 15:30:35 -0400 Subject: [PATCH 06/14] testing --- src/mjolnir/graphbuilder.cc | 3 +++ valhalla/mjolnir/osmnode.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/mjolnir/graphbuilder.cc b/src/mjolnir/graphbuilder.cc index 48262d5490..6c964ab9ab 100644 --- a/src/mjolnir/graphbuilder.cc +++ b/src/mjolnir/graphbuilder.cc @@ -1149,6 +1149,7 @@ void BuildTileSet(const std::string& ways_file, std::vector node_langs; OSMNodeLinguistic ling; if (node.linguistic_info_index() != 0) { + std::cout << "here1 " << node.linguistic_info_index() << std::endl; ling = linguistic_node.at(node.linguistic_info_index()); } OSMWay::ProcessNamesPronunciations(osmdata.node_names, default_languages, @@ -1848,6 +1849,7 @@ bool GraphBuilder::CreateSignInfoList( } else if (node.has_ref() && !fork && ramp) { OSMNodeLinguistic ling; if (node.linguistic_info_index() != 0) { + std::cout << "here2 " << node.linguistic_info_index() << std::endl; ling = linguistic_node.at(node.linguistic_info_index()); } @@ -2144,6 +2146,7 @@ bool GraphBuilder::CreateSignInfoList( OSMNodeLinguistic ling; if (node.linguistic_info_index() != 0) { + std::cout << "here3 " << node.linguistic_info_index() << std::endl; ling = linguistic_node.at(node.linguistic_info_index()); } diff --git a/valhalla/mjolnir/osmnode.h b/valhalla/mjolnir/osmnode.h index 66fa073917..772e69ca86 100644 --- a/valhalla/mjolnir/osmnode.h +++ b/valhalla/mjolnir/osmnode.h @@ -68,6 +68,7 @@ struct OSMNode { uint32_t lat7_; OSMNode() { + std::cout << "here" << std::endl; memset(this, 0, sizeof(OSMNode)); } From 1ff0ca7b0f632d8732b614e9cf88b0435adf358b Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Mon, 11 Mar 2024 15:46:31 -0400 Subject: [PATCH 07/14] clean up --- valhalla/mjolnir/osmnode.h | 1 - 1 file changed, 1 deletion(-) diff --git a/valhalla/mjolnir/osmnode.h b/valhalla/mjolnir/osmnode.h index 772e69ca86..66fa073917 100644 --- a/valhalla/mjolnir/osmnode.h +++ b/valhalla/mjolnir/osmnode.h @@ -68,7 +68,6 @@ struct OSMNode { uint32_t lat7_; OSMNode() { - std::cout << "here" << std::endl; memset(this, 0, sizeof(OSMNode)); } From b907568861a44afb9a799835df5f18370a02fab8 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Mon, 11 Mar 2024 21:25:16 -0400 Subject: [PATCH 08/14] updated --- test/graphparser.cc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/graphparser.cc b/test/graphparser.cc index 5c9498d24b..a6b63e0265 100644 --- a/test/graphparser.cc +++ b/test/graphparser.cc @@ -70,6 +70,25 @@ void DoConfig() { }"; } catch (...) {} file.close(); + + boost::property_tree::ptree conf; + rapidjson::read_json(config_file, conf); + + // Get the tile directory (make sure it ends with the preferred separator + std::string tile_dir = conf.get("mjolnir.tile_dir"); + if (tile_dir.back() != filesystem::path::preferred_separator) { + tile_dir.push_back(filesystem::path::preferred_separator); + } + + ways_file = tile_dir + ways_file; + way_nodes_file = tile_dir + way_nodes_file; + nodes_file = tile_dir + nodes_file; + edges_file = tile_dir + edges_file; + access_file = tile_dir + access_file; + from_restriction_file = tile_dir + from_restriction_file; + to_restriction_file = tile_dir + to_restriction_file; + bss_nodes_file = tile_dir + bss_nodes_file; + linguistic_node_file = tile_dir + linguistic_node_file; } // must do clean up here vs TearDown() as we are building data From ef62d7e48dbba91a74ed1442c42bd1778c73c0b6 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Tue, 12 Mar 2024 09:46:10 -0400 Subject: [PATCH 09/14] reverted --- src/mjolnir/graphbuilder.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/mjolnir/graphbuilder.cc b/src/mjolnir/graphbuilder.cc index 6c964ab9ab..48262d5490 100644 --- a/src/mjolnir/graphbuilder.cc +++ b/src/mjolnir/graphbuilder.cc @@ -1149,7 +1149,6 @@ void BuildTileSet(const std::string& ways_file, std::vector node_langs; OSMNodeLinguistic ling; if (node.linguistic_info_index() != 0) { - std::cout << "here1 " << node.linguistic_info_index() << std::endl; ling = linguistic_node.at(node.linguistic_info_index()); } OSMWay::ProcessNamesPronunciations(osmdata.node_names, default_languages, @@ -1849,7 +1848,6 @@ bool GraphBuilder::CreateSignInfoList( } else if (node.has_ref() && !fork && ramp) { OSMNodeLinguistic ling; if (node.linguistic_info_index() != 0) { - std::cout << "here2 " << node.linguistic_info_index() << std::endl; ling = linguistic_node.at(node.linguistic_info_index()); } @@ -2146,7 +2144,6 @@ bool GraphBuilder::CreateSignInfoList( OSMNodeLinguistic ling; if (node.linguistic_info_index() != 0) { - std::cout << "here3 " << node.linguistic_info_index() << std::endl; ling = linguistic_node.at(node.linguistic_info_index()); } From 6555fc981be0fb56a0e29385cd3fc9b05eb42ea2 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Tue, 12 Mar 2024 09:46:35 -0400 Subject: [PATCH 10/14] this was not the issue. can share dir --- test/graphparser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/graphparser.cc b/test/graphparser.cc index a6b63e0265..6e993ae79f 100644 --- a/test/graphparser.cc +++ b/test/graphparser.cc @@ -65,7 +65,7 @@ void DoConfig() { file << "{ \ \"mjolnir\": { \ \"id_table_size\": 1000, \ - \"tile_dir\": \"test/data/graph_parser_tiles\" \ + \"tile_dir\": \"test/data/parser_tiles\" \ } \ }"; } catch (...) {} From 0b0308f5c7e491b41dfb08c02d148ac512995b33 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Tue, 12 Mar 2024 09:46:55 -0400 Subject: [PATCH 11/14] was using same test file. --- test/signinfo.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/signinfo.cc b/test/signinfo.cc index a64ba0f8b9..c544bad0d6 100644 --- a/test/signinfo.cc +++ b/test/signinfo.cc @@ -30,7 +30,7 @@ TEST(Signinfo, ExitToTest) { std::vector signs; std::vector linguistics; std::vector> default_languages; - const std::string linguistic_node_file = "test_linguistic_node.bin"; + const std::string linguistic_node_file = "test_sign_linguistic_node.bin"; sequence linguistic_node(linguistic_node_file, true); bool has_guide = GraphBuilder::CreateSignInfoList(exit_node, way, pronunciationMap, langMap, From 80b46fd693863e79b7c9c546198f8ee9adac2bab Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Tue, 12 Mar 2024 09:59:45 -0400 Subject: [PATCH 12/14] reverted back. --- test/graphparser.cc | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/test/graphparser.cc b/test/graphparser.cc index 6e993ae79f..74d7a5fc44 100644 --- a/test/graphparser.cc +++ b/test/graphparser.cc @@ -65,30 +65,11 @@ void DoConfig() { file << "{ \ \"mjolnir\": { \ \"id_table_size\": 1000, \ - \"tile_dir\": \"test/data/parser_tiles\" \ + \"tile_dir\": \"test/data/graph_parser_tiles\" \ } \ }"; } catch (...) {} file.close(); - - boost::property_tree::ptree conf; - rapidjson::read_json(config_file, conf); - - // Get the tile directory (make sure it ends with the preferred separator - std::string tile_dir = conf.get("mjolnir.tile_dir"); - if (tile_dir.back() != filesystem::path::preferred_separator) { - tile_dir.push_back(filesystem::path::preferred_separator); - } - - ways_file = tile_dir + ways_file; - way_nodes_file = tile_dir + way_nodes_file; - nodes_file = tile_dir + nodes_file; - edges_file = tile_dir + edges_file; - access_file = tile_dir + access_file; - from_restriction_file = tile_dir + from_restriction_file; - to_restriction_file = tile_dir + to_restriction_file; - bss_nodes_file = tile_dir + bss_nodes_file; - linguistic_node_file = tile_dir + linguistic_node_file; } // must do clean up here vs TearDown() as we are building data @@ -778,7 +759,6 @@ TEST(GraphParser, TestImportBssNode) { kPedestrianAccess); check_edge_attribute(local_tile->directededge(edge_idx_2 + count_2 - 2), kPedestrianAccess, kBicycleAccess); - CleanUp(); } From 043610ec99c33b306a2be2570c116c46cf5fc777 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Tue, 12 Mar 2024 10:20:04 -0400 Subject: [PATCH 13/14] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 215ef54502..3e5c6aa4b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,7 +96,7 @@ * FIXED: Fixed roundoff issue in Tiles Row and Col methods [#4585](https://github.com/valhalla/valhalla/pull/4585) * ADDED: isochrone proper polygon support & pbf output for isochrone [#4575](https://github.com/valhalla/valhalla/pull/4575) * ADDED: return isotile grid as geotiff [#4594](https://github.com/valhalla/valhalla/pull/4594) - * FIXED: updated path location so that we don't share the same as utrecht.cc test [#4625](https://github.com/valhalla/valhalla/pull/4625) + * FIXED: Conflict with signinfo's temporary linguistic node sequence file caused test failures. [#4625](https://github.com/valhalla/valhalla/pull/4625) ## Release Date: 2023-05-11 Valhalla 3.4.0 * **Removed** From 66ecf2d63f6412a916105c647dd4aaa0d7facc62 Mon Sep 17 00:00:00 2001 From: Greg Knisely Date: Tue, 12 Mar 2024 10:51:06 -0400 Subject: [PATCH 14/14] Update graphparser.cc reverted back --- test/graphparser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/graphparser.cc b/test/graphparser.cc index 74d7a5fc44..4df5671a1f 100644 --- a/test/graphparser.cc +++ b/test/graphparser.cc @@ -65,7 +65,7 @@ void DoConfig() { file << "{ \ \"mjolnir\": { \ \"id_table_size\": 1000, \ - \"tile_dir\": \"test/data/graph_parser_tiles\" \ + \"tile_dir\": \"test/data/parser_tiles\" \ } \ }"; } catch (...) {}