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

bicycle=yes/no should override highway and access tags #41

Closed
emiltin opened this issue Dec 2, 2011 · 10 comments
Closed

bicycle=yes/no should override highway and access tags #41

emiltin opened this issue Dec 2, 2011 · 10 comments
Milestone

Comments

@emiltin
Copy link
Contributor

emiltin commented Dec 2, 2011

to have osrm even consider ways with highway=footway i need to add it to the speedprofile.

but now it seems osrm allows routing on all ways with highway=footway, even though there's no bicycle=yes tag.

bicycle=yes or bicycle=no should take precedence over the highway type, and also the acces=.. tag.

@DennisOSRM
Copy link
Collaborator

Thanks for the info. Perhaps it's time to develop a description language to model these dependencies.

@emiltin
Copy link
Contributor Author

emiltin commented Dec 2, 2011

perhaps. i think user mostly just want to set the priority on different types of ways, turns, tags, etc.
but as more of an internal tool it would allow easy updating of the tags parsing without recompiling osrm. instead you could just update the tag parse file.

on the other hand it might be simpler to just parse tags differently depending on car/bike/foot. i don't think the tag parsing would need to change often.

@DennisOSRM
Copy link
Collaborator

speedprofile.ini has a field accessTag, e.g. accessTag = bicycle. The following behavior is default now:

if("no" == accessTag) {
return true;
}

So, it has precedence over anything now when it's forbidden.See abfb498

@emiltin
Copy link
Contributor Author

emiltin commented Dec 5, 2011

a related problem is that when bicycle=yes overrides, there might not be any speed defined for the type of way. for example, a way might have highway=footway, bicycle=yes, but you haven't added footway to the speedprofile. osrm should route on the footway, but doesn't have any speed info for footway. adding footway to the speedprofile is not an option, because that turn on routing on all footways, instead of just those with bicycle=yes.
so seems you need to be able to specify speeds and routability separately in the profile?

@DennisOSRM
Copy link
Collaborator

Already working on a solution that integrates all ways that have for example bicycle=yes, but have an unlisted highway tag. Will take a day or two.

@DennisOSRM DennisOSRM reopened this Dec 5, 2011
@DennisOSRM
Copy link
Collaborator

Latest push to master has a number of changes that should implmement the
said behavior.

@emiltin
Copy link
Contributor Author

emiltin commented Dec 6, 2011

i can't compile the latest using scons:

scons: Building targets ...
g++ -o Contractor/EdgeBasedGraphFactory.o -c -O3 -DNDEBUG -lboost_thread-mt -lboost_system-mt -lboost_regex -lboost_iostreams -lbz2 -lz -lprotobuf -I/usr/include/libxml2 -I/usr/local/Cellar/libstxxl/1.3.1/include -I/usr/local/Cellar/boost/1.48.0/include Contractor/EdgeBasedGraphFactory.cpp
i686-apple-darwin11-llvm-g++-4.2: -lboost_thread-mt: linker input file unused because linking not done
i686-apple-darwin11-llvm-g++-4.2: -lboost_system-mt: linker input file unused because linking not done
i686-apple-darwin11-llvm-g++-4.2: -lboost_regex: linker input file unused because linking not done
i686-apple-darwin11-llvm-g++-4.2: -lboost_iostreams: linker input file unused because linking not done
i686-apple-darwin11-llvm-g++-4.2: -lbz2: linker input file unused because linking not done
i686-apple-darwin11-llvm-g++-4.2: -lz: linker input file unused because linking not done
i686-apple-darwin11-llvm-g++-4.2: -lprotobuf: linker input file unused because linking not done
protoc -I=DataStructures/pbf-proto --cpp_out=DataStructures/pbf-proto DataStructures/pbf-proto/fileformat.proto
protoc -I=DataStructures/pbf-proto --cpp_out=DataStructures/pbf-proto DataStructures/pbf-proto/osmformat.proto
g++ -o extractor.o -c -O3 -DNDEBUG -lboost_thread-mt -lboost_system-mt -lboost_regex -lboost_iostreams -lbz2 -lz -lprotobuf -I/usr/include/libxml2 -I/usr/local/Cellar/libstxxl/1.3.1/include -I/usr/local/Cellar/boost/1.48.0/include extractor.cpp
extractor.cpp: In function 'int main(int, char*)':
extractor.cpp:141: error: no match for 'operator=' in 'settings.Settings::speedProfile. boost::unordered::unordered_map<K, T, H, P, A>::operator[] [with K = std::basic_string<char, std::char_traits, std::allocator >, T = std::pair<int, int>, H = boost::hash<std::basic_string<char, std::char_traits, std::allocator > >, P = std::equal_to<std::basic_string<char, std::char_traits, std::allocator > >, A = std::allocator<std::pair<const std::basic_string<char, std::char_traits, std::allocator >, std::pair<int, int> > >](((const std::basic_string<char, std::char_traits, std::allocator >&)((const std::basic_string<char, std::char_traits, std::allocator >
)(& name)))) = atoi(value. std::basic_string<_CharT, _Traits, _Alloc>::c_str with _CharT = char, _Traits = std::char_traits, _Alloc = std::allocator)'
/usr/include/c++/4.2.1/bits/stl_pair.h:69: note: candidates are: std::pair<int, int>& std::pair<int, int>::operator=(const std::pair<int, int>&)
scons: *** [extractor.o] Error 1
scons: building terminated because of errors.

@DennisOSRM
Copy link
Collaborator

Missed a file in the commit. Try again

@DennisOSRM
Copy link
Collaborator

This bug can be closed, right?

@emiltin
Copy link
Contributor Author

emiltin commented Dec 10, 2011

yes, hereby closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants