Download OpenAPI specification:Download
Centroid API
endpoint for calculating the Centroid in a network graph
Array of objects list of points to compute the centroid for | |
numberofcentroid | integer Number of clusters that needs to created |
traveltimeinmints | integer <int64> from the center return only those points that can be reached with this time period |
departureTime | integer <int64> Departure time, it’s in millisecond also UTC format |
{- "locations": [
- {
- "lat": 25.1128,
- "lng": 55.17367
}, - {
- "lat": 25.12873,
- "lng": 55.18886
}, - {
- "lat": 25.14295,
- "lng": 55.20551
}, - {
- "lat": 25.16097,
- "lng": 55.21933
}, - {
- "lat": 25.18031,
- "lng": 55.2322
}, - {
- "lat": 25.19716,
- "lng": 55.24495
}, - {
- "lat": 25.21361,
- "lng": 55.25591
}
], - "numberofcentroid": 2,
- "traveltimeinmints": 600,
- "departureTime": 1652954924000
}
[- {
- "cluster": [
- {
- "lat": 25.14295,
- "lng": 55.20551
}, - {
- "lat": 25.16097,
- "lng": 55.21933
}, - {
- "lat": 25.18031,
- "lng": 55.2322
}, - {
- "lat": 25.19716,
- "lng": 55.24495
}, - {
- "lat": 25.21361,
- "lng": 55.25591
}
], - "centroid": {
- "lat": 25.18031,
- "lng": 55.2322
}
}, - {
- "cluster": [
- {
- "lat": 25.1128,
- "lng": 55.17367
}, - {
- "lat": 25.12873,
- "lng": 55.18886
}
], - "centroid": {
- "lat": 25.1128,
- "lng": 55.17367
}
}
]