diff --git a/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapFiles.py b/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapFiles.py
deleted file mode 100644
index 845fb16184..0000000000
--- a/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapFiles.py
+++ /dev/null
@@ -1,33 +0,0 @@
-##
-# This software was developed and / or modified by Raytheon Company,
-# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
-#
-# U.S. EXPORT CONTROLLED TECHNICAL DATA
-# This software product contains export-restricted data whose
-# export/transfer/disclosure is restricted by U.S. law. Dissemination
-# to non-U.S. persons whether in the United States or abroad requires
-# an export license or other authorization.
-#
-# Contractor Name: Raytheon Company
-# Contractor Address: 6825 Pine Street, Suite 340
-# Mail Stop B8
-# Omaha, NE 68106
-# 402.291.0100
-#
-# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
-# further licensing information.
-##
-# Example localMapFiles.py configuration file
-
-# Example of adding a new shapefile. The variable name must match
-# the variable names you use in the localMaps.py filename definitions.
-
-TimeZoneMapName = "tz_13sep02"
-
-
-# Example of overriding the definition in MapFiles.py. In this example,
-# the zone shapefile has been updated to the September 13, 2002 version:
-
-ZoneMapName = 'z_13se02'
-
-
diff --git a/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMaps.py b/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMaps.py
index 7c3312b12e..a3bec056ad 100644
--- a/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMaps.py
+++ b/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMaps.py
@@ -28,6 +28,7 @@ from Maps import *
# and named WY_countyName.
WYcounties = ShapeTable('County')
WYcounties.filter(lambda x : x['state'] == "WY")
+WYcounties.name = 'WYCounties'
WYcounties.editAreaName = ['state','countyname']
WYcounties.groupName = 'WYCounties'
maps.append(WYcounties)
diff --git a/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapsAdd.py b/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapsAdd.py
index 25d9d402fe..976646edb3 100644
--- a/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapsAdd.py
+++ b/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapsAdd.py
@@ -28,6 +28,7 @@ from Maps import *
# and named WY_countyName.
WYcounties = ShapeTable('County')
WYcounties.filter(lambda x : x['state'] == "WY")
+WYcounties.name = 'WYCounties'
WYcounties.editAreaName = ['state','countyname']
WYcounties.groupName = 'WYCounties'
maps.append(WYcounties)
diff --git a/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapsMod.py b/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapsMod.py
index 1bc0d8dcaa..007d19806a 100644
--- a/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapsMod.py
+++ b/cave/com.raytheon.viz.gfe/help/EXAMPLElocalMapsMod.py
@@ -25,6 +25,9 @@ from Maps import *
# The following changes the configuration of the CWAzones maps. It overrides
# every possible item that can be overridden.
+# Rename by name of the CWAzones map
+CWAzones.name = "MyCWAZones"
+
# Change the filter to only include "OH" (Ohio) zones
CWAzones.filter(lambda x : x['state'] == "OH")
diff --git a/cave/com.raytheon.viz.gfe/help/GFESuiteServerConfiguration.html b/cave/com.raytheon.viz.gfe/help/GFESuiteServerConfiguration.html
index 60075bde16..cb27f4026d 100644
--- a/cave/com.raytheon.viz.gfe/help/GFESuiteServerConfiguration.html
+++ b/cave/com.raytheon.viz.gfe/help/GFESuiteServerConfiguration.html
@@ -62,12 +62,6 @@ for MapFiles.py
shapefile name configuration file.
-
WYcounties = ShapeTable('County') +WYcounties.name = 'WYCounties' WYcounties.filter(lambda x : x['state'] == "WY") WYcounties.editAreaName = ['state','countyname'] WYcounties.groupName = 'WYCounties' @@ -128,6 +129,7 @@ existing edit areas You can modify the following characteristics of the map definition:
If you want to change the name of the database table used for edit area generation, you will
need to remove the existing definition and create a completely new map definition.
+CWAzones.name = "MyCWAZones" ++Note: this name is only used in text formatter definitions in the mapNameForCombinations setting.
CWAzones = ShapeTable('zone') +CWAzones.name = CWA + '_zones' CWAzones.editAreaName = ['state','zone']The ifpServer can automatically generate edit areas based on the @@ -144,6 +138,7 @@ and creates an edit area with that name. The example below uses the simple format for the editAreaName, in which only one attribute is specified.
CWAzones = ShapeTable('zone') +CWAzones.name = CWA + '_zones' CWAzones.editAreaName = 'zone'
Examples of the names of the edit areas generated from the above @@ -197,6 +192,7 @@ form for the editAreaName, in which two attributes are specified.
CWAzones = ShapeTable('zone') +CWAzones.name = CWA + '_zones' CWAzones.editAreaName = ['state','zone']
Examples of the names of the edit areas generated from the above @@ -332,6 +328,7 @@ def cwaEAN(atts): return s #return the complete edit area name CWAcounties = ShapeTable('county') +CWAcounties.name = CWA + '_counties' CWAcounties.editAreaName = cwaEAN The "atts" dictionary looks simlilar to the following: @@ -357,6 +354,7 @@ the generated edit areas will be placed in the edit area group called 'Zones'.
CWAzones = ShapeTable('zone') +CWAzones.name = CWA + '_zones' CWAzones.editAreaName = 'zone' CWAzones.groupName = 'Zones'@@ -377,6 +375,7 @@ Map Background Database.
CWAzones = ShapeTable('Zone') +CWAzones.name = CWA + '_zones' CWAzones.filter(lambda x : x['cwa'] == CWA) CWAzones.editAreaName = cwazones@@ -388,6 +387,7 @@ def cwaZoneFilt(x): return x['cwa'] == CWA CWAzones = ShapeTable('zone') +CWAzones.name = CWA + '_zones' CWAzones.filter(cwaZoneFilt) CWAzones.editAreaName = cwazones @@ -403,6 +403,7 @@ def exampleFilt(x): return x['countyname'] in myCounties and x['st'] == "OH" and x['cwa'] = 'CLE' OHcounties = ShapeTable('county') +OHcounties.name = 'ExampleOHCounties' OHcounties.filter(exampleFilt) OHcounties.editAreaName = 'countyname' @@ -413,6 +414,7 @@ Areas case except that the user has specified a group name. All of the generated edit areas will be placed in the edit area group called 'Zones'.
CWAzones = ShapeTable('zone') +CWAzones.name = CWA + '_zones' CWAzones.filter(lambda x : x['cwa'] == CWA) CWAzones.editAreaName = ['state','zone'] CWAzones.groupName = 'Zones' diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/Maps.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/Maps.py index e5e6a1544b..e9adf4e100 100644 --- a/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/Maps.py +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/Maps.py @@ -44,6 +44,7 @@ CWA = siteConfig.GFESUITE_SITEID # #MapNameVariable = ShapeTable('the name of the map table') #MapNameVariable.filter( -- - - - - filter string - - - - - - ) +#MapNameVariable.name = 'the display name of the map' #MapNameVariable.editAreaName = 'attribute in ShapeTable to be used to name # 'editArea' #MapNameVariable.groupName = 'name of the edit area group' @@ -202,86 +203,102 @@ def offshoreZoneFilter(atts): # CWA Counties CWAcounties = ShapeTable('county') CWAcounties.filter(lambda x : x['cwa'][0:3] == CWA or x['cwa'][3:6] == CWA) +CWAcounties.name = 'Counties_' + CWA CWAcounties.editAreaName = ['state','countyname'] CWAcounties.groupName = 'Counties' # FIPS for my counties - only include first WFO indicated in CWA field FIPS = ShapeTable('county') +FIPS.name = 'FIPS_' + CWA FIPS.filter(lambda x : x['cwa'][0:3] == CWA) FIPS.editAreaName = fips FIPS.groupName = 'FIPS_' + CWA # Unfiltered Counties Counties = ShapeTable('county') +Counties.name = 'Counties' Counties.editAreaName = fips Counties.groupName = 'FIPS' # CWA Zones CWAzones = ShapeTable('zone') CWAzones.filter(publicZoneFilter) +CWAzones.name = 'Zones_' + CWA CWAzones.editAreaName = cwazones CWAzones.groupName = 'Zones_' + CWA # Unfiltered Zones Zones = ShapeTable('zone') +Zones.name = 'Zones' Zones.editAreaName = cwazones Zones.groupName = 'Zones' # Fire Wx Zones FWCWAzones = ShapeTable('firewxzones') FWCWAzones.filter(firewxZoneFilter) +FWCWAzones.name = 'FireWxZones_' + CWA FWCWAzones.editAreaName = fwxzones FWCWAzones.groupName = 'FireWxZones_' + CWA # Unfiltered Fire Wx Zones FWZones = ShapeTable('firewxzones') +FWZones.name = 'FireWxZones' FWZones.editAreaName = fwxzones FWZones.groupName = 'FireWxZones' # CWAs for all cwas = ShapeTable('cwa') +cwas.name = 'CWA_all' cwas.editAreaName = 'wfo' cwas.groupName = 'WFOs' # ISC areas for all isc = ShapeTable('isc') +isc.name = 'ISC_all' isc.editAreaName = ['ISC','wfo'] isc.groupName = 'ISC' # Fire Wx AOR for all fwaor = ShapeTable('firewxaor') +fwaor.name = 'FireWxAOR' fwaor.editAreaName = ['FireWxAOR', 'cwa'] fwaor.groupName = 'FireWxAOR' # Marine Zones for CWA CWAmzones = ShapeTable('marinezones') CWAmzones.filter(marineZoneFilter) +CWAmzones.name = 'Marine_Zones_' + CWA CWAmzones.editAreaName = marineZ CWAmzones.groupName = 'MZones_' + CWA # Marine Zones (unfiltered) Mzones = ShapeTable('marinezones') +Mzones.name = "Marine_Zones" Mzones.editAreaName = marineZ Mzones.groupName = 'MZones' # States (unfiltered) States = ShapeTable('states') +States.name = "States" States.editAreaName = 'name' States.groupName = 'States' # RFC maps rfc = ShapeTable('rfc') +rfc.name = "RFC" rfc.editAreaName = ['ISC','site_id'] rfc.groupName = 'ISC' # Offshore Marine Zones - unfiltered offshore = ShapeTable('offshore') +offshore.name = "Offshore_Marine_Zones" offshore.editAreaName = offshoreZ offshore.groupName = 'OffShoreMZones' # Offshore Marine Zones - filtered by CWA offshoreCWA = ShapeTable('offshore') offshoreCWA.filter(offshoreZoneFilter) +offshoreCWA.name = "Offshore_Marine_Zones_" + CWA offshoreCWA.editAreaName = offshoreZ offshoreCWA.groupName = 'OffShoreMZones_' + CWA diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/DbShapeSource.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/DbShapeSource.java index 620232530c..807eb9225a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/DbShapeSource.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/DbShapeSource.java @@ -93,6 +93,8 @@ public class DbShapeSource { private boolean filtered = false; + private String displayName; + private boolean hasEditAreaName = false; private String groupName; @@ -357,6 +359,14 @@ public class DbShapeSource { return this.featureCollection.size(); } + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String name) { + this.displayName = name; + } + public String getGroupName() { return groupName; } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/MapManager.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/MapManager.java index fd8ab32424..b0c3a1b81c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/MapManager.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/MapManager.java @@ -392,7 +392,10 @@ public class MapManager { String error = "********* EDIT AREA GENERATION ERROR - MakeReferenceData *********\n" + "Error in generating edit areas, map #" + i - + " Basename: " + m.getTableName(); + + " Name: " + + m.getDisplayName() + + " Basename: " + + m.getTableName(); statusHandler.error(error, e); _mapErrors.add(error); } finally { @@ -484,7 +487,7 @@ public class MapManager { return; } - statusHandler.debug("creating: " + mapDef.getTableName()); + statusHandler.debug("creating: " + mapDef.getDisplayName()); Listdata = createReferenceData(mapDef); if (data.size() == 0) { return; @@ -896,13 +899,13 @@ public class MapManager { } catch (Exception e) { String error = "********* EDIT AREA GENERATION ERROR - Create Reference Data *********\n" + "Error in generating edit areas from maps for map " - + mapDef.getTableName(); + + mapDef.getDisplayName(); statusHandler.error(error, e); _mapErrors.add(error); } statusHandler.debug("EAs: " + created); - editAreaMap.put(mapDef.getTableName(), created); + editAreaMap.put(mapDef.getDisplayName(), created); return data; } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/ShapeTable.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/ShapeTable.py index ef76a5c050..4456a147a6 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/ShapeTable.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/ShapeTable.py @@ -38,6 +38,7 @@ from com.raytheon.edex.plugin.gfe.reference import DbShapeSource class ShapeTable(JUtil.JavaWrapperClass): def __init__(self, identifier): self.identifier = identifier + self.name = None self.editAreaName = None self.groupName = None self.javaObj = DbShapeSource(identifier) @@ -63,6 +64,7 @@ class ShapeTable(JUtil.JavaWrapperClass): return "" def toJavaObj(self): + self.javaObj.setDisplayName(self.name) self.javaObj.setGroupName(self.groupName) if self.editAreaName is not None: self.javaObj.setHasEditAreaName(True);