nationalparkservice / places-data

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

Add NCR label-only records #615

Open chadlawlis opened 8 years ago

chadlawlis commented 8 years ago

These are not "official" units by NCR GIS or Lands standards, but they do have their own NPS.gov web page and would provide enhanced detail to our map. To add as label-only records, or "sites" per @mtaylorlong lingo, if we are able to gather point coordinates:

These probably make the most sense to add as "Locales" in Places, instead of places_boundaries, but TBD.

mtaylorlong commented 8 years ago

I'd be more inclined to add them as label-only sites than as localities in Places.

However, since they have their own websites, I'm tempted to store them as proper records (without polygon geometries, but with point geometries) so they would be searchable in our geocoder.

chadlawlis commented 8 years ago

A locale is still searchable in our geocoder, so that shouldn't be a problem. I think some of these can be added as points of interest - Meridian Hill Park, for example - while others like AFAM could warrant a record in our parks table. We just need to be thoughtful about what makes it into our parks table, vs. the label-only table in places_boundaries, if they aren't technically standalone NPS units. NPS.gov is unfortunately not a reliable source to work against for these decisions.

chadlawlis commented 8 years ago

From Nathan @ NCR, reiterating the need for some of these (CWDW) detail labels:

I think one point of contention is going to be that none of the Circle Defenses of Washington parks are labeled, places like Fort Stevens (where Lincoln witnessed the battle personally), Fort Totten, etc. It will become a political hotbutton if it's left undone.

chadlawlis commented 8 years ago

Based on our conversation about JAME and YORK (#547) each of these records with a unique unit code and website (AFAM, CWDW, OPOT) deserve a record in the database with a label point. I'll work on generating coordinates for these.

chadlawlis commented 8 years ago

Coordinates for AFAM from https://www.nps.gov/afam/planyourvisit/index.htm (switched to lon lat): -77.025977 38.916554.

CWDW is a tough one, given it's a collection of 19 forts around DC. There is a mailing address listed for the unit (3545 Williamsburg Lane N.W. Washington, DC 200008) which we would use to generate a single point, though I'm not sure that would create the ideal result for NCR. We'll need to think this through.

Coordinates for OPOT: -77.02757924795151 38.894354238754204.

rangernathan commented 8 years ago

I can get pretty good precision for the CWDW sites. I need to vet these with the park but I have the pins pretty close on https://github.com/nationalparkservice/data/blob/gh-pages/projects/national_capital_region/CWDW.geojson

chadlawlis commented 8 years ago

Thanks @rangernathan, I actually just pulled that down a minute ago 👍

Let me know if I should hold up on adding labels based on these points, if you need to get them vetted first.

rangernathan commented 8 years ago

@cwlawlis802 i put a request out to one of the rangers just this afternoon, so hopefully I'll be able to adjust the pins and i'll reply here if anything changes.

chadlawlis commented 8 years ago

Coordinate for CWDW: -77.0499837398529 38.935962060056085

chadlawlis commented 8 years ago

CWDW added via:

INSERT INTO parks
    (unit_id,
    unit_code,
    unit_name_short,
    unit_name_long,
    unit_region,
    unit_state)
VALUES
    ((SELECT max(unit_id) + 1 FROM parks),
    'cwdw',
    'Civil War Defenses of Washington',
    'Civil War Defenses of Washington',
    'ncr',
    'dc,md,va');

INSERT INTO parks_poly
    (unit_id,
    simp_type)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'cwdw'),
    'point');

INSERT INTO parks_point
    (unit_id)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'cwdw'));

INSERT INTO parks_line
    (unit_id)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'cwdw'));

INSERT INTO parks_label
    (label_id,
    unit_id,
    label_name_short,
    label_name_long,
    label_type)
VALUES
    ((SELECT max(label_id) + 1 FROM parks_label),
    (SELECT unit_id FROM parks WHERE unit_code = 'cwdw'),
    (SELECT unit_name_short FROM parks WHERE unit_code = 'cwdw'),
    (SELECT unit_name_long FROM parks WHERE unit_code = 'cwdw'),
    'unit');

BEGIN;
UPDATE parks_label
SET geom_label = (SELECT ST_GeomFromText('POINT(-77.0499837398529 38.935962060056085)', 4326))
WHERE label_id = 456;

UPDATE parks_label
SET pt_render = 'false', geom_label = ST_Transform(ST_SetSRID(geom_label, 4326), 3857)
WHERE label_id = 456;

UPDATE parks_point
SET geom_point = (SELECT ST_GeomFromText('POINT(-77.0499837398529 38.935962060056085)', 4326))
WHERE unit_id = 481;

UPDATE parks_point
SET pt_render = 'false', geom_point = ST_Transform(ST_SetSRID(geom_point, 4326), 3857)
WHERE unit_id = 481;
COMMIT;
chadlawlis commented 8 years ago

AFAM added via:

BEGIN;
INSERT INTO parks
    (unit_id,
    unit_code,
    unit_name_short,
    unit_name_long,
    unit_desig_abbr,
    unit_desig_full,
    unit_region,
    unit_state)
VALUES
    ((SELECT max(unit_id) + 1 FROM parks),
    'afam',
    'African American Civil War MEM',
    'African American Civil War Memorial',
    'MEM',
    'Memorial',
    'ncr',
    'dc');

INSERT INTO parks_poly
    (unit_id,
    simp_type)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'afam'),
    'point');

INSERT INTO parks_point
    (unit_id)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'afam'));

INSERT INTO parks_line
    (unit_id)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'afam'));

INSERT INTO parks_label
    (label_id,
    unit_id,
    label_name_short,
    label_name_long,
    label_type)
VALUES
    ((SELECT max(label_id) + 1 FROM parks_label),
    (SELECT unit_id FROM parks WHERE unit_code = 'afam'),
    (SELECT unit_name_short FROM parks WHERE unit_code = 'afam'),
    (SELECT unit_name_long FROM parks WHERE unit_code = 'afam'),
    'unit');
COMMIT;

BEGIN;
UPDATE parks_label
SET geom_label = (SELECT ST_GeomFromText('POINT(-77.025977 38.916554)', 4326))
WHERE label_id = 457;

UPDATE parks_label
SET geom_label = ST_Transform(ST_SetSRID(geom_label, 4326), 3857)
WHERE label_id = 457;

UPDATE parks_point
SET geom_point = (SELECT ST_GeomFromText('POINT(-77.025977 38.916554)', 4326))
WHERE unit_id = 482;

UPDATE parks_point
SET geom_point = ST_Transform(ST_SetSRID(geom_point, 4326), 3857)
WHERE unit_id = 482;
COMMIT;
chadlawlis commented 8 years ago

OPOT added via:

BEGIN;
INSERT INTO parks
    (unit_id,
    unit_code,
    unit_name_short,
    unit_name_long,
    unit_region,
    unit_state)
VALUES
    ((SELECT max(unit_id) + 1 FROM parks),
    'opot',
    'Old Post Office Tower',
    'Old Post Office Tower',
    'ncr',
    'dc');

INSERT INTO parks_poly
    (unit_id,
    simp_type)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'opot'),
    'point');

INSERT INTO parks_point
    (unit_id)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'opot'));

INSERT INTO parks_line
    (unit_id)
VALUES
    ((SELECT unit_id FROM parks WHERE unit_code = 'opot'));

INSERT INTO parks_label
    (label_id,
    unit_id,
    label_name_short,
    label_name_long,
    label_type)
VALUES
    ((SELECT max(label_id) + 1 FROM parks_label),
    (SELECT unit_id FROM parks WHERE unit_code = 'opot'),
    (SELECT unit_name_short FROM parks WHERE unit_code = 'opot'),
    (SELECT unit_name_long FROM parks WHERE unit_code = 'opot'),
    'unit');
COMMIT;

BEGIN;
UPDATE parks_label
SET geom_label = (SELECT ST_GeomFromText('POINT(-77.02757924795151 38.894354238754204)', 4326))
WHERE label_id = 458;

UPDATE parks_label
SET geom_label = ST_Transform(ST_SetSRID(geom_label, 4326), 3857)
WHERE label_id = 458;

UPDATE parks_point
SET geom_point = (SELECT ST_GeomFromText('POINT(-77.02757924795151 38.894354238754204)', 4326))
WHERE unit_id = 483;

UPDATE parks_point
SET geom_point = ST_Transform(ST_SetSRID(geom_point, 4326), 3857)
WHERE unit_id = 483;
COMMIT;
chadlawlis commented 8 years ago

CWDW, AFAM, and OPOT have been added - the latter two of which will show up as labels on the map once the boundaries are regenerated.

I will add the CWDW fort labels once I receive the go ahead on locations.

chadlawlis commented 8 years ago

@mtaylorlong can you go in and populate the carto fields in parks_label for AFAM (label_id = 457) and OPOT (label_id = 458)?

mtaylorlong commented 8 years ago

I updated the carto fields in parks_label for AFAM and OPOT. AFAM should appear at z13 and OPOT at z14. I'm leaving them with opportunistic label directions for now – we can revisit after we see the result in pt3.

chadlawlis commented 8 years ago

@rangernathan are we all set to proceed with the CWDW sites from https://github.com/nationalparkservice/data/blob/gh-pages/projects/national_capital_region/CWDW.geojson?

chadlawlis commented 8 years ago

AFAM and OPOT are live in the tiles, so that's all set.

rangernathan commented 8 years ago

I didn't get a response from the rangers at CWDW. I believe the pins are in the right general locations, but as far as putting them directly on top of the actual forts, I'm not certain about Fort Dupont.

chadlawlis commented 8 years ago

Okay, I'll take a look. If it isn't clear where Fort Dupont is I will hold off on that one for now.

rangernathan commented 8 years ago

@cwlawlis802 i adjusted Fort Dupont, so it should be good to go now. The pin moved about 2500 feet east.

chadlawlis commented 8 years ago

Awesome, thanks! I'll let you know when these have been implemented, hopefully today (in which case they'll go live to the tiles tomorrow).