Geofencing
Massive geofencing service, using multiple polygons.
2 minute read
API Access
The Geofencing API documentation provides details for identifying if a list of points (markers) are within one or more polygons or circles. This service is available via HTTP-JSON and XML.
Base Service URLs:
- Supported methods: POST
- Response formats: JSON / XML
Massive Geofencing Service
This service identifies which markers from a provided list fall within a set of defined geometries (polygons or circles).
Request Parameters
Example:
https://lb.cercalia.com/services/v2/json?cmd=insidegeoms&geoms=[CIRCLE(2.2090%2041.4141,%2012)|ID1],%20[CIRCLE(2.3090%2041.4141,%205)|ID2]&molist=[2.2090,41.4141|P1],%20[2.3090,41.4141|P2]&key=YOUR_API_KEY
| Parameter | Description |
|---|---|
geoms | List of shapes separated by commas. Format: [wkt|id].wkt: Geometry in Well-Known Text format or CIRCLE(x y, radius_in_meters).id: Unique identifier for the geometry. |
srs | Spatial Reference System for geoms. Default: EPSG:4326. |
molist | List of markers to check. Format: [X,Y|ID]. |
mocs | Spatial Reference System for molist. Default: EPSG:4326. |
Response Structure
For every shape provided in the request, the service returns a list of markers that are located inside that geometry.
Example:
{
"cercalia": {
"@cmd": "insidegeoms",
"@version": "1",
"insidegeoms": {
"geometry": [
{
"@id": "ID1",
"wkt": {
"value": "CIRCLE(2.2090 41.4141, 12)"
},
"molist": {
"@num": "1",
"mo": [
{
"@id": "P1",
"coord": {
"@x": "1.984E-5",
"@y": "3.7454E-4"
}
}
]
}
},
{
"@id": "ID2",
"wkt": {
"value": "CIRCLE(2.3090 41.4141, 5)"
},
"molist": {
"@num": "1",
"mo": [
{
"@id": "P2",
"coord": {
"@x": "2.074E-5",
"@y": "3.7454E-4"
}
}
]
}
}
]
},
"server": {
"value": "lb.cercalia.com"
},
"instance": {
"value": "http://master-cercalia-lbs-both-lines"
}
}
}