perliedman / geojson-path-finder

Find shortest path through a network of GeoJSON
https://www.liedman.net/geojson-path-finder/
ISC License
301 stars 87 forks source link

Path missing start point #29

Open egemenokten opened 6 years ago

egemenokten commented 6 years ago

Hi again @perliedman ! Your algorithm working well but i have a problem. when i try to create a small section (max 8-9 segments) , the result returning missing start point.
Marker on the left is start point. 1 Here is the result 2

But this problem did not occur in larger sections. Can you help me ?

perliedman commented 6 years ago

Hi!

Any chance you can share your network, or part of it, that reproduces the problem? It's really hard to track things like these down without a clear example that shows the problem.

egemenokten commented 6 years ago

two segments that precede the start segment {"properties": {"roadClass": "1", "id": 216444}, "type": "Feature", "geometry": {"coordinates": [[32.794495, 39.908943], [32.794976, 39.908964]], "type": "LineString"}}, {"properties": {"roadClass": "1", "id": 216445}, "type": "Feature", "geometry": {"coordinates": [[32.794976, 39.908964], [32.795457, 39.908986]], "type": "LineString"}}, Start Point > {"properties": {"roadClass": "1", "id": 216446}, "type": "Feature", "geometry": {"coordinates": [[32.795457, 39.908986], [32.795937, 39.909009]], "type": "LineString"}}, {"properties": {"roadClass": "1", "id": 7425667}, "type": "Feature", "geometry": {"coordinates": [[32.795937, 39.909009], [32.796434, 39.909027]],"type": "LineString"}}, {"properties": {"roadClass": "1", "id": 7425668}, "type": "Feature", "geometry": {"coordinates": [[32.796434, 39.909027,], [32.79693, 39.909052]], "type": "LineString"}}, {"properties": {"roadClass": "1", "id": 7425669}, "type": "Feature", "geometry": {"coordinates": [[32.79693, 39.909052], [32.797426, 39.909082]], "type": "LineString"}}, Finish > {"properties": {"roadClass": "1", "id": 7425669}, "type": "Feature", "geometry": {"coordinates": [[32.79693, 39.909052], [32.797426, 39.909082]], "type": "LineString"}},

result screenshot from 2018-02-01 13-09-19

and my network. (it can be difficult to open because the file is large. I suggest opening with sublime) segments.txt