12.12.1-3 baseline
Former-commit-id:c999505fba
[formerlyc999505fba
[formerly 8481c91f9918a61631198331c324c4c5a76aac0f]] Former-commit-id:b3b5e6d28f
Former-commit-id:2797cbcdd0
This commit is contained in:
parent
96a4a4f3f5
commit
314495dc8e
19 changed files with 648 additions and 291 deletions
|
@ -308,6 +308,8 @@ public class AutoDailyQC {
|
|||
}
|
||||
}
|
||||
|
||||
num_period_qc=5;
|
||||
//for the 6 hours periods
|
||||
for (int l = 0; l < 5; l++) {
|
||||
if (DailyQcUtils.pdata[i].used[l] == 0) {
|
||||
continue;
|
||||
|
@ -343,6 +345,79 @@ public class AutoDailyQC {
|
|||
WriteQPFGrids wq = new WriteQPFGrids();
|
||||
wq.write_qpf_grids(dbuf);
|
||||
|
||||
/* output grid to file in grib format */
|
||||
|
||||
// create netCDF file from data, write it out then call
|
||||
// nc2grib against it making a grib file, when done
|
||||
// remove the unneeded netCDF file.
|
||||
if (DailyQcUtils.mpe_dqc_save_grib == true) {
|
||||
WriteDQCNetCDFGrids wng = new WriteDQCNetCDFGrids();
|
||||
String ncfile = String.format("%s.nc", dbuf);
|
||||
wng.write_dqc_netcdf_grids(ncfile, 0, 1, 1,
|
||||
ga.getCommonGridAttributes(), datavals);
|
||||
WriteDQCGribGrids wgg = new WriteDQCGribGrids();
|
||||
String fname_grib = String.format("%s.grb", dbuf);
|
||||
int status = wgg.write_dqc_grib_grids(ncfile,
|
||||
fname_grib, 1);
|
||||
File nfile = new File(ncfile);
|
||||
nfile.delete();
|
||||
nfile = null;
|
||||
if (status != 0) {
|
||||
System.out
|
||||
.println(String
|
||||
.format("\n problem with writing GRIB file in write_dqc_grib_grids. status=%d\n",
|
||||
status));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int num;
|
||||
if (l < 4) {
|
||||
num = i * 4 + 3 - l;
|
||||
} else {
|
||||
num = i + 40;
|
||||
}
|
||||
|
||||
/* create the MAP */
|
||||
CreateMap cm = new CreateMap();
|
||||
cm.create_map(num);
|
||||
}
|
||||
//for (int l = 0; l < 5; l++) {
|
||||
for (int l = 0; l < num_period_qc; l++) {
|
||||
if (DailyQcUtils.pdata[i].used[l] == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (l < 2) {
|
||||
otime.setTime(DailyQcUtils.pdata[i].data_time);
|
||||
otime.add(Calendar.SECOND, -86400);
|
||||
} else {
|
||||
otime.setTime(DailyQcUtils.pdata[i].data_time);
|
||||
}
|
||||
|
||||
int ll;
|
||||
if (l < 4) {
|
||||
ll = 0;
|
||||
} else {
|
||||
ll = 1;
|
||||
}
|
||||
RenderPcp rp = new RenderPcp();
|
||||
rp.render_pcp(i, l, ll,
|
||||
DailyQcUtils.precip_stations.size(),
|
||||
DailyQcUtils.precip_stations,
|
||||
DailyQcUtils.getHrap_grid(),
|
||||
DailyQcUtils.pdata, DailyQcUtils.pcp_in_use);
|
||||
|
||||
/* output grid to file in Ascii format */
|
||||
dbuf = String.format("%s%s_%04d%02d%02d",
|
||||
DailyQcUtils.grid_file,
|
||||
DailyQcUtils.timefile[2][l],
|
||||
otime.get(Calendar.YEAR),
|
||||
otime.get(Calendar.MONTH) + 1,
|
||||
otime.get(Calendar.DAY_OF_MONTH));
|
||||
WriteQPFGrids wq = new WriteQPFGrids();
|
||||
wq.write_qpf_grids(dbuf);
|
||||
|
||||
/* output grid to file in NetCDF format */
|
||||
if (DailyQcUtils.mpe_dqc_save_netcdf == true) {
|
||||
WriteDQCNetCDFGrids wng = new WriteDQCNetCDFGrids();
|
||||
|
@ -351,42 +426,6 @@ public class AutoDailyQC {
|
|||
ga.getCommonGridAttributes(), datavals);
|
||||
}
|
||||
|
||||
/* output grid to file in grib format */
|
||||
|
||||
// create netCDF file from data, write it out then call
|
||||
// nc2grib against it making a grib file, when done
|
||||
// remove the unneeded netCDF file.
|
||||
if (DailyQcUtils.mpe_dqc_save_grib == true) {
|
||||
WriteDQCNetCDFGrids wng = new WriteDQCNetCDFGrids();
|
||||
String ncfile = String.format("%s.nc", dbuf);
|
||||
wng.write_dqc_netcdf_grids(ncfile, 0, 1, 1,
|
||||
ga.getCommonGridAttributes(), datavals);
|
||||
WriteDQCGribGrids wgg = new WriteDQCGribGrids();
|
||||
String fname_grib = String.format("%s.grb", dbuf);
|
||||
int status = wgg.write_dqc_grib_grids(ncfile,
|
||||
fname_grib, 1);
|
||||
File nfile = new File(ncfile);
|
||||
nfile.delete();
|
||||
nfile = null;
|
||||
if (status != 0) {
|
||||
System.out
|
||||
.println(String
|
||||
.format("\n problem with writing GRIB file in write_dqc_grib_grids. status=%d\n",
|
||||
status));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int num;
|
||||
if (l < 4) {
|
||||
num = i * 4 + 3 - l;
|
||||
} else {
|
||||
num = i + 40;
|
||||
}
|
||||
|
||||
/* create the MAP */
|
||||
CreateMap cm = new CreateMap();
|
||||
cm.create_map(num);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* Apr 13, 2012 #14691 Qinglu lin Added code for two more fe_area: er and nr.
|
||||
* May 4, 2012 #14887 Qinglu lin Changed 0.25 to 0.60 for DEFAULT_PORTION_TOLERANCE;
|
||||
* added code to pass a Envelope calculatePortion().
|
||||
* Nov 9, 2012 DR 15430 D. Friedman Extracted method converFeAreaToPartList.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -229,67 +230,7 @@ public class Area {
|
|||
.get(parentAreaField));
|
||||
String feArea = (String) regionFeature.attributes
|
||||
.get("FE_AREA");
|
||||
final List<String> partList = new ArrayList<String>();
|
||||
if (feArea == null) {
|
||||
// Marine warnings
|
||||
partList.add("");
|
||||
} else {
|
||||
if (feArea.equals("pa"))
|
||||
partList.add("PA");
|
||||
else if (feArea.equals("mi"))
|
||||
partList.add("MI");
|
||||
else if (feArea.equals("pd"))
|
||||
partList.add("PD");
|
||||
else if (feArea.equals("up"))
|
||||
partList.add("UP");
|
||||
else if (feArea.equals("bb"))
|
||||
partList.add("BB");
|
||||
else if (feArea.equals("er"))
|
||||
partList.add("ER");
|
||||
else if (feArea.equals("eu"))
|
||||
partList.add("EU");
|
||||
else if (feArea.equals("sr"))
|
||||
partList.add("SR");
|
||||
else if (feArea.equals("nr"))
|
||||
partList.add("NR");
|
||||
else if (feArea.equals("wu"))
|
||||
partList.add("WU");
|
||||
else if (feArea.equals("ds"))
|
||||
partList.add("DS");
|
||||
else if (feArea.equals("ne"))
|
||||
partList.add("NE");
|
||||
else if (feArea.equals("nw"))
|
||||
partList.add("NW");
|
||||
else if (feArea.equals("se"))
|
||||
partList.add("SE");
|
||||
else if (feArea.equals("sw"))
|
||||
partList.add("SW");
|
||||
else {
|
||||
for (int i = 0; i < feArea.length(); i++) {
|
||||
char c = feArea.charAt(i);
|
||||
switch (c) {
|
||||
case 'c':
|
||||
partList.add("CENTRAL");
|
||||
break;
|
||||
case 'w':
|
||||
partList.add("WEST");
|
||||
break;
|
||||
case 'n':
|
||||
partList.add("NORTH");
|
||||
break;
|
||||
case 'e':
|
||||
partList.add("EAST");
|
||||
break;
|
||||
case 's':
|
||||
partList.add("SOUTH");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
area.partOfParentRegion = partList;
|
||||
area.partOfParentRegion = converFeAreaToPartList(feArea);
|
||||
}
|
||||
|
||||
// Search against point matches
|
||||
|
@ -391,4 +332,68 @@ public class Area {
|
|||
return retVal;
|
||||
}
|
||||
|
||||
public static List<String> converFeAreaToPartList(String feArea) {
|
||||
final List<String> partList = new ArrayList<String>();
|
||||
if (feArea == null) {
|
||||
// Marine warnings
|
||||
partList.add("");
|
||||
} else {
|
||||
if (feArea.equals("pa"))
|
||||
partList.add("PA");
|
||||
else if (feArea.equals("mi"))
|
||||
partList.add("MI");
|
||||
else if (feArea.equals("pd"))
|
||||
partList.add("PD");
|
||||
else if (feArea.equals("up"))
|
||||
partList.add("UP");
|
||||
else if (feArea.equals("bb"))
|
||||
partList.add("BB");
|
||||
else if (feArea.equals("er"))
|
||||
partList.add("ER");
|
||||
else if (feArea.equals("eu"))
|
||||
partList.add("EU");
|
||||
else if (feArea.equals("sr"))
|
||||
partList.add("SR");
|
||||
else if (feArea.equals("nr"))
|
||||
partList.add("NR");
|
||||
else if (feArea.equals("wu"))
|
||||
partList.add("WU");
|
||||
else if (feArea.equals("ds"))
|
||||
partList.add("DS");
|
||||
else if (feArea.equals("ne"))
|
||||
partList.add("NE");
|
||||
else if (feArea.equals("nw"))
|
||||
partList.add("NW");
|
||||
else if (feArea.equals("se"))
|
||||
partList.add("SE");
|
||||
else if (feArea.equals("sw"))
|
||||
partList.add("SW");
|
||||
else {
|
||||
for (int i = 0; i < feArea.length(); i++) {
|
||||
char c = feArea.charAt(i);
|
||||
switch (c) {
|
||||
case 'c':
|
||||
partList.add("CENTRAL");
|
||||
break;
|
||||
case 'w':
|
||||
partList.add("WEST");
|
||||
break;
|
||||
case 'n':
|
||||
partList.add("NORTH");
|
||||
break;
|
||||
case 'e':
|
||||
partList.add("EAST");
|
||||
break;
|
||||
case 's':
|
||||
partList.add("SOUTH");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return partList;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,12 +22,10 @@ package com.raytheon.viz.warngen.template;
|
|||
import java.awt.geom.Point2D;
|
||||
import java.io.StringWriter;
|
||||
import java.text.DateFormat;
|
||||
import java.text.DecimalFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
|
@ -35,9 +33,11 @@ import java.util.Hashtable;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.TimeZone;
|
||||
import java.util.TreeMap;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
|
@ -45,14 +45,12 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.velocity.Template;
|
||||
import org.apache.velocity.VelocityContext;
|
||||
import org.apache.velocity.app.Velocity;
|
||||
import org.apache.velocity.app.VelocityEngine;
|
||||
import org.apache.velocity.tools.generic.ListTool;
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
|
||||
import com.raytheon.uf.common.activetable.ActiveTableMode;
|
||||
import com.raytheon.uf.common.activetable.ActiveTableRecord;
|
||||
|
@ -60,11 +58,11 @@ import com.raytheon.uf.common.activetable.GetActiveTableRequest;
|
|||
import com.raytheon.uf.common.activetable.GetActiveTableResponse;
|
||||
import com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord;
|
||||
import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction;
|
||||
import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration;
|
||||
import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration.AreaType;
|
||||
import com.raytheon.uf.common.dataplugin.warning.config.WarngenConfiguration;
|
||||
import com.raytheon.uf.common.dataplugin.warning.gis.GeospatialData;
|
||||
import com.raytheon.uf.common.dataplugin.warning.util.GeometryUtil;
|
||||
import com.raytheon.uf.common.geospatial.ISpatialQuery.SearchMode;
|
||||
import com.raytheon.uf.common.geospatial.SpatialQueryFactory;
|
||||
import com.raytheon.uf.common.geospatial.SpatialQueryResult;
|
||||
import com.raytheon.uf.common.site.SiteMap;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
|
@ -75,7 +73,6 @@ import com.raytheon.uf.common.util.FileUtil;
|
|||
import com.raytheon.uf.edex.core.EdexException;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
import com.raytheon.uf.viz.core.localization.LocalizationManager;
|
||||
import com.raytheon.uf.viz.core.maps.rsc.DbMapQueryFactory;
|
||||
import com.raytheon.uf.viz.core.requests.ThriftClient;
|
||||
import com.raytheon.viz.awipstools.ToolsDataManager;
|
||||
import com.raytheon.viz.awipstools.common.StormTrackData;
|
||||
|
@ -101,11 +98,11 @@ import com.raytheon.viz.warngen.util.FollowUpUtil;
|
|||
import com.raytheon.viz.warngen.util.WarnGenMathTool;
|
||||
import com.raytheon.viz.warngen.util.WatchUtil;
|
||||
import com.raytheon.viz.warngen.util.WeatherAdvisoryWatch;
|
||||
import com.raytheon.viz.warngen.util.WeatherAdvisoryWatch.Portion;
|
||||
import com.raytheon.viz.warnings.DateUtil;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.Polygon;
|
||||
import com.vividsolutions.jts.geom.prep.PreparedGeometry;
|
||||
import com.vividsolutions.jts.io.WKTReader;
|
||||
|
||||
/**
|
||||
|
@ -129,6 +126,7 @@ import com.vividsolutions.jts.io.WKTReader;
|
|||
* Aug 29, 2011 15351 jsanchez Set the timezone for TML time.
|
||||
* Sep 10, 2012 15295 snaples Added property setting for runtime log to createScript.
|
||||
* Sep 18, 2012 15332 jsanchez Used a new warning text handler.
|
||||
* Nov 9, 1202 DR 15430 D. Friedman Improve watch inclusion.
|
||||
* </pre>
|
||||
*
|
||||
* @author njensen
|
||||
|
@ -742,7 +740,7 @@ public class TemplateRunner {
|
|||
try {
|
||||
t0 = System.currentTimeMillis();
|
||||
WatchUtil watches = getWatches(warngenLayer, config, warnPolygon,
|
||||
fourLetterSiteId);
|
||||
fourLetterSiteId, simulatedTime);
|
||||
System.out.println("getWatches time: "
|
||||
+ (System.currentTimeMillis() - t0));
|
||||
if (watches != null) {
|
||||
|
@ -837,12 +835,13 @@ public class TemplateRunner {
|
|||
* ([template_name_site.xml])
|
||||
* @param polygon
|
||||
* The Geometry surrounded by the warning polygon.
|
||||
* @param simulatedTime
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
private static WatchUtil getWatches(WarngenLayer warngenLayer,
|
||||
WarngenConfiguration config, Geometry polygon,
|
||||
String fourLetterSiteId) throws Exception {
|
||||
String fourLetterSiteId, Date simulatedTime) throws Exception {
|
||||
Validate.isTrue(config.getHatchedAreaSource()
|
||||
.getIncludedWatchAreaBuffer() >= 0,
|
||||
"IncludedWatchAreaBuffer can not be negative");
|
||||
|
@ -877,8 +876,27 @@ public class TemplateRunner {
|
|||
GetActiveTableResponse resp = (GetActiveTableResponse) ThriftClient
|
||||
.sendRequest(req);
|
||||
long t1 = System.currentTimeMillis();
|
||||
java.util.List<ActiveTableRecord> activeTable = resp
|
||||
.getActiveTable();
|
||||
java.util.List<ActiveTableRecord> respList = resp.getActiveTable();
|
||||
ArrayList<ActiveTableRecord> activeTable = new ArrayList<ActiveTableRecord>(
|
||||
respList.size());
|
||||
// Filter out entries representing non-active events.
|
||||
for (ActiveTableRecord ar : respList) {
|
||||
if ("CAN".equals(ar.getAct()) || "EXP".equals(ar.getAct()))
|
||||
continue;
|
||||
if (ar.getEndTime() == null) {
|
||||
statusHandler.handle(Priority.ERROR, String.format(
|
||||
"Watch %s has null end time; not included.",
|
||||
ar.getVtecstr()));
|
||||
continue;
|
||||
}
|
||||
// From A1 SELSparagraphs.C processWOU
|
||||
if (simulatedTime.before(new Date(ar.getStartTime().getTime()
|
||||
.getTime() - 180 * 1000))
|
||||
|| simulatedTime.after(ar.getEndTime().getTime()))
|
||||
continue;
|
||||
|
||||
activeTable.add(ar);
|
||||
}
|
||||
|
||||
System.out.println("getWatches.getActiveTable time: " + (t1 - t0)
|
||||
+ ", found "
|
||||
|
@ -902,96 +920,293 @@ public class TemplateRunner {
|
|||
t1 = System.currentTimeMillis();
|
||||
System.out.println("getWatches.createWatchGeometry time: "
|
||||
+ (t1 - t0));
|
||||
SpatialQueryResult[] parentRegionFeatures = null;
|
||||
|
||||
try {
|
||||
String field = "the_geom";
|
||||
t0 = System.currentTimeMillis();
|
||||
List<Double> results = DbMapQueryFactory.getMapQuery(
|
||||
"mapdata.states", field).getLevels();
|
||||
Collections.sort(results, Collections.reverseOrder());
|
||||
Double decimationTolerance = null;
|
||||
for (Double result : results) {
|
||||
if (result <= 0.064) {
|
||||
decimationTolerance = result;
|
||||
}
|
||||
}
|
||||
|
||||
if (decimationTolerance != null) {
|
||||
DecimalFormat df = new DecimalFormat("0.######");
|
||||
String suffix = "_"
|
||||
+ StringUtils.replaceChars(df.format(results
|
||||
.get(results.size() - 1)), '.', '_');
|
||||
parentRegionFeatures = SpatialQueryFactory.create()
|
||||
.query("states", field + suffix,
|
||||
new String[] { "Name" }, watchArea,
|
||||
null, false, SearchMode.INTERSECTS);
|
||||
} else {
|
||||
parentRegionFeatures = SpatialQueryFactory.create()
|
||||
.query("states", new String[] { "Name" },
|
||||
watchArea, null, false,
|
||||
SearchMode.INTERSECTS);
|
||||
}
|
||||
|
||||
t1 = System.currentTimeMillis();
|
||||
System.out.println("getWatches.stateSpatialQuery time: "
|
||||
+ (t1 - t0) + ", found "
|
||||
+ parentRegionFeatures.length + " states");
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
"Error querying state geometries", e);
|
||||
return null;
|
||||
}
|
||||
|
||||
rval = new WatchUtil();
|
||||
WeatherAdvisoryWatch watch = null;
|
||||
long cumulativeIntersect = 0;
|
||||
long cumulativeCalcPortion = 0;
|
||||
GeodeticCalculator gc = new GeodeticCalculator();
|
||||
|
||||
// For each State in our watchArea...
|
||||
for (int j = 0; j < parentRegionFeatures.length; j++) {
|
||||
Geometry parentGeom = parentRegionFeatures[j].geometry;
|
||||
List<PreparedGeometry> prepGeoms = new ArrayList<PreparedGeometry>();
|
||||
GeometryUtil.recursivePreparedGeometry(parentGeom,
|
||||
prepGeoms);
|
||||
|
||||
for (ActiveTableRecord atr : activeTable) {
|
||||
// Get the intersection of watchArea with State.
|
||||
watch = new WeatherAdvisoryWatch();
|
||||
watch.setEndTime(atr.getEndTime().getTime());
|
||||
watch.setPhensig(atr.getPhensig());
|
||||
|
||||
// If State intersections intersects with out ATR
|
||||
// record, add watch
|
||||
t0 = System.currentTimeMillis();
|
||||
boolean intersects = GeometryUtil.intersects(prepGeoms,
|
||||
atr.getGeometry());
|
||||
t1 = System.currentTimeMillis();
|
||||
cumulativeIntersect = (t1 - t0);
|
||||
|
||||
if (intersects) {
|
||||
watch.setParentRegion(parentRegionFeatures[j].attributes
|
||||
.get("Name").toString());
|
||||
|
||||
t0 = System.currentTimeMillis();
|
||||
watch.setPartOfParentRegion(GisUtil
|
||||
.asStringList(GisUtil.calculatePortion(
|
||||
parentGeom, atr.getGeometry(), gc)));
|
||||
t1 = System.currentTimeMillis();
|
||||
cumulativeCalcPortion = (t1 - t0);
|
||||
rval.addWaw(watch);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("getWatches.cumulativeIntersect: "
|
||||
+ cumulativeIntersect);
|
||||
System.out.println("getWatches.cumulativeCalcPortion: "
|
||||
+ cumulativeCalcPortion);
|
||||
rval = processATEntries(activeTable, warngenLayer);
|
||||
System.out.println("getWatches.createPoritions time: "
|
||||
+ (t1 - t0));
|
||||
}
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
private static class WatchWork {
|
||||
public WeatherAdvisoryWatch waw;
|
||||
public boolean valid;
|
||||
public ArrayList<String> ugcZone = new ArrayList<String>();
|
||||
|
||||
public WatchWork(WeatherAdvisoryWatch waw) {
|
||||
this.waw = waw;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create the list of objects representing active watches that will be
|
||||
* passed to the template context.
|
||||
*
|
||||
* @param activeTable
|
||||
* List of entries for active watches
|
||||
* @param warngenLayer
|
||||
* @return
|
||||
*/
|
||||
private static WatchUtil processATEntries(
|
||||
List<ActiveTableRecord> activeTable, WarngenLayer warngenLayer) {
|
||||
WatchUtil rval = new WatchUtil();
|
||||
TreeMap<WeatherAdvisoryWatch, WatchWork> map = new TreeMap<WeatherAdvisoryWatch, TemplateRunner.WatchWork>();
|
||||
|
||||
AreaSourceConfiguration asc = null;
|
||||
for (AreaSourceConfiguration a : warngenLayer.getConfiguration()
|
||||
.getAreaSources()) {
|
||||
if (a.getType() == AreaType.HATCHING) {
|
||||
asc = a;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (asc == null) {
|
||||
statusHandler
|
||||
.handle(Priority.ERROR,
|
||||
"Cannot process watches: missing HATCHING area source configuration");
|
||||
return rval;
|
||||
}
|
||||
GeospatialData[] geoData = warngenLayer.getGeodataFeatures(asc
|
||||
.getAreaSource() + "." + warngenLayer.getLocalizedSite());
|
||||
if (geoData == null || geoData.length == 0) {
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Cannot process watches: cannot get geospatial data");
|
||||
return rval;
|
||||
}
|
||||
|
||||
// For each watch event, get the end time and list of active zones
|
||||
for (ActiveTableRecord ar : activeTable) {
|
||||
/*
|
||||
* Currently reports all zones in the watch even if a given zone is
|
||||
* not in the warning polygon. If the logic is changed to only show
|
||||
* the portions of the watch near our warning polygon, perform the
|
||||
* isEmpty check here.
|
||||
*/
|
||||
WeatherAdvisoryWatch waw = new WeatherAdvisoryWatch();
|
||||
waw.setPhensig(ar.getPhensig());
|
||||
try {
|
||||
waw.setEventId(Integer.parseInt(ar.getEtn()));
|
||||
} catch (RuntimeException e) {
|
||||
statusHandler.handle(Priority.ERROR, String.format(
|
||||
"Watch %s has null end time; not included.",
|
||||
ar.getVtecstr()));
|
||||
continue;
|
||||
}
|
||||
|
||||
WatchWork work = map.get(waw);
|
||||
if (work == null) {
|
||||
waw.setEndTime(ar.getEndTime().getTime());
|
||||
work = new WatchWork(waw);
|
||||
map.put(waw, work);
|
||||
}
|
||||
// TODO: Building geometry just to perform this test is probably
|
||||
// inefficient with the post-DR-15430 logic...
|
||||
if (!ar.getGeometry().isEmpty())
|
||||
work.valid = true;
|
||||
|
||||
work.ugcZone.add(ar.getUgcZone());
|
||||
}
|
||||
|
||||
for (WatchWork work : map.values()) {
|
||||
/*
|
||||
* If none of the areas in the watch were neer our warning polygon,
|
||||
* do not included it.
|
||||
*/
|
||||
if (!work.valid)
|
||||
continue;
|
||||
if (determineAffectedPortions(work.ugcZone, asc, geoData, work.waw));
|
||||
rval.addWaw(work.waw);
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given the list of counties in a watch, fill out the "portions" part of
|
||||
* the given WeatherAdvisoryWatch
|
||||
*
|
||||
* @param ugcs
|
||||
* @param asc
|
||||
* @param geoData
|
||||
* @param waw
|
||||
*/
|
||||
private static boolean determineAffectedPortions(List<String> ugcs,
|
||||
AreaSourceConfiguration asc, GeospatialData[] geoData,
|
||||
WeatherAdvisoryWatch waw) {
|
||||
|
||||
// Maps state abbreviation to unique fe_area values
|
||||
HashMap<String, Set<String>> map = new HashMap<String, Set<String>>();
|
||||
|
||||
for (String ugc : ugcs) {
|
||||
for (Entry<String, String[]> e : FipsUtil.parseCountyHeader(ugc).entrySet()) {
|
||||
String stateAbbrev = e.getKey();
|
||||
if (e.getValue().length != 1) // either zero or more than one
|
||||
// would be wrong
|
||||
statusHandler.handle(Priority.ERROR,
|
||||
"Invalid ugczone in active table entry");
|
||||
Set<String> feAreas = map.get(stateAbbrev);
|
||||
if (feAreas == null) {
|
||||
feAreas = new HashSet<String>();
|
||||
map.put(stateAbbrev, feAreas);
|
||||
}
|
||||
try {
|
||||
feAreas.add(getFeArea(stateAbbrev, e.getValue()[0], asc,
|
||||
geoData));
|
||||
} catch (RuntimeException exc) {
|
||||
statusHandler.handle(Priority.ERROR, "Error generating included watches.", exc);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<Portion> portions = new ArrayList<Portion>(map.size());
|
||||
for (Entry<String, Set<String>> e : map.entrySet()) {
|
||||
Portion portion = new Portion();
|
||||
try {
|
||||
portion.parentRegion = getStateName(e.getKey(), asc, geoData)
|
||||
.toUpperCase();
|
||||
} catch (RuntimeException exc) {
|
||||
statusHandler.handle(Priority.ERROR, "Error generating included watches.", exc);
|
||||
return false;
|
||||
}
|
||||
portion.partOfParentRegion = Area
|
||||
.converFeAreaToPartList(mungeFeAreas(e.getValue()));
|
||||
System.out.format("Munged %s to %s (%s)\n", e.getValue(),
|
||||
mungeFeAreas(e.getValue()), portion.partOfParentRegion);
|
||||
portions.add(portion);
|
||||
}
|
||||
waw.setPortions(portions);
|
||||
// Set legacy values
|
||||
if (portions.size() > 0) {
|
||||
waw.setParentRegion(portions.get(0).parentRegion);
|
||||
waw.setPartOfParentRegion(portions.get(0).partOfParentRegion);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// Based on AWIPS 1 SELSparagraphs.C SELSparagraphs::processWOU().
|
||||
private static String mungeFeAreas(Set<String> feAreas) {
|
||||
String abrev = "";
|
||||
// If eight or more portions, don't qualify area of state
|
||||
int m = feAreas.size();
|
||||
if (m < 8) {
|
||||
String partAbrev = "";
|
||||
/*
|
||||
* TODO: Unused variables should be removed if we are not going to
|
||||
* improve this in A2.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
int nw, nc, ne, wc, cc, ec, sw, sc, se, pa;
|
||||
int eee, www, nnn, sss, ee, ww, nn, ss;
|
||||
|
||||
// Identify individual sub areas of this state affected
|
||||
nw = nc = ne = wc = cc = ec = sw = sc = se = pa = 0;
|
||||
eee = www = nnn = sss = ee = ww = nn = ss = 0;
|
||||
for (String part : feAreas) {
|
||||
if ("pa".equals(part)) {
|
||||
pa = 1;
|
||||
continue;
|
||||
} else if ("nn".equals(part))
|
||||
nnn = nn = 1;
|
||||
else if ("ss".equals(part))
|
||||
sss = ss = 1;
|
||||
else if ("ee".equals(part))
|
||||
eee = ee = 1;
|
||||
else if ("ww".equals(part))
|
||||
www = ww = 1;
|
||||
else if ("nw".equals(part))
|
||||
nnn = www = nw = 1;
|
||||
else if ("nc".equals(part))
|
||||
nnn = nc = 1;
|
||||
else if ("ne".equals(part))
|
||||
nnn = eee = ne = 1;
|
||||
else if ("wc".equals(part))
|
||||
www = wc = 1;
|
||||
else if ("cc".equals(part)) {
|
||||
cc = 1;
|
||||
continue;
|
||||
} else if ("ec".equals(part))
|
||||
eee = ec = 1;
|
||||
else if ("sw".equals(part))
|
||||
sss = www = sw = 1;
|
||||
else if ("sc".equals(part))
|
||||
sss = sc = 1;
|
||||
else if ("se".equals(part))
|
||||
sss = eee = se = 1;
|
||||
partAbrev = part;
|
||||
}
|
||||
// decide how to describe these subareas.
|
||||
if (ne > 0 && nw > 0)
|
||||
nn = 1;
|
||||
if (se > 0 && sw > 0)
|
||||
ss = 1;
|
||||
if (se > 0 && ne > 0)
|
||||
ee = 1;
|
||||
if (sw > 0 && nw > 0)
|
||||
ww = 1;
|
||||
if (nnn > 0 && sss > 0 && eee > 0 && www > 0)
|
||||
return abrev;
|
||||
if (nn > 0 && ss > 0 || ee > 0 && ww > 0)
|
||||
return abrev;
|
||||
if (nnn + sss + eee + www == 3) {
|
||||
if (www == 0) {
|
||||
abrev = "e";
|
||||
} else if (eee == 0) {
|
||||
abrev = "w";
|
||||
} else if (nnn == 0) {
|
||||
abrev = "s";
|
||||
} else if (sss == 0) {
|
||||
abrev = "n";
|
||||
}
|
||||
return abrev;
|
||||
}
|
||||
if (nnn == sss && eee == www || cc == m) {
|
||||
abrev = "c";
|
||||
return abrev;
|
||||
}
|
||||
if (pa != 0 && cc == 0) {
|
||||
abrev = "pa";
|
||||
if (--m <= 0) {
|
||||
return abrev;
|
||||
}
|
||||
}
|
||||
if (m == 1 + cc) {
|
||||
abrev += partAbrev + " ";
|
||||
return abrev;
|
||||
}
|
||||
if (nnn != sss) {
|
||||
abrev += nnn != 0 ? "n" : "s";
|
||||
}
|
||||
if (eee != www) {
|
||||
abrev += eee != 0 ? "e" : "w";
|
||||
}
|
||||
}
|
||||
return abrev;
|
||||
}
|
||||
|
||||
private static String getStateName(String key, AreaSourceConfiguration asc,
|
||||
GeospatialData[] geoData) {
|
||||
for (GeospatialData g : geoData) {
|
||||
if (key.equals((String) g.attributes.get("STATE")))
|
||||
return (String) g.parent.attributes.get("NAME");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getFeArea(String stateAbbrev, String ugc,
|
||||
AreaSourceConfiguration asc, GeospatialData[] geoData) {
|
||||
for (GeospatialData g : geoData) {
|
||||
if (stateAbbrev.equals((String) g.attributes.get("STATE"))
|
||||
&& ((String) g.attributes.get(asc.getFipsField()))
|
||||
.endsWith(ugc))
|
||||
return (String) g.attributes.get(asc.getFeAreaField());
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import java.util.List;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Jul 1, 2009 bwoodle Initial creation
|
||||
* Nov 9, 2012 DR 15430 D. Friedman Support proper watch inclusion language
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -40,12 +41,44 @@ import java.util.List;
|
|||
|
||||
public class WeatherAdvisoryWatch implements Comparable<WeatherAdvisoryWatch> {
|
||||
|
||||
public static class Portion {
|
||||
public String parentRegion;
|
||||
|
||||
public List<String> partOfParentRegion;
|
||||
|
||||
public String getParentRegion() {
|
||||
return parentRegion;
|
||||
}
|
||||
|
||||
public void setParentRegion(String parentRegion) {
|
||||
this.parentRegion = parentRegion;
|
||||
}
|
||||
|
||||
public List<String> getPartOfParentRegion() {
|
||||
return partOfParentRegion;
|
||||
}
|
||||
|
||||
public void setPartOfParentRegion(List<String> partOfParentRegion) {
|
||||
this.partOfParentRegion = partOfParentRegion;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO: NOTE: There is no site field. We currently only process
|
||||
* WCNs for the site and not WOUs from the SPC.
|
||||
*/
|
||||
|
||||
private String phensig;
|
||||
|
||||
private int eventId;
|
||||
|
||||
private Date endTime;
|
||||
|
||||
private List<Portion> portions;
|
||||
|
||||
@Deprecated
|
||||
private String parentRegion;
|
||||
|
||||
@Deprecated
|
||||
private List<String> partOfParentRegion;
|
||||
|
||||
public String getPhensig() {
|
||||
|
@ -64,23 +97,59 @@ public class WeatherAdvisoryWatch implements Comparable<WeatherAdvisoryWatch> {
|
|||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public String getParentRegion() {
|
||||
return parentRegion;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setParentRegion(String parentRegion) {
|
||||
this.parentRegion = parentRegion;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public List<String> getPartOfParentRegion() {
|
||||
return partOfParentRegion;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setPartOfParentRegion(List<String> partOfParentRegion) {
|
||||
this.partOfParentRegion = partOfParentRegion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return obj instanceof WeatherAdvisoryWatch &&
|
||||
this.compareTo((WeatherAdvisoryWatch) obj) == 0;
|
||||
}
|
||||
|
||||
public int compareTo(WeatherAdvisoryWatch waw) {
|
||||
return this.parentRegion.compareTo(waw.getParentRegion());
|
||||
if (this.phensig == null)
|
||||
return waw.phensig == null ? 0 : -1;
|
||||
else if (waw.phensig == null)
|
||||
return 1;
|
||||
else {
|
||||
int c = this.phensig.compareTo(waw.phensig);
|
||||
if (c == 0)
|
||||
return this.eventId - waw.eventId;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
}
|
||||
|
||||
public int getEventId() {
|
||||
return eventId;
|
||||
}
|
||||
|
||||
public void setEventId(int eventId) {
|
||||
this.eventId = eventId;
|
||||
}
|
||||
|
||||
public List<Portion> getPortions() {
|
||||
return portions;
|
||||
}
|
||||
|
||||
public void setPortions(List<Portion> portions) {
|
||||
this.portions = portions;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
##### Qinglu Lin 06-18-2012 DR 15043. Use duration in secondBullet.
|
||||
##### Qinglu Lin 07-31-2012 DR 15217. Use roundAndPad for movement direction in DEG.
|
||||
##### Qinglu Lin 08-13-2012 DR 14493. Use corToNewMarker and corEventtime.
|
||||
##### D. Friedman 11-09-2012 DR 15430. Rework included watches.
|
||||
####################################################################################################
|
||||
Mile Marker Test Code
|
||||
macro "mmarkers" use (called out of VM_global_library.vm):
|
||||
|
@ -146,52 +147,66 @@ ${drainage.name}##
|
|||
|
||||
#macro(inserttorwatches $watches $list $secondtimezone $dateUtil $timeFormat)
|
||||
#set($torWatches = ${watches.getTorWatches()})
|
||||
#if(${list.size($torWatches)} > 0)
|
||||
A TORNADO WATCH REMAINS IN EFFECT UNTIL ${dateUtil.format(${watches.getLatestTorTime()}, ${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
#set($torWatchAlso = "")
|
||||
#set($torWatchFirst = 1)
|
||||
#foreach(${watch} in ${torWatches})
|
||||
#if($torWatchFirst)
|
||||
#set($torWatchFirst = 0)
|
||||
##
|
||||
#end
|
||||
A TORNADO WATCH ${torWatchAlso}REMAINS IN EFFECT UNTIL ${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
${dateUtil.period(${watches.getLatestTorTime()},${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
#if(${secondtimezone})
|
||||
/${dateUtil.format(${list.get($torWatches, 0).endTime}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
|
||||
/${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
|
||||
#end
|
||||
FOR ##
|
||||
#set($numWatches = ${list.size($torWatches)})
|
||||
#set($numPortions = ${list.size(${watch.getPortions()})})
|
||||
#set($count = 0)
|
||||
#foreach(${watch} in ${torWatches})
|
||||
#foreach(${portion} in ${watch.getPortions()})
|
||||
#set($count = $count + 1)
|
||||
#areaFormat(${watch.partOfParentRegion} true false) ${watch.parentRegion}##
|
||||
#if($count == $numWatches - 1)
|
||||
#areaFormat(${portion.partOfParentRegion} true false) ${portion.parentRegion}##
|
||||
#if($count == $numPortions - 1)
|
||||
AND ##
|
||||
#elseif($count < $numWatches)
|
||||
#elseif($count < $numPortions)
|
||||
...##
|
||||
#end
|
||||
#end
|
||||
.
|
||||
|
||||
#set($torWatchAlso = "ALSO ")
|
||||
.##
|
||||
#end
|
||||
|
||||
#end
|
||||
|
||||
#macro(insertsvrwatches $watches $list $secondtimezone $dateUtil $timeFormat)
|
||||
#set($svrWatches = ${watches.getSvrWatches()})
|
||||
#if(${list.size($svrWatches)} > 0)
|
||||
A SEVERE THUNDERSTORM WATCH REMAINS IN EFFECT UNTIL ${dateUtil.format(${watches.getLatestSvrTime()}, ${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
#set($svrWatchAlso = "")
|
||||
#set($svrWatchFirst = 1)
|
||||
#foreach(${watch} in ${svrWatches})
|
||||
#if($svrWatchFirst)
|
||||
#set($svrWatchFirst = 0)
|
||||
##
|
||||
#end
|
||||
A SEVERE THUNDERSTORM WATCH ${svrWatchAlso}REMAINS IN EFFECT UNTIL ${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
${dateUtil.period(${watches.getLatestSvrTime()},${timeFormat.plain}, 15, ${localtimezone})}##
|
||||
#if(${secondtimezone})
|
||||
/${dateUtil.format(${list.get($svrWatches, 0).endTime}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
|
||||
/${dateUtil.format(${watch.getEndTime()}, ${timeFormat.plain}, 15, ${secondtimezone})}/##
|
||||
#end
|
||||
FOR ##
|
||||
#set($numWatches = ${list.size($svrWatches)})
|
||||
#set($numPortions = ${list.size(${watch.getPortions()})})
|
||||
#set($count = 0)
|
||||
#foreach(${watch} in ${svrWatches})
|
||||
#foreach(${portion} in ${watch.getPortions()})
|
||||
#set($count = $count + 1)
|
||||
#areaFormat(${watch.partOfParentRegion} true false) ${watch.parentRegion}##
|
||||
#if($count == $numWatches - 1)
|
||||
#areaFormat(${portion.partOfParentRegion} true false) ${portion.parentRegion}##
|
||||
#if($count == $numPortions - 1)
|
||||
AND ##
|
||||
#elseif($count < $numWatches)
|
||||
#elseif($count < $numPortions)
|
||||
...##
|
||||
#end
|
||||
#end
|
||||
.
|
||||
|
||||
#set($svrWatchAlso = "ALSO ")
|
||||
.##
|
||||
#end
|
||||
|
||||
#end
|
||||
|
||||
#macro(printcoords $coordinates $list)
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>250160</name>
|
||||
<description>QPF Grid for TIR (Ohio Basin RFC Wilmington, Ohio)</description>
|
||||
<la1>36.19</la1>
|
||||
<lo1>-91.347</lo1>
|
||||
<la1>36.203</la1>
|
||||
<lo1>-91.320</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>250</nx>
|
||||
<ny>260</ny>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240161</name>
|
||||
<description>HRAP Grid for ALR (Southeast RFC Peachtree, Georgia)</description>
|
||||
<la1>27.033</la1>
|
||||
<lo1>-91.417</lo1>
|
||||
<la1>27.045</la1>
|
||||
<lo1>-91.395</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>335</nx>
|
||||
<ny>412</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240162</name>
|
||||
<description>HRAP Grid for WFR (West Gulf RFC Fort Worth, Texas)</description>
|
||||
<la1>24.852</la1>
|
||||
<lo1>-108.99</lo1>
|
||||
<la1>24.869</la1>
|
||||
<lo1>-108.973</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>425</nx>
|
||||
<ny>390</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240156</name>
|
||||
<description>HRAP Grid for KRF (Missouri Basin RFC Pleasant Hill, Missouri)</description>
|
||||
<la1>37.275</la1>
|
||||
<lo1>-112.71</lo1>
|
||||
<la1>37.296</la1>
|
||||
<lo1>-112.690</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>485</nx>
|
||||
<ny>325</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240157</name>
|
||||
<description>HRAP Grid for MSR (North Central RFC Chanhassen, Minnesota)</description>
|
||||
<la1>37.87</la1>
|
||||
<lo1>-105.515</lo1>
|
||||
<la1>37.889</la1>
|
||||
<lo1>-105.492</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>450</nx>
|
||||
<ny>350</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240154</name>
|
||||
<description>HRAP Grid for ORN (Lower Mississippi RFC Slidel, Louisiana)</description>
|
||||
<la1>28.686</la1>
|
||||
<lo1>-98.791</lo1>
|
||||
<la1>28.701</la1>
|
||||
<lo1>-98.770</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>419</nx>
|
||||
<ny>419</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240159</name>
|
||||
<description>HRAP Grid for PTR (Northwest RFC Portland, Oregon)</description>
|
||||
<la1>37.952</la1>
|
||||
<lo1>-124.207</lo1>
|
||||
<la1>38.00</la1>
|
||||
<lo1>-124.179</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>400</nx>
|
||||
<ny>378</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240155</name>
|
||||
<description>HRAP Grid for RHA (Middle Atlantic RFC State College, PA)</description>
|
||||
<la1>38.025</la1>
|
||||
<lo1>-83.346</lo1>
|
||||
<la1>38.035</la1>
|
||||
<lo1>-83.315</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>200</nx>
|
||||
<ny>200</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240153</name>
|
||||
<description>HRAP Grid for RSA (California-Nevada RFC Sacramento, California)</description>
|
||||
<la1>30.91</la1>
|
||||
<lo1>-120.872</lo1>
|
||||
<la1>30.931</la1>
|
||||
<lo1>-120.858</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>235</nx>
|
||||
<ny>335</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240152</name>
|
||||
<description>HRAP Grid for STR (Colorado Basin RFC Salt Lake City, Utah)</description>
|
||||
<la1>30.027</la1>
|
||||
<lo1>-114.429</lo1>
|
||||
<la1>30.047</la1>
|
||||
<lo1>-114.413</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>260</nx>
|
||||
<ny>360</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240158</name>
|
||||
<description>HRAP Grid for TAR (Northeast RFC Taunton, Massachusetts)</description>
|
||||
<la1>42.057</la1>
|
||||
<lo1>-80.004</lo1>
|
||||
<la1>42.066</la1>
|
||||
<lo1>-79.970</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>180</nx>
|
||||
<ny>235</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -21,13 +21,13 @@
|
|||
<polarStereoGridCoverage>
|
||||
<name>240150</name>
|
||||
<description>HRAP Grid for TUA (Arkansas-Red River RFC Tulsa, Oklahoma)</description>
|
||||
<la1>33.603</la1>
|
||||
<lo1>-106.455</lo1>
|
||||
<la1>33.621</la1>
|
||||
<lo1>-106.434</lo1>
|
||||
<firstGridPointCorner>LowerLeft</firstGridPointCorner>
|
||||
<nx>335</nx>
|
||||
<ny>159</ny>
|
||||
<dx>4.762</dx>
|
||||
<dy>4.762</dy>
|
||||
<dx>4.7625</dx>
|
||||
<dy>4.7625</dy>
|
||||
<spacingUnit>km</spacingUnit>
|
||||
<minorAxis>6371229.0</minorAxis>
|
||||
<majorAxis>6371229.0</majorAxis>
|
||||
|
|
|
@ -45,6 +45,8 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Jan 14, 2010 chammack Initial creation
|
||||
*
|
||||
* 10/30/2012 15448 Xiaochuan Check if container != null first in from().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -157,6 +159,8 @@ public class PointDataThriftContainer implements ISerializableObject {
|
|||
List<StringPointDataObject> stringTypes = new ArrayList<StringPointDataObject>();
|
||||
List<LongPointDataObject> longTypes = new ArrayList<LongPointDataObject>();
|
||||
|
||||
if( container != null )
|
||||
{
|
||||
for (Map.Entry<String, AbstractPointDataObject<?>> v : container.pointDataTypes
|
||||
.entrySet()) {
|
||||
AbstractPointDataObject<?> o = v.getValue();
|
||||
|
@ -173,6 +177,7 @@ public class PointDataThriftContainer implements ISerializableObject {
|
|||
+ o.getClass().getName()
|
||||
+ ". Code must be updated to support new type");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pdtc.intData = intTypes
|
||||
|
@ -185,6 +190,7 @@ public class PointDataThriftContainer implements ISerializableObject {
|
|||
.size()]);
|
||||
|
||||
pdtc.size = container.getAllocatedSz();
|
||||
}
|
||||
|
||||
return pdtc;
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<purgeRuleSet>
|
||||
<defaultRule>
|
||||
<versionsToKeep>24</versionsToKeep>
|
||||
<delta>=00-01:00:00</delta>
|
||||
<round>00-01:00:00</round>
|
||||
</defaultRule>
|
||||
</purgeRuleSet>
|
Loading…
Add table
Reference in a new issue