Do "Zones" in HERE Geofencing Use Polygons?
Symptoms / Triggers
When attempting to define a geofencing zone, the system does not recognize the polygon shape.
Your polygon shape file is not being uploaded to HERE Geofencing as expected.
You are unsure if zones in HERE Geofencing must be defined using polygon data or another geometry type.
---
Quick Answer
Yes, in HERE Geofencing, zones can and are represented using polygons, specifically as Well-Known Text (WKT) format such as POLYGON(...). A zone can be uploaded in a tabular format where each row contains a zone’s attributes along with its polygon boundary in WKT format.
---
Step-by-Step Actions
1. Format Your Data Properly
Each zone should be on one row in a plain text (.txt or .csv) file or a zipped shapefile.
Include a WKT column containing the POLYGON geometry with coordinates in longitude, latitude order.
Ensure the polygon is closed (first and last point are the same).
Example:<br />ID NAME ABBR WKT 1 Frankfurt2 FRAN POLYGON ((8.670293702971577 50.09986623625284, 8.671916888624878 50.1004752458006, 8.670293702971577 50.09986623625284))<br />
1. Choose the Correct Layer Type
The layer must only contain polygons (or only points or only lines). Mixing geometry types will cause an error.
Create a new layer using the Geofencing API or the developer console.
Assign the new layer a unique layerId.
1. Upload the Polygon Zone(s)
Use the Geofencing v8 Upload API to send a POST request with the file zipped and the required headers.
Example command:<br />curl -X POST \ -H "Content-Type: multipart/form-data" \ -F "zipfile=@C:\temp\layer_4711_shapes.zip" \ "https://geofencing.hereapi.com/v8/geofence/upload?layerId=a4GhqqfHX8T8EbqhbLTL..MyZoneLayer&apikey={YOUR_API_KEY}"<br />
1. Verify the Upload
If the upload is successful, the API will return a 201 Created status and a storedTilesCount indicating the number of zones stored.
1. Check Geofencing in Real-Time (Optional)
Use the Geofencing API to check if a point (e.g., an asset position) is inside any of the zone polygons.
---
Applies To
HERE Geofencing API v8
Users creating geofencing zones with polygon boundaries from custom shapefiles or custom data
Applications requiring asset position-checking inside geozones defined using polygons
---
Customer-Searchable Tags
geofencing polygon
zone definition
well-known text format (WKT)
HERE API v8
upload layer shapefile
geofencing upload zones
HERE map layer
polygon geoshape
Updated 3 days ago