Isochrones

 

background

Inspired by Dr Gus Macaulay’s previous work, in early 2016 Dr Yiqun Chen decided to take the isochrones calculation as a spatial computation challenge and wrapped it as a web service to facilitate the calculation process by utilising OpenstreetMap road network.

citation

Chen Y., Rajabifard, A., & Day, J. (2017). An Advanced Web API for Isochrones Calculation Using OpenStreetMap Data. In Geertman, S., Allan, A., Pettit, C., Stillwell, J.(Eds.), Planning Support Science for Smarter Urban Futures (pp. 185-205). Springer.

road network data in use

The raw road network data is obtained from OSM.  An extra data cleanup step has been performed to remove isolated road links which may decrease the stability of isochrones calculation in some cases. For example, when a seed point happens to be attached to an isolated road segment, the calculation will generate unrealistic outputs.

The isochrones calculation can be run in either Drive mode or Walk mode. The followings are ‘highway’ tags from OSM, each road link belongs to one of these tags. For Walk mode, all tags are used to construct the network. For Drive mode, all tags, except thoese class_id in range of [114-122],  are used.

The following table shows the distribution of link number for each tag for the Australian road network currently in use.

Tag Class_Id Links Number
“road” 100 7847
“motorway” 101 10001
“motorway_link” 102 8746
“trunk” 104 60524
“trunk_link” 105 3875
“primary” 106 94865
“primary_link” 107 5538
“secondary” 108 137673
“tertiary” 109 216619
“residential” 110 964964
“living_street” 111 2226
“service” 112 290424
“track” 113 166446
“pedestrian” 114 6525
“services” 115 77
“bus_guideway” 116 75
“path” 117 70423
“cycleway” 118 65902
“footway” 119 154339
“bridleway” 120 1064
“steps” 122 5212
“unclassified” 123 224752
“secondary_link” 124 3790
“tertiary_link” 125 5410

endpoint url

http://nearbit.com:8080/api/stable/isochrone

API key for testing

3stP4f7KCZLBznzAE9vf

inputs

Param Description Default
key  api key to access this service. Get a key
coordarr  an array of seed point coordinates. for example, [{“lat”:-31.9956,”lng”:115.8996},{“lat”:-32.0004,”lng”:115.8924}]. An identifier can also be appended in each coord element so that the generated isochrones can be matched,  [{“lat”:-31.9956,”lng”:115.8996, “id”:120},{“lat”:-32.0004,”lng”:115.8924,”id”:130}] or [{“lat”:-31.9956,”lng”:115.8996, “id”:”abc123″},{“lat”:-32.0004,”lng”:115.8924,”id”:”def456″}]  N/A
radiusarr  an array of distance (in meter) on road network that algorithm can reach. each seed can be assigned with a different distance value. in range of [10, 3000]. when traveltype set to “simple”, the radius can be set up to 200000 [500,…]
traveltype  use “drive”,”walk” or “simple” road network for calculation. if radius is bigger than 3000, the traveltype will be automatically changed to “simple”. walk
bufsize  the width (in meter) of buffer around road network lines, in range of [5, 200]. 50
removeholes  whether removing holes in the output isochrones polygon. true
returnline  whether including road links as a part of the output. false
returnpoint  whether including road nodes as a part of the output. false
combotype  use “simple” or “composite” to control isochrones generation behaviour. if set to  “simple”, the algorithm will enforce the length of radiusarr equals to the lengths of coordarr so that each seed point will be assigned with one radius value; if set to  “composite”, the algorithm will apply all radius values defined in radiusarr to each seed point. simple
format  use “geojson” or “shp” to control output format. if set to “shp”, a shpfile download url will be provided in the outputs. geojson
polygondetaillevel  use “high”, “mid”, “low” or “coarse” to control how the isochrones polygon can be generated. if set to “high”, it will use the buffered line geometry as the searvice area polygon, this is probably the most precise way to describe the concept of isochrones; if set to “mid”, it will use a concave hull to represent the isochrones, the “concavehullthreshold” vaule used for the concave hull generation will be dynamically determined using the value of radius/4; if set to “low”, it will use a concave hull to represent the isochrones, user defined “concavehullthreshold” value will be used for the concave hull generation.if set to “coarse”, it will use a convex hull to represent the isochrones, this usually applies when traveltype set to “simple”. high
concavehullthreshold  this will only take effect when “polygondetaillevel” is set to “low”. in range of [50, 5000]. The concave hull is defined according to this threshold which is the maximum length of border edges of the concave hull. read more 200

outputs

Attributes Description
version  current version number of API.
lastupdate  last update time of API.
status  whether algorithm runs successfully, 0: success 1: failure.
errdesc  error description.
data
processingtime algorithm processing time (in second).
crs  coordinate reference system, e.g., EPSG:4326
geojson_polygon  isochrones polygons described in geojson. copy and paste this section to  geojson.io to check the results.
geojson_line  road links (LineString with travel distance attribute) described in geojson. copy and paste this section to  geojson.io to check the results.
geojson_point  road nodes(LineString with travel distance attribute) described in geojson. copy and paste this section to  geojson.io to check the results.
shpurl_polygon  a download url for isochrones polygon shpfiles (a zipped package).
shpurl_line  a download url for isochrones road links shpfiles (a zipped package).
shpurl_point  a download url for isochrones road nodes shpfiles (a zipped package).
 the rest attributes are identical to input parameters

sample usages

  • calculate pedestrian catchments for two seed points with different radius respectively (500m and 800m), set road buffer size to 50m, keep holes.

http://nearbit.com:8080/api/stable/isochrone?key=YOUR-API-KEY&coordarr=[{“lat”:-31.9956,”lng”:115.8996},{“lat”:-32.0004,”lng”:115.8924}]&radiusarr=[500,800]&traveltype=walk&bufsize=50&removeholes=false

servicearea-sample-2-seeds

  • calculate pedestrian catchments for one seed point with different radius (400m, 800m, 1200m), set road buffer size to 30m, no holes.

http://nearbit.com:8080/api/stable/isochrone?key=YOUR-API-KEY&coordarr=[{“lat”:-37.8014,”lng”:144.9558}]&radiusarr=[400,800,1200]&combotype=composite

which equals to:

http://nearbit.com:8080/api/stable/isochrone?key=YOUR-API-KEY&coordarr=[{“lat”:-37.8014,”lng”:144.9558},{“lat”:-37.8014,”lng”:144.9558},{“lat”:-37.8014,”lng”:144.9558}]&radiusarr=[400,800,1200]

servicearea-sample-1-seed-multi-catchments

  • calculate pedestrian catchments for two seed points, applying two radii (500m and 1000m) to each seed point

http://nearbit.com:8080/api/stable/isochrone?key=YOUR-API-KEY&coordarr=[{“lat”:-37.8014,”lng”:144.9558},{“lat”:-37.79972,”lng”:144.98004}]&radiusarr=[500,1000]&combotype=composite

servicearea-sample-2-seeds-multi-catchments-composite

  • calculate isochrones for one seed point with radius of 800m, set road buffer size to 30m, no holes.

http://nearbit.com:8080/api/stable/isochrone?key=YOUR-API-KEY&coordarr=[{“lat”:-32.0004,”lng”:115.8924}]&radiusarr=[800]&traveltype=drive&bufsize=30&removeholes=true

servicearea-sample-without-hole

without hole

servicearea-sample-with-hole

with hole

  • calculate isochrones with road segments exported.

http://nearbit.com:8080/api/stable/isochrone?key=YOUR-API-KEY&coordarr=[{“lat”:39.8822,”lng”:116.4141}]&radiusarr=[500]&traveltype=walk&bufsize=20&returnline=true

sample-servicearea-with-roadsegs-beijing-tiantan

road links with travel distance

sample-servicearea-with-roadsegs

road links rendered with travel distance value

  • calculate isochrones with road lines and points exported.

http://nearbit.com:8080/api/stable/isochrone?key=YOUR-API-KEY&coordarr=[{“lat”:-37.804390,”lng”:144.961753}]&radiusarr=[1000]&returnline=true&returnpoint=true

outputs with polygons, lines, and points

outputs with polygons, lines, and points

performance

Currently, the service is deployed on a single virtual machine (size:xxlarge) provided by NeCTAR Research Cloud with following configurations:

  • 64GB RAM
  • 2.3GHz AMD Opteron 63xx class CPU
  • 16 cores
  • Ubuntu 14.04
  • Java 7
  • PostgreSQL9.4+PostGIS2.1.7

The API performance is measured by processing time for resolving walk isochrones using 500m, 1000m and 1500m traval distance. The region of Urban Centres and Localities (UCLs) of Melbourne, Australia is selected for testing. UCLs are geographical units that describe Australian population centres with populations exceeding two hundred persons. The road network density in this region is generally higher than the rest of Melbourne. 500 points are randomly selected from Melbournce UCLs for testing. Usually the isochrones calculation time and complexity expands quadratically as the scale of problem increases.

“proc_time” is the total time used for data loading, bfs algorithm running and data exporting.

“BFS_time” is the core isochrone computation time.

“num_rawlink” shows how many raw road links are processed for isochrone calculation.

“num_isolink” shows how many road links are exported as output.

measure of API performance

measure of API performance

 

API performance measure for 500m isochrones calculation

API performance measure for 500m isochrones calculation

 

API performance measure for 1000m isochrones calculation

API performance measure for 1000m isochrones calculation

 

API performance measure for 1500m isochrones calculation

API performance measure for 1500m isochrones calculation