nationalparkservice / places-data

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

Transition IMR to Lands boundaries #692

Closed chadlawlis closed 8 years ago

chadlawlis commented 8 years ago

There are currently 87 units with unit_region = 'imr' in our parks table:

unit_id name unit_code data_source point_label area_boundary
7 Alibates Flint Quarries National Monument alfl WSD_Parks y y
9 Amistad National Recreation Area amis WSD_Parks y y
19 Arches National Park arch WSD_Parks y y
23 Aztec Ruins National Monument azru WSD_Parks y y
26 Bandelier National Monument band npmap y y
30 Bent's Old Fort National Historic Site beol WSD_Parks y y
31 Big Bend National Park bibe WSD_Parks y y
32 Bighorn Canyon National Recreation Area bica WSD_Parks y y
37 Big Thicket National Preserve bith WSD_Parks y y
38 Black Canyon Of The Gunnison National Park blca WSD_Parks y y
45 Bryce Canyon National Park brca WSD_Parks y y
51 Canyon De Chelly National Monument cach Land Resources Division y y
54 Casa Grande Ruins National Monument cagr WSD_Parks y y
434 California National Historic Trail cali n n
60 Canyonlands National Park cany WSD_Parks y y
61 Capitol Reef National Park care WSD_Parks y y
66 Carlsbad Caverns National Park cave WSD_Parks y y
67 Capulin Volcano National Monument cavo WSD_Parks y y
70 Cedar Breaks National Monument cebr WSD_Parks y y
72 Chamizal National Memorial cham WSD_Parks y y
75 Chaco Culture National Historical Park chcu WSD_Parks y y
76 Chickasaw National Recreation Area chic WSD_Parks y y
77 Chiricahua National Monument chir WSD_Parks y y
88 Colorado National Monument colm WSD_Parks y y
91 Coronado National Memorial coro WSD_Parks y y
97 Curecanti National Recreation Area cure WSD_Parks y y
103 Devils Tower National Monument deto WSD_Parks y y
106 Dinosaur National Monument dino WSD_Parks y y
113 El Malpais National Monument elma WSD_Parks y y
114 El Morro National Monument elmo WSD_Parks y y
121 Florissant Fossil Beds National Monument flfo WSD_Parks y y
123 Fort Bowie National Historic Site fobo WSD_Parks y y
124 Fossil Butte National Monument fobu WSD_Parks y y
126 Fort Davis National Historic Site foda WSD_Parks y y
131 Fort Laramie National Historic Site fola WSD_Parks y y
145 Fort Union National Monument foun WSD_Parks y y
163 Gila Cliff Dwellings National Monument gicl WSD_Parks y y
164 Glacier National Park glac WSD_Parks y y
166 Glen Canyon National Recreation Area glca glca y y
170 Golden Spike National Historic Site gosp WSD_Parks y y
172 Grand Canyon National Park grca npmap y y
175 Grant-Kohrs Ranch National Historic Site grko WSD_Parks y y
177 Great Sand Dunes National Park & Preserve grsa WSD_Parks y y
180 Grand Teton National Park grte Land Resources Division y y
183 Guadalupe Mountains National Park gumo WSD_Parks y y
201 Hovenweep National Monument hove WSD_Parks y y
203 Hubbell Trading Post National Historic Site hutr WSD_Parks y y
216 John D Rockefeller Jr Memorial Parkway jodr WSD_Parks y y
240 Lake Meredith National Recreation Area lamr WSD_Parks y y
244 Little Bighorn Battlefield National Monument libi WSD_Parks y y
253 Lyndon B Johnson National Historical Park lyjo WSD_Parks y y
266 Mesa Verde National Park meve WSD_Parks y y
273 Montezuma Castle National Monument moca WSD_Parks y y
440 Mormon Pioneer National Historic Trail mopi n n
281 Natural Bridges National Monument nabr WSD_Parks y y
289 Navajo National Monument nava WSD_Parks y y
461 Oklahoma City National Memorial okci OKCI y n
443 Oregon National Historic Trail oreg n n
306 Organ Pipe Cactus National Monument orpi WSD_Parks y y
309 Palo Alto Battlefield National Historical Park paal WSD_Parks y y
312 Padre Island National Seashore pais WSD_Parks y y
313 Pecos National Historical Park peco WSD_Parks y y
314 Petrified Forest National Park pefo WSD_Parks y y
317 Petroglyph National Monument petr WSD_Parks y y
324 Pipe Spring National Monument pisp WSD_Parks y y
333 Rainbow Bridge National Monument rabr WSD_Parks y y
336 Rio Grande Wild & Scenic River rigr Land Resources Division y y
340 Rocky Mountain National Park romo WSD_Parks y y
345 San Antonio Missions National Historical Park saan SAAN y y
447 Santa Fe National Historic Trail safe n n
350 Saguaro National Park sagu Land Resources Division y y
357 Sand Creek Massacre National Historic Site sand WSD_Parks y y
359 Salinas Pueblo Missions National Monument sapu WSD_Parks y y
373 Sunset Crater Volcano National Monument sucr WSD_Parks y y
382 Timpanogos Cave National Monument tica WSD_Parks y y
384 Tonto National Monument tont WSD_Parks y y
449 Trail of Tears National Historic Trail trte n n
387 Tumacácori National Historical Park tuma WSD_Parks y y
390 Tuzigoot National Monument tuzi WSD_Parks y y
401 Washita Battlefield National Historic Site waba WSD_Parks y y
402 Walnut Canyon National Monument waca WSD_Parks y y
429 Waco Mammoth National Monument waco imr y y
409 White Sands National Monument whsa WSD_Parks y y
418 Wupatki National Monument wupa WSD_Parks y y
420 Yellowstone National Park yell WSD_Parks y y
423 Yucca House National Monument yuho WSD_Parks y y
424 Zion National Park zion WSD_Parks y y

