Roof pitch and surface area for any New Zealand address

Send a street address. Get back the building footprint, the roof pitch measured from LiDAR, and the true roof surface area in square metres. One request answers in about a second.

Cross-section of a gable roof: footprint 186.4 square metres, pitch 24 degrees, roof surface 204.1 square metres.24°204.1 m²surface186.4 m²footprint
12 Example Street, Christchurch. Surface area is the footprint divided by the cosine of the pitch: 186.4 ÷ cos 24° = 204.1 m².

What is Roof Pitch API?

Roof Pitch API is a REST API that turns a New Zealand street address into a measured roof pitch in degrees, the building footprint in square metres and the true roof surface area in square metres. It is built on Land Information New Zealand (LINZ) open data: the national address dataset, building outlines and 1 m LiDAR elevation. It covers Canterbury today, with the rest of New Zealand coming, and is sold by Product in Your Pocket in Christchurch.

Endpoints

A small, plain REST API. JSON over HTTPS, authenticated with a bearer key. Areas are square metres, pitch is degrees from horizontal, coordinates are WGS 84.

Base URL https://api.roofpitchapi.co.nz/v1. The full documentation covers authentication, rate limits and every response field, and there is an OpenAPI 3.1 specification.

GET/roofs

Address in, measured roof out

The main endpoint. Resolves the address, finds the buildings on the section, measures the dominant pitch of the primary building and returns footprint, pitch and surface area in one call.

Request
GET /v1/roofs?address=12%20Example%20Street%2C%20Northwood%2C%20Christchurch
Authorization: Bearer rp_live_...
Response
{
  "address": {
    "full": "12 Example Street, Northwood, Christchurch 8051",
    "territorialAuthority": "Christchurch City",
    "latitude": -43.4731,
    "longitude": 172.6163
  },
  "building": {
    "id": 2048173,
    "footprintM2": 186.4,
    "pitchDegrees": 24,
    "pitchSource": "lidar",
    "pitchConfidence": "high",
    "surfaceAreaM2": 204.1
  },
  "otherBuildings": [
    {
      "id": 2048174,
      "footprintM2": 38.2,
      "pitchDegrees": 15,
      "pitchSource": "lidar",
      "pitchConfidence": "medium",
      "surfaceAreaM2": 39.6
    }
  ],
  "attribution": "Contains data sourced from LINZ, CC BY 4.0"
}

GET/addresses

Address search and autocomplete

Type-ahead search over the LINZ national address dataset. Each candidate says whether it sits inside a covered territorial authority, so you can tell the user before they commit.

Request
GET /v1/addresses?q=12%20Example%20St
Authorization: Bearer rp_live_...
Response
{
  "candidates": [
    {
      "full": "12 Example Street, Northwood, Christchurch 8051",
      "territorialAuthority": "Christchurch City",
      "covered": true
    },
    {
      "full": "12 Example Street, Mosgiel, Dunedin 9024",
      "territorialAuthority": "Dunedin City",
      "covered": false
    }
  ]
}

GET/buildings/{id}

Measure one specific building

When your user has confirmed which building is theirs, fetch the measurement for that LINZ building outline directly, without resolving the address again.

Request
GET /v1/buildings/2048173
Authorization: Bearer rp_live_...
Response
{
  "id": 2048173,
  "footprintM2": 186.4,
  "pitchDegrees": 24,
  "pitchSource": "lidar",
  "pitchConfidence": "high",
  "surfaceAreaM2": 204.1,
  "territorialAuthority": "Christchurch City"
}

GET/coverage

Where measured pitch is available

The territorial authorities with LiDAR-measured pitch today. Check this rather than hardcoding a list: coverage grows as new districts are processed.

Request
GET /v1/coverage
Response
{
  "territorialAuthorities": [
    "Christchurch City",
    "Selwyn District",
    "Waimakariri District",
    "Timaru District",
    "Ashburton District",
    "Hurunui District",
    "Waimate District",
    "Mackenzie District",
    "Kaikoura District"
  ]
}

How it works

Address to roof area in four steps. Every number comes from a national open dataset, so the answer is the same for every caller and can be audited back to the source.

1Send an address
Any New Zealand street address, as a person would type it. We match it against the LINZ national address dataset and return the exact point.
2We find the building
LINZ building outlines give every building near that point, with its footprint area in square metres. Where more than one building sits on the section, each is returned so you can pick the right one.
3We measure the pitch
The dominant roof slope is read from 1 m LiDAR elevation data over the footprint, in degrees, with a confidence grade that says how planar the roof is.
4You get the surface area
True roof surface area is the footprint divided by the cosine of the pitch. The response carries all three numbers so you can apply your own allowances for eaves, gutters or waste.

