Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include area in square meters to the building footprint datasets #213

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 40 additions & 1 deletion transform/models/marts/geo_reference/_geo_reference__models.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ models:
- name: geo_reference__us_building_footprints_with_tiger
description: |
This data table is a join of the TIGER data for blocks, tracts, counties, and
places with the Microsoft Building Footprints data for the state of CA.
places with the Microsoft US Building Footprints data for the state of CA.
columns:
- name: release
description: The version of the data
Expand Down Expand Up @@ -60,3 +60,42 @@ models:
description: Current FIPS class definition
- name: geometry
description: The footprint geometry
- name: area_sqm
description: The area of the footprint in square meters
- name: geo_reference__global_ml_building_footprints_with_tiger
description: |
This data table is a join of the TIGER data for blocks, tracts, counties, and
places with the Microsoft Global ML Building Footprints data for the state of CA.
columns:
- name: height
description: The height of the building (negative indicates unknown height)
- name: county_fips
description: 2020 Census county FIPS code
- name: tract
description: 2020 Census tract code
- name: block
description: 2020 Census tabulation block number
- name: block_geoid
description: >
Census block identifier; a concatenation of 2020 Census state FIPS code, 2020
Census county FIPS code, 2020 Census tract code, and 2020 Census block number
- name: place_fips
description: Current place FIPS code
- name: place_ns
description: Current place GNIS code
- name: place_geoid
description: >
Place identifier; a concatenation of the current state
FIPS code and place FIPS code
- name: place_name
description: >
Current name and the translated legal/statistical
area description for place
- name: class_fips_code
description: Current FIPS class code
- name: class_fips
description: Current FIPS class definition
- name: geometry
description: The footprint geometry
- name: area_sqm
description: The area of the footprint in square meters
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ footprints_with_blocks_and_places as (
kind="left",
prefix="p",
) }}
),

footprints_with_blocks_and_places_final as (
select
*,
st_area("geometry") as "area_sqm"
from footprints_with_blocks_and_places
)

select * from footprints_with_blocks_and_places
select * from footprints_with_blocks_and_places_final
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ footprints_with_blocks_and_places as (
kind="left",
prefix="p",
) }}
),

footprints_with_blocks_and_places_final as (
select
*,
st_area("geometry") as "area_sqm"
from footprints_with_blocks_and_places
)

select * from footprints_with_blocks_and_places
select * from footprints_with_blocks_and_places_final