5 of these are National Trails, which are not included in Lands (and we currently do not have a label point geom_point or area boundary geom_poly for them):

unit_id name unit_code data_source point_label area_boundary
434 California National Historic Trail cali n n
440 Mormon Pioneer National Historic Trail mopi n n
443 Oregon National Historic Trail oreg n n
447 Santa Fe National Historic Trail safe n n
449 Trail of Tears National Historic Trail trte n n

2 others are not currently included in Lands:

unit_id name unit_code data_source point_label area_boundary
461 Oklahoma City National Memorial okci OKCI y n
429 Waco Mammoth National Monument waco imr y y

So, we will maintain the geometries for OKCI and WACO given they are not available in Lands.

I will update the remaining 80 units to pull from Lands, using the latest release from 20160107 (#362, though all newly updated boundaries in this release have already been updated in our parks table):

unit_id name unit_code data_source
7 Alibates Flint Quarries National Monument alfl WSD_Parks
9 Amistad National Recreation Area amis WSD_Parks
19 Arches National Park arch WSD_Parks
23 Aztec Ruins National Monument azru WSD_Parks
26 Bandelier National Monument band npmap
30 Bent's Old Fort National Historic Site beol WSD_Parks
31 Big Bend National Park bibe WSD_Parks
32 Bighorn Canyon National Recreation Area bica WSD_Parks
37 Big Thicket National Preserve bith WSD_Parks
38 Black Canyon Of The Gunnison National Park blca WSD_Parks
45 Bryce Canyon National Park brca WSD_Parks
51 Canyon De Chelly National Monument cach Land Resources Division
54 Casa Grande Ruins National Monument cagr WSD_Parks
60 Canyonlands National Park cany WSD_Parks
61 Capitol Reef National Park care WSD_Parks
66 Carlsbad Caverns National Park cave WSD_Parks
67 Capulin Volcano National Monument cavo WSD_Parks
70 Cedar Breaks National Monument cebr WSD_Parks
72 Chamizal National Memorial cham WSD_Parks
75 Chaco Culture National Historical Park chcu WSD_Parks
76 Chickasaw National Recreation Area chic WSD_Parks
77 Chiricahua National Monument chir WSD_Parks
88 Colorado National Monument colm WSD_Parks
91 Coronado National Memorial coro WSD_Parks
97 Curecanti National Recreation Area cure WSD_Parks
103 Devils Tower National Monument deto WSD_Parks
106 Dinosaur National Monument dino WSD_Parks
113 El Malpais National Monument elma WSD_Parks
114 El Morro National Monument elmo WSD_Parks
121 Florissant Fossil Beds National Monument flfo WSD_Parks
123 Fort Bowie National Historic Site fobo WSD_Parks
124 Fossil Butte National Monument fobu WSD_Parks
126 Fort Davis National Historic Site foda WSD_Parks
131 Fort Laramie National Historic Site fola WSD_Parks
145 Fort Union National Monument foun WSD_Parks
163 Gila Cliff Dwellings National Monument gicl WSD_Parks
164 Glacier National Park glac WSD_Parks
166 Glen Canyon National Recreation Area glca glca
170 Golden Spike National Historic Site gosp WSD_Parks
172 Grand Canyon National Park grca npmap
175 Grant-Kohrs Ranch National Historic Site grko WSD_Parks
177 Great Sand Dunes National Park & Preserve grsa WSD_Parks
180 Grand Teton National Park grte Land Resources Division
183 Guadalupe Mountains National Park gumo WSD_Parks
201 Hovenweep National Monument hove WSD_Parks
203 Hubbell Trading Post National Historic Site hutr WSD_Parks
216 John D Rockefeller Jr Memorial Parkway jodr WSD_Parks
240 Lake Meredith National Recreation Area lamr WSD_Parks
244 Little Bighorn Battlefield National Monument libi WSD_Parks
253 Lyndon B Johnson National Historical Park lyjo WSD_Parks
266 Mesa Verde National Park meve WSD_Parks
273 Montezuma Castle National Monument moca WSD_Parks
281 Natural Bridges National Monument nabr WSD_Parks
289 Navajo National Monument nava WSD_Parks
306 Organ Pipe Cactus National Monument orpi WSD_Parks
309 Palo Alto Battlefield National Historical Park paal WSD_Parks
312 Padre Island National Seashore pais WSD_Parks
313 Pecos National Historical Park peco WSD_Parks
314 Petrified Forest National Park pefo WSD_Parks
317 Petroglyph National Monument petr WSD_Parks
324 Pipe Spring National Monument pisp WSD_Parks
333 Rainbow Bridge National Monument rabr WSD_Parks
336 Rio Grande Wild & Scenic River rigr Land Resources Division
340 Rocky Mountain National Park romo WSD_Parks
345 San Antonio Missions National Historical Park saan SAAN
350 Saguaro National Park sagu Land Resources Division
357 Sand Creek Massacre National Historic Site sand WSD_Parks
359 Salinas Pueblo Missions National Monument sapu WSD_Parks
373 Sunset Crater Volcano National Monument sucr WSD_Parks
382 Timpanogos Cave National Monument tica WSD_Parks
384 Tonto National Monument tont WSD_Parks
387 Tumacácori National Historical Park tuma WSD_Parks
390 Tuzigoot National Monument tuzi WSD_Parks
401 Washita Battlefield National Historic Site waba WSD_Parks
402 Walnut Canyon National Monument waca WSD_Parks
409 White Sands National Monument whsa WSD_Parks
418 Wupatki National Monument wupa WSD_Parks
420 Yellowstone National Park yell WSD_Parks
423 Yucca House National Monument yuho WSD_Parks
424 Zion National Park zion WSD_Parks

Lands includes two boundaries for GRSA - one for the Park and another for the Preserve, which I will have to ST_Union together. Otherwise, it is 1 record per unit for each boundary.

chadlawlis commented 8 years ago

Done via:

-- PULL IN SINGLE-RECORD BOUNDARIES FROM LANDS

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'alfl')
WHERE
    unit_code = 'alfl';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'amis')
