12.11.1-6 baseline

Former-commit-id: 5c1f3cdc46 [formerly fba4a443a0 [formerly 18939af3b7cf54a36970d65d528003f4fe489eb7]]
Former-commit-id: fba4a443a0
Former-commit-id: 30c786a885
This commit is contained in:
Steve Harris 2012-10-18 15:53:01 -05:00
parent bb8fe6e556
commit 58cd1e90f8
17 changed files with 79 additions and 55 deletions

View file

@ -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)

View file

@ -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)

View file

@ -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")

View file

@ -62,12 +62,6 @@ for MapFiles.py</a></td>
shapefile name configuration file.<br>
</td>
</tr>
<tr>
<td style="vertical-align: top;"><a href="localMapFiles.html">Syntax
for localMapFiles.py</a></td>
<td style="vertical-align: top;">Override file for using
different (e.g., updated) shapefiles for map backgrounds.</td>
</tr>
<tr>
<td style="vertical-align: top;"><a href="localMapsConfig.html">Syntax
for localMaps.py</a></td>

View file

@ -88,8 +88,7 @@ will then stop. No network connections are brought up. </td>
<td style="vertical-align: top;">YES<br>
</td>
<td style="vertical-align: top;">Runs the ifpServer in a BASELINE
mode only.&nbsp; The localConfig, localMaps, localWxConfig,
localMapFiles are ignored.<br>
mode only.&nbsp; The localConfig, localMaps, localWxConfig are ignored.<br>
</td>
</tr>
<tr>

View file

@ -83,6 +83,7 @@ WYCounties):
</p>
<PRE>
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</h3>
You can modify the following characteristics of the map definition:
<ul>
<li>name of the database table (ShapeTable parameter)</li>
<li>name of the map background (.name line)</li>
<li>filtering (.filter line)</li>
<li>generation of edit areas (.editAreaName line)</li>
<li>group name of generated edit areas (.groupName)</li>
@ -137,6 +139,15 @@ Database Table Name</h4>
<p>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 <a href="#Adding">create a completely new map definition</a>.<br>
</p>
<h4>Name of the Map Background</h4>
The format of the line is identical to that found in Maps.py.&nbsp;
Simply repeat the line you want to change and then put the new map name.
For example, if you want to change the CWAzones map name to MyCWAZones,
you would add the following line to localMaps.py:
<pre>
CWAzones.name = "MyCWAZones"
</pre>
Note: this name is only used in text formatter definitions in the mapNameForCombinations setting.
<h4>Filter Changes</h4>
The format of the line is identical to that found in Maps.py.&nbsp;
Simply repeat the line you want to change and then put in the new filter string.&nbsp;

View file

@ -17,16 +17,9 @@ Configuration</h1>
<h2><a name="Organization"></a><b>Organization</b></h2>
<a href="#Maps.pyFormat">Maps.py Format</a> <br>
&nbsp;&nbsp;&nbsp;<a href="#SiteInformation">Site Information</a> <br>
&nbsp;&nbsp;&nbsp;<a href="#ShapefileNames">Shapefile Names</a> <br>
&nbsp;&nbsp;&nbsp;<a href="#MapDefinitions">Map Definitions</a> <br>
&nbsp;&nbsp;&nbsp;<a href="#PuttingitallTogetherwiththemaplist">Putting it all togetherwith the maps list</a> <br>
&nbsp;&nbsp;&nbsp;<a href="#ImportinglocalMaps">Importing localMaps</a><br>
<br>
<a href="#AWIPSstandardnames">AWIPS standard names</a> <br>
<a href="#ShapefileDescription">Shapefile Description</a><br>
&nbsp;&nbsp;&nbsp;<a href="#Filenames">Filenames</a> <br>
&nbsp;&nbsp;&nbsp;<a href="#CatalogEntryDescription">Catalog Entry Description</a> <br>
&nbsp;&nbsp;&nbsp;<a href="#Attributes">Attributes</a> <br>
<hr width="100%">
<h2><a name="Overview"></a>Overview</h2>
The Maps.py file defines how edit areas are generated for each map.
@ -101,6 +94,7 @@ is passed as a parameter to the ShapeTable constructor.
<pre>
CWAzones = ShapeTable('zone')
CWAzones.name = CWA + '_zones'
CWAzones.editAreaName = ['state','zone']
</pre>
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.
<pre>
CWAzones = ShapeTable('zone')
CWAzones.name = CWA + '_zones'
CWAzones.editAreaName = 'zone'
</pre>
<p>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.
</p>
<pre>
CWAzones = ShapeTable('zone')
CWAzones.name = CWA + '_zones'
CWAzones.editAreaName = ['state','zone']
</pre>
<p>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
</pre>
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'.
<pre>
CWAzones = ShapeTable('zone')
CWAzones.name = CWA + '_zones'
CWAzones.editAreaName = 'zone'
CWAzones.groupName = 'Zones'
</pre>
@ -377,6 +375,7 @@ Map Background Database</a>.
</p>
<pre>
CWAzones = ShapeTable('Zone')
CWAzones.name = CWA + '_zones'
CWAzones.filter(lambda x : x['cwa'] == CWA)
CWAzones.editAreaName = cwazones
</pre>
@ -388,6 +387,7 @@ def cwaZoneFilt(x):
return x['cwa'] == CWA
CWAzones = ShapeTable('zone')
CWAzones.name = CWA + '_zones'
CWAzones.filter(cwaZoneFilt)
CWAzones.editAreaName = cwazones
</pre>
@ -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'
</pre>
@ -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'.
<pre>
CWAzones = ShapeTable('zone')
CWAzones.name = CWA + '_zones'
CWAzones.filter(lambda x : x['cwa'] == CWA)
CWAzones.editAreaName = ['state','zone']
CWAzones.groupName = 'Zones'

