-
Notifications
You must be signed in to change notification settings - Fork 69
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Enhancement: nogo areas #19
Comments
Implementation is not planned but it's also not going to be very difficult... What's the usecase? What are you using this for? |
I'm trying to explain using a simple example. Take into account that I'm using a routing with heavy vehicle (hgv) Looking at the picture below suppose you have to go from one point to the The right path must be as follows I realize this goal defining a sort of nogo area where traversing should be If the destination point is inside the nogo area than the right path is as You should avoid as much as nogo area is possible. Defining the nogo area as circle is simpler but the best should be having I know that there is a RestrictionsDb but I haven't understood well the Do you have some directions on how to achieve this goal. If you need further info don't hesitate to ask. Thanks in advance, 2016-09-08 15:55 GMT+02:00 Ben Abelshausen notifications@github.com:
Alessandro Cavalieri |
Normally the routing prioritize large roads over smaller ones just because of the speed profiles. You could build a new profile that does this more aggresively but I have done this already for another project myself. I just add this profile. If you use (Vehicle).Classified() instead of .Fastest() things should be better already. |
Very very few roads have dimension attribute and the speed attribute
doesn't help.
The problem is that if you have a 40tons, 12 meters length vehicle it is
better you don't go through city roads even if the road is classified as
primary and is 10 meters wide and has 50km speed limit. The same apply to
mountains road due to elevation.
I played a little with profile (in my custom vehicle profile I already have
the Classified one) but, for what I saw, it doesn't help.
The problem is not easy as my example, just to give you another point; some
mountain roads you should avoid in winter but you can go in summer
(sometime are really close in winter).
I need to define an area where driving is penalized and should be avoided
if there are alternatives even if much longer or take (theoretically) more
time.
Thanks for you attention.
|
Ok, then I would advise to include this in a separate preprocessing step. Let's say you take polygons of residential areas and for the edges in those areas you add an extra attribute to the edgeprofile (=edge attributes). Next you adjust your vehicle profile to penalize these edges. For the winter/summer issue, there are tags for this in OSM: https://help.openstreetmap.org/questions/23468/how-to-tag-access-restriction-on-snow-and-ice Itinero doesn't support these by default, but it's possible to do so. |
Oh, and I would be open to including this by default now... I can see other usecases for this feature too. |
"Ok, then I would advise to include this in a separate preprocessing step. this means that when I add or change those areas I need to rebuild the 2016-09-09 13:24 GMT+02:00 Ben Abelshausen notifications@github.com:
Alessandro Cavalieri |
You told me to use edge attributes but at first sight RestrictionDb seems to be the for this purpose, am I wrong? |
I would get all edges within the area and mark them with an extra attribute, then build a vehicle profile that can handle this. This way you can use all the existing optimizations for fast routing. The restrictions db is for turn-restrictions. |
Ok. I agree. I'll study how to collect all the adges within an area, and what is the processing step where I can insert this logic. |
You can use this to get all vertices in a boundingbox for example: A GeometricGraph is found by using RouterDb.Network.GeometricGraph if I'm right. |
Ok. thanks for the suggestion. I'm taking a look at the CycleNetworkProcessor function as an example. 2016-09-12 17:27 GMT+02:00 Ben Abelshausen notifications@github.com:
Alessandro Cavalieri |
Ah that's a good option also... I did not consider doing this during OSM preprocessing... Only a good option if you are sure you will only use OSM-data. |
Yes I use only OSM-data. I'm trying to figure out if is better to add the extra tag to nodes or 2016-09-12 18:09 GMT+02:00 Ben Abelshausen notifications@github.com:
Alessandro Cavalieri |
Just to let you know, I'm putting this on the roadmap as one of the first features to be implemented for Itinero 2.0 once Itinero 1.0 is released (for 1.0, there is a feature stop, otherwise there will never be a release) but more in the line of speed restrictions based on areas:
|
This is a good news, but I have to find a solution asap. |
I'm try to implement the TwoPassProcessor class for my nogo area problem. |
Hi Ben,
A little help is appreciate I have a list of:
|
@alecava58 Can you give a bit more context around this code... Are you trying to add extra tags to ways inside the nogo areas? |
Yes. Right. The extra tag should be used in a custom profile. -- Alessandro Il 09 nov 2016 2:12 PM, "Ben Abelshausen" notifications@github.com ha
|
This is what I'm trying to do: is that right? |
It works. It seems to be ok. I have to disable tags normalization and add the following to the vehicle profile: `
` Is there a better way to achieve this without disable tag normalization? Thanks in advance. |
In the latest version, with the lua profiles you can do this by adding the tags to the profile-whitelist. They shouldn't be deleted, even when using normalization... Closing this issue, the no-go area feature in now on the roadmap and I consider the any new issue as issues related to the vehicle profiles and lua. Feel free to reopen, or file a new issue about the lua profiles... 👍 |
Good news.
I really appreciate your effort.
Thanks.
…-- Alessandro
Il 19 dic 2016 15:44, "Ben Abelshausen" <notifications@github.com> ha
scritto:
In the latest version, with the lua profiles you can do this by adding the
tags to the profile-whitelist. They shouldn't be deleted, even when using
normalization...
Closing this issue, the no-go area feature in now on the roadmap
<https://github.com/itinero/routing/wiki/Roadmap#version-20-and-beyond>
and I consider the any new issue as issues related to the vehicle profiles
and lua.
Feel free to reopen, or file a new issue about the lua profiles... 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#19 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABtMQcqnA5KMN4bre9yWeo6lUyPy7_tHks5rJphdgaJpZM4J03O7>
.
|
The project is very good but is missing a feature I need (I think):
I'm planning to add a new routing constraint called "nogo areas" to the routing engine, like "brouter.de" does.
One "nogo" area has the following properties:
a center (lat, lon)
a radius in meters
a vale of cost (penalty)
The logic is that the routing engine should avoid, if possible, those areas.
When a calculated path goes through one ore more "nogo" areas the value of cost (penalty) must be added to the cost function.
This means that if there is an alternative, even much longer, the alternative must be preferred.
If the target is inside one "nogo" area the solution is still possible (in this case even if the cost is high there isn't alternative), unless the cost value is a particular value (let say 100000), in this case the "nogo" area is strictly forbidden and the calculation fails.
There is something like that already?
if no
Are you planned to implement something like that?
if no
Do you think that I could implement it?
if yes
Can you give me some info on how could be implemented?
If I decided to proceed are you interested if I make a branch and after you decide if can be merged with the main?
Regards,
Alessandro
The text was updated successfully, but these errors were encountered: