openrouteservice
openrouteservice copied to clipboard
Isochrone API Call not returning geometry of intersections
Here's what I did
dist = [600, 900]
core_stations = [[1.147316,51.804177],[1.258808,51.931259]]
body = {"locations":core_stations, "range": dist,"attributes":["area"],"intersections":"true","range_type":"time"}
headers = {
'Accept': 'application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8',
'Authorization': '5b3ce3597851110001cf6248103d3b27049f428c96218da1f0f3ae77',
'Content-Type': 'application/json; charset=utf-8'
}
call = requests.post('https://api.openrouteservice.org/v2/isochrones/driving-car', json=body, headers=headers)
Here's what I got
{
"type": "FeatureCollection",
"bbox": [0.927113, 51.770341, 1.295371, 51.954185],
"features": [{
"type": "Feature",
"properties": {
"group_index": 0,
"value": 600.0,
"center": [1.1472877371450008, 51.80421289363979],
"area": 8.482977865E7
},
"geometry": {
"coordinates": [[[1.028238, 51.883549], [1.029945, 51.883434], [1.031601, 51.883368], [1.035489, 51.872082], [1.035375, 51.871973], [1.034509, 51.870554], [1.034419, 51.869468], [1.034596, 51.868508], [1.035073, 51.866999], [1.03513, 51.866968], [1.036134, 51.867039], [1.036208, 51.867061], [1.038584, 51.867983], [1.046205, 51.869159], [1.049953, 51.869406], [1.053375, 51.869465], [1.058102, 51.868835], [1.058962, 51.857525], [1.05393, 51.856882], [1.053478, 51.856714], [1.054726, 51.853338], [1.064069, 51.849037], [1.065175, 51.847467], [1.065607, 51.846699], [1.066859, 51.843331], [1.060778, 51.83418], [1.060153, 51.830634], [1.060811, 51.821299], [1.060899, 51.821096], [1.065536, 51.81402], [1.068044, 51.803081], [1.064366, 51.797412], [1.061083, 51.795006], [1.060575, 51.791442], [1.063368, 51.790684], [1.063646, 51.791269], [1.067269, 51.795282], [1.076009, 51.794272], [1.078919, 51.789893], [1.084817, 51.782871], [1.088398, 51.78324], [1.088257, 51.784603], [1.088028, 51.787517], [1.096317, 51.794647], [1.099304, 51.795087], [1.103356, 51.79494], [1.10923, 51.791213], [1.110473, 51.785087], [1.104892, 51.775263], [1.103289, 51.774371], [1.101774, 51.772177], [1.101783, 51.772141], [1.103537, 51.770779], [1.103652, 51.770787], [1.111126, 51.773345], [1.120334, 51.77543], [1.130637, 51.779949], [1.13395, 51.779375], [1.137072, 51.77921], [1.147729, 51.78424], [1.154649, 51.78681], [1.159071, 51.789085], [1.167068, 51.791715], [1.172652, 51.794283], [1.181958, 51.795437], [1.184469, 51.796211], [1.189222, 51.797669], [1.191951, 51.798501], [1.19455, 51.79931], [1.204624, 51.803612], [1.212408, 51.806608], [1.215424, 51.807946], [1.214033, 51.811266], [1.207005, 51.813583], [1.208155, 51.822725], [1.212203, 51.82434], [1.219907, 51.826649], [1.220522, 51.826767], [1.219845, 51.830303], [1.210254, 51.835877], [1.208055, 51.835601], [1.207505, 51.835464], [1.206136, 51.832555], [1.197288, 51.828141], [1.190533, 51.825838], [1.183316, 51.825935], [1.178214, 51.827187], [1.175306, 51.827732], [1.171835, 51.828336], [1.164813, 51.82832], [1.160122, 51.830902], [1.15727, 51.836964], [1.163653, 51.844497], [1.164659, 51.849789], [1.175191, 51.852389], [1.177805, 51.852643], [1.177815, 51.856243], [1.171286, 51.86056], [1.16978, 51.861372], [1.169486, 51.861323], [1.160425, 51.860946], [1.156278, 51.863478], [1.156018, 51.863664], [1.155545, 51.863991], [1.152668, 51.866159], [1.15236, 51.866404], [1.144893, 51.872216], [1.144271, 51.875762], [1.143921, 51.8757], [1.138936, 51.875172], [1.136256, 51.875364], [1.126132, 51.881159], [1.123537, 51.883655], [1.118184, 51.883334], [1.111544, 51.889029], [1.110783, 51.890533], [1.110688, 51.890643], [1.110346, 51.890978], [1.110268, 51.891006], [1.108282, 51.890552], [1.108083, 51.890126], [1.107954, 51.888301], [1.109032, 51.886642], [1.107484, 51.874903], [1.102368, 51.871111], [1.100287, 51.86928], [1.090077, 51.864062], [1.086125, 51.871532], [1.084868, 51.877988], [1.081921, 51.882986], [1.081135, 51.88664], [1.079571, 51.89067], [1.079522, 51.890794], [1.078212, 51.891851], [1.075559, 51.892133], [1.074507, 51.891965], [1.073992, 51.888892], [1.07626, 51.886325], [1.078067, 51.884567], [1.079367, 51.882403], [1.079081, 51.875484], [1.070886, 51.871061], [1.065571, 51.87413], [1.060541, 51.878566], [1.057926, 51.879899], [1.057437, 51.880024], [1.047816, 51.885208], [1.0452, 51.886618], [1.042182, 51.887108], [1.039598, 51.887246], [1.02848, 51.887141], [1.028238, 51.883549]]],
"type": "Polygon"
}
}, {
"type": "Feature",
"properties": {
"group_index": 0,
"value": 900.0,
"center": [1.1472877371450008, 51.80421289363979],
"area": 1.7910116971E8
},
"geometry": {
"coordinates": [[[0.927113, 51.922631], [0.932718, 51.918262], [0.932856, 51.918256], [0.942887, 51.915746], [0.945541, 51.914005], [0.948523, 51.912304], [0.951125, 51.911001], [0.954486, 51.90957], [0.957855, 51.908278], [0.962172, 51.906895], [0.965605, 51.905942], [0.96804, 51.904819], [0.970436, 51.903269], [0.972724, 51.90194], [0.975303, 51.900671], [0.973822, 51.889425], [0.963811, 51.883213], [0.963268, 51.883217], [0.962184, 51.88183], [0.962001, 51.881337], [0.962002, 51.881317], [0.963246, 51.879617], [0.969155, 51.876602], [0.97706, 51.868062], [0.979897, 51.865844], [0.991349, 51.864265], [0.992315, 51.863422], [0.993165, 51.862679], [0.995534, 51.86539], [0.995686, 51.869442], [1.00429, 51.874942], [1.006868, 51.873989], [1.010326, 51.87225], [1.014085, 51.866814], [1.015719, 51.864867], [1.016628, 51.862192], [1.006859, 51.855439], [1.006574, 51.855611], [1.005196, 51.856461], [1.003229, 51.854432], [1.002295, 51.852599], [1.002341, 51.852364], [1.002977, 51.850841], [1.003665, 51.850793], [1.004002, 51.850774], [1.011574, 51.848582], [1.014028, 51.84687], [1.016172, 51.845163], [1.017265, 51.833486], [1.015001, 51.832212], [1.011725, 51.829414], [1.01284, 51.825991], [1.01513, 51.825025], [1.0161, 51.826287], [1.01745, 51.827778], [1.022759, 51.831657], [1.027958, 51.835038], [1.034925, 51.833492], [1.038033, 51.831674], [1.041837, 51.827791], [1.045342, 51.82697], [1.045832, 51.829063], [1.056831, 51.831265], [1.060811, 51.821299], [1.060899, 51.821096], [1.065536, 51.81402], [1.068044, 51.803081], [1.060811, 51.801935], [1.052726, 51.796021], [1.049232, 51.796994], [1.045752, 51.79585], [1.036945, 51.798929], [1.034513, 51.800049], [1.027385, 51.800975], [1.027035, 51.800995], [1.025491, 51.799349], [1.025476, 51.799211], [1.026831, 51.797401], [1.036251, 51.791926], [1.039105, 51.791324], [1.047193, 51.784311], [1.047579, 51.780731], [1.048562, 51.775732], [1.049257, 51.77436], [1.049798, 51.773692], [1.052594, 51.77596], [1.053427, 51.780894], [1.061289, 51.786757], [1.065057, 51.786842], [1.069232, 51.785667], [1.070964, 51.788201], [1.078919, 51.789893], [1.084817, 51.782871], [1.077267, 51.775599], [1.079527, 51.774447], [1.08601, 51.772896], [1.094216, 51.770341], [1.103537, 51.770779], [1.103652, 51.770787], [1.111126, 51.773345], [1.120334, 51.77543], [1.130637, 51.779949], [1.13395, 51.779375], [1.137072, 51.77921], [1.147729, 51.78424], [1.154649, 51.78681], [1.159071, 51.789085], [1.167068, 51.791715], [1.172652, 51.794283], [1.181958, 51.795437], [1.184469, 51.796211], [1.189222, 51.797669], [1.191951, 51.798501], [1.19455, 51.79931], [1.204624, 51.803612], [1.212408, 51.806608], [1.215424, 51.807946], [1.214033, 51.811266], [1.207005, 51.813583], [1.208155, 51.822725], [1.212203, 51.82434], [1.221648, 51.823702], [1.227115, 51.823606], [1.231237, 51.821487], [1.23442, 51.823169], [1.233569, 51.824778], [1.232719, 51.826387], [1.233753, 51.837316], [1.242771, 51.836361], [1.244027, 51.835311], [1.244458, 51.835198], [1.245879, 51.835513], [1.248708, 51.836818], [1.249605, 51.837241], [1.249442, 51.839531], [1.249109, 51.839815], [1.249044, 51.839868], [1.248833, 51.840031], [1.24807, 51.840497], [1.24307, 51.842969], [1.242222, 51.851918], [1.241818, 51.852091], [1.232874, 51.8549], [1.230068, 51.855385], [1.223047, 51.85653], [1.217741, 51.863612], [1.216429, 51.863474], [1.210253, 51.863368], [1.205474, 51.858934], [1.201962, 51.85526], [1.191606, 51.860917], [1.193496, 51.868209], [1.191427, 51.871174], [1.186492, 51.86795], [1.17747, 51.873686], [1.177676, 51.884345], [1.181373, 51.885425], [1.188775, 51.886451], [1.191918, 51.889562], [1.193787, 51.892639], [1.193279, 51.892948], [1.185838, 51.897035], [1.182299, 51.897698], [1.17248, 51.900469], [1.171385, 51.900577], [1.165566, 51.901412], [1.162757, 51.900075], [1.160257, 51.899502], [1.15658, 51.899438], [1.153968, 51.899308], [1.144892, 51.903151], [1.150468, 51.910843], [1.15412, 51.912034], [1.154074, 51.915633], [1.146818, 51.918235], [1.141673, 51.919579], [1.136354, 51.914419], [1.131167, 51.911298], [1.12788, 51.910317], [1.123486, 51.909869], [1.115287, 51.911796], [1.113766, 51.917176], [1.113823, 51.920323], [1.1121, 51.9226], [1.109466, 51.922278], [1.109201, 51.922233], [1.108128, 51.914795], [1.101521, 51.908369], [1.0943, 51.907056], [1.088478, 51.915933], [1.087667, 51.918675], [1.086548, 51.925462], [1.086494, 51.925652], [1.0853, 51.926799], [1.084721, 51.926768], [1.082343, 51.9265], [1.081922, 51.922925], [1.074954, 51.915265], [1.073602, 51.911928], [1.071767, 51.901421], [1.066961, 51.900979], [1.064702, 51.902116], [1.060845, 51.90682], [1.057632, 51.913778], [1.047567, 51.918007], [1.044007, 51.917471], [1.035453, 51.909598], [1.033281, 51.908241], [1.032211, 51.907523], [1.028937, 51.903092], [1.020698, 51.899012], [1.019906, 51.8955], [1.022049, 51.886463], [1.015837, 51.881713], [1.008004, 51.884315], [1.004766, 51.885888], [0.99929, 51.889022], [0.998037, 51.890318], [0.99751, 51.890674], [0.9962, 51.89087], [0.98494, 51.88772], [0.98074, 51.888658], [0.977659, 51.899664], [0.979046, 51.902986], [0.970427, 51.907584], [0.967381, 51.909126], [0.963201, 51.910344], [0.959143, 51.91164], [0.955856, 51.912899], [0.950256, 51.915459], [0.94498, 51.918675], [0.942842, 51.920201], [0.938715, 51.923531], [0.93516, 51.92657], [0.92807, 51.926101], [0.927113, 51.922631]]],
"type": "Polygon"
}
}, {
"type": "Feature",
"properties": {
"group_index": 1,
"value": 600.0,
"center": [1.2588672465216015, 51.93145714837858],
"area": 3.439387591E7
},
"geometry": {
"coordinates": [[[1.115275, 51.909978], [1.115543, 51.906388], [1.12505, 51.906444], [1.129019, 51.906902], [1.132738, 51.907903], [1.14298, 51.908579], [1.153843, 51.910875], [1.157178, 51.909684], [1.162804, 51.90719], [1.168416, 51.907053], [1.175677, 51.903783], [1.184122, 51.900141], [1.190258, 51.900327], [1.192907, 51.902764], [1.197431, 51.907301], [1.206375, 51.904072], [1.209032, 51.904047], [1.211254, 51.905573], [1.221805, 51.904773], [1.22501, 51.906412], [1.225031, 51.912478], [1.233436, 51.915077], [1.236455, 51.911788], [1.238701, 51.909912], [1.239819, 51.909184], [1.24019, 51.908966], [1.242015, 51.912069], [1.243944, 51.923169], [1.255629, 51.921332], [1.266465, 51.923895], [1.275659, 51.93094], [1.280863, 51.935188], [1.289502, 51.940552], [1.295371, 51.95059], [1.295194, 51.954185], [1.286082, 51.947894], [1.274679, 51.949571], [1.274502, 51.953166], [1.263767, 51.946673], [1.25381, 51.952147], [1.249557, 51.950855], [1.238698, 51.945949], [1.229079, 51.938837], [1.220537, 51.937981], [1.212536, 51.935286], [1.207414, 51.936423], [1.204754, 51.936941], [1.197051, 51.938277], [1.194618, 51.937257], [1.192025, 51.936307], [1.181016, 51.939757], [1.177709, 51.941179], [1.176519, 51.941597], [1.167161, 51.943558], [1.161635, 51.944596], [1.15696, 51.943717], [1.149636, 51.941138], [1.142634, 51.932041], [1.139152, 51.93163], [1.138345, 51.928122], [1.138568, 51.92807], [1.139105, 51.92801], [1.146836, 51.925048], [1.143637, 51.915421], [1.141702, 51.914896], [1.13843, 51.91492], [1.135797, 51.914253], [1.131532, 51.911371], [1.126071, 51.910247], [1.121808, 51.910573], [1.119316, 51.910279], [1.117296, 51.910129], [1.115275, 51.909978]]],
"type": "Polygon"
}
}, {
"type": "Feature",
"properties": {
"group_index": 1,
"value": 900.0,
"center": [1.2588672465216015, 51.93145714837858],
"area": 7.282837347E7
},
"geometry": {
"coordinates": [[[1.057446, 51.886307], [1.058799, 51.884517], [1.058892, 51.884508], [1.061691, 51.885895], [1.064091, 51.887044], [1.066091, 51.88859], [1.076318, 51.886273], [1.078414, 51.883703], [1.088387, 51.885937], [1.097955, 51.882686], [1.100381, 51.882834], [1.102111, 51.882803], [1.113128, 51.879894], [1.115562, 51.877242], [1.121301, 51.87949], [1.121261, 51.88309], [1.129069, 51.888673], [1.131968, 51.890286], [1.13315, 51.892556], [1.13508, 51.895353], [1.137412, 51.896754], [1.146092, 51.889692], [1.149989, 51.883199], [1.150346, 51.879617], [1.150782, 51.87966], [1.153943, 51.879909], [1.157395, 51.879849], [1.165512, 51.87599], [1.171515, 51.871589], [1.175114, 51.87166], [1.175094, 51.872705], [1.174337, 51.876495], [1.179777, 51.884896], [1.190729, 51.884504], [1.193158, 51.888562], [1.193981, 51.892504], [1.192271, 51.901473], [1.192907, 51.902764], [1.197431, 51.907301], [1.206375, 51.904072], [1.209032, 51.904047], [1.211254, 51.905573], [1.221805, 51.904773], [1.22501, 51.906412], [1.225031, 51.912478], [1.233436, 51.915077], [1.236455, 51.911788], [1.238701, 51.909912], [1.239819, 51.909184], [1.24019, 51.908966], [1.242015, 51.912069], [1.243944, 51.923169], [1.255629, 51.921332], [1.266465, 51.923895], [1.275659, 51.93094], [1.280863, 51.935188], [1.289502, 51.940552], [1.295371, 51.95059], [1.295194, 51.954185], [1.286082, 51.947894], [1.274679, 51.949571], [1.274502, 51.953166], [1.263767, 51.946673], [1.25381, 51.952147], [1.249557, 51.950855], [1.238698, 51.945949], [1.229079, 51.938837], [1.220537, 51.937981], [1.212536, 51.935286], [1.207414, 51.936423], [1.204754, 51.936941], [1.197051, 51.938277], [1.194618, 51.937257], [1.192025, 51.936307], [1.181016, 51.939757], [1.177709, 51.941179], [1.169786, 51.94569], [1.161635, 51.944596], [1.15696, 51.943717], [1.149636, 51.941138], [1.146797, 51.939858], [1.142634, 51.932041], [1.13706, 51.932496], [1.133743, 51.933199], [1.131515, 51.934443], [1.126928, 51.935631], [1.118339, 51.938705], [1.111032, 51.941488], [1.100275, 51.942512], [1.090036, 51.944495], [1.086816, 51.945312], [1.084219, 51.94534], [1.082575, 51.942627], [1.074349, 51.935197], [1.071218, 51.935759], [1.070698, 51.935906], [1.069714, 51.932443], [1.070233, 51.932296], [1.07794, 51.927441], [1.078567, 51.92332], [1.074278, 51.913596], [1.07581, 51.910965], [1.074767, 51.902516], [1.066286, 51.90132], [1.065017, 51.901884], [1.063556, 51.898594], [1.058183, 51.888336], [1.057451, 51.886346], [1.057446, 51.886307]]],
"type": "Polygon"
}
}, {
"type": "Feature",
"properties": {
"area": 2689406.31,
"contours": [[0, 0], [1, 1]]
}
}
]
}
Here's what I was expecting
I would only expect 4 features to be output, one for each combination of distance and core_station.
Instead there is a 5th feature which has no geometry value.
This only appears to happen for some combinations of locations and distances.
When running this via the web API test it creates a blank map.
Here's what I think could be improved
Thanks for reaching out! Indeed, this looks like a bug to me. Please note that because your query specifies "intersections":"true"
the response is expected to contain not only polygons describing the isochrones, but also ones corresponding to their intersections. As there is overlap between some of the isochrone I would expect this to be reflected in the response too.