nationalparkservice / places-data

Data from the Places system.
http://www.nps.gov/npmap/tools/places/
13 stars 5 forks source link

Add boundary/label point for new unit STON #752

Closed jakecoolidge closed 7 years ago

jakecoolidge commented 8 years ago

Stonewall has a website now: nps.gov/ston

Might be a good idea to start labeling it while the boundary geometry is pending?

chadlawlis commented 8 years ago

There is currently no record for this in the database so we'll need to add it in. We could probably display a label point if we have a coordinate to use, though we may want to check in with someone from NER first to make sure it's appropriate for display. Other units like COLT and HATU have been announced but are not yet appropriate for display on NPS maps (see https://github.com/nationalparkservice/places-data/issues/182 for context).

chadlawlis commented 8 years ago

Added to the database 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),
    'ston',
    'Stonewall NM',
    'Stonewall National Monument',
    'NM',
    'National Monument',
    'ner',
    'ny',
    'false');

-- add to parks_poly table
INSERT INTO parks_poly
    (unit_id,
    simp_type,
    pt_render,
    pt_fill)
VALUES (
    (SELECT unit_id FROM parks WHERE unit_code = 'ston'),
    'point',
    'true',
    'true');

-- add to parks_point table
INSERT INTO parks_point 
    (unit_id,
    pt_render)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'ston'),
    '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 = 'ston'),
    (SELECT unit_name_short FROM parks WHERE unit_code = 'ston'),
    (SELECT unit_name_long FROM parks WHERE unit_code = 'ston'),
    'unit',
    'true');

-- add to parks_line table
INSERT INTO parks_line 
    (unit_id,
    pt_render)
VALUES 
    ((SELECT unit_id FROM parks WHERE unit_code = 'ston'),
    'true');
COMMIT;

Currently no area or label point geometry so this will not display on a map. nps_official also set to 'false' for the time being.

chadlawlis commented 8 years ago

This unit is not official as of latest Lands release 2016063 (confirmed by Nigel @ NER). Label (and boundary if available) only to be added once official, per COLT and HATU.

chadlawlis commented 7 years ago

Boundary was released in the 20160930 Lands release and is ready for public display.

Updated in DB via:

UPDATE parks_poly SET geom_poly = (SELECT wkb_geometry FROM lands_20170930 WHERE unit_code = 'STON'), data_source = 'Land Resources Division', min_zoom_poly = 14, min_zoom_border = 14, min_zoom_tintband = 14 WHERE unit_id = 485;

UPDATE parks SET unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_id = 485), nps_official = 'true' WHERE unit_id = 485;

UPDATE parks_point SET geom_point = (SELECT ST_Centroid(geom_poly) FROM parks_poly WHERE unit_id = 485) WHERE unit_id = 485;

UPDATE parks_label SET geom_label = (SELECT geom_point FROM parks_point WHERE unit_id = 485), min_zoom_label = 14, min_zoom_label_long = 14, min_zoom_label_center = 14, max_zoom_label = 22, ldir = 'NE' WHERE unit_id = 485;

Will go live once boundaries are regenerated. Will likely require coordination with @jakecoolidge to ensure cartographic attributes are set properly.

chadlawlis commented 7 years ago

This is now live in PT.

Cartographic attributes look to be set properly - closing for now.

@jakecoolidge take a look (https://www.nps.gov/maps/tools/park-tiles/view/#17/40.73374/-74.00070) and let me know if you'd like this reopened to reset any cartographic attributes.

jakecoolidge commented 7 years ago

Looks good; thanks @cwlawlis802!