Returns roof age information for the resource ID within the supplied AOI
This endpoint enables you to retrieve roof age information for the resource ID within the supplied Area of Interest (AOI).
Endpoint
https://api.nearmap.com/ai/roofage/v1/resources/{resourceId}.{fileFormat}
Path parameters
resourceId(string, required): The unique identifier of the survey resource to analyze for roof age datafileFormat(string, required): Output format for the response. Currently onlygeojsonis supported.
Request body parameters
The request body must contain either an address OR an aoi parameter (not both).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
address | Address object | ✔* | N/A | Address information for the property to analyze. Required if aoi is not specified. |
aoi | AOI Geometry object | ✔* | N/A | Geographic area of interest definition. Required if address is not specified. |
cursor | string | ✖ | N/A | Optional cursor for pagination. Should be omitted on the first request, and set to the value of nextCursor from the previous response for subsequent requests. |
limit | integer | ✖ | 1000 | Optional maximum number of features to return. If not set, a default of 1000 is used. If results exceed the limit, the response will be paginated. |
*Either address or aoi is required, but not both.
Address Object
The address object must contain all of the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
streetAddress | string | ✔ | The street address for a geocoded request. Should consist of the street number, street name, and street type. |
city | string | ✔ | The city, suburb, or locality for a geocoded request. |
state | string | ✔ | The two-letter state code for a geocoded request. |
zipCode | string | ✔ | The five-digit ZIP code or nine-digit ZIP+4 code for US addresses or the four-digit postal code for AU addresses for a geocoded request. |
country | string | ✔ | The two-letter country code for the geocoded request. Only supports US and AU. |
Example:
{
"streetAddress": "422 Towne Park Trl",
"city": "Austin",
"state": "TX",
"zipCode": "78751",
"country": "US"
}AOI Geometry Object
The AOI geometry object defines a geographic area of interest using GeoJSON polygon format.
| Field | Type | Required | Description |
|---|---|---|---|
geometry | GeoJSON Geometry | ✔ | A GeoJSON object representing the requested AOI. Must be a GeoJSON polygon with no interior rings. |
Example:
{
"geometry": {
"type": "Polygon",
"coordinates": [[
[-97.72889712645727, 30.30097004106024],
[-97.72891413685106, 30.30094441770939],
[-97.7286977067365, 30.300846611442992],
[-97.7286821440362, 30.300871609858902],
[-97.72889712645727, 30.30097004106024]
]]
}
}Response
The response returns roof age information in GeoJSON format with the following structure:
features: Array of feature objects containing roof age datanextCursor: Cursor for fetching the next page of results (only present when there are more results)type: Response type (typically "FeatureCollection")resourceId: The resource ID used for the requestaddress: Canonical address information (when address was provided in request)
Each feature in the response includes properties such as:
installationDate: Predicted roof installation datetrustScore: Confidence score for the predictionevidenceType: Type of evidence used for the predictionnumberOfCaptures: Number of image captures used in analysis
