Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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

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

How can I get rrs's clazz?

share|improve this question

1 Answer 1

up vote 0 down vote accepted
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);
share|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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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