Get started with HERE Geofencing API v8

This section explains how to quickly get started using the HERE Geofencing API v8.

📘

Note

Geofencing is only available under asset-based licenses. For information on Geofencing licenses, please contact your HERE account executive.

For more detailed information on HERE account setup, app registration, and authentication, see the Identity and Access Management Developer Guide.

Get a HERE account

Obtain access to the HERE platform through your organization administrator's invitation or contact us to get started.

  • If your company has already established a HERE platform organization, contact your organization admin who can invite you to join the organization.
  • If your company hasn’t established a HERE platform organization yet, contact us.

Get an API key

To get an API key, follow these steps:

  1. Sign in to the HERE platform using your HERE account.
  2. Select the Access Manager from the launcher.
  3. Select the Apps tab and click Register new app.
  4. Enter a name for the app.
  5. Click Register. The HERE platform creates a new app with a unique app ID.
  6. On the Credentials tab, select API Keys and then click Create API key to generate a maximum of two API Keys for your application authentication credentials. The API key is created and displayed.

Send a request

The following example tests whether a set of geocoordinates falls within a set of geoshapes.
This example assumes you have uploaded the required shape file to the service.

📘

Note

Use POST requests for large payloads. GET requests can be constrained by request-line length limits imposed by load balancers.

https://geofencing.hereapi.com/v8/geofence?apikey=API_KEY&layers=ROAD_GEOM_FC1&in=point:41.93,12.43;r=40000

Response

The response contains a list of geoshapes (called geometries) with the distance from the geocoordinate to the nearest geofence border — a negative value indicates the position is inside the shape; a positive value indicates it is outside. The response also includes metadata about the request.

{
    "geometries": [
        {
            "attributes": {
                "NAMES": "",
                "TUNNEL": "N",
                "START_OFFSET": "046572",
                "TOPOLOGY_ID": "181901328",
                "ELEVATION": ",,,,,,,,",
                "ZLEVEL": "1,,,,,,,,1",
                "LONG_HAUL": "Y",
                "BRIDGE": "Y",
                "NAME": "A90 / Circonvallazione Settentrionale",
                "END_OFFSET": "054948",
                "LINK_ID": "1046857210"
            },
            "distance": 4014.35,
            "nearestLat": 41.91914,
            "nearestLon": 12.38378,
            "layerId": "ROAD_GEOM_FC1",
            "geometry": "MULTILINESTRING((12.38415 41.91815,12.3841 41.91829,12.38405 41.91845,12.38399 41.91862,12.38392 41.9188,12.38385 41.91897,12.38378 41.91914,12.38371 41.9193,12.38366 41.9194))"
        },
  ]
}

Next steps


Did this page help you?