This section provides some common geofence concepts, including common terminology and how to manage geofences.
Amazon Location Service geofence terminology
- Geofence collection
Contains zero or more geofences. It is capable of geofence monitoring by emitting Entry and Exit events, when requested, to evaluate a device position against its geofences.
- Geofence
A polygon or circle geometry that defines a virtual boundary on a map.
- Polygon geometry
An Amazon Location geofence is a virtual boundary for a geographical area and is represented as a polygon geometry or as a circle.
A circle is a point with a distance around it. Use a circle when you want to be notified if a device is within a certain distance of a location.
A polygon is an array composed of 1 or more linear rings. Use a polygon when you want to define a specific boundary for device notifications. A linear ring is an array of four or more vertices, where the first and last vertex are the same to form a closed boundary. Each vertex is a 2-dimensional point of the form [
longitude
,latitude
], where the units of longitude and latitude are degrees. The vertices must be listed in counter-clockwise order around the polygon.The following is an example of a single linear external ring:
[ [ [-5.716667, -15.933333], [-14.416667, -7.933333], [-12.316667, -37.066667], [-5.716667, -15.933333] ] ]
Note
Amazon Location Service doesn't support polygons with more than one ring. This includes holes, islands, or multipolygons. Amazon Location also doesn't support polygons that are wound clockwise, or that cross the antimeridian.