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.

I have something like this:

int[] edges = graph.findCloseEdges(lat, lon, 1); // returns only one element
RoutingResultSegment rrs = graph.lookupSegment(edges[0]);
LatLon[] latlons = rrs.getLatLons()

For the red dot in the image (with lat/lon), array latlons contains the blue points. I would instead expect "close edge" to be a segment of the A3/E70 road.

Here is the image (I don't have enough reputation to post images apparently).

What is the third integer argument in findCloseGraph and what does this method return? I need to do simple "snap to road".

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Oh, this is a very expert question ;-)

graph.findCloseEdges(lat, lon, x)

finds x close Edges that are not necessarily the closest ones. What you are going to find is clear. Use TouchPoint.create(...) instead.

share|improve this answer
add comment

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.