Skip to content

Commit

Permalink
export GFT historic source data
Browse files Browse the repository at this point in the history
  • Loading branch information
damonmcc committed Apr 20, 2024
1 parent 54a9de6 commit c56103f
Show file tree
Hide file tree
Showing 16 changed files with 82 additions and 3 deletions.
13 changes: 13 additions & 0 deletions products/green_fast_track/bash/export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,19 @@ mkdir -p output && (

export sources__natural_resources_buffer

# Historic
export sources__nyc_historic_buildings_points POINT
export sources__nyc_historic_buildings_lots
export sources__nyc_historic_buildings_buffers
export sources__nyc_historic_districts
export sources__scenic_landmarks
export sources__nys_historic_buildings_points POINT
export sources__nys_historic_buildings_lots
export sources__nys_historic_buildings_buffers
export sources__nys_historic_districts
export sources__us_historic_places
export sources__us_historic_places_buffers
export sources__archaeological_areas

export variables NONE
export source_data_versions NONE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ models:
- name: sources__waterfront_access_pow_buffers
- name: sources__waterfront_access_wpaa
- name: sources__waterfront_access_wpaa_buffers
- name: sources__natural_resources_buffer

## natural resources
- name: sources__state_freshwater_wetlands_checkzones
Expand All @@ -54,4 +55,16 @@ models:
- name: sources__forever_wild_reserves
- name: sources__national_wetlands

- name: sources__natural_resources_buffer
## historic
- name: sources__nyc_historic_buildings_points
- name: sources__nyc_historic_buildings_lots
- name: sources__nyc_historic_buildings_buffers
- name: sources__nyc_historic_districts
- name: sources__scenic_landmarks
- name: sources__nys_historic_buildings_points
- name: sources__nys_historic_buildings_lots
- name: sources__nys_historic_buildings_buffers
- name: sources__nys_historic_districts
- name: sources__us_historic_places
- name: sources__us_historic_places_buffers
- name: sources__archaeological_areas
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('stg__nysshpo_archaeological_buffer_areas') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SELECT ST_UNION(buffer) AS geom
FROM {{ ref('int_buffers__lpc_landmarks') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('int_buffers__lpc_landmarks') }}
WHERE ST_GEOMETRYTYPE(raw_geom) = 'ST_MultiPolygon'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('stg__lpc_landmarks') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('stg__lpc_historic_district_areas') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SELECT ST_UNION(buffer) AS geom
FROM {{ ref('int_buffers__nysshpo_historic_buildings') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('int_buffers__nysshpo_historic_buildings') }}
WHERE ST_GEOMETRYTYPE(raw_geom) = 'ST_MultiPolygon'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('stg__nysshpo_historic_buildings') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('stg__nysshpo_historic_building_districts') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('stg__lpc_scenic_landmarks') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
SELECT
variable_type,
variable_id,
raw_geom
FROM {{ ref('int_buffers__nysparks_historicplaces') }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SELECT ST_UNION(buffer) AS geom
FROM {{ ref('int_buffers__nysparks_historicplaces') }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ SELECT
'nyc_historic_districts' AS variable_type,
lp_number || '-' || area_name AS variable_id,
raw_geom AS raw_geom,
raw_geom AS buffer
NULL AS buffer
FROM lpc_dist_areas
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ SELECT
'scenic_landmarks' AS variable_type,
lp_number || '-' || scen_lm_na AS variable_id,
ST_TRANSFORM(wkb_geometry, 2263) AS raw_geom,
ST_TRANSFORM(wkb_geometry, 2263) AS buffer
NULL AS buffer
FROM {{ source('recipe_sources', 'lpc_scenic_landmarks') }}

0 comments on commit c56103f

Please sign in to comment.