0

Can I get clazz of a segment in Java? For example,

RoutingResultSegment rrs = graph.lookupSegment(path[j])

How can I get rrs's clazz?

0
rrs.getFlags()

returns a user defined 32 Bit Integer which contains the configured road type by default. You can override this beavior if needed. In order to save memory it always returns 0. To activate it open the graph with e.g.

Graph graph = new Graph(graphFile, new Log(), Graph.SUPPORT_EDGEFLAGS);
| improve this answer | |
  • Thanks! To use findClosestVertexId, I also needed Graph.SUPPORT_LATLON. Are javadocs available? – user19858 Jul 9 '13 at 7:43
  • Not online and not in english (only in german ;-( Nevertheless I've already sent the java-docs (routing part only) to some people via mail. So if you need it, please contact me via email. – Carsten Jul 10 '13 at 12:22
  • Unfortunately I don't know German. I have one more problem gis.stackexchange.com/questions/65734/… Variable names are generic in findCloseEdges so I am not sure what the third argument is. – user19858 Jul 10 '13 at 14:36
  • I just answered it ;-) – Carsten Jul 10 '13 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.