WHERE
    unit_code = 'amis';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'arch')
WHERE
    unit_code = 'arch';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'azru')
WHERE
    unit_code = 'azru';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'band')
WHERE
    unit_code = 'band';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'beol')
WHERE
    unit_code = 'beol';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'bibe')
WHERE
    unit_code = 'bibe';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'bica')
WHERE
    unit_code = 'bica';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'bith')
WHERE
    unit_code = 'bith';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'blca')
WHERE
    unit_code = 'blca';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'brca')
WHERE
    unit_code = 'brca';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'cach')
WHERE
    unit_code = 'cach';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'cagr')
WHERE
    unit_code = 'cagr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'cany')
WHERE
    unit_code = 'cany';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'care')
WHERE
    unit_code = 'care';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'cave')
WHERE
    unit_code = 'cave';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'cavo')
WHERE
    unit_code = 'cavo';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'cebr')
WHERE
    unit_code = 'cebr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'cham')
WHERE
    unit_code = 'cham';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'chcu')
WHERE
    unit_code = 'chcu';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'chic')
WHERE
    unit_code = 'chic';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'chir')
WHERE
    unit_code = 'chir';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'colm')
WHERE
    unit_code = 'colm';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'coro')
WHERE
    unit_code = 'coro';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'cure')
WHERE
    unit_code = 'cure';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'deto')
