From c56103f1f3c05d135b6ddd1e456e32f113ee550e Mon Sep 17 00:00:00 2001 From: Damon McCullough Date: Thu, 18 Apr 2024 17:05:54 -0400 Subject: [PATCH] export GFT historic source data --- products/green_fast_track/bash/export.sh | 13 +++++++++++++ .../models/product/sources/_sources_models.yml | 15 ++++++++++++++- .../historic/sources__archaeological_areas.sql | 5 +++++ .../sources__nyc_historic_buildings_buffers.sql | 2 ++ .../sources__nyc_historic_buildings_lots.sql | 6 ++++++ .../sources__nyc_historic_buildings_points.sql | 5 +++++ .../historic/sources__nyc_historic_districts.sql | 5 +++++ .../sources__nys_historic_buildings_buffers.sql | 2 ++ .../sources__nys_historic_buildings_lots.sql | 6 ++++++ .../sources__nys_historic_buildings_points.sql | 5 +++++ .../historic/sources__nys_historic_districts.sql | 5 +++++ .../historic/sources__scenic_landmarks.sql | 5 +++++ .../historic/sources__us_historic_places.sql | 5 +++++ .../sources__us_historic_places_buffers.sql | 2 ++ .../staging/stg__lpc_historic_district_areas.sql | 2 +- .../models/staging/stg__lpc_scenic_landmarks.sql | 2 +- 16 files changed, 82 insertions(+), 3 deletions(-) create mode 100644 products/green_fast_track/models/product/sources/historic/sources__archaeological_areas.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_buffers.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_lots.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_points.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__nyc_historic_districts.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_buffers.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_lots.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_points.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__nys_historic_districts.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__scenic_landmarks.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__us_historic_places.sql create mode 100644 products/green_fast_track/models/product/sources/historic/sources__us_historic_places_buffers.sql diff --git a/products/green_fast_track/bash/export.sh b/products/green_fast_track/bash/export.sh index c6c2361ee..0a21bab4c 100755 --- a/products/green_fast_track/bash/export.sh +++ b/products/green_fast_track/bash/export.sh @@ -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 diff --git a/products/green_fast_track/models/product/sources/_sources_models.yml b/products/green_fast_track/models/product/sources/_sources_models.yml index 11328a942..f4c040073 100644 --- a/products/green_fast_track/models/product/sources/_sources_models.yml +++ b/products/green_fast_track/models/product/sources/_sources_models.yml @@ -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 @@ -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 diff --git a/products/green_fast_track/models/product/sources/historic/sources__archaeological_areas.sql b/products/green_fast_track/models/product/sources/historic/sources__archaeological_areas.sql new file mode 100644 index 000000000..e4ea743a8 --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__archaeological_areas.sql @@ -0,0 +1,5 @@ +SELECT + variable_type, + variable_id, + raw_geom +FROM {{ ref('stg__nysshpo_archaeological_buffer_areas') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_buffers.sql b/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_buffers.sql new file mode 100644 index 000000000..6f6d10f8c --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_buffers.sql @@ -0,0 +1,2 @@ +SELECT ST_UNION(buffer) AS geom +FROM {{ ref('int_buffers__lpc_landmarks') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_lots.sql b/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_lots.sql new file mode 100644 index 000000000..881810049 --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_lots.sql @@ -0,0 +1,6 @@ +SELECT + variable_type, + variable_id, + raw_geom +FROM {{ ref('int_buffers__lpc_landmarks') }} +WHERE ST_GEOMETRYTYPE(raw_geom) = 'ST_MultiPolygon' diff --git a/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_points.sql b/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_points.sql new file mode 100644 index 000000000..67131a5d9 --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_buildings_points.sql @@ -0,0 +1,5 @@ +SELECT + variable_type, + variable_id, + raw_geom +FROM {{ ref('stg__lpc_landmarks') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_districts.sql b/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_districts.sql new file mode 100644 index 000000000..6e8a3b1a0 --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__nyc_historic_districts.sql @@ -0,0 +1,5 @@ +SELECT + variable_type, + variable_id, + raw_geom +FROM {{ ref('stg__lpc_historic_district_areas') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_buffers.sql b/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_buffers.sql new file mode 100644 index 000000000..ca8a2df3a --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_buffers.sql @@ -0,0 +1,2 @@ +SELECT ST_UNION(buffer) AS geom +FROM {{ ref('int_buffers__nysshpo_historic_buildings') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_lots.sql b/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_lots.sql new file mode 100644 index 000000000..adde833bb --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_lots.sql @@ -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' diff --git a/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_points.sql b/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_points.sql new file mode 100644 index 000000000..56d3b60d2 --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__nys_historic_buildings_points.sql @@ -0,0 +1,5 @@ +SELECT + variable_type, + variable_id, + raw_geom +FROM {{ ref('stg__nysshpo_historic_buildings') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__nys_historic_districts.sql b/products/green_fast_track/models/product/sources/historic/sources__nys_historic_districts.sql new file mode 100644 index 000000000..501980107 --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__nys_historic_districts.sql @@ -0,0 +1,5 @@ +SELECT + variable_type, + variable_id, + raw_geom +FROM {{ ref('stg__nysshpo_historic_building_districts') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__scenic_landmarks.sql b/products/green_fast_track/models/product/sources/historic/sources__scenic_landmarks.sql new file mode 100644 index 000000000..18ec76cf9 --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__scenic_landmarks.sql @@ -0,0 +1,5 @@ +SELECT + variable_type, + variable_id, + raw_geom +FROM {{ ref('stg__lpc_scenic_landmarks') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__us_historic_places.sql b/products/green_fast_track/models/product/sources/historic/sources__us_historic_places.sql new file mode 100644 index 000000000..99d246be7 --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__us_historic_places.sql @@ -0,0 +1,5 @@ +SELECT + variable_type, + variable_id, + raw_geom +FROM {{ ref('int_buffers__nysparks_historicplaces') }} diff --git a/products/green_fast_track/models/product/sources/historic/sources__us_historic_places_buffers.sql b/products/green_fast_track/models/product/sources/historic/sources__us_historic_places_buffers.sql new file mode 100644 index 000000000..fa6a69ade --- /dev/null +++ b/products/green_fast_track/models/product/sources/historic/sources__us_historic_places_buffers.sql @@ -0,0 +1,2 @@ +SELECT ST_UNION(buffer) AS geom +FROM {{ ref('int_buffers__nysparks_historicplaces') }} diff --git a/products/green_fast_track/models/staging/stg__lpc_historic_district_areas.sql b/products/green_fast_track/models/staging/stg__lpc_historic_district_areas.sql index 8ecd5c884..491f91936 100644 --- a/products/green_fast_track/models/staging/stg__lpc_historic_district_areas.sql +++ b/products/green_fast_track/models/staging/stg__lpc_historic_district_areas.sql @@ -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 diff --git a/products/green_fast_track/models/staging/stg__lpc_scenic_landmarks.sql b/products/green_fast_track/models/staging/stg__lpc_scenic_landmarks.sql index d662be5e7..aead81404 100644 --- a/products/green_fast_track/models/staging/stg__lpc_scenic_landmarks.sql +++ b/products/green_fast_track/models/staging/stg__lpc_scenic_landmarks.sql @@ -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') }}