Custom fence shapes

Service version: 1
Last edit: 2022.09.01

Purpose

This is a list of supported custom fence shape types in addition to GeoJSON Polygons and MultiPolygons.

Important note:

The Geofencing API does not support "holes" in Polygons, as described in

RFC 7946

art. 3.1.6 and ex. A3.

Custom fence shape parameters

Circle shape

Creates a circular fence with a specified radius and center point.

Required geometry object fields

  • "radius": radius_in_meters
  • "type": "Point"
  • "shapeType": "Circle"
1"geometry": {
2 "type": "Point",
3 "radius": radius_in_meters,
4 "shapeType": "Circle",
5 "coordinates": [longitude, latitude]
6}
1{
2 "name": "Rounded Circle",
3 "type": "Feature",
4 "geometry": {
5 "type": "Point",
6 "radius": 75,
7 "shapeType": "Circle",
8 "coordinates": [-67.137343, 45.137451]
9 }
10}

Corridor shape

Creates a border around a provided line that is distanced from that line in exactly the amount of meters described in the radius.

Required geometry object fields

  • "radius": radius_in_meters
  • "type": "LineString"
  • "shapeType": "Corridor"
1"geometry": {
2 "type": "LineString",
3 "radius": radius_in_meters,
4 "shapeType": "Corridor",
5 "coordinates": [[longitude_1, latitude_1], [longitude_2, latitude_2], ...]
6}
1{
2 "name": "Only Rectangle",
3 "type": "Feature",
4 "geometry": {
5 "type": "LineString",
6 "radius": 75,
7 "shapeType": "Corridor",
8 "coordinates": [
9 [-67.137343, 45.137451],
10 [-68.137343, 46.137451]
11 ]
12 }
13}

Rectangle shape

Creates a rectangle using two points.

  • The first point is the bottom-left corner.
  • The second point is the top-right corner.

Required geometry object fields

  • "type": "MultiPoint"
  • "shapeType": "Rectangle"
1"geometry": {
2 "type": "MultiPoint",
3 "shapeType": "Rectangle",
4 "coordinates": [[longitude_1, latitude_1], [longitude_2, latitude_2]]
5}
1{
2 "name": "Only Rectangle",
3 "type": "Feature",
4 "geometry": {
5 "type": "MultiPoint",
6 "shapeType": "Rectangle",
7 "coordinates": [
8 [-67.137343, 45.137451],
9 [-68.137343, 46.137451]
10 ]
11 }
12}