WHERE
    unit_code = 'deto';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'dino')
WHERE
    unit_code = 'dino';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'elma')
WHERE
    unit_code = 'elma';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'elmo')
WHERE
    unit_code = 'elmo';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'flfo')
WHERE
    unit_code = 'flfo';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'fobo')
WHERE
    unit_code = 'fobo';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'fobu')
WHERE
    unit_code = 'fobu';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'foda')
WHERE
    unit_code = 'foda';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'fola')
WHERE
    unit_code = 'fola';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'foun')
WHERE
    unit_code = 'foun';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'gicl')
WHERE
    unit_code = 'gicl';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'glac')
WHERE
    unit_code = 'glac';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'glca')
WHERE
    unit_code = 'glca';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'gosp')
WHERE
    unit_code = 'gosp';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'grca')
WHERE
    unit_code = 'grca';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'grko')
WHERE
    unit_code = 'grko';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'grte')
WHERE
    unit_code = 'grte';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'gumo')
WHERE
    unit_code = 'gumo';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'hove')
WHERE
    unit_code = 'hove';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'hutr')
WHERE
    unit_code = 'hutr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'jodr')
WHERE
    unit_code = 'jodr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'lamr')
WHERE
    unit_code = 'lamr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'libi')
WHERE
    unit_code = 'libi';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'lyjo')
WHERE
    unit_code = 'lyjo';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'meve')
WHERE
    unit_code = 'meve';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'moca')
WHERE
    unit_code = 'moca';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'nabr')
WHERE
    unit_code = 'nabr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'nava')
WHERE
    unit_code = 'nava';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'orpi')
WHERE
    unit_code = 'orpi';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'paal')
WHERE
    unit_code = 'paal';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'pais')
WHERE
    unit_code = 'pais';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'peco')
WHERE
    unit_code = 'peco';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'pefo')
WHERE
    unit_code = 'pefo';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'petr')
WHERE
    unit_code = 'petr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'pisp')
WHERE
    unit_code = 'pisp';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'rabr')
WHERE
    unit_code = 'rabr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'rigr')
WHERE
    unit_code = 'rigr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'romo')
WHERE
    unit_code = 'romo';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'saan')
WHERE
    unit_code = 'saan';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'sagu')
WHERE
    unit_code = 'sagu';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'sand')
WHERE
    unit_code = 'sand';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'sapu')
WHERE
    unit_code = 'sapu';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'sucr')
WHERE
    unit_code = 'sucr';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'tica')
WHERE
    unit_code = 'tica';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'tont')
WHERE
    unit_code = 'tont';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'tuma')
WHERE
    unit_code = 'tuma';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'tuzi')
WHERE
    unit_code = 'tuzi';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'waba')
WHERE
    unit_code = 'waba';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'waca')
WHERE
    unit_code = 'waca';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'whsa')
WHERE
    unit_code = 'whsa';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'wupa')
WHERE
    unit_code = 'wupa';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'yell')
WHERE
    unit_code = 'yell';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'yuho')
WHERE
    unit_code = 'yuho';

UPDATE
    parks_poly
SET
    geom_poly = (SELECT wkb_geometry FROM lands_20160107 WHERE unit_code = 'zion')
WHERE
    unit_code = 'zion';

-- PULL MULTI-RECORD BOUNDARIES FROM LANDS USING ST_UNION

UPDATE
    parks_poly
SET
    geom_poly = (SELECT ST_Union(wkb_geometry) FROM lands_20160107 WHERE unit_code = 'grsa')
WHERE
    unit_code = 'grsa';

-- UPDATE PARKS TABLE ATTRIBUTE DATA: DATA SOURCE AND UNIT AREA

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'alfl')
WHERE
    unit_code = 'alfl';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'amis')
WHERE
    unit_code = 'amis';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'arch')
WHERE
    unit_code = 'arch';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'azru')
WHERE
    unit_code = 'azru';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'band')
WHERE
    unit_code = 'band';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'beol')
WHERE
    unit_code = 'beol';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'bibe')
WHERE
    unit_code = 'bibe';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'bica')
WHERE
    unit_code = 'bica';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'bith')
WHERE
    unit_code = 'bith';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'blca')
WHERE
    unit_code = 'blca';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'brca')
WHERE
    unit_code = 'brca';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'cach')
WHERE
    unit_code = 'cach';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'cagr')
