BeMapAPI
BeMap 4.1.0

Natural geocoding Check positions against zones

BeMap name: Natural geocoding

POST/geofencing/1.0

Whether each position is inside or outside the zones you define, such as a depot, a customer site or a restricted area.

The whole description

Use it to know when a vehicle enters or leaves a site, or to check that a delivery happened where it should.

In BeMap's words

A geo-fence is a virtual perimeter for a real-world geographic area. A geo-fence could be dynamically generated-as in a radius around a point location, or a geo-fence can be a predefined set of boundaries (such as school zones or neighborhood boundaries).

A geo-fence is a virtual perimeter for a real-world geographic area. A geo-fence could be dynamically generated-as in a radius around a point location, or a geo-fence can be a predefined set of boundaries (such as school zones or neighborhood boundaries).

Provisioned per account. This service is enabled per account; without it BeMap answers 400 with Access Denied.

Request body

JSON, Content-Type: application/json. Schema GeofencingRequest.

  • fenceShapesGeoFenceShp[]required

    Define a fence shape to perform a intersection test between the route and fence.

    GeoFenceShp fields
    • centerCoordinaterequired

      Center of circle fence.

      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.

    • radiusinteger (int64)required

      Radius of circle fence.

    • verticesCoordinate[]required

      Vertices of polygon fence.

      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.

    • idinteger (int64)

      The fence id. If value is negative the server will set it with an auto-incrementing number.

    • typeenum

      Define the type of geometric shape of fence, like CIRCLE or POLYGON.

      2 accepted values
      CIRCLECircle.
      POLYGONPolygon.
  • positionsGeofencingPos[]required

    The coordinates will be compared with the fences.

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

    • radiusinteger (int64)

      Radius in meters.

  • geoserverstring

    Geoserver name.

  • swidxinteger (int32)deprecated

    Switch index.

  • positionTypeenum

    Define type of positions parameter used to perform a comparison between fence shapes and coordinates.

    3 accepted values
    CIRCLEDefine type of xy parameter as circle to perform a comparison between fence shapes and a circle.
    POLYLINEDefine the interpretation of coordinates of xy parameter to perform a comparison between fence shapes and a polyline.
    POLYGONDefine the interpretation of coordinates of xy parameter to perform a comparison between fence shapes and a polygon.
  • optionsenum[]

    Comma-separated list of one or more geo-fencing options.

    1 accepted value
    SEARCHEnable to search the fences with coordinate, in this case the parameter positions can be use the radius.

Response

200, schema GeofencingResponse.

Response fields
  • fenceResultsGeofencingRes[]

    Return a list in same order of xy parameters (list of coordinates) with state INSIDE, OUTSIDE or INTERSECT.

    GeofencingRes fields
    • idinteger (int64)

      Unique ID of fence.

    • typeenum

      Type of geometry.

      2 accepted values
      CIRCLECircle.
      POLYGONPolygon.
    • fenceShapeGeoFenceShp

      Shape of fence used to perform the test.

      GeoFenceShp fields
      • centerCoordinaterequired

        Center of circle fence.

        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.

      • radiusinteger (int64)required

        Radius of circle fence.

      • verticesCoordinate[]required

        Vertices of polygon fence.

        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.

      • idinteger (int64)

        The fence id. If value is negative the server will set it with an auto-incrementing number.

      • typeenum

        Define the type of geometric shape of fence, like CIRCLE or POLYGON.

        2 accepted values
        CIRCLECircle.
        POLYGONPolygon.
    • positionStatesenum[]

      Defines position state of tested coordinate on the fence geometry.

      5 accepted values
      INWARDDefines if the tested coordinate is an inward intersection.
      INSIDEDefines if the tested coordinate is in fence.
      OUTWARDDefines if the tested coordinate is an outward intersection.
      OUTSIDEDefines if the tested coordinate is out of fence.
      INTERSECTPosition is not completely inside or outside but the shapes are intersected.

Errors

  • 400 Bad Request, ErrorResponse
  • 302 No credentials were sent. Do not follow the redirect.
  • 401 The account or the API key is wrong.

How to read each one: Errors.

Reference pages