initial work towards generic weighting&encoding ('more flexible' work) #730

Closed
wants to merge 6 commits into
from

Projects

None yet

3 participants

@karussell
Member

See the forum for more discussion.

There are lots of TODOs and currently no integration tests, so it is not time to merge but to play around for you. You can currently configure the average speed of the highways the (car-like) vehicle should use. E.g. overwrite residential, tertiary and secondary via this request.

@karussell karussell initial work towards generic flexible weighting&encoding
a8020dd
@karussell karussell added this to the 0.8 milestone May 31, 2016
@karussell karussell fixed tests
3874ef8
@karussell karussell changed the title from initial work towards generic flexible weighting&encoding to initial work towards generic weighting&encoding ('more flexible' work) May 31, 2016
@boldtrn boldtrn commented on an outdated diff Sep 5, 2016
.../com/graphhopper/routing/util/GenericFlagEncoder.java
+ private final Map<String, Integer> transportModeMap = new HashMap<>();
+
+ public GenericFlagEncoder()
+ {
+ // TODO include turn information
+ super(5, 5, 0);
+
+ maxPossibleSpeed = 140;
+
+ //
+ // TODO do something about the access values (forestry, agricultural, destination, private, delivery, customers)
+ //
+ List<String> highwayList = Arrays.asList(
+ /* reserve index=0 for unset roads (not accessible) */
+ "_default",
+ "motorway", "motorway_link", "motorroad",
@boldtrn
boldtrn Sep 5, 2016 edited Member

Why do you define motorroad here? I thought this would not be not an highway value - http://overpass-turbo.eu/s/idk

@boldtrn boldtrn and 1 other commented on an outdated diff Sep 5, 2016
.../com/graphhopper/routing/util/GenericFlagEncoder.java
+ // TODO include turn information
+ super(5, 5, 0);
+
+ maxPossibleSpeed = 140;
+
+ //
+ // TODO do something about the access values (forestry, agricultural, destination, private, delivery, customers)
+ //
+ List<String> highwayList = Arrays.asList(
+ /* reserve index=0 for unset roads (not accessible) */
+ "_default",
+ "motorway", "motorway_link", "motorroad",
+ "trunk", "trunk_link",
+ "primary", "primary_link", "secondary", "secondary_link", "tertiary", "tertiary_link",
+ "unclassified", "residential", "living_street", "service", "road", "track",
+ "ferry", "shuttle");
@boldtrn
boldtrn Sep 5, 2016 Member

I also could not find anything about shuttle in OSM, is this description more general to also support non-osm sources?

@karussell
karussell Sep 5, 2016 edited Member

Sorry, this is a typo: should be shuttle_train http://wiki.openstreetmap.org/wiki/Proposed_features/shuttle_train

@boldtrn
boldtrn Sep 5, 2016 Member

There is no need to be sorry :)

But I am wondering: this is used in the route tag and not the highway tag, but we never look in the route tag for it (or I missed it?).

@karussell
karussell Sep 5, 2016 edited Member

There is no need to be sorry :)

:) sure 👍 !

Yes, this is used in the route tag but I was trying to avoid a new tag key here as there are no combinations of e.g. motorway and ferry or with shuttle. This is just to avoid using yet another set of bits and to save a bit memory. Not sure if this is wise.

@boldtrn
boldtrn Sep 5, 2016 Member

Yes I am with you in that point. But I mean we are not reading the route tag yet in this PR, right?

But what about the motorroad, see my comment above?

@karussell
karussell Sep 5, 2016 Member

But I mean we are not reading the route tag yet in this PR, right?

Yes

But what about the motorroad, see my comment above?

Same here (where we could interpret motorroad=yes as highway=motorroad) but probably we should remove that

@boldtrn
boldtrn Sep 5, 2016 Member

Thanks for your answers :), helped me a lot to understand what's happening.

karussell added some commits Sep 9, 2016
@karussell karussell minor changes to merge feature f414d1c
@karussell karussell minor tweaks f7e296d
karussell added some commits Sep 12, 2016
@karussell karussell merged master
57ff841
@karussell karussell minor tweaks
c646e56
@karussell karussell added a commit that referenced this pull request Sep 12, 2016
@karussell karussell new DataFlagEncoder with more flexible GenericWeighting, #730 ca5fb9e
@devemux86
Contributor

We cannot combine the regular encoders (e.g. car) with the DataFlagEncoder's features like store of highway tags?
I mean using a CarFlagEncoder and retrieving the road type of an edge, as generic appears as an independent vehicle for the graph.

@karussell
Member
karussell commented Sep 13, 2016 edited

Not yet, but this is one of the tasks now.

@karussell karussell closed this Sep 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment