BeMapAPI
BeMap 4.1.0

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#

  1. Request
    1. Parameters
  2. Response
    1. Details of fields
    2. Response samples
    3. 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:

javascript
{
  "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#

  • vehiclestringrequired

    Vehicle model (UUID key).

  • temperatureinteger (int32)required

    Temperature in Celsius.

  • startLonnumber (double)required

    Departure longitude in decimal degrees (WGS84).

    Also accepted as longitude.

  • startLatnumber (double)required

    Departure latitude in decimal degrees (WGS84).

    Also accepted as latitude.

  • geoserverstring

    Geoserver name.

  • swidxinteger (int32)deprecated

    Switch index.

  • initBatLvlnumber (double)

    Initial battery level in percent. Available value 0 to 100. 100% if not defined.

  • weatherboolean

    Enable the weather information.

  • wpstring

    Enable the weather information.

  • payloadinteger (int32)

    Vehicle's extra load (consumables or passengers weight for example) (in kg). 75kg by default.

  • extraPayloadinteger (int32)deprecated

    Additional load weight in kg (like passengers, luggage or tools). Deprecated and not supported anymore, use the payload field.

    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).

  • geoboolean

    Set to true to enable the geometry of the reachable area's polygon. By default true.

  • egeoboolean

    Set to true to enable the encoded geometry of the reachable area's polygon. By default false. See Google Encoded Polyline Algorithm Format in glossary.

Response#

Details of fields#

  • boundingBoxBoundingBox

    The bounding box of the returned polygon geometry.

    BoundingBox fields
    • minLonnumber (double)

      Minimum longitude, in degrees decimal (WGS84).

    • minLatnumber (double)

      Minimum latitude, in degrees decimal (WGS84).

    • maxLonnumber (double)

      Maximum longitude, in degrees decimal (WGS84).

    • maxLatnumber (double)

      Maximum latitude, in degrees decimal (WGS84).

  • geometryCoordinate[]

    The reachable area's polygon geometry defined as a list of WGGS84 coordinates.

    Coordinate fields
    • lonnumber (double)required

      Longitude in degrees decimal (WGS84).

      Also accepted as longitude.

    • latnumber (double)required

      Latitude in degrees decimal (WGS84).

      Also accepted as latitude.

  • encodedGeometrystring

    The 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):

javascript
{
  "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).
    • lon: longitude of coordinate in decimal degrees (WGS84).
    • lat: latitude of coordinate in decimal degrees (WGS84).

Error codes#

List of all possible error codes:

CodeDescription
OKNo error.
COORDINATE_NOT_MATCHOne of input point cannot be matched on a road.
COUNTRY_NOT_AVAILABLEStart and end addresses coordinates are not in the allowed area.
CHARGING_STATION_NOT_FOUNDCannot find any charging station around the coordinate.
NO_REACHABLE_STEP_POINTNo charging stations found can be reached.
CANNOT_PERFORM_ROUTINGThe routing calculation cannot be performed.
OVER_ALLOWED_DISTANCEThe requested travel is over the allowed distance limit. Max distance for journey is 2500 km.
INTERNAL_ERRORThe server cannot perform the routing calculation due to internal BeNomad SDK error.

Error example#

javascript
{ 
   "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.