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

CAMP Notes #15

Open
tibbben opened this issue Jun 14, 2024 · 2 comments
Open

CAMP Notes #15

tibbben opened this issue Jun 14, 2024 · 2 comments

Comments

@tibbben
Copy link
Member

tibbben commented Jun 14, 2024

camp notes:

gdsc ingest

check folios QC

check water parcels

check road parcels

create municipalities and places (not in GDSC automation yet)

CREATE SERVER postgis_dn7tn2p5cfahc611 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'postgis-dn7tn2p5cfahc611', dbname 'gdsc', port '5432');
CREATE USER MAPPING FOR postgres SERVER postgis_dn7tn2p5cfahc611 OPTIONS (user 'postgres', password 'WaterGDSCFlow');
IMPORT FOREIGN SCHEMA public LIMIT TO (mdc_municipal_boundary) FROM SERVER postgis_dn7tn2p5cfahc611 INTO public;

CREATE SERVER postgis_d1gxh00d8j6m2xd0 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'postgis-d1gxh00d8j6m2xd0', dbname 'gdsc', port '5432');
CREATE USER MAPPING FOR postgres SERVER postgis_d1gxh00d8j6m2xd0 OPTIONS (user 'postgres', password 'WaterGDSCFlow');
IMPORT FOREIGN SCHEMA public LIMIT TO (mdc_neighborhoods) FROM SERVER postgis_d1gxh00d8j6m2xd0 INTO public;

CREATE SERVER postgis_90zi29yo2f6dr8g0 FOREIGN DATA WRAPPER postgres_fdw OPTIONS (host 'postgis-90zi29yo2f6dr8g0', dbname 'gdsc', port '5432');
CREATE USER MAPPING FOR postgres SERVER postgis_90zi29yo2f6dr8g0 OPTIONS (user 'postgres', password 'WaterGDSCFlow');
IMPORT FOREIGN SCHEMA public LIMIT TO (com_neighborhoods) FROM SERVER postgis_90zi29yo2f6dr8g0 INTO public;

ALTER TABLE mdc_parcels_camp ADD COLUMN mdc_place varchar;
ALTER TABLE mdc_parcels_camp ADD COLUMN mdc_municipality varchar;
ALTER TABLE mdc_parcels_camp ADD COLUMN com_neighborhood varchar;

UPDATE mdc_parcels_camp
SET place = 'Unincorporated Miami-Dade County';

-- all title case: initcap()

UPDATE mdc_parcels_camp
SET mdc_place = initcap(mdc_neighborhoods.name)
FROM mdc_neighborhoods
WHERE ST_Within(mdc_parcels_camp.geom_centroid,mdc_neighborhoods.geom);

UPDATE mdc_parcels_camp
SET mdc_place = initcap(mdc_municipal_boundary.name), mdc_municipality = initcap(mdc_municipal_boundary.name)
FROM mdc_municipal_boundary
WHERE ST_Within(mdc_parcels_camp.geom_centroid,mdc_municipal_boundary.geom) AND mdc_municipal_boundary.name != 'UNINCORPORATED MIAMI-DADE';

UPDATE mdc_parcels_camp
SET mdc_place = initcap(com_neighborhoods.label), com_neighborhood = initcap(com_neighborhoods.label)
FROM com_neighborhoods
WHERE ST_Within(mdc_parcels_camp.geom_centroid,com_neighborhoods.geom);

create county_parks and municipal_parks (not in automation yet)

same as above but not notes yet ... within and create column with park names (one for each, county and municipality)

add land use

ogr2ogr -f PostgreSQL PG:"dbname=$POSTGRES_DB port=$POSTGRES_PORT user=$POSTGRES_USER password=$POSTGRES_PASSWORD host='postgis-4d8urdupgjvec6d0'" distinct_dor_code_list_filtered.csv -nln dor_code_list

ALTER TABLE mdc_parcels_camp ADD COLUMN land_use varchar;
UPDATE mdc_parcels_camp
SET land_use = dor_code_list.cce_land_use
FROM dor_code_list
WHERE mdc_parcels_camp.dor_code_cur = dor_code_list.dor_code_cur;

add ownership

create vecctor tiles

ogr2ogr -f "GeoJSON" /data/mdc_parcels_camp/dump/mdc_parcels_camp.json PG:"dbname=$POSTGRES_DB port=$POSTGRES_PORT user=$POSTGRES_USER password=$POSTGRES_PASSWORD host='postgis-4d8urdupgjvec6d0'" -sql "SELECT folio, true_site_addr as address, true_site_unit as unit, true_site_city as city, true_site_zip_code as zip_code, true_owner1 as owner, dor_code_cur as dor_code, dor_desc, land_use, building_actual_area as building_area, lot_size, year_built, mdc_county_zone || ' - ' || mdc_county_zone_desc as county_zone, mdc_municipal_zone || ' - ' || mdc_municipal_zone_desc as municipal_zone, mdc_municipal_park_name, mdc_county_park_name, flma_name || ' - ' || flma_type as florida_managed_area, fema_flood_zone as floodzone, mdc_qualified_opportunity_zones as qualified_opportunity_zone, elevation, place, municipality, neighborhood, geom from mdc_parcels_camp"

tippecanoe -Z 14 -z 20 -o mdc_parcels_camp.mbtiles mdc_parcels_camp.json

start tileserver-ng in pod

node@tileserver-gl:/data $ nohup node /usr/src/app/src/main.js tilserver-gl -c /tiles/vector/config.json -p 7810 &

@tibbben tibbben changed the title From Julio and Harsha CAMP Notes Aug 5, 2024
@tibbben tibbben mentioned this issue Aug 5, 2024
32 tasks
@tibbben
Copy link
Member Author

tibbben commented Aug 7, 2024

  • Cooling center source? MDC Emergency Management Policy and Procedures

@tibbben
Copy link
Member Author

tibbben commented Aug 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant