From 155b7ce7ec401f5452e19a47aa0a24d7fa40aa3f Mon Sep 17 00:00:00 2001 From: Michael James Date: Tue, 30 Aug 2016 14:39:29 -0500 Subject: [PATCH] Regional Mercator for localized site; remove States scale --- .../Installer.localization/component.spec | 57 +++-- .../cave_static/bundles/scales/Regional.xml | 219 +++++++----------- .../cave_static/bundles/scales/States.xml | 117 ---------- 3 files changed, 127 insertions(+), 266 deletions(-) delete mode 100644 rpms/awips2.core/Installer.localization/utility/cave_static/bundles/scales/States.xml diff --git a/rpms/awips2.core/Installer.localization/component.spec b/rpms/awips2.core/Installer.localization/component.spec index c03ebfa6e0..a5b8b1eee4 100644 --- a/rpms/awips2.core/Installer.localization/component.spec +++ b/rpms/awips2.core/Installer.localization/component.spec @@ -41,41 +41,60 @@ if [ -d ${RPM_BUILD_ROOT} ]; then fi %build -# Build all WFO site localization Map Scales (Regional.xml, States.xml, WFO.xml) +# Build all WFO site localization Map Scales (Regional.xml and WFO.xml) BUILD_DIR=%{_baseline_workspace}/rpms/awips2.core/Installer.localization/ UTIL=%{_baseline_workspace}/localization/utility #file=$BUILD_DIR/wfo.dat file=$BUILD_DIR/coords.dat +regional=$BUILD_DIR/coords_regional.dat # for site in $(cat $file |cut -c -3) do - lat=$(cat $file |grep $site | cut -d"," -f2) - lon=$(cat $file |grep $site | cut -d"," -f3) + lat=$(cat $file |grep $site | cut -d"," -f2 | tr -d '[[:space:]]') + lon=$(cat $file |grep $site | cut -d"," -f3 | tr -d '[[:space:]]') # - lowx=$(cat $file |grep $site | cut -d"," -f4) - highx=$(cat $file |grep $site | cut -d"," -f5) - lowy=$(cat $file |grep $site | cut -d"," -f6) - highy=$(cat $file |grep $site | cut -d"," -f7) - minx=$(cat $file |grep $site | cut -d"," -f8) - maxx=$(cat $file |grep $site | cut -d"," -f9) - miny=$(cat $file |grep $site | cut -d"," -f10) - maxy=$(cat $file |grep $site | cut -d"," -f11) + lowx=$(cat $file |grep $site | cut -d"," -f4 | tr -d '[[:space:]]') + highx=$(cat $file |grep $site | cut -d"," -f5 | tr -d '[[:space:]]') + lowy=$(cat $file |grep $site | cut -d"," -f6 | tr -d '[[:space:]]') + highy=$(cat $file |grep $site | cut -d"," -f7 | tr -d '[[:space:]]') + minx=$(cat $file |grep $site | cut -d"," -f8 | tr -d '[[:space:]]') + maxx=$(cat $file |grep $site | cut -d"," -f9 | tr -d '[[:space:]]') + miny=$(cat $file |grep $site | cut -d"," -f10 | tr -d '[[:space:]]') + maxy=$(cat $file |grep $site | cut -d"," -f11 | tr -d '[[:space:]]') # CAVE CAVE_DIR=$UTIL/cave_static/site/$site mkdir -p $CAVE_DIR cp -R $BUILD_DIR/utility/cave_static/* $CAVE_DIR - grep -rl 'LOWX' $CAVE_DIR | xargs sed -i 's/LOWX/'$lowx'/g' - grep -rl 'HIGHX' $CAVE_DIR | xargs sed -i 's/HIGHX/'$highx'/g' - grep -rl 'LOWY' $CAVE_DIR | xargs sed -i 's/LOWY/'$lowy'/g' - grep -rl 'HIGHY' $CAVE_DIR | xargs sed -i 's/HIGHY/'$highy'/g' - grep -rl 'MINX' $CAVE_DIR | xargs sed -i 's/MINX/'$minx'/g' - grep -rl 'MAXX' $CAVE_DIR | xargs sed -i 's/MAXX/'$maxx'/g' - grep -rl 'MINY' $CAVE_DIR | xargs sed -i 's/MINY/'$miny'/g' - grep -rl 'MAXY' $CAVE_DIR | xargs sed -i 's/MAXY/'$maxy'/g' + grep -rl 'LOWX' $CAVE_DIR/bundles/scales/WFO.xml | xargs sed -i 's/LOWX/'$lowx'/g' + grep -rl 'HIGHX' $CAVE_DIR/bundles/scales/WFO.xml | xargs sed -i 's/HIGHX/'$highx'/g' + grep -rl 'LOWY' $CAVE_DIR/bundles/scales/WFO.xml | xargs sed -i 's/LOWY/'$lowy'/g' + grep -rl 'HIGHY' $CAVE_DIR/bundles/scales/WFO.xml | xargs sed -i 's/HIGHY/'$highy'/g' + grep -rl 'MINX' $CAVE_DIR/bundles/scales/WFO.xml | xargs sed -i 's/MINX/'$minx'/g' + grep -rl 'MAXX' $CAVE_DIR/bundles/scales/WFO.xml | xargs sed -i 's/MAXX/'$maxx'/g' + grep -rl 'MINY' $CAVE_DIR/bundles/scales/WFO.xml | xargs sed -i 's/MINY/'$miny'/g' + grep -rl 'MAXY' $CAVE_DIR/bundles/scales/WFO.xml | xargs sed -i 's/MAXY/'$maxy'/g' + + lowx=$(cat $regional |grep $site | cut -d"," -f4 | tr -d '[[:space:]]') + highx=$(cat $regional |grep $site | cut -d"," -f5 | tr -d '[[:space:]]') + lowy=$(cat $regional |grep $site | cut -d"," -f6 | tr -d '[[:space:]]') + highy=$(cat $regional |grep $site | cut -d"," -f7 | tr -d '[[:space:]]') + minx=$(cat $regional |grep $site | cut -d"," -f8 | tr -d '[[:space:]]') + maxx=$(cat $regional |grep $site | cut -d"," -f9 | tr -d '[[:space:]]') + miny=$(cat $regional |grep $site | cut -d"," -f10 | tr -d '[[:space:]]') + maxy=$(cat $regional |grep $site | cut -d"," -f11 | tr -d '[[:space:]]') + + grep -rl 'LOWX' $CAVE_DIR/bundles/scales/Regional.xml | xargs sed -i 's/LOWX/'$lowx'/g' + grep -rl 'HIGHX' $CAVE_DIR/bundles/scales/Regional.xml | xargs sed -i 's/HIGHX/'$highx'/g' + grep -rl 'LOWY' $CAVE_DIR/bundles/scales/Regional.xml | xargs sed -i 's/LOWY/'$lowy'/g' + grep -rl 'HIGHY' $CAVE_DIR/bundles/scales/Regional.xml | xargs sed -i 's/HIGHY/'$highy'/g' + grep -rl 'MINX' $CAVE_DIR/bundles/scales/Regional.xml | xargs sed -i 's/MINX/'$minx'/g' + grep -rl 'MAXX' $CAVE_DIR/bundles/scales/Regional.xml | xargs sed -i 's/MAXX/'$maxx'/g' + grep -rl 'MINY' $CAVE_DIR/bundles/scales/Regional.xml | xargs sed -i 's/MINY/'$miny'/g' + grep -rl 'MAXY' $CAVE_DIR/bundles/scales/Regional.xml | xargs sed -i 's/MAXY/'$maxy'/g' grep -rl 'XXX' $CAVE_DIR | xargs sed -i 's/XXX/'$site'/g' grep -rl 'LATITUDE' $CAVE_DIR | xargs sed -i 's/LATITUDE/'$lat'/g' diff --git a/rpms/awips2.core/Installer.localization/utility/cave_static/bundles/scales/Regional.xml b/rpms/awips2.core/Installer.localization/utility/cave_static/bundles/scales/Regional.xml index cd88b473ca..865c6168f0 100644 --- a/rpms/awips2.core/Installer.localization/utility/cave_static/bundles/scales/Regional.xml +++ b/rpms/awips2.core/Installer.localization/utility/cave_static/bundles/scales/Regional.xml @@ -1,131 +1,87 @@ - - - - - - - - - - - - PLAN_VIEW - - - - - + + + + - - - - PLAN_VIEW + + + + - - + + - - World - mapdata.world
- the_geom - name not in ('CANADA', 'MEXICO', 'UNITED STATES') + + + + PLAN_VIEW + + + + + + + + + + + + + World + mapdata.world
+ name not in ('UNITED STATES') + the_geom +
+
+ + + PLAN_VIEW + + + + + + + + + + + + + County Boundaries + mapdata.county
+ the_geom +
+
+ + + PLAN_VIEW + + + + + + + + + + + + + State Boundaries + mapdata.states
+ the_geom +
+
+ State/County Boundaries
- - - - - - - PLAN_VIEW - - - - - - State Boundaries - mapdata.states
- the_geom -
-
- - - - - - - PLAN_VIEW - - - - - - Canada - mapdata.canada
- the_geom -
-
- - - - - - - PLAN_VIEW - - - - - - Mexico - mapdata.mexico
- the_geom -
-
- - - - - - - PLAN_VIEW - - - - - - County Boundaries - mapdata.county
-
-
- State/County Boundaries -
-
- - 12 - - PROJCS["Lambert_Conformal_Conic_1SP", + 2147483647 + + PROJCS["Mercator_1SP", GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], @@ -133,18 +89,21 @@ UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]], - PROJECTION["Lambert_Conformal_Conic_1SP"], - PARAMETER["semi_major", 6371200.0], - PARAMETER["semi_minor", 6371200.0], - PARAMETER["central_meridian", LONGITUDE], - PARAMETER["latitude_of_origin", LATITUDE], + PROJECTION["Mercator_1SP"], + PARAMETER["semi_major", 6371229.0], + PARAMETER["semi_minor", 6371229.0], + PARAMETER["latitude_of_origin", 0.0], + PARAMETER["central_meridian", 0.0], + PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH]] - -
-
-
-
+
+ 12 + + + + + diff --git a/rpms/awips2.core/Installer.localization/utility/cave_static/bundles/scales/States.xml b/rpms/awips2.core/Installer.localization/utility/cave_static/bundles/scales/States.xml deleted file mode 100644 index 925731d47f..0000000000 --- a/rpms/awips2.core/Installer.localization/utility/cave_static/bundles/scales/States.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - PLAN_VIEW - - - - - - - - - - - - PLAN_VIEW - - - - - - State Boundaries Zoom - mapdata.states
- the_geom -
-
- - - - - - - PLAN_VIEW - - - - - - State Boundaries - mapdata.states
- the_geom -
-
- - - - - - - - PLAN_VIEW - - - - - - County Boundaries - mapdata.county
-
-
- State/County Boundaries -
-
- - 12 - - - PROJCS["Lambert_Conformal_Conic_1SP", - GEOGCS["WGS84(DD)", - DATUM["WGS84", - SPHEROID["WGS84", 6378137.0, 298.257223563]], - PRIMEM["Greenwich", 0.0], - UNIT["degree", 0.017453292519943295], - AXIS["Geodetic longitude", EAST], - AXIS["Geodetic latitude", NORTH]], - PROJECTION["Lambert_Conformal_Conic_1SP"], - PARAMETER["semi_major", 6371200.0], - PARAMETER["semi_minor", 6371200.0], - PARAMETER["central_meridian", LONGITUDE], - PARAMETER["latitude_of_origin", LATITUDE], - PARAMETER["false_easting", 0.0], - PARAMETER["false_northing", 0.0], - UNIT["m", 1.0], - AXIS["Easting", EAST], - AXIS["Northing", NORTH]] - -
-
-
-