Request
This request is based on a known surveyResourceId
, so the API will not need parameters to find a survey resource.
Two variations are possible when using an AOI geometry. Either as the polygon
query parameter as a sequence of coordinates:
GET https://api.nearmap.com/ai/features/v4/surveyresources/09aee77b-3f6e-5077-b9ec-036da962642e/features.json?include=damage&classes=91987430-6739-5e16-b92f-b830dd7d52a6&systemVersionPrefix=gen6&polygon=-118.523608,34.048762,-118.523579,34.048634,-118.524001,34.048569,-118.524029,34.048697,-118.523608,34.048762
Or in the body as GeoJSON under the property aoi
:
POST https://api.nearmap.com/ai/features/v4/surveyresources/09aee77b-3f6e-5077-b9ec-036da962642e/features.json?include=damage&classes=91987430-6739-5e16-b92f-b830dd7d52a6&systemVersionPrefix=gen6
With body:
{
"aoi": {
"type": "Polygon",
"coordinates": [
[
[
-118.523608,
34.048762
],
[
-118.523579,
34.048634
],
[
-118.524001,
34.048569
],
[
-118.524029,
34.048697
],
[
-118.523608,
34.048762
]
]
]
}
}
The query parameters are as follows:
classes=91987430-6739-5e16-b92f-b830dd7d52a6
: Requests the feature class Building Lifecycle
with the feature class ID as specified.include=damage
: Requests inclusion of the real-time damage supplementary data source. Eligible returned Building Lifecycle features will include damage classifications.polygon=...
/"aoi":{...}
: Requests all features of the requested class (Building Lifecycle) that intersect this AOI.- Parcel mode is not set, so discrete classes (like
Building Lifecycle
91987430-6739-5e16-b92f-b830dd7d52a6
) will not be clipped. The damage classifications will be based on the full feature geometries.
Response
An example response object is provided below. See the article Example date-based request and response for further details of all relevant fields. This example response highlights only the differences present in this request.
{
"credits": 1,
// this is the resourceId provided in the request
"resourceId": "09aee77b-3f6e-5077-b9ec-036da962642e",
"surveyId": "857d656e-d2dd-11ef-a707-b7e79eec4f45",
"surveyDate": "2025-01-13",
"3dDate": "",
"systemVersion": "gen6-glowing_lantern-1.0",
"link": "https://apps.nearmap.com/maps/#/@34 .0486655,-118.5238042,20.00z,0d/V/20250113?locationMarker",
// geomatched address is not included as this is an AOI (not address-based) request
"extentMinX": -118.5240398621885,
"extentMaxX": -118.5235681378115,
"extentMinY": 34.04856,
"extentMaxY": 34.048771,
"perspective": "Vert",
"postcat": true,
"features": [
{
"id": "6f5fbd84-8a60-517b-8c76-24d1fd2d8051",
"classId": "91987430-6739-5e16-b92f-b830dd7d52a6",
"description": "Building lifecycle",
"confidence": 0.8876989,
"parentId": "",
"geometry": {
"type": "Polygon",
"coordinates": [
[]
]
},
"geometry": {
"type": "Polygon",
"coordinates": [
[]
]
},
// no `clippedGeometry` field is included as parcel mode is not active
// no `belongsToParcel` field is included as parcel mode is not active
"areaSqm": 7291.8,
"areaSqft": 78489,
"clippedAreaSqm": 374.5,
"clippedAreaSqft": 4031,
"unclippedAreaSqm": 7291.8,
"unclippedAreaSqft": 78489,
"attributes": [],
"surveyDate": "2025-01-13",
"meshDate": "",
"damage": {
"confidences": {
"raw": {
"Undamaged": 0.001,
"Affected": 0,
"Minor": 0.001,
"Major": 0.001,
"Destroyed": 0.997
},
"3tier": {
"UndamagedOrAffected": 0.001,
"Minor": 0.001,
"MajorOrDestroyed": 0.998
},
"2tier": {
"UndamagedOrAffectedOrMinor": 0.002,
"MajorOrDestroyed": 0.998
}
},
// The ratios array is explained above.
"ratios": [
{
"classId": "2322ca41-5d3d-5782-b2b7-1a2ffd0c4b78",
"description": "Exposed Underlayment",
"ratioAbove50PctConf": 0
},
{
"classId": "2905ba1c-6d96-58bc-9b1b-5911b3ead023",
"description": "Exposed Roof Deck",
"ratioAbove50PctConf": 0
},
{
"classId": "3534a1fc-2e12-51a7-b2dc-1c850bc69fc1",
"description": "Building with Structural Damage",
"ratioAbove50PctConf": 0
},
{
"classId": "4794d3ec-0ee7-5def-ad56-f82ff7639bce",
"description": "Building Under Construction",
"ratioAbove50PctConf": 0
},
{
"classId": "584188c4-4f77-5724-a782-f13865ab0dbc",
"description": "Building Structural Loss",
"ratioAbove50PctConf": 0.99
},
{
"classId": "6832955f-89c6-5cfd-874d-40c22aead943",
"description": "Vegetation Debris",
"ratioAbove50PctConf": 0
},
{
"classId": "abb1f304-ce01-527b-b799-cbfd07551b2c",
"description": "Roof with Temporary Repair",
"ratioAbove50PctConf": 0
},
{
"classId": "c46e75a6-7b3c-5910-9f3f-742dd668025b",
"description": "Building Damage by Tree",
"ratioAbove50PctConf": 0
},
{
"classId": "dec855e2-ae6f-56b5-9cbb-f9967ff8ca12",
"description": "Missing Roof Tile or Shingle",
"ratioAbove50PctConf": 0
},
{
"classId": "f8abc8e3-6af3-5a1d-9a8e-1793419455bb",
"description": "Junk and Wreckage",
"ratioAbove50PctConf": 0.491
},
{
"classId": "f907e625-26b3-59db-a806-d41f62ce1f1b",
"description": "Structural Damage",
"ratioAbove50PctConf": 0
}
]
}
}
],
"versions": {
"damage": {
"modelVersion": "B.0",
"presentationVersion": "1"
}
}
}