New Feature: Avoid snapping to motorways

We are happy to announce that it is now even easier to avoid snapping to motorways or tunnels. If you read this blogpost, you already know that “street_hint” can be used to improve and control snapping. However, some use cases do not allow using “street_hint”, but still require that deliveries are not mapped to motorways or tunnels. You can now configure this for the entire problem. It is as easy as specifying this:

"configuration": {
    "routing": {
      "snap_preventions": [
        "tunnel", 
        "motorway"
      ]
    }
}

The following road link types can be avoided: motorway, trunk, bridge, ford, tunnel, ferry

1 Like

Here is an example. You can play with this in our route editor. Note that markers in the route editor are now draggable. This makes playing with this example a real pleasure.

{
  "configuration": {
    "routing": {
      "snap_preventions": [
        "motorway"
      ]
    }
  },
  "vehicles": [
    {
      "vehicle_id": "v1",
      "start_address": {
        "location_id": "13.801231_52.467833",
        "lon": 13.801231,
        "lat": 52.467833
      },
      "type_id": "my_type"
    }
  ],
  "vehicle_types": [
    {
      "type_id": "my_type",
      "profile": "car",
      "capacity": [
        50
      ]
    }
  ],
  "services": [
    {
      "id": "s1",
      "name": "no-name",
      "address": {
        "location_id": "13.821659_52.473846",
        "lon": 13.821659,
        "lat": 52.473846
      },
      "size": [
        1
      ]
    },
    {
      "id": "s2",
      "name": "no-name",
      "address": {
        "location_id": "13.810415_52.457270",
        "lon": 13.810415,
        "lat": 52.45727
      },
      "size": [
        1
      ]
    },
    {
      "id": "s3",
      "name": "no-name",
      "address": {
        "location_id": "13.795481_52.461088",
        "lon": 13.795438,
        "lat": 52.460873
      },
      "size": [
        1
      ]
    },
    {
      "id": "s4",
      "name": "no-name",
      "address": {
        "location_id": "13.794708_52.467729",
        "lon": 13.793678,
        "lat": 52.465893
      },
      "size": [
        1
      ]
    }
  ]
}
1 Like