osm2pgrouting
osm2pgrouting copied to clipboard
standard value for maxspeed
if you set no maxspeed in mapconfig then.
in configuration table 40 is written in ways table 50 is used for ways without maxspeed.
osm2pgrouting 2.3.1 on windows 10 1909
Example: I removed all maxspeed tags from osm dataset and did not set any maxspeed in mapconfig.xml
configuration: (maxspeed standard says 40) 1 -402 "access" "no" 4 40 40 40 "N" 2 401 "access" "yes" 4 40 40 40 "N" 3 102 "bicycle" "designated" 1 40 40 40 "Y" 4 -103 "bicycle" "no" 1 40 40 40 "Y" 5 101 "bicycle" "yes" 1 40 40 40 "Y" ...
ways: (all maxspeed values are set to 50) 1 742741584 -551 0.00048988587446328 38.6107942079199 181 1117 20925383 2474429010 0.00048988587446328 -0.00048988587446328 2.77997718297024 -2.77997718297024 1 "YES" 9.6749674 52.4389587 9.6754043 52.4391803 50 50 1 2 27064620 505 0.00133795937531873 91.0464431682603 "Engelbosteler Straße" 325 1 7602833335 2620112807 0.00133795937531873 0.00133795937531873 6.55534390811474 6.55534390811474 2 "NO" 9.6344026 52.4465895 9.6357399 52.4465475 50 50 5 3 24776308 507 0.00239707010584194 233.055083939022 "Mühlenweg" 58 3 269226210 549014240 0.00239707010584194 0.00239707010584194 16.7799660436096 16.7799660436096 0 "UNKNOWN" 9.7307327 52.4755479 9.7309007 52.4736684 50 50 5
configuration.cpp line 68
Configuration::maxspeed(const Tag &tag) const {
if (tag_key(tag).has(tag, "maxspeed"))
return boost::lexical_cast<double>(tag_key(tag).get(tag, "maxspeed"));
return 50;
}
way.cpp line 276
if (is_number(value)) {
return boost::lexical_cast<double>(value);
}
// ...
return 50;
tag_key.cpp line 75 is only used for configuration table
std::vector<std::string>
Tag_key::values(const std::vector<std::string> &columns) const {
std::vector<std::string> export_values;
for (const auto &item : m_Tag_values) {
auto row = item.second.values(columns, true);
row[1] = name();
row[2] = item.second.get_attribute("name");
// row[3] has priority
if (row[4] == "") row[4] = "40"; // max_speed
if (row[5] == "") row[5] = row[4];
if (row[6] == "") row[6] = row[4];
if (row[7] == "") row[7] = "N";
export_values.push_back(tab_separated(row));
}
return export_values;
}