awips2/deltaScripts/14.2.1/satellite_spatial_update/update_satellite_spatial.sh
Max Schenkelberg 9bd27e3c43 Issue #2333 Removed more unused fields from satellite record
Change-Id: I02ec3ff328606673d717c31e583c2679389e87ec

Former-commit-id: 3c2492cdbe [formerly b68b8de21b] [formerly 8fddd5a57b [formerly 91c5da670e6b23814532b473c93237744398369d]]
Former-commit-id: 8fddd5a57b
Former-commit-id: 3b53d18be4
2013-10-11 16:17:52 -05:00

16 lines
971 B
Bash
Executable file

#!/bin/bash
# This script is needed for DR 2333 for GOES-R readiness. The satellite spatial table needed to be refactored to store data to construct
# GridGeometry2D in CRS space instead of lat/lon due to the geostationary projection corner points not being valid in lat/lon space.
DIR=`dirname $0`
PSQL="/awips2/psql/bin/psql"
JAVA="/awips2/java/bin/java"
# Update columns on tables for satellite
${PSQL} -U awips -d metadata -c "ALTER TABLE satellite DROP COLUMN upperrightlat, DROP COLUMN upperrightlon, DROP COLUMN sizerecords, DROP COLUMN numrecords;"
${PSQL} -U awips -d metadata -c "ALTER TABLE satellite_spatial DROP COLUMN la1, DROP COLUMN la2, DROP COLUMN latin, DROP COLUMN lo1, DROP COLUMN lo2, DROP COLUMN lov;"
${PSQL} -U awips -d metadata -c "ALTER TABLE satellite_spatial ADD COLUMN minx double precision, ADD COLUMN miny double precision;"
# Run application to convert sat spatial entries to use crs space
${JAVA} -jar update_satellite_spatial.jar