awips2/deltaScripts/16.2.2/DR5348/add_county_names_view.sh
Ron Anderson aa09d864af Omaha #5348 Use county table for source of county names map instead of lpi file
Change-Id: I054674aa55c3eef75ffe92312843e8be4174f87b

Former-commit-id: 55a07d6125a94449e131751598461fe70bd7f9d1
2016-02-11 11:31:57 -06:00

16 lines
467 B
Bash
Executable file

#!/bin/sh
# DR #5348 - This script creates the county_names view on the county table
# in the maps database
if [ -z $1 ] ; then
PGHOST=dx1
else
PGHOST=${1}
fi
/awips2/psql/bin/psql -d maps -U awips -q -h ${PGHOST} -c "
DROP VIEW IF EXISTS mapdata.county_names;
CREATE OR REPLACE VIEW mapdata.county_names AS
SELECT countyname as name, ST_SetSRID(ST_Point(lon,lat), 4326)::geometry(Point, 4326) as the_geom
FROM mapdata.county;
"