Closed chadlawlis closed 8 years ago
Added via:
BEGIN;
-- add to parks table
INSERT INTO parks
(unit_id,
unit_code,
unit_name_short,
unit_name_long,
unit_desig_abbr,
unit_desig_full,
unit_region,
unit_state,
nps_official)
values
((select max(unit_id) + 1 from parks),
'vall',
'Valles Caldera N PRES',
'Valles Caldera National Preserve',
'N PRES',
'National Preserve',
'imr',
'nm',
'true');
-- add to parks_poly table
INSERT INTO parks_poly
(unit_id,
simp_type,
pt_render,
pt_fill,
data_source,
geom_poly)
VALUES (
(SELECT unit_id FROM parks WHERE unit_code = 'vall'),
'point',
'true',
'true',
'Land Resources Division',
(SELECT wkb_geometry FROM lands_20160630 WHERE unit_code = 'vall'));
-- add to parks_point table
INSERT INTO parks_point
(unit_id,
pt_render)
VALUES
((SELECT unit_id FROM parks WHERE unit_code = 'vall'),
'true');
-- add to parks_label table
INSERT INTO parks_label
(label_id,
unit_id,
label_name_short,
label_name_long,
label_type,
pt_render)
VALUES
((SELECT max(label_id) + 1 FROM parks_label),
(SELECT unit_id FROM parks WHERE unit_code = 'vall'),
(SELECT unit_name_short FROM parks WHERE unit_code = 'vall'),
(SELECT unit_name_long FROM parks WHERE unit_code = 'vall'),
'unit',
'true');
-- add to parks_line table
INSERT INTO parks_line
(unit_id,
pt_render)
VALUES
((SELECT unit_id FROM parks WHERE unit_code = 'vall'),
'true');
COMMIT;
Remaining fields updated via:
BEGIN;
UPDATE
parks
SET
unit_area = (select ST_Area(geom_poly) from parks_poly where unit_id = 484)
WHERE
unit_id = 484;
UPDATE
parks_point
SET
geom_point = (select ST_Centroid(geom_poly) from parks_poly where unit_id = 484)
WHERE
unit_id = 484;
UPDATE
parks_label
SET
geom_label = (select geom_point from parks_point where unit_id = 484)
WHERE
label_id = 459;
COMMIT;
parks_poly
carto fields updated via the following, in line with neighboring and of similar size BAND:
UPDATE
parks_poly
SET
min_zoom_poly = 7,
min_zoom_border = 12,
min_zoom_tintband = 13
WHERE
unit_id = 484;
And finally parks_label
carto fields updated via the following:
UPDATE
parks_label
SET
min_zoom_label = 7,
min_zoom_label_long = 12,
min_zoom_label_center = 10,
max_zoom_label = 23,
ldir = 'NW'
WHERE
label_id = 459;
This will go live once boundaries are regenerated.
This is now live, though it still needs to be synced to CartoDB.
Valles Caldera National Preserve. Boundary available through latest Lands release https://github.com/nationalparkservice/places-data/issues/746.