queryType: getZonesByRadius*
The getZonesByRadius queryType is passed to the API to generate an array of zones that fall within a given radius of the centroid of a central zone.
Parameters
These parameters should be passed to the functionParameters object regardless of which method you choose to make an API request.
| Parameter | Description | Type | Defined Value Set | Value Required |
|---|---|---|---|---|
| queryType | Must equal getZonesByRadius. | STRING | getZonesByRadius | Y |
| asOfDate |
The date for which OSM base map version to use. The date is in YYYY-MM-DD string format. If not provided will use the most recent month. Note:
This date is utilized to pull the correct basemap reference when utilizing a segment as your zone; it is recommended you provide input. | STRING | - | N |
| customZoneTypes |
Array of custom zone type IDs representing the types of custom zones you would like returned. Empty array means all custom zone types. Note:
This filter is only applied when | ARRAY | - | N |
| excludeServiceRoads | True to exclude service roads, false to include them. The default is true. | BOOLEAN | - | N |
| isMetric | True if you want the data returned to be metric, false if you want imperial. | BOOLEAN | true or false | Y |
| radius | The length of the radius (kilometers or miles) based on isMetric. | FLOAT | true or false | Y |
| requestZoneType | The type of zones you want returned. | STRING |
See Zones for details on how to structure the zone inputs for each zone type. | Y |
| roadTypes |
Array of strings representing the different road types for which you want data. Empty array means all road types. Note: This filter is only applied when
requestZoneType is “Segment”. | ARRAY | List of OSM road types. See the Road Types table. | N |
| zones |
An object representing the zone reference for returning zones of the requested type:
| ARRAY |
See Zones for details on how to structure the zone inputs for each zone type. | Y |
Responses
| Code | Type | Description |
|---|---|---|
| 200 | JSON | The requested data. |
| 401 | JSON | Occurs for various unauthorized tasks, such as not providing credentials in your parameters. |
| 500 | JSON | Occurs if an internal server error occurs. Contact altitudesupport@geotab.com if this occurs. |
Response Schema
| Attribute | Description | Data Type | Defined Value Set |
|---|---|---|---|
| Geography | A GeoJSON string representing the geography of the zone. | STRING | - |
| ISO_3166_2 | The ISO 3166:2 code for the state or province. | STRING | - |
| MaxLatitude | Maximum latitude of the zone. | FLOAT64 | - |
| MaxLongitude | Maximum longitude of the zone. | FLOAT64 | - |
| MinLatitude | Minimum latitude of the zone. | FLOAT64 | - |
| MinLongitude | Minimum longitude of the zone. | FLOAT64 | - |
| ZoneId | The zone ID for which data is being returned. | STRING | - |
| ZoneDescription |
Description of the zone when available. The value is based on the type of zone:
| STRING | - |
| ZoneSubType |
The zone type subclassification value, where applicable. This value is based on
All other values return a null. | STRING | - |
| ZoneType | The zone type of the zone. | STRING | “State”, ”County”, ”City”, ”CTR”, ”ZIP”, “TAZ”, “FSA”, “Custom” and “Segment” |
Sample parameters
{
"queryType": "getZonesByRadius",
"isMetric": false,
"radius": 50.0,
"requestZoneType": " CTR ",
"zones": [{
"ZoneId": "36063",
"ISO_3166_2": "US-NY",
"ZoneType": "county"
}]
}