surfaceAreaM2 = footprintM2 / cos(pitchDegrees)

Why roof area is hard to get

Anyone who prices by roof area in New Zealand hits the same wall: the number they need does not exist anywhere as data. It has to be measured on site, estimated from floor area, or guessed.

Floor area is not roof area
Council records and property sites give floor area. A pitched roof is bigger than its footprint, by 1 / cos(pitch): a 25 degree roof is 10% larger, a 35 degree roof 22% larger. Quoting from floor area under-prices every job.
Pitch is invisible from above
Satellite and aerial photos show the outline, not the slope. Pitch needs elevation data, and until now that meant a ladder, a pitch gauge and a site visit.
No New Zealand dataset ships it joined
LINZ publishes addresses, building outlines and LiDAR as three separate datasets with no shared key. Google's Solar API has no New Zealand coverage at all. Joining them takes a geospatial pipeline, which is what this API is.
Site visits do not scale
A tradesperson can measure one roof an hour. A website quoting hundreds of leads a month cannot wait for that, and most homeowners leave if a price takes longer than ten seconds.

Who uses it

Roofers, roof painters, solar installers, insulation installers, insurers, property-data teams and the developers building their websites and quoting tools. Anyone who prices or plans by roof area and needs the number from an address, not a site visit.

  • Roof painting and restoration quotes. Price a roof from an address before anyone drives out. Surface area times your rate, in seconds, on your own website.
  • Re-roofing and roofing supply. Estimate sheet, tile or membrane quantities from true pitched area, not floor area.
  • Solar and insulation. Usable roof area and slope for panel layouts and R-value calculations.
  • Insurance and property data. Enrich a property record with footprint, pitch and roof area for rebuild and risk models.

Errors

If the roof cannot be measured, the API returns an error rather than an estimate. The four you will meet first are below.

StatusCodeMeaning
404ADDRESS_NOT_FOUNDNo LINZ address matched. Try the /addresses search first and send the candidate back.
422OUT_OF_AREAThe address is real but sits outside a covered territorial authority. No pitch is guessed.
422NO_BUILDING_FOUNDNo building outline near the address point. About 7% of Canterbury addresses: bare sections, new subdivisions, houses set far back from the road.
401UNAUTHORIZEDMissing, malformed or revoked API key.

The docs list every error, with the response envelope and which ones are safe to retry.

Coverage

Measured pitch needs LiDAR that has been processed district by district. If you need a region sooner, say so.

Available now
Canterbury: Christchurch City, Selwyn District, Waimakariri District, Timaru District, Ashburton District, Hurunui District, Waimate District, Mackenzie District, Kaikoura District.
Coming soon
Auckland, Wellington, Waikato, Bay of Plenty, Otago, Manawatū-Whanganui, Northland, Hawke's Bay, Taranaki, Southland, Nelson, Tasman, Marlborough, Gisborne, West Coast. Regions are processed in order of demand.

Frequently asked questions

How accurate is the roof pitch?
Pitch is measured from 1 m LiDAR, not assumed. It has been checked against real Christchurch roofs at 16 to 33 degrees. Every measurement carries a confidence grade of high, medium or low, and the pitch source field says whether the pitch was measured from LiDAR or is a default, so a weak measurement is never passed off as a strong one.
Where does the data come from?
Three Land Information New Zealand (LINZ) open datasets: the NZ Street Address dataset, NZ Building Outlines and the 1 m LiDAR digital surface model. All are licensed CC BY 4.0, which allows commercial use with attribution. No Google data is used in the measurement.
What happens when an address has no building on it?
The API returns a 422 with the code NO_BUILDING_FOUND rather than guessing. About 7% of Canterbury addresses have no building outline at the address point: bare sections, new subdivisions and houses set far back from the road.
Does the surface area include eaves and overhangs?
No. The footprint is the LINZ building outline, so the surface area is the pitched area of that outline. Add your own eaves, gutter or waste allowance on top; the response gives footprint, pitch and surface area separately so you can.
Can I use Roof Pitch API for commercial quoting?
Yes. The underlying LINZ data is licensed CC BY 4.0, which permits commercial use provided LINZ is credited. Every response includes the attribution string to display.
How much does it cost and how do I get access?
The API is in private preview and priced per customer by region and monthly lookup volume. Email Anthony at Product in Your Pocket with your use case and you will get a quote and an API key.
Can my region be added sooner?
Yes. Regions are processed in order of demand, so tell us which territorial authorities you need and roughly how many lookups a month.

Get access

The API is in private preview. Email Anthony at Product in Your Pocket with your use case, the regions you need and roughly how many lookups a month, and you will get a quote and a key.