View file

@ -30,7 +30,6 @@ import com.raytheon.uf.common.time.DataTime;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Sep 15, 2009 mschenke Initial creation
* OCT 04, 2012 15132 kshresth Restored "MSAS/LDAD QC plots" display data
*
* </pre>
*
@ -39,8 +38,7 @@ import com.raytheon.uf.common.time.DataTime;
*/
public class PlotInfo {
public Integer id;
public String stationId;
public Double latitude;
@ -78,16 +76,4 @@ public class PlotInfo {
this.plotQueued = false;
this.sampleQueued = false;
}
public PlotInfo(String stationId, Double latitude,
Double longitude, DataTime dataTime, String dataURI, Integer id) {
this.stationId = stationId;
this.latitude = latitude;
this.longitude = longitude;
this.dataTime = dataTime;
this.dataURI = dataURI;
this.id = id;
this.plotQueued = false;
this.sampleQueued = false;
}
}

View file

@ -57,7 +57,6 @@ import com.raytheon.viz.pointdata.thread.PlotSampleGeneratorJob;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Apr 22, 2011 njensen Initial creation
* OCT 04, 2012 15132 kshresth Restored "MSAS/LDAD QC plots" display data
*
* </pre>
*
@ -180,7 +179,7 @@ public class PlotModelDataRequestJob extends Job {
private void requestData(List<PlotInfo[]> stationQuery,
List<PlotModelElement> pme) {
Map<Integer, PlotInfo> plotMap = new HashMap<Integer, PlotInfo>();
Map<String, PlotInfo> plotMap = new HashMap<String, PlotInfo>();
List<String> params = new ArrayList<String>();
for (PlotModelElement p : pme) {
@ -205,8 +204,8 @@ public class PlotModelDataRequestJob extends Job {
List<String> str = new ArrayList<String>(stationQuery.size());
for (PlotInfo[] infos : stationQuery) {
for (PlotInfo info : infos) {
str.add(Integer.toString(info.id));
plotMap.put(info.id, info);
str.add(info.dataURI);
plotMap.put(info.dataURI, info);
}
}
@ -220,7 +219,7 @@ public class PlotModelDataRequestJob extends Job {
index++;
j++;
}
map.put("id", rc);
map.put("dataURI", rc);
try {
// Try and get data from datacube
long t0 = System.currentTimeMillis();
@ -244,8 +243,8 @@ public class PlotModelDataRequestJob extends Job {
for (int uriCounter = 0; uriCounter < pdc.getAllocatedSz(); uriCounter++) {
PointDataView pdv = pdc.readRandom(uriCounter);
if (pdv != null) {
int id = pdv.getInt("id");
PlotInfo info = plotMap.get(id);
String dataURI = pdv.getString("dataURI");
PlotInfo info = plotMap.get(dataURI);
// If the id doesn't match, try to match by
// location
if (info == null) {
@ -258,8 +257,6 @@ public class PlotModelDataRequestJob extends Job {
- pdv.getFloat("longitude"));
if (diffLat < 0.01 && diffLon < 0.01) {
info = pi;
pdv.setInt("id", pi.id);
id = pi.id;
}
}
}

View file

@ -48,7 +48,7 @@ import com.raytheon.viz.pointdata.PlotInfo;
* Date Ticket# Engineer Description
* ------------ ---------- ----------- --------------------------
* Oct 9, 2009 bsteffen Initial creation
* OCT 4, 2012 15132 kshresth Restored "MSAS/LDAD QC plots" display data
*
* </pre>
*
* @author bsteffen
@ -76,7 +76,6 @@ public class PointDataPlotInfoRetriever extends AbstractDbPlotInfoRetriever {
} else {
dq.addColumn("dataTime");
}
dq.addColumn("id");
}
@Override
@ -104,7 +103,7 @@ public class PointDataPlotInfoRetriever extends AbstractDbPlotInfoRetriever {
statusHandler.handle(Priority.CRITICAL, message, new Exception(
message));
}
stationInfo.id = (Integer) data[5];
return stationInfo;
}

View file

@ -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

View file

@ -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;
}

View file

@ -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());
List<ReferenceData> data = 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;
}

View file

@ -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);

View file

@ -5,8 +5,8 @@
<order>0</order>
</pathKey>
<pathKey>
<key>modelInfo.level</key>
<order>1</order>
<key>modelInfo.level.masterLevel.name</key>
<order>0</order>
</pathKey>
</pathKeySet>

View file

@ -76,8 +76,7 @@ public class RadarPathProvider extends DefaultPathProvider {
sb.append(pluginName);
sb.append("-");
sb.append(pdo.getIcao());
sb.append("-");
sb.append(pdo.getDataTime().toString().replaceAll(" ", "_"));
sb.append(fileNameFormat.get().format(pdo.getDataTime().getRefTime()));
sb.append(".h5");
return sb.toString();

View file

@ -174,11 +174,11 @@ if [ "${1}" = "-delta" ]; then
fi
if [ "${1}" = "-full" ]; then
# buildCAVE
# if [ $? -ne 0 ]; then
# exit 1
# fi
# buildRPM "awips2-alertviz"
buildCAVE
if [ $? -ne 0 ]; then
exit 1
fi
buildRPM "awips2-alertviz"
buildEDEX
if [ $? -ne 0 ]; then
exit 1