Regions
Regions are polygons with some metadata attached. They are used throughout the system and are required for sending messages, creating segments and viewing statistics. The properties of a region are:
Property | Type | Description |
---|---|---|
id | String | The region ID. This is not required (and will be ignored) on creation. It is used when updating regions. |
name | String (required) | The name of the region |
areaType | String (required) | The type of the region. For example: Bar, Stage, etc. |
surfaceId | String (required) | The ID of the surface the region is on* |
points | 2-D Array of Numbers (optional as long as latlngs is present) | Cartesian coordinates of each point of the polygon. For example: [[0,0],[0,10],[10,10],[0,0]] (the first and last point must be the same). Generally latlngs will be used instead of points. The coordinate system is specified in the surface definition. |
latlngs | 2-D Array of Numbers (optional as long as points is present) | Latitude / Longitude coordinates of each point of the polygon. For example: [[51.2,-0.61],[51.3,-0.62],[51.4,-0.63],[51.2, -0.61]] (the first and last point must be the same) |
For standard outdoor deployments there is only one surface, WorldSurface. You can get the ID by using:
GET on /v2/surfaces
This will return one item with an ID. For these deployments the coordinate system used for points is World Mercator (EPSG reference 3395)
See API Docs for path and method options.