0

As per the graphhopper 0.9 release, it says

A new graph change API to change road speed and access properties, #845. Can be applied before preprocessing or per-request.

how do i use it, can someone point me to the documentation with example ?

thanks for your support

DJM
  • 594
  • 1
  • 5
  • 18

1 Answers1

1

Indeed there is no good documentation at the moment. Have a look into the tests:

  1. Disable speed mode - set prepare.ch.weightings=no in the config.properties
  2. Create a GeoJSON where e.g. you want to change the access properties to false (blocking):

    {
         "type": "FeatureCollection",
         "features": [{
           "type": "Feature",
           "geometry": {
             "type": "Point",
             "coordinates": [1.521692, 42.522969]
           },
           "properties": {
             "vehicles": ["car"],
             "access": false
            }
         }]
    }
    
  3. Then POST this as json to the /change endpoint.

Please note that in 0.9.0

  • for geometry type only Point, MultiPoint and LineString are supported.
  • for the properties only access (Boolean) and speed (Double) are supported that can be applied to multiple vehicles (but only in both directions).

You can also use the Java equivalent.

Please see this issue to improve the documentation.

Karussell
  • 17,085
  • 16
  • 97
  • 197
  • i am getting below response \n { "message" : "Not found" }
    i am using the configuration as below
    – DJM Aug 03 '17 at 00:00
  • i am getting response { "message" : "Not found" } i am using the configuration as prepare.ch.weightings=no, prepare.lm.weightings=fastest – DJM Aug 03 '17 at 00:05
  • The change endpoint is disabled by default, enable it by `web.change_graph.enabled=true`. Please review also this topic - https://discuss.graphhopper.com/t/how-to-use-road-speed-per-request-in-graphhopper-routing/2267 – Robin Aug 06 '17 at 23:55