# Building outlines used by the roof estimator

These files hold the building outlines (footprints) this site's roof estimator uses for the towns round Calgary:
to check an older aerial measurement against the building at an address, to work out an approximate roof size
where there is no aerial measurement, and to draw the building on a satellite photo. They come from open data
published by the bodies below, under the licences named. Each file names its source, licence, attribution and
date in its own `notice`. Built 2026-10-14 from sources fetched 2026-10-14.

## The sources

| Folder | Source | Licence | Attribution | Snapshot | Captured | Outlines |
|---|---|---|---|---|---|---|
| `airdrie/` | City of Airdrie: City of Airdrie building footprints (https://services1.arcgis.com/bctnJobT0aahg98G/arcgis/rest/services/Building_Footprint/FeatureServer/36) | [Open Data Licence - City of Airdrie](https://data-airdrie.opendata.arcgis.com/pages/our-open-licence) | Contains information licensed under the Open Data Licence – City of Airdrie. | 2026-04-23 | LiDAR-derived; new buildings digitised from the latest orthophotos (City of Airdrie) | 26231 |
| `okotoks/` | Town of Okotoks: Town of Okotoks building footprints (https://services3.arcgis.com/Fl5sQFvYY7w7mPQj/arcgis/rest/services/Building_Footprints/FeatureServer/46) | [Open Government Licence - Town of Okotoks](https://map.okotoks.ca/pages/open-data-licence) | Contains information licensed under the Open Government Licence - Town of Okotoks. | 2026-10-11 | digitised from aerial imagery and kept current by the Town (no date per building) | 15338 |
| `cochrane/` | Town of Cochrane: Town of Cochrane buildings (https://services5.arcgis.com/M1SNYuFIW9v2gSO7/arcgis/rest/services/Buildings/FeatureServer/3) | [Open Data Licence - Town of Cochrane](https://geohub.cochrane.ca/pages/open-data-license-agreement) | Contains information licensed under the Open Data Licence – Town of Cochrane. | 2026-10-02 | 2018 aerial photogrammetry (Town of Cochrane) | 10638 |
| `chestermere/` | City of Chestermere: City of Chestermere building footprints (https://services5.arcgis.com/xPoG9m86qjKWAzys/arcgis/rest/services/Building_Footprints/FeatureServer/0) | [not stated (asked)](https://www.arcgis.com/home/item.html?id=4948841285f74cec9b989700c283aa41) | Building outlines: City of Chestermere. | 2020-08-27 | layer last edited 2020-08-27 (no capture date given) | 10730 |
| `high-river/` | Town of High River: Town of High River building footprints (September 2025) (https://services.arcgis.com/LfXUSCH9e6auUGvD/arcgis/rest/services/BuildingFootprint/FeatureServer/0) | [not stated (asked)](https://www.arcgis.com/home/item.html?id=bffa075b1db14587a356804c77221f68) | Building outlines: Town of High River. | 2026-05-12 | September 2025, from the September 6, 2025 LiDAR (Town of High River) | 5941 |
| `black-diamond/` | Natural Resources Canada: NRCan Automatically Extracted Buildings, Elbow River 2015 (https://download-telecharger.services.geo.ca/pub/nrcan_rncan/extraction/auto_building/gpkg/Autobuilding_AB_Elbow_River_UTM11_2015_gpkg.zip) | [Open Government Licence - Canada](https://open.canada.ca/en/open-government-licence-canada) | Contains information licensed under the Open Government Licence – Canada. | 2026-09-04 | 2015-04-17 | 2759 |
| `de-winton/` | Natural Resources Canada: NRCan Automatically Extracted Buildings, Calgary East and West 2020 (https://download-telecharger.services.geo.ca/pub/nrcan_rncan/extraction/auto_building/gpkg/Autobuilding_AB_Calgary_West_utm11_2020_gpkg.zip, https://download-telecharger.services.geo.ca/pub/nrcan_rncan/extraction/auto_building/gpkg/Autobuilding_AB_Calgary_East_utm12_2020_gpkg.zip) | [Open Government Licence - Canada](https://open.canada.ca/en/open-government-licence-canada) | Contains information licensed under the Open Government Licence – Canada. | 2026-09-04 | 2020-05-04 | 2664 |
| `priddis/` | Natural Resources Canada: NRCan Automatically Extracted Buildings, Calgary West 2020 (https://download-telecharger.services.geo.ca/pub/nrcan_rncan/extraction/auto_building/gpkg/Autobuilding_AB_Calgary_West_utm11_2020_gpkg.zip) | [Open Government Licence - Canada](https://open.canada.ca/en/open-government-licence-canada) | Contains information licensed under the Open Government Licence – Canada. | 2026-09-04 | 2020-05-04 | 1423 |
| `strathmore/` | Microsoft: Microsoft's Canadian Building Footprints (Alberta, 2019) (https://minedbuildings.z5.web.core.windows.net/legacy/canadian-buildings-v2/Alberta.zip) | [Open Database License (ODbL) 1.0](https://opendatacommons.org/licenses/odbl/1-0/) | Contains information from Microsoft's Canadian Building Footprints, which is made available here under the Open Database License (ODbL). | 2019-05-08 | Bing imagery of mixed dates (Microsoft does not give a date per building); file of 2019-05-08 | 4601 |
| `gleichen/` | Microsoft: Microsoft's Canadian Building Footprints (Alberta, 2019) (https://minedbuildings.z5.web.core.windows.net/legacy/canadian-buildings-v2/Alberta.zip) | [Open Database License (ODbL) 1.0](https://opendatacommons.org/licenses/odbl/1-0/) | Contains information from Microsoft's Canadian Building Footprints, which is made available here under the Open Database License (ODbL). | 2019-05-08 | Bing imagery of mixed dates (Microsoft does not give a date per building); file of 2019-05-08 | 399 |
| `rockyford/` | Microsoft: Microsoft's Canadian Building Footprints (Alberta, 2019) (https://minedbuildings.z5.web.core.windows.net/legacy/canadian-buildings-v2/Alberta.zip) | [Open Database License (ODbL) 1.0](https://opendatacommons.org/licenses/odbl/1-0/) | Contains information from Microsoft's Canadian Building Footprints, which is made available here under the Open Database License (ODbL). | 2019-05-08 | Bing imagery of mixed dates (Microsoft does not give a date per building); file of 2019-05-08 | 160 |
| `bragg-creek/` | Microsoft: Microsoft's Canadian Building Footprints (Alberta, 2019) (https://minedbuildings.z5.web.core.windows.net/legacy/canadian-buildings-v2/Alberta.zip) | [Open Database License (ODbL) 1.0](https://opendatacommons.org/licenses/odbl/1-0/) | Contains information from Microsoft's Canadian Building Footprints, which is made available here under the Open Database License (ODbL). | 2019-05-08 | Bing imagery of mixed dates (Microsoft does not give a date per building); file of 2019-05-08 | 698 |
| `aldersyde/` | Microsoft: Microsoft's Canadian Building Footprints (Alberta, 2019) (https://minedbuildings.z5.web.core.windows.net/legacy/canadian-buildings-v2/Alberta.zip) | [Open Database License (ODbL) 1.0](https://opendatacommons.org/licenses/odbl/1-0/) | Contains information from Microsoft's Canadian Building Footprints, which is made available here under the Open Database License (ODbL). | 2019-05-08 | Bing imagery of mixed dates (Microsoft does not give a date per building); file of 2019-05-08 | 223 |

Inside the City of Calgary the estimator reads the City's own roof outline layer (data.calgary.ca, uc4c-6kbd)
when it needs it; it is not copied here. `index.json` holds the City's boundary (data.calgary.ca, erra-cqp9),
simplified. Contains information licensed under the Open Government Licence – City of Calgary. (https://data.calgary.ca/d/Open-Data-Terms/u45n-7awa)

## Microsoft's Canadian Building Footprints (ODbL)

Contains information from Microsoft's Canadian Building Footprints, which is made available here under the Open
Database License (ODbL).

- The database: Microsoft, Canadian Building Footprints, https://github.com/microsoft/CanadianBuildingFootprints
- The licence, in full: Open Database License (ODbL) 1.0, https://opendatacommons.org/licenses/odbl/1-0/
- The file used: https://minedbuildings.z5.web.core.windows.net/legacy/canadian-buildings-v2/Alberta.zip, its member `Alberta.geojson` dated
  2019-05-08, SHA-256 `4fd2b43dbc629382fe31c6ec21deb4c329c0a16955b61313eea08c9dbc904576`.

The outlines in the folders below are a selection from that file and nothing else: they are not edited, merged
with another source or joined to any other data. This is how they were selected:

1. One area per town, written from each place's centre (not taken from another dataset). A circle is drawn on the
   ground (an azimuthal equidistant projection centred on the point, a buffer of the radius, 64 segments a
   quarter). From each area, the City of Calgary's boundary and the areas of the other sources listed above it in
   the table are taken out, so a place covered by a municipal or federal source never reads these.

   | Folder | Town | Area | Outlines |
   |---|---|---|---|
   | `strathmore/` | Strathmore | the box 113.445 W to 113.335 W, 51.020 N to 51.075 N | 4601 |
   | `gleichen/` | Gleichen | a circle of 1,500 m round 50.867 N, 113.050 W | 399 |
   | `rockyford/` | Rockyford | a circle of 1,500 m round 51.223 N, 113.137 W | 160 |
   | `bragg-creek/` | Bragg Creek | a circle of 4,000 m round 50.949 N, 114.565 W | 698 |
   | `aldersyde/` | Aldersyde | a circle of 2,000 m round 50.677 N, 113.879 W | 223 |

2. The file has one building per line. A building is kept, whole, when a point inside it (shapely's
   `representative_point()`, always inside the polygon) falls inside the town's area. Buildings are never cut at
   the edge of an area.
3. A kept building's id is `ms<N>`, N being its place among the file's buildings counted from 0, so it can be
   found in the original file again.
4. Its coordinates are copied exactly as published (degrees, WGS 84, 6 decimals).
5. The buildings are stored in tiles of 0.01 degree of latitude by 0.015 of longitude, a building whole in every
   tile its bounding box touches. A tile: `{"set", "cell", "origin", "enc": "deg", "notice", "o": [[id, [ring]],
   ...]}`, each ring a flat list `lng, lat, lng, lat, ...`.

These folders are the whole of the selection, free to copy under the ODbL. The script that makes them is kept
with the site and does exactly the steps above.

<!-- rural set: written by build-outlines.py rural -->
### The rest of the service area (`rural/`, staff only)

The same Microsoft file, selected the same way (steps 2 to 4 above), for the staff building picker on the CRM's
Measure a roof card: every building within 150 m of an address, also between the towns. The area is a circle of
80,000 m round 51.0447 N, 114.0719 W (the service area), less the City of Calgary and every area in the
table above and every other source's area. The public estimator never reads this folder.

- Outlines: 70490, in 627 tiles of 0.05 degree of latitude by 0.075 of longitude
  (the set's own `cell` in index.json), a building whole in every tile its box touches.
- The file used: the same `Alberta.geojson` of 2019-05-08, SHA-256 `4fd2b43dbc629382fe31c6ec21deb4c329c0a16955b61313eea08c9dbc904576`.
<!-- end rural set -->

## The other files

The municipal and federal outlines are carried from NAD83(CSRS) to WGS 84 as Google's imagery uses it
(NAD83(CSRS)v7 to ITRF2014 (EPSG:8256 inverse, 14 parameters) at epoch 2020.0, i.e. WGS 84 as Google uses it (Microsoft: as published, WGS 84); here about 1.41 m west and
0.52 m north), rounded to 6 decimals and stored as whole millionths of a degree
from the tile's corner (`"enc": "udeg"`). `index.json` lists every set, its area and its tiles.
