Restricting Borders in openrouteservice

Openrouteservice Avoiding Switzerland

Have you ever wanted to route between countries in Europe but only cross Schengen borders? Or maybe route from Detroit to Buffalo without crossing into Canada? Well now with openrouteservice you can! With the introduction of the new border crossing restrictions feature on driving profiles, you can tell the openrouteservice API to avoid all borders, controlled borders, or even specific countries.

To make use of this feature, simply pass a parameter called “avoid_borders” with a value of “all” or “controlled” into the options json object. For example,

...&options={"avoid_borders":"controlled"}&...

would tell the routing engine to avoid crossing controlled borders, but still allow crossing of open borders (i.e. Schengen borders). To avoid specific countries, you can make use of the avoid_countries option. For that,

Population Statistics for Isochrones

GHSL - Global Human Settlement Layer

We are also excited about one handy new feature for the isochrones API: From now on, you can optionally return the population count for each isochrone you’re calculating. This is an imperative step for inclusive reachability analysis.

The dataset, which makes this possible, is published by the European Commission in their Global Human Settlement Program. It features 250 m x 250 m cell size across the globe and is the finest grained dataset of its kind.

To access this feature in runtime you have to specify it as attribute in the isochrone request:

Responding in GeoJSON

Last but not least, we have finally introduced the much longed feature to respond in GeoJSON. This is especially handy for a quick look at the geometry of routes. The response can be directly imported into QGIS via “add vector layer”, selecting “protocol” as the source type, and entering the url (with the format=geojson url parameter)!