2

I have a GeoJSON objects and I want to route between way-points on my GeoJSON file.

This is my example GeoJSON file:

{
  "type":"FeatureCollection",
  "generator":"JOSM",
  "bbox":[
    23.4668,
    58.9198,
    23.6412,
    58.974
  ],
  "features":[
    {
        "type":"Feature",
        "properties":{
            "wheelchair":"yes",
            "smoothness":"bad",
            "surface":"crushed stones"
        },
        "geometry":{
            "type":"Point",
            "coordinates":[
                23.53359252,
                58.95034587858
            ]
        }
    },
    {
        "type":"Feature",
        "properties":{
            "wheelchair":"yes",
            "addr:housename":"Saue kohvik",
            "amenity":"pub",
            "name":"Saue kohvik"
        },
        "geometry":{
            "type":"Point",
            "coordinates":[
                23.5361382,
                58.9473236
            ]
        }
    },
     {
        "type":"Feature",
        "properties":{
            "wheelchair":"yes",
            "smoothness":"intermediate",
            "highway":"footway"
        },
        "geometry":{
            "type":"LineString",
            "coordinates":[
                [
                    23.5410658,
                    58.9406213
                ],
                [
                    23.5410936,
                    58.9408252
                ],
                [
                    23.541092,
                    58.9408358
                ],
                [
                    23.5410706,
                    58.9410896
                ],
                [
                    23.5410448,
                    58.9412609
                ],
                [
                    23.541028,
                    58.9413309
                ],
                [
                    23.5409993,
                    58.9414512
                ],
                [
                    23.5408984,
                    58.9416477
                ],
                [
                    23.5408677,
                    58.9416962
                ],
                [
                    23.5407571,
                    58.9418706
                ],
                [
                    23.5405886,
                    58.9421204
                ],
                [
                    23.5405302,
                    58.9422071
                ],
                [
                    23.5403894,
                    58.9423888
                ],
                [
                    23.5401636,
                    58.9426413
                ],
                [
                    23.5400953,
                    58.9426593
                ],
                [
                    23.5399336,
                    58.9428447
                ],
                [
                    23.5399287,
                    58.9428504
                ],
                [
                    23.5399434,
                    58.9428895
                ],
                [
                    23.5394702,
                    58.9434341
                ],
                [
                    23.5394296,
                    58.943468
                ],
                [
                    23.5389324,
                    58.9439879
                ],
                [
                    23.5384256,
                    58.9445103
                ],
                [
                    23.5381597,
                    58.9447992
                ],
                [
                    23.5377425,
                    58.9452314
                ],
                [
                    23.5375449,
                    58.9454551
                ]
            ]
        }
    },
     {
        "type":"Feature",
        "properties":{
            "wheelchair":"yes",
            "highway":"footway"
        },
        "geometry":{
            "type":"LineString",
            "coordinates":[
                [
                    23.5408677,
                    58.9416962
                ],
                [
                    23.541045,
                    58.9417267
                ],
                [
                    23.5412157,
                    58.9417564
                ]
            ]
        }
    }

    ]
}

And my question is: can I route between places inside my file, but the catch is: "routing only on these LineStrings where properties are "wheelchair":"yes" and "highway":"footway", and routing can't use LineStrings where property is only "highway":"footway".

  • I think this is far too broad a question to answer here, but here is a starting point: wiki.openstreetmap.org/wiki/Routing#Developers -- also I would question the need to implement your own routing API when there are many others to look at first, e.g. pgRouting and Graphhopper -- for algorithms, look at en.wikipedia.org/wiki/Category:Routing_algorithms, particularly Dijkstra's and A* – blah238 Feb 23 '15 at 20:13
  • Thanks for answere and i read about graphopper. And now i have next question witch is explaining why i aked question about "making my own api" couse i dont know if existing api-s support my requirements. – Kevin Laanemägi Feb 23 '15 at 21:20
1

i asked about that and mapbox replay was: We currently don't have a method to limit our walking directions to wheelchair="yes" paths. I would urge you to submit a feature request as an issue in this repo: https://github.com/mapbox/mapbox-directions.js. its done , so now i wait :)

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.