WHERE
    unit_code = 'cagr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'cany')
WHERE
    unit_code = 'cany';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'care')
WHERE
    unit_code = 'care';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'cave')
WHERE
    unit_code = 'cave';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'cavo')
WHERE
    unit_code = 'cavo';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'cebr')
WHERE
    unit_code = 'cebr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'cham')
WHERE
    unit_code = 'cham';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'chcu')
WHERE
    unit_code = 'chcu';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'chic')
WHERE
    unit_code = 'chic';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'chir')
WHERE
    unit_code = 'chir';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'colm')
WHERE
    unit_code = 'colm';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'coro')
WHERE
    unit_code = 'coro';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'cure')
WHERE
    unit_code = 'cure';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'deto')
WHERE
    unit_code = 'deto';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'dino')
WHERE
    unit_code = 'dino';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'elma')
WHERE
    unit_code = 'elma';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'elmo')
WHERE
    unit_code = 'elmo';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'flfo')
WHERE
    unit_code = 'flfo';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'fobo')
WHERE
    unit_code = 'fobo';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'fobu')
WHERE
    unit_code = 'fobu';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'foda')
WHERE
    unit_code = 'foda';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'fola')
WHERE
    unit_code = 'fola';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'foun')
WHERE
    unit_code = 'foun';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'gicl')
WHERE
    unit_code = 'gicl';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'glac')
WHERE
    unit_code = 'glac';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'glca')
WHERE
    unit_code = 'glca';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'gosp')
WHERE
    unit_code = 'gosp';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'grca')
WHERE
    unit_code = 'grca';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'grko')
WHERE
    unit_code = 'grko';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'grsa')
WHERE
    unit_code = 'grsa';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'grte')
WHERE
    unit_code = 'grte';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'gumo')
WHERE
    unit_code = 'gumo';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'hove')
WHERE
    unit_code = 'hove';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'hutr')
WHERE
    unit_code = 'hutr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'jodr')
WHERE
    unit_code = 'jodr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'lamr')
WHERE
    unit_code = 'lamr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'libi')
WHERE
    unit_code = 'libi';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'lyjo')
WHERE
    unit_code = 'lyjo';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'meve')
WHERE
    unit_code = 'meve';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'moca')
WHERE
    unit_code = 'moca';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'nabr')
WHERE
    unit_code = 'nabr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'nava')
WHERE
    unit_code = 'nava';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'orpi')
WHERE
    unit_code = 'orpi';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'paal')
WHERE
    unit_code = 'paal';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'pais')
WHERE
    unit_code = 'pais';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'peco')
WHERE
    unit_code = 'peco';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'pefo')
WHERE
    unit_code = 'pefo';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'petr')
WHERE
    unit_code = 'petr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'pisp')
WHERE
    unit_code = 'pisp';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'rabr')
WHERE
    unit_code = 'rabr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'rigr')
WHERE
    unit_code = 'rigr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'romo')
WHERE
    unit_code = 'romo';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'saan')
WHERE
    unit_code = 'saan';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'sagu')
WHERE
    unit_code = 'sagu';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'sand')
WHERE
    unit_code = 'sand';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'sapu')
WHERE
    unit_code = 'sapu';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'sucr')
WHERE
    unit_code = 'sucr';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'tica')
WHERE
    unit_code = 'tica';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'tont')
WHERE
    unit_code = 'tont';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'tuma')
WHERE
    unit_code = 'tuma';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'tuzi')
WHERE
    unit_code = 'tuzi';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'waba')
WHERE
    unit_code = 'waba';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'waca')
WHERE
    unit_code = 'waca';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'whsa')
WHERE
    unit_code = 'whsa';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'wupa')
WHERE
    unit_code = 'wupa';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'yell')
WHERE
    unit_code = 'yell';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'yuho')
WHERE
    unit_code = 'yuho';

UPDATE
    parks
SET
    data_source = 'Land Resources Division',
    unit_area = (SELECT ST_Area(geom_poly) FROM parks_poly WHERE unit_code = 'zion')
WHERE
    unit_code = 'zion';
chadlawlis commented 8 years ago

At first glance everything seems to check out when viewed locally in QGIS, except for GRSA which suffered from the ST_Union between the Park and Preserve areas:

grsa

I'll open a separate issue and resolve this manually. Otherwise, should be all set here. Will close once tiles are regenerated.

chadlawlis commented 8 years ago

Boundaries have been regenerated - these are now live.