Hi forum,

I have an input data set with sparse points and am seeing incorrect edges snapped to a point returned in MatchResult. The line color corresponds to the way id that is associated with each snapped point. I’ve highlighted the incorrect edge in black.

Here is another example (point was snapped to way in orange where, based on the sequence of points, it should have been snapped to the way in green):

This is the logic I am using to get the snapped points.

for (em <- mr.getEdgeMatches) {

```
val gpxExtensions = em.getGpxExtensions
if (gpxExtensions.size()>0) {
for (gpxExtension <- gpxExtensions) {
val res = gpxExtension.getQueryResult
val edgeState = res.getClosestEdge
// get way id of closest edge
val wayId = GraphhopperFactory.getOSMInfo(edgeState)
// get snapped point
val snappedPoint = res.getSnappedPoint
```

,

When I inspect the edge match in MatchResult, both incoming and outgoing edges are null. Should I be filtering out these edges?

Also I don’t know what the difference is between the edges returned by:

val mergedPath = mr.getMergedPath.calcEdges

vs

mr.getEdgeMatches

I need the original timestamps in order to interpolate points on edges for which no GPX entry exists, and this it the reason why I’m using the later in order to navigate to the points in GPXExtensions which have timestamp information.

Any help would be greatly appreciated!

Thanks,

Trang