CM-MERGE:OB13.5.6-4 into 14.1.3
Former-commit-id:8ecdd9a192
[formerly 86dc406cd227362abc5274f4cd64813ceb91d00d] Former-commit-id:399c06820a
This commit is contained in:
parent
06c565d74f
commit
be589ceb9b
8 changed files with 115 additions and 36 deletions
|
@ -100,6 +100,8 @@ import com.vividsolutions.jts.geom.LineString;
|
|||
* 06-24-2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
* 04-07-2014 DR 17232 D. Friedman Make sure pivot indexes are valid.
|
||||
* 06-03-14 3191 njensen Fix postData to not retrieve
|
||||
* 06-17-2014 DR17409 mgamazaychikov Fix futurePoints calculation in generateNewTrackInfo()
|
||||
* and generateExistingTrackInfo()
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -910,7 +912,7 @@ public class StormTrackDisplay implements IRenderable {
|
|||
// time, the arrow of the pathcast is drawn behind the last frame
|
||||
if (state.duration >= 0) {
|
||||
for (int i = 1; i < futurePoints.length - (remainder == 0 ? 0 : 1); ++i) {
|
||||
timeInMillis += minIntervalInSeconds * 1000;
|
||||
timeInMillis += interval * 60 * 1000;
|
||||
DataTime time = new DataTime(new Date(timeInMillis));
|
||||
|
||||
double distance = speed
|
||||
|
@ -1062,7 +1064,7 @@ public class StormTrackDisplay implements IRenderable {
|
|||
// time, the arrow of the pathcast is drawn behind the last frame
|
||||
if (state.duration >= 0) {
|
||||
for (int i = 1; i < futurePoints.length - (remainder == 0 ? 0 : 1); ++i) {
|
||||
timeInMillis += minIntervalInSeconds * 1000;
|
||||
timeInMillis += interval * 60 * 1000;
|
||||
DataTime time = new DataTime(new Date(timeInMillis));
|
||||
|
||||
double distance = speed
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
package com.raytheon.viz.warngen.gis;
|
||||
|
||||
import java.awt.geom.Point2D;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.EnumSet;
|
||||
|
@ -29,6 +30,7 @@ import java.util.List;
|
|||
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.warning.util.CountyUserData;
|
||||
import com.vividsolutions.jts.geom.Coordinate;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.GeometryFactory;
|
||||
|
@ -53,6 +55,8 @@ import com.vividsolutions.jts.geom.GeometryFactory;
|
|||
* 0.10 to 0.0625 for EXTREME_DELTA; Added/modified code.
|
||||
* May 1, 2013 1963 jsanchez Refactored calculatePortion to match A1. Do not allow 'Central' to be included if East and West is included.
|
||||
* Jun 3, 2013 2029 jsanchez Updated A1 special case for calculating a central portion. Allowed East Central and West Central.
|
||||
* Jun 17, 2014 DR 17390 Qinglu Lin Update calculateLocationPortion(). Use centroid in maps county table for geomCentroid
|
||||
* for county based products.
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -344,13 +348,22 @@ public class GisUtil {
|
|||
* @return
|
||||
*/
|
||||
public static EnumSet<Direction> calculateLocationPortion(
|
||||
Geometry locationGeom, Geometry reference, boolean useExtreme) {
|
||||
Geometry locationGeom, Geometry reference, boolean useExtreme, boolean notUseShapefileCentroid) {
|
||||
for (int i = 0; i < locationGeom.getNumGeometries(); i++) {
|
||||
Geometry geom = locationGeom.getGeometryN(i);
|
||||
if (geom.intersects(reference)) {
|
||||
|
||||
Coordinate geomCentroid = geom.getEnvelope().getCentroid()
|
||||
.getCoordinate();
|
||||
Coordinate geomCentroid = null;
|
||||
if (notUseShapefileCentroid) {
|
||||
geomCentroid = geom.getEnvelope().getCentroid()
|
||||
.getCoordinate();
|
||||
} else {
|
||||
geomCentroid = new Coordinate();
|
||||
geomCentroid.x = ((BigDecimal)((CountyUserData)geom.getUserData()).
|
||||
entry.attributes.get("LON")).doubleValue();
|
||||
geomCentroid.y = ((BigDecimal)((CountyUserData)geom.getUserData()).
|
||||
entry.attributes.get("LAT")).doubleValue();
|
||||
}
|
||||
Coordinate refCentroid = reference.getCentroid()
|
||||
.getCoordinate();
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import java.util.EnumSet;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.warning.util.CountyUserData;
|
||||
import com.raytheon.viz.warngen.gis.GisUtil.Direction;
|
||||
import com.raytheon.viz.warngen.gui.WarngenLayer;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
|
@ -39,6 +40,7 @@ import com.vividsolutions.jts.geom.Geometry;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* Aug 5, 2013 2177 jsanchez Initial creation
|
||||
* Sep 22, 2013 2177 jsanchez Updated logic. Used GisUtil for very small portions.
|
||||
* Jun 17, 2014 DR 17390 Qinglu Lin Update getPortions().
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -78,8 +80,15 @@ public class PortionsUtil {
|
|||
// This takes into account the warned areas that are very small
|
||||
// the convex hull of the warned area is used for case the
|
||||
// warnedArea is a geometry collection.
|
||||
portions = GisUtil.calculateLocationPortion(countyOrZone,
|
||||
warnedArea.convexHull(), useExtreme);
|
||||
CountyUserData cud = (CountyUserData) countyOrZone.getUserData();
|
||||
String countyName = (String) cud.entry.attributes.get("COUNTYNAME");
|
||||
if (countyName == null) {
|
||||
portions = GisUtil.calculateLocationPortion(countyOrZone,
|
||||
warnedArea.convexHull(), useExtreme, true);
|
||||
} else {
|
||||
portions = GisUtil.calculateLocationPortion(countyOrZone,
|
||||
warnedArea.convexHull(), useExtreme, false);
|
||||
}
|
||||
} else {
|
||||
portions = getAreaDesc(entityData.getMeanMask(),
|
||||
entityData.getCoverageMask(), entityData.getOctants(),
|
||||
|
|
|
@ -115,6 +115,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Jun 24, 2013 DR 16317 D. Friedman Handle "motionless" track.
|
||||
* Jun 25, 2013 16224 Qinglu Lin Resolved the issue with "Date start" for pathcast in CON.
|
||||
* Apr 29, 2014 3033 jsanchez Updated method to retrieve files in localization.
|
||||
* Jun 17, 2014 DR 17390 Qinglu Lin Updated getClosestPoints().
|
||||
* </pre>
|
||||
*
|
||||
* @author chammack
|
||||
|
@ -766,7 +767,7 @@ public class Wx {
|
|||
cp.partOfArea = GisUtil.asStringList(GisUtil
|
||||
.calculateLocationPortion(
|
||||
cp.prepGeom.getGeometry(), reference,
|
||||
false));
|
||||
false, true));
|
||||
distance = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,6 +63,7 @@ import com.raytheon.uf.edex.core.EdexException;
|
|||
* ------------ ---------- ----------- --------------------------
|
||||
* ??? ??, 20?? wldougher Initial creation
|
||||
* Jun 09, 2014 #3268 dgilling Ensure code works in multi-domain scenarios.
|
||||
* Jun 13, 2014 #3278 dgilling Ensure temporary files get deleted.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -152,7 +153,13 @@ public class WCLWatchSrv {
|
|||
// Move the file to the wcl folder
|
||||
// Rename it to <wclDir>/<completeProductPil>
|
||||
statusHandler.info("Placing WCL Procedure Utility in ifpServer ");
|
||||
makePermanent(tmpFile, completeProductPil, siteIDs);
|
||||
try {
|
||||
makePermanent(tmpFile, completeProductPil, siteIDs);
|
||||
} finally {
|
||||
if (tmpFile != null) {
|
||||
tmpFile.delete();
|
||||
}
|
||||
}
|
||||
|
||||
if (doNotify && wclInfo.getNotify()) {
|
||||
for (String siteID : sitesToNotify) {
|
||||
|
@ -166,40 +173,22 @@ public class WCLWatchSrv {
|
|||
}
|
||||
|
||||
statusHandler.debug("handleWclWatch() ending");
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert a temporary parsed WCL file to a permanent one by moving it to
|
||||
* the WCL directory. This is done through File.renameTo(). Unfortunately,
|
||||
* that method returns a boolean success flag rather than throwing an error,
|
||||
* so all we can do is tell the user that the rename failed, not why.
|
||||
*
|
||||
* @param wclData
|
||||
* WCL data to write to file.
|
||||
* @param completeProductPil
|
||||
* The simple name of the file.
|
||||
*
|
||||
* @throws EdexException
|
||||
* if WCL file cannot be opened, written, or closed.
|
||||
*/
|
||||
/**
|
||||
* Convert a temporary parsed WCL file to a permanent one by moving it to
|
||||
* the WCL directory. This is done through File.renameTo(). Unfortunately,
|
||||
* that method returns a boolean success flag rather than throwing an error,
|
||||
* so all we can do is tell the user that the rename failed, not why.
|
||||
* Convert a temporary parsed WCL file to a permanent one by copying its
|
||||
* contents to the localization path cave_static.SITE/gfe/wcl/ for each of
|
||||
* the specified sites.
|
||||
*
|
||||
* @param tmpFile
|
||||
* The temporary file (may be null)
|
||||
* The temporary file (may be {@code null})
|
||||
* @param completeProductPil
|
||||
* The simple name of the file.
|
||||
* The base name of the files to write.
|
||||
* @param siteIDs
|
||||
* The set of siteIDs to write out the WCL data for.
|
||||
* @throws EdexException
|
||||
* if tmpFile cannot be renamed.
|
||||
*/
|
||||
protected void makePermanent(File tmpFile, String completeProductPil,
|
||||
Collection<String> siteIDs) throws EdexException {
|
||||
Collection<String> siteIDs) {
|
||||
statusHandler.debug("makePermanent(" + tmpFile + ","
|
||||
+ completeProductPil + ") started");
|
||||
if (tmpFile != null) {
|
||||
|
@ -243,7 +232,7 @@ public class WCLWatchSrv {
|
|||
File tmpFile = null;
|
||||
PrintStream wclOut = null;
|
||||
try {
|
||||
tmpFile = File.createTempFile("wcl", null, null);
|
||||
tmpFile = File.createTempFile("wcl", null);
|
||||
wclOut = new PrintStream(tmpFile);
|
||||
wclOut.println(wclStr);
|
||||
} catch (IOException e) {
|
||||
|
|
|
@ -60,6 +60,7 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory;
|
|||
* So, do not add the returned value of getFeAreaField()
|
||||
* to areaFields.
|
||||
* Jan 9, 2013 15600 Qinglu Lin Execute "timezones = myTimeZones;" even if timezones != null.
|
||||
* Jun 17, 2014 DR 17390 Qinglu Lin Updated getMetaDataMap() for lonField and latField.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -211,6 +212,9 @@ public class GeospatialFactory {
|
|||
areaFields.add(feAreaField);
|
||||
}
|
||||
|
||||
areaFields.add("LON");
|
||||
areaFields.add("LAT");
|
||||
|
||||
if (timeZoneField != null) {
|
||||
areaFields.add(timeZoneField);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,34 @@
|
|||
#!/bin/bash
|
||||
##
|
||||
# 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.
|
||||
##
|
||||
##############################################################################
|
||||
# Process Received Digital Grids
|
||||
# This is run at the backup site to merge the failed site's grids into the
|
||||
# Fcst database.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 06/16/15 3276 randerso Added -T to iscMosaic call
|
||||
##############################################################################
|
||||
|
||||
import_file=${1}
|
||||
log_msg Processing file: $import_file
|
||||
|
@ -98,7 +128,7 @@ log_msg "CDSPORT is $CDSPORT"
|
|||
|
||||
log_msg Beginning iscMosaic
|
||||
log_msg 75
|
||||
${GFESUITE_BIN}/iscMosaic -h $SVCBU_HOST -r $CDSPORT -d ${SITE}_GRID__Fcst_00000000_0000 -f ${SVCBU_HOME}/${failed_site}Grd.netcdf.gz -n
|
||||
${GFESUITE_BIN}/iscMosaic -h $SVCBU_HOST -r $CDSPORT -d ${SITE}_GRID__Fcst_00000000_0000 -f ${SVCBU_HOME}/${failed_site}Grd.netcdf.gz -n -T
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
log_msg "ERROR: iscMosaic failed to import grids from ${SITE}_GRID__Fcst_00000000_0000"
|
||||
|
|
|
@ -1,4 +1,35 @@
|
|||
#!/bin/bash
|
||||
##
|
||||
# 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.
|
||||
##
|
||||
##############################################################################
|
||||
# Receive grids from backup site
|
||||
# This script is run when importing your digital data back from the backup site.
|
||||
# The grids are placed in the Restore database.
|
||||
#
|
||||
# SOFTWARE HISTORY
|
||||
#
|
||||
# Date Ticket# Engineer Description
|
||||
# ------------ ---------- ----------- --------------------------
|
||||
# 06/16/15 3276 randerso Added -T to iscMosaic call
|
||||
##############################################################################
|
||||
|
||||
if [ ${#AWIPS_HOME} = 0 ]
|
||||
then
|
||||
path_to_script=`readlink -f $0`
|
||||
|
@ -94,7 +125,7 @@ if [ -a ${import_file} ]
|
|||
then
|
||||
#use iscMosaic to load grids into databases
|
||||
log_msg "Running iscMosaic to unpack griddded data..."
|
||||
${GFESUITE_BIN}/iscMosaic -h $SVCBU_HOST -r $CDSPORT -d ${SITE}_GRID__Restore_00000000_0000 -f ${import_file} -n -x
|
||||
${GFESUITE_BIN}/iscMosaic -h $SVCBU_HOST -r $CDSPORT -d ${SITE}_GRID__Restore_00000000_0000 -f ${import_file} -n -T -x
|
||||
if [ $? -ne 0 ];
|
||||
then
|
||||
log_msg "ERROR: iscMosaic failed to run correctly. Please re-run iscMosaic manually."
|
||||
|
|
Loading…
Add table
Reference in a new issue