REST API, Service version 1.0.0
EV reachable area#
Perform a calculation of reachable area dedicated to electrical vehicle. This service return a geometry of area.
Summary#
- Request
- Parameters
- Response
- Details of fields
- Response samples
- ErrorResponse object
Request#
The request must be sent with the HTTP method POST and the HTTP header Content-Type set to application/json.
Sample:
URI: /bgis/service/evreachablearea/1.0 for JSON output format.
URI: /bgis/service/evreachablearea/1.0/kml for KML output format.
POST data:
{
"geoserver": "here",
"vehicle": "e16f0d0b-964b-4a23-bd78-f5cb438abad6",
"initBatLvl": 25,
"temperature": 20,
"payload": 75,
"startLon": 2.34494,
"startLat": 48.78852,
"geo": true
}All coordinates are defined by longitude and latitude, see the coordinate system glossary for more details.
Parameters#
vehiclestringrequiredVehicle model (UUID key).
temperatureinteger (int32)requiredTemperature in Celsius.
startLonnumber (double)requiredDeparture longitude in decimal degrees (WGS84).
Also accepted as
longitude.startLatnumber (double)requiredDeparture latitude in decimal degrees (WGS84).
Also accepted as
latitude.geoserverstringGeoserver name.
swidxinteger (int32)deprecatedSwitch index.
initBatLvlnumber (double)Initial battery level in percent. Available value 0 to 100. 100% if not defined.
weatherbooleanEnable the weather information.
wpstringEnable the weather information.
payloadinteger (int32)Vehicle's extra load (consumables or passengers weight for example) (in kg). 75kg by default.
extraPayloadinteger (int32)deprecatedAdditional load weight in kg (like passengers, luggage or tools). Deprecated and not supported anymore, use the
payloadfield.Also accepted as
extraPayLoad.criteriasenum[]This field is a list of criteria used by the routing calculator, e.g.: "
AVOID_MOTORWAYS", "AVOID_TOLLS".7 accepted values
AVOID_FERRIESFind a route with no ferry. AVOID_MOTORWAYSFind a route without motorways. AVOID_TOLLSFind a route with no toll. AVOID_UNPAVEDFind a route with no unpaved roads. AVOID_CROSSING_BORDERFind a route without country border crossing (makes sence only when the start and stop points are in the same country). LESS_EXPENSIVEFind the less expensive charging stations. Only with algorithm v2. Deprecated. TRAFFICUse traffic info for route calculation. stopLonnumber (double)Arrival longitude in decimal degrees (WGS84).
stopLatnumber (double)Arrival latitude in decimal degrees (WGS84).
geobooleanSet to
trueto enable the geometry of the reachable area's polygon. By defaulttrue.egeobooleanSet to
trueto enable the encoded geometry of the reachable area's polygon. By defaultfalse. SeeGoogle Encoded Polyline Algorithm Formatin glossary.
Response#
Details of fields#
boundingBoxBoundingBoxThe bounding box of the returned polygon geometry.
geometryCoordinate[]The reachable area's polygon geometry defined as a list of WGGS84 coordinates.
encodedGeometrystringThe reachable area's polygon geometry encoded with Google Algorithm.
See chapter Google Encoded Polyline Algorithm Format for full description of encoding format.
Response samples#
JSON Sample (trunked):
{
"boundingBox": {
"minLon": 1.74877,
"minLat": 48.39662,
"maxLon": 2.9994,
"maxLat": 49.23037
},
"geometry": [
{
"lon": 2.10434,
"lat": 48.55356
},
. . .
{
"lon": 2.03813,
"lat": 48.53885
}
]
}ErrorResponse object#
If an error occurs during the process on server side, only an error object will be returned in the response. See Error example chapter.
code: error code. See the Error list chapter.message: error message.coordinate: coordinate of error (optional).
Error codes#
List of all possible error codes:
| Code | Description |
|---|---|
| OK | No error. |
| COORDINATE_NOT_MATCH | One of input point cannot be matched on a road. |
| COUNTRY_NOT_AVAILABLE | Start and end addresses coordinates are not in the allowed area. |
| CHARGING_STATION_NOT_FOUND | Cannot find any charging station around the coordinate. |
| NO_REACHABLE_STEP_POINT | No charging stations found can be reached. |
| CANNOT_PERFORM_ROUTING | The routing calculation cannot be performed. |
| OVER_ALLOWED_DISTANCE | The requested travel is over the allowed distance limit. Max distance for journey is 2500 km. |
| INTERNAL_ERROR | The server cannot perform the routing calculation due to internal BeNomad SDK error. |
Error example#
{
"error": {
"code": "NO_REACHABLE_STEP_POINT",
"message": "All charging stations found cannot be reachable. Around this coordinate.",
"coordinate": {
"lon": 8.193691832353528,
"lat": 45.42630127240513
}
}
}All coordinates are defined by longitude and latitude, see the coordinate system glossary for more details.