Omaha #5003: Update A2 baseline code to utilize apache commons-lang version 3.
Change-Id: I2b23399b2cfd3d37a41f89cb3c3173ca628caecb Former-commit-id: b9c41fe3354a90a03440e1ea67991e6ecd5885c0
This commit is contained in:
parent
230c3dd997
commit
648bb0e367
158 changed files with 2578 additions and 2508 deletions
|
@ -2,11 +2,11 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Archive
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.archive;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: org.eclipse.ui;bundle-version="3.8.2",
|
||||
org.eclipse.core.runtime,
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
org.apache.commons.io;bundle-version="2.4.0",
|
||||
com.raytheon.viz.ui;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.events.MouseAdapter;
|
||||
import org.eclipse.swt.events.MouseEvent;
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Core Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.d2d.core;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.ui,
|
||||
|
@ -14,7 +14,7 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
com.raytheon.uf.viz.core.rsc;bundle-version="1.0.0",
|
||||
com.raytheon.uf.viz.core.maps;bundle-version="1.12.1174",
|
||||
com.raytheon.viz.ui;bundle-version="1.12.1174",
|
||||
org.apache.commons.lang;bundle-version="2.3.0"
|
||||
org.apache.commons.lang3;bundle-version="3.4.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.viz.d2d.core,
|
||||
|
|
|
@ -33,7 +33,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.status.IUFStatusHandler;
|
||||
|
@ -1048,8 +1048,9 @@ public class D2DTimeMatcher extends AbstractTimeMatcher {
|
|||
IRenderableDisplay paneDisplay = pane.getRenderableDisplay();
|
||||
IDescriptor paneDescriptor = paneDisplay != null ? paneDisplay
|
||||
.getDescriptor() : null;
|
||||
if (paneDescriptor == descriptor)
|
||||
if (paneDescriptor == descriptor) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Ffmp Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.monitor.ffmp;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Activator: com.raytheon.uf.viz.monitor.ffmp.Activator
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
|
@ -14,7 +14,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.viz.ui;bundle-version="1.10.13",
|
||||
com.raytheon.uf.viz.monitor;bundle-version="1.11.1",
|
||||
com.raytheon.uf.common.dataplugin.ffmp;bundle-version="1.11.9",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
com.raytheon.uf.viz.d2d.core;bundle-version="1.11.15",
|
||||
com.raytheon.uf.viz.localization,
|
||||
com.raytheon.uf.common.serialization,
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Safeseas Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.monitor.safeseas;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
|
@ -20,7 +20,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.viz.monitor.fog;bundle-version="1.12.1174"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Import-Package: com.raytheon.viz.pointdata,
|
||||
org.apache.commons.lang
|
||||
Import-Package: com.raytheon.viz.pointdata
|
||||
Export-Package: com.raytheon.uf.viz.monitor.safeseas.resources
|
||||
Bundle-ClassPath: com.raytheon.uf.viz.monitor.safeseas.jar
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Monitor Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.monitor;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Activator: com.raytheon.uf.viz.monitor.Activator
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
|
@ -13,7 +13,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
org.geotools;bundle-version="2.4.0",
|
||||
com.raytheon.viz.alerts;bundle-version="1.10.13",
|
||||
com.raytheon.uf.common.monitor;bundle-version="1.11.17",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
com.raytheon.uf.common.wxmath
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.viz.monitor,
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Stats
|
||||
Bundle-SymbolicName: com.raytheon.uf.viz.stats;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
|
@ -13,8 +13,7 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.common.util;bundle-version="1.12.1174",
|
||||
com.google.guava;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.units;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.event;bundle-version="1.0.0",
|
||||
org.apache.commons.lang;bundle-version="2.3.0"
|
||||
com.raytheon.uf.common.event;bundle-version="1.0.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.uf.viz.stats.collector,
|
||||
|
|
|
@ -24,7 +24,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.viz.ui.personalities.awips;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.application;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.tafqueue;bundle-version="1.0.0",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
com.raytheon.uf.common.auth;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.viz.datacube,
|
||||
com.raytheon.uf.common.dataplugin.taf
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Avnconfig Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.avnconfig;singleton:=true
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Version: 1.15.1.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.avnconfig.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
|
@ -10,8 +10,8 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.viz.core,
|
||||
com.raytheon.viz.ui;bundle-version="1.11.9",
|
||||
org.geotools,
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
com.raytheon.viz.pointdata;bundle-version="1.15.0"
|
||||
com.raytheon.viz.pointdata;bundle-version="1.15.0",
|
||||
org.apache.commons.configuration;bundle-version="1.10.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: com.raytheon.uf.common.dataplugin.persist,
|
||||
|
@ -22,8 +22,7 @@ Import-Package: com.raytheon.uf.common.dataplugin.persist,
|
|||
com.raytheon.uf.common.pointdata.spatial,
|
||||
com.raytheon.uf.common.serialization.comm,
|
||||
com.raytheon.uf.common.time,
|
||||
com.raytheon.uf.common.util,
|
||||
org.apache.commons.configuration
|
||||
com.raytheon.uf.common.util
|
||||
Export-Package: com.raytheon.viz.avncommon,
|
||||
com.raytheon.viz.avnconfig
|
||||
Bundle-ClassPath: com.raytheon.viz.avnconfig.jar
|
||||
|
|
|
@ -2,13 +2,12 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Awipstools Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.awipstools;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.awipstools.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Eclipse-RegisterBuddy: org.apache.velocity, com.raytheon.uf.viz.core.rsc
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.ui,
|
||||
org.apache.commons.lang,
|
||||
com.raytheon.viz.ui,
|
||||
javax.measure,
|
||||
com.raytheon.uf.common.pointdata,
|
||||
|
|
|
@ -2,14 +2,13 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: BCD Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.bcd;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
com.raytheon.viz.core,
|
||||
com.raytheon.viz.ui,
|
||||
org.geotools,
|
||||
org.apache.commons.lang,
|
||||
com.raytheon.uf.viz.core.maps;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.pointdata;bundle-version="1.12.1174"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Viz Data Access
|
||||
Bundle-SymbolicName: com.raytheon.viz.dataaccess
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Version: 1.15.1.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Bundle-ActivationPolicy: lazy
|
||||
|
@ -10,7 +10,7 @@ Require-Bundle: com.raytheon.uf.viz.core;bundle-version="1.14.0",
|
|||
com.raytheon.uf.common.dataaccess;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.colormap;bundle-version="1.12.1174",
|
||||
javax.measure;bundle-version="1.0.0",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
com.raytheon.uf.common.style;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.numeric;bundle-version="1.14.0",
|
||||
com.raytheon.uf.viz.core.grid;bundle-version="1.15.0",
|
||||
|
|
|
@ -21,7 +21,7 @@ package com.raytheon.viz.dataaccess.rsc;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
import com.raytheon.uf.viz.core.IGraphicsTarget;
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
||||
import com.raytheon.uf.common.dataaccess.geom.IGeometryData;
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.Map;
|
|||
|
||||
import javax.measure.unit.UnitFormat;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Geotiff Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.geotiff;singleton:=true
|
||||
Bundle-Version: 1.14.1.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.geotiff.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
|
@ -10,7 +10,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.viz.core,
|
||||
org.geotools,
|
||||
com.raytheon.viz.ui,
|
||||
org.apache.commons.lang,
|
||||
com.raytheon.uf.viz.core.maps;bundle-version="1.12.1174"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: GFE Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.gfe;singleton:=true
|
||||
Bundle-Version: 1.15.1.qualifier
|
||||
Bundle-Version: 1.15.2.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.gfe.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
|
@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.viz.spellchecker;bundle-version="1.0.0";resolution:=optional,
|
||||
javax.measure,
|
||||
com.raytheon.viz.ui,
|
||||
org.apache.commons.lang,
|
||||
org.jep,
|
||||
org.apache.velocity,
|
||||
com.raytheon.viz.core.contours,
|
||||
|
@ -38,7 +37,8 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.uf.common.plugin.nwsauth;bundle-version="1.14.0",
|
||||
com.raytheon.uf.viz.core.grid;bundle-version="1.15.0",
|
||||
com.raytheon.uf.common.dataaccess;bundle-version="1.15.0",
|
||||
com.raytheon.uf.viz.core.point;bundle-version="1.15.0"
|
||||
com.raytheon.uf.viz.core.point;bundle-version="1.15.0",
|
||||
org.apache.commons.lang3;bundle-version="3.4.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.viz.gfe,
|
||||
com.raytheon.viz.gfe.constants,
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Arrays;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.mutable.MutableByte;
|
||||
import org.apache.commons.lang3.mutable.MutableByte;
|
||||
import org.geotools.geometry.jts.JTS;
|
||||
import org.opengis.metadata.spatial.PixelOrientation;
|
||||
import org.opengis.referencing.FactoryException;
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Arrays;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.mutable.MutableByte;
|
||||
import org.apache.commons.lang3.mutable.MutableByte;
|
||||
import org.geotools.geometry.jts.JTS;
|
||||
import org.opengis.metadata.spatial.PixelOrientation;
|
||||
import org.opengis.referencing.FactoryException;
|
||||
|
|
|
@ -25,11 +25,10 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.commands.ICommandService;
|
||||
|
||||
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
|
||||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.common.time.DataTime;
|
||||
|
@ -42,7 +41,6 @@ import com.raytheon.uf.viz.core.exception.VizException;
|
|||
import com.raytheon.uf.viz.core.rsc.AbstractVizResource;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceList;
|
||||
import com.raytheon.uf.viz.core.rsc.ResourceProperties;
|
||||
import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability;
|
||||
import com.raytheon.viz.gfe.Activator;
|
||||
import com.raytheon.viz.gfe.GFEOperationFailedException;
|
||||
import com.raytheon.viz.gfe.actions.ShowISCMarkersAction;
|
||||
|
@ -164,6 +162,7 @@ public abstract class AbstractSpatialDisplayManager implements
|
|||
*
|
||||
* @see com.raytheon.viz.gfe.core.ISpatialDisplayManager#getActivatedParm()
|
||||
*/
|
||||
@Override
|
||||
public Parm getActivatedParm() {
|
||||
return activeParm;
|
||||
}
|
||||
|
@ -186,6 +185,7 @@ public abstract class AbstractSpatialDisplayManager implements
|
|||
* addActivatedParmChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IActivatedParmChangedListener)
|
||||
*/
|
||||
@Override
|
||||
public void addActivatedParmChangedListener(
|
||||
IActivatedParmChangedListener listener) {
|
||||
Validate.notNull(listener, "Attempting to add null listener");
|
||||
|
@ -199,6 +199,7 @@ public abstract class AbstractSpatialDisplayManager implements
|
|||
* removeActivatedParmChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IActivatedParmChangedListener)
|
||||
*/
|
||||
@Override
|
||||
public void removeActivatedParmChangedListener(
|
||||
IActivatedParmChangedListener parmChangeListener) {
|
||||
this.activatedParmChangedListeners.remove(parmChangeListener);
|
||||
|
@ -238,6 +239,7 @@ public abstract class AbstractSpatialDisplayManager implements
|
|||
* addGridVisibilityChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IGridVisibilityChangedListener)
|
||||
*/
|
||||
@Override
|
||||
public void addGridVisibilityChangedListener(
|
||||
IGridVisibilityChangedListener listener) {
|
||||
Validate.notNull(listener, "Attempting to add null listener");
|
||||
|
@ -251,6 +253,7 @@ public abstract class AbstractSpatialDisplayManager implements
|
|||
* removeGridVisibilityChangedListener
|
||||
* (com.raytheon.viz.gfe.core.msgs.IGridVisibilityChangedListener)
|
||||
*/
|
||||
@Override
|
||||
public void removeGridVisibilityChangedListener(
|
||||
IGridVisibilityChangedListener parmChangeListener) {
|
||||
this.gridVisibilityChangedListeners.remove(parmChangeListener);
|
||||
|
@ -491,6 +494,7 @@ public abstract class AbstractSpatialDisplayManager implements
|
|||
* com.raytheon.viz.gfe.core.ISpatialDisplayManager#activateParm(com.raytheon
|
||||
* .viz.gfe.core.parm.Parm)
|
||||
*/
|
||||
@Override
|
||||
public void activateParm(Parm parmToActivate)
|
||||
throws GFEOperationFailedException {
|
||||
// Keep any resources on descriptors in sync
|
||||
|
@ -504,11 +508,11 @@ public abstract class AbstractSpatialDisplayManager implements
|
|||
if (props.isSystemResource()) {
|
||||
continue;
|
||||
}
|
||||
Parm parm = ((GFEResource) rsc).getParm();
|
||||
Parm parm = rsc.getParm();
|
||||
if (parm.equals(parmToActivate)) {
|
||||
props.setVisible(true);
|
||||
}
|
||||
((GFEResource) rsc).reset();
|
||||
rsc.reset();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
import org.apache.commons.lang.mutable.MutableInt;
|
||||
import org.apache.commons.lang3.mutable.MutableInt;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.DatabaseID;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.viz.gfe.core.parm;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.eclipse.core.runtime.ListenerList;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
|
||||
|
|
|
@ -22,7 +22,7 @@ package com.raytheon.viz.gfe.dialogs.formatterlauncher;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.WordUtils;
|
||||
import org.apache.commons.lang3.text.WordUtils;
|
||||
import org.eclipse.jface.dialogs.IDialogConstants;
|
||||
import org.eclipse.swt.SWT;
|
||||
import org.eclipse.swt.custom.ScrolledComposite;
|
||||
|
|
|
@ -33,7 +33,7 @@ import java.util.TreeSet;
|
|||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.runtime.FileLocator;
|
||||
import org.eclipse.jface.dialogs.MessageDialog;
|
||||
import org.eclipse.swt.SWT;
|
||||
|
|
|
@ -35,7 +35,7 @@ import java.util.Random;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
|
||||
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ArrayBlockingQueue;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
|
|
|
@ -10,7 +10,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.viz.core,
|
||||
com.raytheon.viz.ui,
|
||||
org.geotools,
|
||||
org.apache.commons.lang,
|
||||
com.raytheon.uf.viz.core.maps;bundle-version="1.0.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.viz.lpi
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: MPE Ui Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.mpe.ui;singleton:=true
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Version: 1.15.1.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.mpe.ui.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: org.eclipse.core.runtime,
|
||||
|
@ -11,7 +11,7 @@ Require-Bundle: org.eclipse.core.runtime,
|
|||
com.raytheon.viz.mpe,
|
||||
com.raytheon.viz.core.contours,
|
||||
javax.measure,
|
||||
org.apache.commons.lang,
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
com.raytheon.uf.viz.app.launcher,
|
||||
com.raytheon.uf.common.mpe,
|
||||
com.raytheon.uf.common.hydro,
|
||||
|
|
|
@ -32,7 +32,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
@ -97,9 +97,9 @@ public class PlotGriddedFreezeResource extends
|
|||
IMpeResource {
|
||||
|
||||
MPEDisplayManager displayMgr = null;
|
||||
|
||||
|
||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
||||
|
||||
|
||||
private DrawDQCStations ddq = DrawDQCStations.getInstance();
|
||||
|
||||
private GriddedImageDisplay gridDisplay;
|
||||
|
@ -130,9 +130,9 @@ public class PlotGriddedFreezeResource extends
|
|||
|
||||
private List<Colorvalue> colorSet;
|
||||
|
||||
// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
||||
// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
||||
|
||||
// Pcp pcp = DailyQcUtils.pcp;
|
||||
// Pcp pcp = DailyQcUtils.pcp;
|
||||
|
||||
public PlotGriddedFreezeResource(MPEDisplayManager displayMgr,
|
||||
LoadProperties loadProperties, List<Colorvalue> colorSet) {
|
||||
|
@ -213,7 +213,8 @@ public class PlotGriddedFreezeResource extends
|
|||
|
||||
cm.read_file(file, num, dqc.pcp);
|
||||
|
||||
buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi * dqc.getHrap_grid().maxj);
|
||||
buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi
|
||||
* dqc.getHrap_grid().maxj);
|
||||
|
||||
/* Get value in the HRAP grid bins. */
|
||||
for (j = dqc.getHrap_grid().maxj - 1; j >= 0; j--) {
|
||||
|
@ -264,7 +265,8 @@ public class PlotGriddedFreezeResource extends
|
|||
buf.rewind();
|
||||
|
||||
Rectangle extent = new Rectangle(dqc.getHrap_grid().hrap_minx,
|
||||
dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi, dqc.getHrap_grid().maxj);
|
||||
dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi,
|
||||
dqc.getHrap_grid().maxj);
|
||||
|
||||
if (extent.x == 0 && extent.y == 0) {
|
||||
Rectangle coord = null;
|
||||
|
@ -433,8 +435,7 @@ public class PlotGriddedFreezeResource extends
|
|||
@Override
|
||||
protected void paintInternal(IGraphicsTarget target,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
if (buf == null || dqc.grids_flag != 1
|
||||
|| displayMgr.isZflag() != true) {
|
||||
if (buf == null || dqc.grids_flag != 1 || displayMgr.isZflag() != true) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
@ -470,13 +470,14 @@ public class PlotGriddedPrecipResource extends
|
|||
@Override
|
||||
protected void paintInternal(IGraphicsTarget target,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
if (buf == null || (DailyQcUtils.grids_flag != 1 && DailyQcUtils.contour_flag != 1)
|
||||
if (buf == null
|
||||
|| (DailyQcUtils.grids_flag != 1 && DailyQcUtils.contour_flag != 1)
|
||||
|| displayMgr.isQpf() != true) {
|
||||
return;
|
||||
}
|
||||
|
||||
Set<DisplayMode> mode = displayMgr.getDisplayMode();
|
||||
System.out.println("Mode is: "+mode.toString());
|
||||
System.out.println("Mode is: " + mode.toString());
|
||||
|
||||
if (mode.contains(DisplayMode.Image)) {
|
||||
if (gridDisplay == null) {
|
||||
|
|
|
@ -32,7 +32,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
@ -100,9 +100,9 @@ public class PlotGriddedTempResource extends
|
|||
IMpeResource {
|
||||
|
||||
private DailyQcUtils dqc = DailyQcUtils.getInstance();
|
||||
|
||||
|
||||
private DrawDQCStations ddq = DrawDQCStations.getInstance();
|
||||
|
||||
|
||||
MPEDisplayManager displayMgr = null;
|
||||
|
||||
private GriddedImageDisplay2 gridDisplay;
|
||||
|
@ -133,9 +133,9 @@ public class PlotGriddedTempResource extends
|
|||
|
||||
private final List<Colorvalue> colorSet;
|
||||
|
||||
// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
||||
// Hrap_Grid hrap_grid = DailyQcUtils.getHrap_grid();
|
||||
|
||||
// Pcp pcp = DailyQcUtils.pcp;
|
||||
// Pcp pcp = DailyQcUtils.pcp;
|
||||
|
||||
public PlotGriddedTempResource(MPEDisplayManager displayMgr,
|
||||
LoadProperties loadProperties, List<Colorvalue> colorSet) {
|
||||
|
@ -223,7 +223,8 @@ public class PlotGriddedTempResource extends
|
|||
|
||||
cm.read_file(file, num, dqc.pcp);
|
||||
|
||||
buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi * dqc.getHrap_grid().maxj);
|
||||
buf = FloatBuffer.allocate(dqc.getHrap_grid().maxi
|
||||
* dqc.getHrap_grid().maxj);
|
||||
|
||||
/* Get value in the HRAP grid bins. */
|
||||
for (j = dqc.getHrap_grid().maxj - 1; j >= 0; j--) {
|
||||
|
@ -276,7 +277,8 @@ public class PlotGriddedTempResource extends
|
|||
buf.rewind();
|
||||
|
||||
Rectangle extent = new Rectangle(dqc.getHrap_grid().hrap_minx,
|
||||
dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi, dqc.getHrap_grid().maxj);
|
||||
dqc.getHrap_grid().hrap_miny, dqc.getHrap_grid().maxi,
|
||||
dqc.getHrap_grid().maxj);
|
||||
|
||||
if (extent.x == 0 && extent.y == 0) {
|
||||
Rectangle coord = null;
|
||||
|
@ -446,8 +448,7 @@ public class PlotGriddedTempResource extends
|
|||
protected void paintInternal(IGraphicsTarget target,
|
||||
PaintProperties paintProps) throws VizException {
|
||||
|
||||
if (buf == null || dqc.grids_flag != 1
|
||||
|| displayMgr.isMaxmin() != true) {
|
||||
if (buf == null || dqc.grids_flag != 1 || displayMgr.isMaxmin() != true) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,14 +2,14 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Mpe Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.mpe
|
||||
Bundle-Version: 1.12.1174.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.mpe.Activator
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
org.eclipse.core.runtime,
|
||||
org.geotools,
|
||||
com.raytheon.viz.core,
|
||||
org.apache.commons.lang,
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
com.raytheon.viz.hydrocommon,
|
||||
javax.persistence;bundle-version="1.0.0",
|
||||
javax.measure;bundle-version="1.0.0",
|
||||
|
|
|
@ -40,7 +40,7 @@ import java.util.TimeZone;
|
|||
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.opengis.metadata.spatial.PixelOrientation;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.shef.tables.Hourlypc;
|
||||
|
@ -154,9 +154,9 @@ public class MPEDataManager {
|
|||
private short[] unbiasedRadarData;
|
||||
|
||||
private double rwBiasValUsed;
|
||||
// private double daaBiasValUsed;
|
||||
|
||||
|
||||
|
||||
// private double daaBiasValUsed;
|
||||
|
||||
private double memSpanUsed;
|
||||
|
||||
private String editBias;
|
||||
|
@ -209,21 +209,18 @@ public class MPEDataManager {
|
|||
}
|
||||
|
||||
/*
|
||||
public double getDAABiasValUsed() {
|
||||
return daaBiasValUsed;
|
||||
}
|
||||
*/
|
||||
|
||||
* public double getDAABiasValUsed() { return daaBiasValUsed; }
|
||||
*/
|
||||
|
||||
public void setRwBiasValUsed(double rwBiasValUsed) {
|
||||
this.rwBiasValUsed = rwBiasValUsed;
|
||||
}
|
||||
|
||||
/*
|
||||
public void setDAABiasValUsed(double daaBiasValUsed) {
|
||||
this.daaBiasValUsed = daaBiasValUsed;
|
||||
}
|
||||
*/
|
||||
|
||||
* public void setDAABiasValUsed(double daaBiasValUsed) {
|
||||
* this.daaBiasValUsed = daaBiasValUsed; }
|
||||
*/
|
||||
|
||||
/**
|
||||
* @return the memSpanUsed
|
||||
*/
|
||||
|
@ -766,8 +763,8 @@ public class MPEDataManager {
|
|||
}
|
||||
|
||||
public Map<Date, MPEDateInfo> getDateMap(boolean update) {
|
||||
|
||||
getDates(update);
|
||||
|
||||
getDates(update);
|
||||
return dateMap;
|
||||
}
|
||||
|
||||
|
@ -781,7 +778,8 @@ public class MPEDataManager {
|
|||
for (Object[] item : results) {
|
||||
// note db stores west longitude as positive so must negate
|
||||
MPERadarLoc radarLoc = new MPERadarLoc((String) item[0],
|
||||
((Number) item[1]).doubleValue(), -((Number) item[2]).doubleValue());
|
||||
((Number) item[1]).doubleValue(),
|
||||
-((Number) item[2]).doubleValue());
|
||||
radarList.add(radarLoc);
|
||||
}
|
||||
} catch (VizException e) {
|
||||
|
@ -833,7 +831,8 @@ public class MPEDataManager {
|
|||
}
|
||||
radarData.setRadAvail(radAvail);
|
||||
|
||||
radarData.setRwBiasValUsed(((Number) item[3]).doubleValue());
|
||||
radarData
|
||||
.setRwBiasValUsed(((Number) item[3]).doubleValue());
|
||||
radarData.setMemSpanUsed(((Number) item[4]).doubleValue());
|
||||
radarData.setEditBias((String) item[5]);
|
||||
radarData.setIgnoreRadar(!"n".equals(item[6]));
|
||||
|
@ -868,26 +867,28 @@ public class MPEDataManager {
|
|||
return radarResultList;
|
||||
}
|
||||
|
||||
public Map<String, MPERadarData> readSPRadarData(Date date)
|
||||
{
|
||||
//reads DPA radar data
|
||||
return readRadarData(date, "rwradarresult");
|
||||
|
||||
public Map<String, MPERadarData> readSPRadarData(Date date) {
|
||||
// reads DPA radar data
|
||||
return readRadarData(date, "rwradarresult");
|
||||
|
||||
}
|
||||
|
||||
public Map<String, MPERadarData> readDPRadarData(Date date)
|
||||
{
|
||||
//reads DAA radar data
|
||||
return readRadarData(date, "daaradarresult");
|
||||
|
||||
public Map<String, MPERadarData> readDPRadarData(Date date) {
|
||||
// reads DAA radar data
|
||||
return readRadarData(date, "daaradarresult");
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Map<String, MPERadarData> readRadarData(Date date, String tableName) {
|
||||
getRadars();
|
||||
StringBuffer sqlQuery = new StringBuffer();
|
||||
sqlQuery.append("select radid,num_gages, rad_avail, rw_bias_val_used, mem_span_used, edit_bias, ignore_radar from " +
|
||||
tableName + " where obstime='" + sdf.format(date) + "' and radid in(");
|
||||
System.out.println("Datestring actually passed in query to radar table: " + sdf.format(date));
|
||||
sqlQuery.append("select radid,num_gages, rad_avail, rw_bias_val_used, mem_span_used, edit_bias, ignore_radar from "
|
||||
+ tableName
|
||||
+ " where obstime='"
|
||||
+ sdf.format(date)
|
||||
+ "' and radid in(");
|
||||
System.out
|
||||
.println("Datestring actually passed in query to radar table: "
|
||||
+ sdf.format(date));
|
||||
for (int i = 0; i < radarList.size(); i++) {
|
||||
sqlQuery.append("'");
|
||||
sqlQuery.append(radarList.get(i).getId());
|
||||
|
@ -926,7 +927,8 @@ public class MPEDataManager {
|
|||
}
|
||||
radarData.setRadAvail(radAvail);
|
||||
|
||||
radarData.setRwBiasValUsed(((Number) item[3]).doubleValue());
|
||||
radarData
|
||||
.setRwBiasValUsed(((Number) item[3]).doubleValue());
|
||||
radarData.setMemSpanUsed(((Number) item[4]).doubleValue());
|
||||
radarData.setEditBias((String) item[5]);
|
||||
radarData.setIgnoreRadar(!"n".equals(item[6]));
|
||||
|
|
|
@ -11,7 +11,7 @@ Require-Bundle: org.apache.batik;bundle-version="1.6",
|
|||
org.eclipse.core.runtime;bundle-version="3.8",
|
||||
com.raytheon.uf.viz.core;bundle-version="1.14.3",
|
||||
com.raytheon.viz.ui;bundle-version="1.14.0",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
javax.measure,
|
||||
com.raytheon.uf.viz.localization,
|
||||
org.jep;bundle-version="2.3.0",
|
||||
|
|
|
@ -22,7 +22,7 @@ package com.raytheon.viz.pointdata;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint;
|
||||
import com.raytheon.uf.common.dataquery.requests.RequestConstraint.ConstraintType;
|
||||
|
@ -242,7 +242,6 @@ public class PointDataRequest {
|
|||
new RequestConstraint(
|
||||
PointDataServerRequest.REQUEST_MODE_2D));
|
||||
|
||||
|
||||
PointDataServerRequest request = new PointDataServerRequest(rcMap);
|
||||
|
||||
Object result = ThriftClient.sendRequest(request);
|
||||
|
|
|
@ -30,7 +30,7 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.eclipse.swt.graphics.RGB;
|
||||
import org.opengis.coverage.grid.GridEnvelope;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Redbook Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.redbook;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.redbook.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: org.apache.batik,
|
||||
|
@ -11,7 +11,7 @@ Require-Bundle: org.apache.batik,
|
|||
com.raytheon.viz.core,
|
||||
org.geotools,
|
||||
com.raytheon.viz.ui,
|
||||
org.apache.commons.lang,
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
com.raytheon.uf.common.serialization,
|
||||
com.raytheon.uf.common.pointdata;bundle-version="1.11.26",
|
||||
com.raytheon.viz.pointdata,
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.opengis.referencing.crs.CoordinateReferenceSystem;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.HDF5Util;
|
||||
|
@ -114,8 +114,9 @@ public class RedbookResource extends
|
|||
font.dispose();
|
||||
font = null;
|
||||
}
|
||||
for (RedbookFrame frame : this.redbookFrames.values())
|
||||
for (RedbookFrame frame : this.redbookFrames.values()) {
|
||||
frame.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -205,8 +206,9 @@ public class RedbookResource extends
|
|||
@Override
|
||||
public void remove(DataTime dataTime) {
|
||||
RedbookFrame frame = this.redbookFrames.remove(dataTime);
|
||||
if (frame != null)
|
||||
if (frame != null) {
|
||||
frame.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -219,8 +221,9 @@ public class RedbookResource extends
|
|||
@Override
|
||||
protected void initInternal(IGraphicsTarget target) throws VizException {
|
||||
for (RedbookFrame frame : this.redbookFrames.values()) {
|
||||
if (!frame.hasInited())
|
||||
if (!frame.hasInited()) {
|
||||
frame.init(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import javax.xml.bind.annotation.XmlAccessType;
|
|||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
|
@ -135,8 +135,9 @@ public class RedbookUpperAirResource extends
|
|||
*/
|
||||
@Override
|
||||
protected void disposeInternal() {
|
||||
for (UAFrame frame : this.frames.values())
|
||||
for (UAFrame frame : this.frames.values()) {
|
||||
frame.dispose();
|
||||
}
|
||||
|
||||
if (font != null) {
|
||||
font.dispose();
|
||||
|
@ -181,8 +182,9 @@ public class RedbookUpperAirResource extends
|
|||
return;
|
||||
}
|
||||
RedbookWMOMap.Info info = map.getValue(wmo.getConstraintValue());
|
||||
if (info != null && info.name != null)
|
||||
if (info != null && info.name != null) {
|
||||
this.humanReadableName = info.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -230,8 +232,9 @@ public class RedbookUpperAirResource extends
|
|||
public void remove(DataTime dataTime) {
|
||||
dataTimes.remove(dataTime);
|
||||
UAFrame frame = frames.remove(dataTime);
|
||||
if (frame != null)
|
||||
if (frame != null) {
|
||||
frame.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -274,17 +277,19 @@ public class RedbookUpperAirResource extends
|
|||
UAFrame frame = frames.get(displayedDataTime);
|
||||
if (frame != null) {
|
||||
|
||||
if (frame.isReadyToPaint())
|
||||
if (frame.isReadyToPaint()) {
|
||||
frame.paint(target, paintProps);
|
||||
else
|
||||
} else {
|
||||
job.upadte();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void invalidateAll() {
|
||||
synchronized (job) {
|
||||
for (UAFrame frame : frames.values())
|
||||
for (UAFrame frame : frames.values()) {
|
||||
frame.invalidate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -378,8 +383,9 @@ public class RedbookUpperAirResource extends
|
|||
}
|
||||
|
||||
public void init(IGraphicsTarget target) {
|
||||
if (pointData == null)
|
||||
if (pointData == null) {
|
||||
retrieveAndDecodeData();
|
||||
}
|
||||
|
||||
PlotModelFactory pmf;
|
||||
|
||||
|
@ -426,20 +432,22 @@ public class RedbookUpperAirResource extends
|
|||
}
|
||||
|
||||
synchronized (job) {
|
||||
if (!plotSettingsChanged)
|
||||
if (!plotSettingsChanged) {
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
synchronized (this) {
|
||||
if (images != null)
|
||||
if (images != null) {
|
||||
for (int i = 0; i < images.length; ++i) {
|
||||
if (images[i] != null) {
|
||||
images[i].dispose();
|
||||
images[i] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
valid = false;
|
||||
redbookRecord = null;
|
||||
pointData = null;
|
||||
|
@ -448,8 +456,9 @@ public class RedbookUpperAirResource extends
|
|||
|
||||
public void paint(IGraphicsTarget target, PaintProperties paintProps)
|
||||
throws VizException {
|
||||
if (pointData == null || images == null)
|
||||
if (pointData == null || images == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
IExtent pe = paintProps.getView().getExtent();
|
||||
|
||||
|
@ -470,24 +479,27 @@ public class RedbookUpperAirResource extends
|
|||
|
||||
int threshold;
|
||||
|
||||
if (netZoom <= 0.8)
|
||||
if (netZoom <= 0.8) {
|
||||
threshold = 0;
|
||||
else if (netZoom <= 1.5)
|
||||
} else if (netZoom <= 1.5) {
|
||||
threshold = 1;
|
||||
else if (netZoom <= 2.5)
|
||||
} else if (netZoom <= 2.5) {
|
||||
threshold = 2;
|
||||
else
|
||||
} else {
|
||||
threshold = 3;
|
||||
}
|
||||
|
||||
for (int i = 0; i < pointData.getCurrentSz(); ++i) {
|
||||
if (images[i] == null)
|
||||
if (images[i] == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
PointDataView pdv = pointData.readRandom(i);
|
||||
|
||||
int zoomLevel = pdv.getInt(RedbookUpperAirDecoder.P_ZOOM_LEVEL);
|
||||
if (zoomLevel > threshold)
|
||||
if (zoomLevel > threshold) {
|
||||
continue;
|
||||
}
|
||||
|
||||
double[] worldCoord = new double[] {
|
||||
pdv.getFloat(RedbookUpperAirDecoder.P_LONGITUDE),
|
||||
|
@ -512,8 +524,9 @@ public class RedbookUpperAirResource extends
|
|||
stationPixelLocation[1] + scaleValue, 0 };
|
||||
|
||||
if (ul[0] > pe.getMaxX() || ul[1] > pe.getMaxY()
|
||||
|| lr[0] < pe.getMinX() || lr[1] < pe.getMinY())
|
||||
|| lr[0] < pe.getMinX() || lr[1] < pe.getMinY()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
PixelCoverage pc = new PixelCoverage(new Coordinate(ul[0],
|
||||
ul[1], ul[2]), new Coordinate(ur[0], ur[1], ur[2]),
|
||||
|
|
|
@ -22,7 +22,7 @@ package com.raytheon.viz.redbookua.rsc;
|
|||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.PluginDataObject;
|
||||
import com.raytheon.uf.common.dataplugin.redbook.RedbookRecord;
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: SPI Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.spi;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.spi.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Require-Bundle: org.eclipse.ui,
|
||||
|
@ -11,7 +11,6 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.viz.ui,
|
||||
org.geotools,
|
||||
com.raytheon.viz.pointdata,
|
||||
org.apache.commons.lang,
|
||||
com.raytheon.uf.viz.core.maps;bundle-version="1.0.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: com.raytheon.viz.spi
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Warngen Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.viz.warngen;singleton:=true
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Activator: com.raytheon.viz.warngen.Activator
|
||||
Bundle-Vendor: Raytheon
|
||||
Eclipse-RegisterBuddy: com.raytheon.uf.viz.core.rsc, org.apache.velocity
|
||||
|
@ -12,7 +12,7 @@ Require-Bundle: org.eclipse.ui,
|
|||
com.raytheon.viz.ui,
|
||||
org.apache.velocity;bundle-version="1.7.0",
|
||||
javax.measure,
|
||||
org.apache.commons.lang,
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
org.geotools,
|
||||
com.raytheon.viz.awipstools,
|
||||
com.raytheon.viz.texteditor,
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.Set;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.geotools.geometry.jts.JTS;
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
import org.opengis.referencing.operation.MathTransform;
|
||||
|
@ -185,8 +185,8 @@ abstract public class AbstractDbSourceDataAdaptor {
|
|||
ptFields.toArray(new String[ptFields.size()]),
|
||||
searchArea, filter, SearchMode.INTERSECTS);
|
||||
}
|
||||
perfLog.logDuration("Retrieve location data for '" + pointSource + "'",
|
||||
System.currentTimeMillis() - t0);
|
||||
perfLog.logDuration("Retrieve location data for '" + pointSource
|
||||
+ "'", System.currentTimeMillis() - t0);
|
||||
} catch (SpatialException e) {
|
||||
throw new VizException("Error querying " + pointSource + " table: "
|
||||
+ e.getLocalizedMessage(), e);
|
||||
|
@ -309,7 +309,8 @@ abstract public class AbstractDbSourceDataAdaptor {
|
|||
iter.remove();
|
||||
}
|
||||
}
|
||||
SpatialQueryResult[] ptFeaturesFiltered = ptFeaturesList.toArray(new SpatialQueryResult[ptFeaturesList.size()]);
|
||||
SpatialQueryResult[] ptFeaturesFiltered = ptFeaturesList
|
||||
.toArray(new SpatialQueryResult[ptFeaturesList.size()]);
|
||||
|
||||
Geometry localPCGeom = null;
|
||||
if (pcGeom != null) {
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration;
|
||||
import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration.AreaType;
|
||||
|
@ -35,6 +35,7 @@ import com.raytheon.uf.common.dataplugin.warning.config.GeospatialConfiguration;
|
|||
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.portions.GisUtil;
|
||||
import com.raytheon.uf.common.dataplugin.warning.portions.GisUtil.Direction;
|
||||
import com.raytheon.uf.common.dataplugin.warning.portions.PortionsUtil;
|
||||
import com.raytheon.uf.common.dataplugin.warning.util.CountyUserData;
|
||||
import com.raytheon.uf.common.dataplugin.warning.util.GeometryUtil;
|
||||
|
@ -50,12 +51,11 @@ import com.raytheon.uf.common.status.PerformanceStatus;
|
|||
import com.raytheon.uf.common.status.UFStatus;
|
||||
import com.raytheon.uf.common.status.UFStatus.Priority;
|
||||
import com.raytheon.uf.viz.core.exception.VizException;
|
||||
//import com.raytheon.viz.warngen.gis.GisUtil.Direction;
|
||||
import com.raytheon.uf.common.dataplugin.warning.portions.GisUtil.Direction;
|
||||
import com.raytheon.viz.warngen.gui.WarngenLayer;
|
||||
import com.raytheon.viz.warngen.util.Abbreviation;
|
||||
import com.vividsolutions.jts.geom.Geometry;
|
||||
import com.vividsolutions.jts.geom.prep.PreparedGeometry;
|
||||
//import com.raytheon.viz.warngen.gis.GisUtil.Direction;
|
||||
|
||||
/**
|
||||
* Area
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
|
@ -94,7 +94,7 @@ public class ClosestPointComparator implements Comparator<ClosestPoint> {
|
|||
|
||||
ClosestPoint[] points = null;
|
||||
if (array1 != null && array2 != null) {
|
||||
points = (ClosestPoint[]) ArrayUtils.addAll(array1, array2);
|
||||
points = ArrayUtils.addAll(array1, array2);
|
||||
} else if (array1 != null && array2 == null) {
|
||||
points = array1;
|
||||
} else if (array1 == null && array2 != null) {
|
||||
|
|
|
@ -38,7 +38,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import com.raytheon.uf.common.activetable.ActiveTableRecord;
|
||||
import com.raytheon.uf.common.activetable.OperationalActiveTableRecord;
|
||||
|
@ -280,11 +280,15 @@ public class WatchUtil {
|
|||
|
||||
DbQueryRequest request = new DbQueryRequest();
|
||||
request.setEntityClass(entityClass);
|
||||
request.addConstraint(START_TIME_FIELD,
|
||||
new RequestConstraint(TimeUtil.formatToSqlTimestamp(startConstraintTime),
|
||||
request.addConstraint(
|
||||
START_TIME_FIELD,
|
||||
new RequestConstraint(TimeUtil
|
||||
.formatToSqlTimestamp(startConstraintTime),
|
||||
ConstraintType.LESS_THAN_EQUALS));
|
||||
request.addConstraint(END_TIME_FIELD,
|
||||
new RequestConstraint(TimeUtil.formatToSqlTimestamp(simulatedTime),
|
||||
request.addConstraint(
|
||||
END_TIME_FIELD,
|
||||
new RequestConstraint(TimeUtil
|
||||
.formatToSqlTimestamp(simulatedTime),
|
||||
ConstraintType.GREATER_THAN_EQUALS));
|
||||
request.addConstraint("phensig",
|
||||
new RequestConstraint(phenSig.toString(), ConstraintType.IN));
|
||||
|
|
|
@ -42,7 +42,7 @@ import javax.measure.unit.SI;
|
|||
import javax.measure.unit.Unit;
|
||||
import javax.measure.unit.UnitFormat;
|
||||
|
||||
import org.apache.commons.lang.Validate;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import org.geotools.geometry.jts.JTS;
|
||||
import org.geotools.referencing.GeodeticCalculator;
|
||||
import org.opengis.referencing.FactoryException;
|
||||
|
@ -271,8 +271,10 @@ public class Wx {
|
|||
String trxFileStr = pathcastConfiguration
|
||||
.getAreaNotationTranslationFile();
|
||||
if (trxFileStr != null) {
|
||||
File trxFile = WarnFileUtil.findFileInLocalizationIncludingBackupSite(
|
||||
areaNotationAbbrevField, localizedSite, null).getFile();
|
||||
File trxFile = WarnFileUtil
|
||||
.findFileInLocalizationIncludingBackupSite(
|
||||
areaNotationAbbrevField, localizedSite, null)
|
||||
.getFile();
|
||||
if (!trxFile.exists()) {
|
||||
throw new WarngenException(
|
||||
"Translation file does not exist: " + trxFileStr);
|
||||
|
@ -537,8 +539,7 @@ public class Wx {
|
|||
pathcasts.remove(pathcasts.size() - 1);
|
||||
}
|
||||
|
||||
perfLog.logDuration("Get pathcast",
|
||||
System.currentTimeMillis() - t0);
|
||||
perfLog.logDuration("Get pathcast", System.currentTimeMillis() - t0);
|
||||
return pathcasts.toArray(new PathCast[pathcasts.size()]);
|
||||
} catch (Exception e) {
|
||||
statusHandler.handle(Priority.PROBLEM,
|
||||
|
@ -614,8 +615,8 @@ public class Wx {
|
|||
+ variable + "'", t);
|
||||
}
|
||||
}
|
||||
perfLog.logDuration("Get closestPoints",
|
||||
System.currentTimeMillis() - t0);
|
||||
perfLog.logDuration("Get closestPoints", System.currentTimeMillis()
|
||||
- t0);
|
||||
return pointsMap;
|
||||
}
|
||||
|
||||
|
@ -976,8 +977,9 @@ public class Wx {
|
|||
List<ClosestPoint> points, double stormtrackAngle) {
|
||||
// convert storm track angle to geometry angle in range of (0,360)
|
||||
double convertedAngle = 90.0 - stormtrackAngle;
|
||||
if (convertedAngle < 0.0)
|
||||
if (convertedAngle < 0.0) {
|
||||
convertedAngle += 360.0;
|
||||
}
|
||||
|
||||
Iterator<ClosestPoint> iter = points.iterator();
|
||||
List<ClosestPoint> removedPoints = new ArrayList<ClosestPoint>();
|
||||
|
@ -985,10 +987,12 @@ public class Wx {
|
|||
ClosestPoint cp = iter.next();
|
||||
double d = Math.abs(convertedAngle
|
||||
- computeAngle(centroid, cp.point));
|
||||
if (d > 180.0)
|
||||
if (d > 180.0) {
|
||||
d = 360.0 - d;
|
||||
if (d > 90.0)
|
||||
}
|
||||
if (d > 90.0) {
|
||||
removedPoints.add(cp);
|
||||
}
|
||||
}
|
||||
return removedPoints;
|
||||
}
|
||||
|
@ -996,8 +1000,9 @@ public class Wx {
|
|||
private double computeAngle(Point p, Coordinate c) {
|
||||
double angle = Math.atan2(c.y - p.getY(), c.x - p.getX()) * 180
|
||||
/ Math.PI;
|
||||
if (angle < 0)
|
||||
if (angle < 0) {
|
||||
angle += 360;
|
||||
}
|
||||
return angle;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.Set;
|
|||
import java.util.TreeMap;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import org.apache.commons.lang.ArrayUtils;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.warning.AbstractWarningRecord;
|
||||
import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction;
|
||||
|
@ -430,8 +430,7 @@ public class BulletListManager {
|
|||
private void loadBullets(Bullet[] bullets, DamInfoBullet[] damInfoBullets) {
|
||||
this.bullets = bullets;
|
||||
if (damInfoBullets != null) {
|
||||
this.bullets = (Bullet[]) ArrayUtils
|
||||
.addAll(bullets, damInfoBullets);
|
||||
this.bullets = ArrayUtils.addAll(bullets, damInfoBullets);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ import java.util.List;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.warning.WarningRecord.WarningAction;
|
||||
import com.raytheon.uf.common.dataplugin.warning.util.WarnFileUtil;
|
||||
|
@ -217,7 +217,8 @@ abstract public class AbstractLockingBehavior {
|
|||
// should not be locked. For some reason, this differs from followups as
|
||||
// stated in DR 15110. Need verification from NWS. This is a variance?
|
||||
if (!isMarineProduct()) {
|
||||
StringBuilder newText = new StringBuilder(firstBulletText.length() + 1024);
|
||||
StringBuilder newText = new StringBuilder(
|
||||
firstBulletText.length() + 1024);
|
||||
Matcher m = null;
|
||||
boolean first = true;
|
||||
for (String line : firstBulletText.split("\\n", -1)) {
|
||||
|
@ -240,10 +241,11 @@ abstract public class AbstractLockingBehavior {
|
|||
|
||||
int endIndex = line.toUpperCase().indexOf(" IN ");
|
||||
String textForSearch = null;
|
||||
if (endIndex == -1)
|
||||
if (endIndex == -1) {
|
||||
textForSearch = line;
|
||||
else
|
||||
} else {
|
||||
textForSearch = line.substring(0, endIndex);
|
||||
}
|
||||
for (AffectedAreas affectedArea : affectedAreas) {
|
||||
String name = affectedArea.getName();
|
||||
String areaNotation = affectedArea.getAreaNotation();
|
||||
|
@ -290,7 +292,8 @@ abstract public class AbstractLockingBehavior {
|
|||
Matcher m = WarnGenPatterns.firstBulletPtrn.matcher(firstBulletText);
|
||||
firstBulletText = m.replaceAll(WarnGenPatterns.REPLACEMENT);
|
||||
|
||||
this.text = new StringBuffer(text).replace(start, end, firstBulletText).toString();
|
||||
this.text = new StringBuffer(text).replace(start, end, firstBulletText)
|
||||
.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@ Require-Bundle: com.raytheon.uf.common.dataplugin.gfe;bundle-version="1.12.1174"
|
|||
com.raytheon.uf.common.dataplugin.grid;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.util;bundle-version="1.12.1174",
|
||||
com.google.guava;bundle-version="1.0.0",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
com.raytheon.uf.common.python.concurrent;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.edex.esb.camel;bundle-version="1.12.1174"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
**/
|
||||
package com.raytheon.edex.plugin.gfe.server.handler.svcbu;
|
||||
|
||||
import org.apache.commons.lang.BooleanUtils;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
|
||||
import com.raytheon.edex.plugin.gfe.svcbackup.SvcBackupUtil;
|
||||
import com.raytheon.uf.common.dataplugin.gfe.request.ImportConfRequest;
|
||||
|
|
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Grib Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.edex.plugin.grib
|
||||
Bundle-Version: 1.15.1.qualifier
|
||||
Bundle-Version: 1.15.2.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Require-Bundle: com.raytheon.edex.common;bundle-version="1.14.0",
|
||||
com.raytheon.uf.common.awipstools,
|
||||
|
@ -16,7 +16,7 @@ Require-Bundle: com.raytheon.edex.common;bundle-version="1.14.0",
|
|||
com.raytheon.uf.edex.plugin.grid,
|
||||
com.raytheon.uf.edex.python.decoder,
|
||||
org.apache.camel;bundle-version="2.12.3",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
javax.measure,
|
||||
ucar.nc2,
|
||||
org.jep;bundle-version="3.3.0"
|
||||
|
|
|
@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
@ -127,6 +127,7 @@ public class Grib1Parameter {
|
|||
this.id = hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
HashCodeBuilder builder = new HashCodeBuilder();
|
||||
builder.append(center);
|
||||
|
|
|
@ -25,7 +25,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerialize;
|
||||
import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement;
|
||||
|
@ -122,6 +122,7 @@ public class GribLevel {
|
|||
this.id = hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
HashCodeBuilder builder = new HashCodeBuilder();
|
||||
builder.append(center);
|
||||
|
|
|
@ -29,5 +29,4 @@ Require-Bundle: com.raytheon.uf.edex.core;bundle-version="1.12.1174",
|
|||
com.raytheon.uf.common.python;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.util;bundle-version="1.12.1174",
|
||||
org.apache.commons.configuration;bundle-version="1.6.0",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
org.apache.commons.pool2;bundle-version="2.4.2"
|
||||
|
|
|
@ -2,13 +2,13 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Satellite Common
|
||||
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.satellite
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||
Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174",
|
||||
com.raytheon.uf.common.serialization;bundle-version="1.12.1174",
|
||||
javax.persistence;bundle-version="1.0.0",
|
||||
org.apache.commons.lang;bundle-version="2.3.0",
|
||||
org.apache.commons.lang3;bundle-version="3.4.0",
|
||||
javax.measure;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.dataaccess;bundle-version="1.0.0",
|
||||
com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174",
|
||||
|
|
|
@ -36,7 +36,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
|
|||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.geotools.coverage.grid.GridEnvelope2D;
|
||||
import org.geotools.coverage.grid.GridGeometry2D;
|
||||
import org.geotools.geometry.Envelope2D;
|
||||
|
@ -401,42 +401,56 @@ public class SatMapCoverage extends PersistableDataObject<Object> implements
|
|||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
if (this == obj) {
|
||||
return true;
|
||||
if (obj == null)
|
||||
}
|
||||
if (obj == null) {
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
return false;
|
||||
}
|
||||
SatMapCoverage other = (SatMapCoverage) obj;
|
||||
if (projection != other.projection)
|
||||
if (projection != other.projection) {
|
||||
return false;
|
||||
}
|
||||
String crsWKT = getCrsWKT();
|
||||
String otherCrsWKT = other.getCrsWKT();
|
||||
if (crsWKT == null) {
|
||||
if (otherCrsWKT != null)
|
||||
if (otherCrsWKT != null) {
|
||||
return false;
|
||||
} else if (!crsWKT.equals(otherCrsWKT))
|
||||
}
|
||||
} else if (!crsWKT.equals(otherCrsWKT)) {
|
||||
return false;
|
||||
if (Double.doubleToLongBits(dx) != Double.doubleToLongBits(other.dx))
|
||||
}
|
||||
if (Double.doubleToLongBits(dx) != Double.doubleToLongBits(other.dx)) {
|
||||
return false;
|
||||
if (Double.doubleToLongBits(dy) != Double.doubleToLongBits(other.dy))
|
||||
}
|
||||
if (Double.doubleToLongBits(dy) != Double.doubleToLongBits(other.dy)) {
|
||||
return false;
|
||||
}
|
||||
if (Double.doubleToLongBits(minX) != Double
|
||||
.doubleToLongBits(other.minX))
|
||||
.doubleToLongBits(other.minX)) {
|
||||
return false;
|
||||
}
|
||||
if (Double.doubleToLongBits(minY) != Double
|
||||
.doubleToLongBits(other.minY))
|
||||
.doubleToLongBits(other.minY)) {
|
||||
return false;
|
||||
}
|
||||
if (nx == null) {
|
||||
if (other.nx != null)
|
||||
if (other.nx != null) {
|
||||
return false;
|
||||
} else if (!nx.equals(other.nx))
|
||||
}
|
||||
} else if (!nx.equals(other.nx)) {
|
||||
return false;
|
||||
}
|
||||
if (ny == null) {
|
||||
if (other.ny != null)
|
||||
if (other.ny != null) {
|
||||
return false;
|
||||
} else if (!ny.equals(other.ny))
|
||||
}
|
||||
} else if (!ny.equals(other.ny)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -23,14 +23,14 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
public class DerivedTempToWVPixelConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
private static UnitConverter kelvinToCelsius = SI.KELVIN
|
||||
.getConverterTo(SI.CELSIUS);
|
||||
.getConverterTo(SI.CELSIUS);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
|
@ -40,15 +40,15 @@ public class DerivedTempToWVPixelConverter extends UnitConverter {
|
|||
@Override
|
||||
public double convert(double aTemp) throws ConversionException {
|
||||
aTemp = kelvinToCelsius.convert(aTemp);
|
||||
|
||||
|
||||
double result = 145 - aTemp;
|
||||
|
||||
|
||||
if (result < 0) {
|
||||
result = 0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
public class DerivedWVPixel extends DerivedUnit<Temperature> {
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
public class DerivedWVPixelToTempConverter extends UnitConverter {
|
||||
|
||||
|
|
|
@ -22,23 +22,23 @@ package com.raytheon.uf.common.dataplugin.satellite.units.generic;
|
|||
import javax.measure.converter.ConversionException;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 16, 2010 jsanchez Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jsanchez
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class GenericFromPixelConverter extends UnitConverter {
|
||||
|
|
|
@ -23,23 +23,23 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.quantity.Dimensionless;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 16, 2010 jsanchez Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jsanchez
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class GenericPixel extends Unit<Dimensionless> {
|
||||
|
|
|
@ -22,23 +22,23 @@ package com.raytheon.uf.common.dataplugin.satellite.units.generic;
|
|||
import javax.measure.converter.ConversionException;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* Mar 16, 2010 jsanchez Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jsanchez
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class GenericToPixelConverter extends UnitConverter {
|
||||
|
|
|
@ -23,7 +23,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.quantity.Dimensionless;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.PixelToPercentConverter;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.PolarPrecipPixelToLengthConverter;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import javax.measure.quantity.Dimensionless;
|
|||
import javax.measure.unit.DerivedUnit;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.CloudPixelToPercentConverter;
|
||||
|
||||
|
@ -45,26 +45,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.CloudPixel
|
|||
*/
|
||||
public class SounderCloudAmountPixel extends DerivedUnit<Dimensionless> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderCloudAmountPixel);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderCloudAmountPixel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit<Dimensionless> getStandardUnit() {
|
||||
return Unit.ONE;
|
||||
}
|
||||
@Override
|
||||
public Unit<Dimensionless> getStandardUnit() {
|
||||
return Unit.ONE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new CloudPixelToPercentConverter();
|
||||
}
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new CloudPixelToPercentConverter();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.CloudPixelToHeightConverter;
|
||||
|
||||
|
@ -46,26 +46,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.CloudPixel
|
|||
*/
|
||||
public class SounderCloudTopHeightPixel extends DerivedUnit<Length> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderCloudTopHeightPixel);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderCloudTopHeightPixel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit<Length> getStandardUnit() {
|
||||
return SI.METRE;
|
||||
}
|
||||
@Override
|
||||
public Unit<Length> getStandardUnit() {
|
||||
return SI.METRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new CloudPixelToHeightConverter();
|
||||
}
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new CloudPixelToHeightConverter();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.LiftedIndexPixelToTempConverter;
|
||||
|
||||
|
@ -46,26 +46,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.LiftedInde
|
|||
*/
|
||||
public class SounderLiftedIndexPixel extends DerivedUnit<Temperature> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderLiftedIndexPixel);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderLiftedIndexPixel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit<Temperature> getStandardUnit() {
|
||||
return SI.KELVIN;
|
||||
}
|
||||
@Override
|
||||
public Unit<Temperature> getStandardUnit() {
|
||||
return SI.KELVIN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new LiftedIndexPixelToTempConverter();
|
||||
}
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new LiftedIndexPixelToTempConverter();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.SounderPrecipPixelToLengthConverter;
|
||||
|
||||
|
@ -46,26 +46,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.SounderPre
|
|||
*/
|
||||
public class SounderPrecipWaterPixel extends DerivedUnit<Length> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderPrecipWaterPixel);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderPrecipWaterPixel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit<Length> getStandardUnit() {
|
||||
return SI.METRE;
|
||||
}
|
||||
@Override
|
||||
public Unit<Length> getStandardUnit() {
|
||||
return SI.METRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new SounderPrecipPixelToLengthConverter();
|
||||
}
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new SounderPrecipPixelToLengthConverter();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.SkinTempPixelToTempConverter;
|
||||
|
||||
|
@ -46,26 +46,26 @@ import com.raytheon.uf.common.dataplugin.satellite.units.goes.convert.SkinTempPi
|
|||
*/
|
||||
public class SounderSkinTempPixel extends DerivedUnit<Temperature> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderSkinTempPixel);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof SounderSkinTempPixel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit<Temperature> getStandardUnit() {
|
||||
return SI.KELVIN;
|
||||
}
|
||||
@Override
|
||||
public Unit<Temperature> getStandardUnit() {
|
||||
return SI.KELVIN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new SkinTempPixelToTempConverter();
|
||||
}
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new SkinTempPixelToTempConverter();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a cloud height in meters to a pixel value (calculation is done in
|
||||
|
@ -44,90 +44,91 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class CloudHeightToPixelConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter meterToFoot = SI.METRE.getConverterTo(NonSI.FOOT);
|
||||
private static UnitConverter meterToFoot = SI.METRE
|
||||
.getConverterTo(NonSI.FOOT);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert( double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aHeight) throws ConversionException {
|
||||
double result = 0.0;
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert( double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aHeight) throws ConversionException {
|
||||
double result = 0.0;
|
||||
|
||||
// value is in meters, but below calculates pixel based on value being
|
||||
// ft/100 MSL
|
||||
aHeight = meterToFoot.convert(aHeight);
|
||||
|
||||
if (aHeight < 1) {
|
||||
result = 0;
|
||||
} else if (aHeight <= 17.7) {
|
||||
result = (aHeight / 17.7) + 75.0;
|
||||
} else if (aHeight <= 50) {
|
||||
result = (24.0 / 32.3 * (aHeight - 17.7)) + 76.0;
|
||||
} else if (aHeight <= 87.5) {
|
||||
result = (25.0 / 37.5 * (aHeight - 50.0)) + 100.0;
|
||||
} else if (aHeight <= 129.9) {
|
||||
result = (25.0 / 42.4 * (aHeight - 87.5)) + 125.0;
|
||||
} else if (aHeight <= 179.1) {
|
||||
result = (25.0 / 49.2 * (aHeight - 129.9)) + 150.0;
|
||||
} else if (aHeight <= 238) {
|
||||
result = (25.0 / 58.9 * (aHeight - 179.1)) + 175.0;
|
||||
} else if (aHeight <= 312.3) {
|
||||
result = (25.0 / 74.3 * (aHeight - 238.0)) + 200.0;
|
||||
} else {
|
||||
result = (30.0 / 134.4 * (aHeight - 312.3)) + 225.0;
|
||||
}
|
||||
// value is in meters, but below calculates pixel based on value being
|
||||
// ft/100 MSL
|
||||
aHeight = meterToFoot.convert(aHeight);
|
||||
|
||||
if (result < 0) {
|
||||
result = 0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
if (aHeight < 1) {
|
||||
result = 0;
|
||||
} else if (aHeight <= 17.7) {
|
||||
result = (aHeight / 17.7) + 75.0;
|
||||
} else if (aHeight <= 50) {
|
||||
result = (24.0 / 32.3 * (aHeight - 17.7)) + 76.0;
|
||||
} else if (aHeight <= 87.5) {
|
||||
result = (25.0 / 37.5 * (aHeight - 50.0)) + 100.0;
|
||||
} else if (aHeight <= 129.9) {
|
||||
result = (25.0 / 42.4 * (aHeight - 87.5)) + 125.0;
|
||||
} else if (aHeight <= 179.1) {
|
||||
result = (25.0 / 49.2 * (aHeight - 129.9)) + 150.0;
|
||||
} else if (aHeight <= 238) {
|
||||
result = (25.0 / 58.9 * (aHeight - 179.1)) + 175.0;
|
||||
} else if (aHeight <= 312.3) {
|
||||
result = (25.0 / 74.3 * (aHeight - 238.0)) + 200.0;
|
||||
} else {
|
||||
result = (30.0 / 134.4 * (aHeight - 312.3)) + 225.0;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
if (result < 0) {
|
||||
result = 0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof CloudHeightToPixelConverter);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof CloudHeightToPixelConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new CloudPixelToHeightConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new CloudPixelToHeightConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert;
|
|||
import javax.measure.converter.ConversionException;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a cloud amount percent to a pixel value
|
||||
|
|
|
@ -25,7 +25,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a pixel value representing cloud height to a height above MSL in
|
||||
|
@ -44,85 +44,85 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class CloudPixelToHeightConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter footToMeter = (NonSI.FOOT)
|
||||
.getConverterTo(SI.METRE);
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
private static UnitConverter footToMeter = (NonSI.FOOT)
|
||||
.getConverterTo(SI.METRE);
|
||||
|
||||
if (aPixel <= 75) {
|
||||
result = 0.0;
|
||||
} else if (aPixel <= 76) {
|
||||
result = 17.7 * (aPixel - 75.0);
|
||||
} else if (aPixel <= 100) {
|
||||
result = (32.3 / 24.0 * (aPixel - 76.0)) + 17.7;
|
||||
} else if (aPixel <= 125) {
|
||||
result = (37.5 / 25.0 * (aPixel - 100.0)) + 50.0;
|
||||
} else if (aPixel <= 150) {
|
||||
result = (42.4 / 25.0 * (aPixel - 125.0)) + 87.5;
|
||||
} else if (aPixel <= 175) {
|
||||
result = (49.2 / 25.0 * (aPixel - 150.0)) + 129.9;
|
||||
} else if (aPixel <= 200) {
|
||||
result = (58.9 / 25.0 * (aPixel - 175.0)) + 179.1;
|
||||
} else if (aPixel <= 225) {
|
||||
result = (74.3 / 25.0 * (aPixel - 200.0)) + 238.0;
|
||||
} else {
|
||||
result = (134.4 / 30.0 * (aPixel - 225.0)) + 312.3;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
|
||||
// above converts pixel to ft/100 MSL, but we need to change it to
|
||||
// meters
|
||||
result = footToMeter.convert(result);
|
||||
if (aPixel <= 75) {
|
||||
result = 0.0;
|
||||
} else if (aPixel <= 76) {
|
||||
result = 17.7 * (aPixel - 75.0);
|
||||
} else if (aPixel <= 100) {
|
||||
result = (32.3 / 24.0 * (aPixel - 76.0)) + 17.7;
|
||||
} else if (aPixel <= 125) {
|
||||
result = (37.5 / 25.0 * (aPixel - 100.0)) + 50.0;
|
||||
} else if (aPixel <= 150) {
|
||||
result = (42.4 / 25.0 * (aPixel - 125.0)) + 87.5;
|
||||
} else if (aPixel <= 175) {
|
||||
result = (49.2 / 25.0 * (aPixel - 150.0)) + 129.9;
|
||||
} else if (aPixel <= 200) {
|
||||
result = (58.9 / 25.0 * (aPixel - 175.0)) + 179.1;
|
||||
} else if (aPixel <= 225) {
|
||||
result = (74.3 / 25.0 * (aPixel - 200.0)) + 238.0;
|
||||
} else {
|
||||
result = (134.4 / 30.0 * (aPixel - 225.0)) + 312.3;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
// above converts pixel to ft/100 MSL, but we need to change it to
|
||||
// meters
|
||||
result = footToMeter.convert(result);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof CloudPixelToHeightConverter);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof CloudPixelToHeightConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new CloudHeightToPixelConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new CloudHeightToPixelConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert;
|
|||
import javax.measure.converter.ConversionException;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a pixel value of cloud amount to a cloud amount in percent
|
||||
|
@ -41,74 +41,74 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class CloudPixelToPercentConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
|
||||
if (aPixel <= 75) {
|
||||
result = 0.0;
|
||||
} else if (aPixel <= 76) {
|
||||
result = aPixel - 75.0;
|
||||
} else if (aPixel <= 166) {
|
||||
result = (49.0 / 90.0 * (aPixel - 76.0)) + 1.0;
|
||||
} else if (aPixel <= 167) {
|
||||
result = aPixel - 116.0;
|
||||
} else if (aPixel <= 253) {
|
||||
result = (24.0 / 43.0 * (aPixel - 167.0)) + 51.0;
|
||||
} else if (aPixel <= 254) {
|
||||
result = aPixel - 154.0;
|
||||
} else {
|
||||
result = 100.0;
|
||||
}
|
||||
if (aPixel <= 75) {
|
||||
result = 0.0;
|
||||
} else if (aPixel <= 76) {
|
||||
result = aPixel - 75.0;
|
||||
} else if (aPixel <= 166) {
|
||||
result = (49.0 / 90.0 * (aPixel - 76.0)) + 1.0;
|
||||
} else if (aPixel <= 167) {
|
||||
result = aPixel - 116.0;
|
||||
} else if (aPixel <= 253) {
|
||||
result = (24.0 / 43.0 * (aPixel - 167.0)) + 51.0;
|
||||
} else if (aPixel <= 254) {
|
||||
result = aPixel - 154.0;
|
||||
} else {
|
||||
result = 100.0;
|
||||
}
|
||||
|
||||
return result / 100;
|
||||
}
|
||||
return result / 100;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof CloudPixelToPercentConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof CloudPixelToPercentConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new CloudPercentToPixelConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new CloudPercentToPixelConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a pixel representing Lifted Index to temperature in Celsius
|
||||
|
@ -41,65 +41,65 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class LiftedIndexPixelToTempConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter celsiusToKelvin = SI.CELSIUS
|
||||
.getConverterTo(SI.KELVIN);
|
||||
private static UnitConverter celsiusToKelvin = SI.CELSIUS
|
||||
.getConverterTo(SI.KELVIN);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 25 - (aPixel / 5);
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 25 - (aPixel / 5);
|
||||
|
||||
// above converts pixel to Celsius, but we need to change it to
|
||||
// Kelvin
|
||||
result = celsiusToKelvin.convert(result);
|
||||
// above converts pixel to Celsius, but we need to change it to
|
||||
// Kelvin
|
||||
result = celsiusToKelvin.convert(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof LiftedIndexPixelToTempConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof LiftedIndexPixelToTempConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new LiftedIndexTempToPixelConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new LiftedIndexTempToPixelConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a Lifted Index in temperature Kelvin to a pixel value
|
||||
|
@ -41,71 +41,71 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class LiftedIndexTempToPixelConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter kelvinToCelsius = SI.KELVIN
|
||||
.getConverterTo(SI.CELSIUS);
|
||||
private static UnitConverter kelvinToCelsius = SI.KELVIN
|
||||
.getConverterTo(SI.CELSIUS);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aTemp) throws ConversionException {
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aTemp) throws ConversionException {
|
||||
|
||||
// value is in kelvin, but below calculates pixel based on value being
|
||||
// celsius
|
||||
aTemp = kelvinToCelsius.convert(aTemp);
|
||||
// value is in kelvin, but below calculates pixel based on value being
|
||||
// celsius
|
||||
aTemp = kelvinToCelsius.convert(aTemp);
|
||||
|
||||
double result = -5 * (aTemp - 25);
|
||||
if (result < 0) {
|
||||
result = 0.0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
double result = -5 * (aTemp - 25);
|
||||
if (result < 0) {
|
||||
result = 0.0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof LiftedIndexTempToPixelConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof LiftedIndexTempToPixelConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new LiftedIndexPixelToTempConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new LiftedIndexPixelToTempConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -22,23 +22,23 @@ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert;
|
|||
import javax.measure.converter.ConversionException;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 11, 2010 jsanchez Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jsanchez
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class PercentToPixelConverter extends UnitConverter {
|
||||
|
|
|
@ -22,23 +22,23 @@ package com.raytheon.uf.common.dataplugin.satellite.units.goes.convert;
|
|||
import javax.measure.converter.ConversionException;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* TODO Add Description
|
||||
*
|
||||
* <pre>
|
||||
*
|
||||
*
|
||||
* SOFTWARE HISTORY
|
||||
*
|
||||
*
|
||||
* Date Ticket# Engineer Description
|
||||
* ------------ ---------- ----------- --------------------------
|
||||
* May 11, 2010 jsanchez Initial creation
|
||||
*
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author jsanchez
|
||||
* @version 1.0
|
||||
* @version 1.0
|
||||
*/
|
||||
|
||||
public class PixelToPercentConverter extends UnitConverter {
|
||||
|
@ -51,7 +51,7 @@ public class PixelToPercentConverter extends UnitConverter {
|
|||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
return aPixel/100;
|
||||
return aPixel / 100;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts meters of total precipitation of water to a pixel value
|
||||
|
@ -59,19 +59,17 @@ public class PolarPrecipLengthToPixelConverter extends UnitConverter {
|
|||
aLength = meterToMillimeter.convert(aLength);
|
||||
|
||||
double result = 0.0;
|
||||
|
||||
if (aLength < 1 ) {
|
||||
|
||||
if (aLength < 1) {
|
||||
result = 0.0;
|
||||
} else if (aLength <= 70) {
|
||||
result = aLength + 176;
|
||||
}
|
||||
else if (aLength <= 75) {
|
||||
} else if (aLength <= 75) {
|
||||
result = (18900 - aLength) / 75;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
result = 255;
|
||||
}
|
||||
|
||||
|
||||
if (result < 0) {
|
||||
result = 0;
|
||||
} else if (result > 255) {
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a pixel representation of total precipitation of water to meters
|
||||
|
@ -39,7 +39,7 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*
|
||||
* @author jsanchez
|
||||
*/
|
||||
public class PolarPrecipPixelToLengthConverter extends UnitConverter {
|
||||
public class PolarPrecipPixelToLengthConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -55,7 +55,7 @@ public class PolarPrecipPixelToLengthConverter extends UnitConverter {
|
|||
public double convert(double aPixel) throws ConversionException {
|
||||
|
||||
double result = 0.0;
|
||||
|
||||
|
||||
if (aPixel < 1) {
|
||||
result = 0.0;
|
||||
} else if (aPixel <= 251) {
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a skin temperature pixel to a temperature in Kelvin
|
||||
|
@ -41,65 +41,65 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class SkinTempPixelToTempConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter celsiusToKelvin = SI.CELSIUS
|
||||
.getConverterTo(SI.KELVIN);
|
||||
private static UnitConverter celsiusToKelvin = SI.CELSIUS
|
||||
.getConverterTo(SI.KELVIN);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 63.0 - (aPixel / 2.0);
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 63.0 - (aPixel / 2.0);
|
||||
|
||||
// above converts pixel to Celsius, but we need to change it to
|
||||
// Kelvin
|
||||
result = celsiusToKelvin.convert(result);
|
||||
// above converts pixel to Celsius, but we need to change it to
|
||||
// Kelvin
|
||||
result = celsiusToKelvin.convert(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof SkinTempPixelToTempConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof SkinTempPixelToTempConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new SkinTempTempToPixelConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new SkinTempTempToPixelConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a skin temperature in Kelvin to a pixel value
|
||||
|
@ -41,71 +41,71 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class SkinTempTempToPixelConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter kelvinToCelsius = SI.KELVIN
|
||||
.getConverterTo(SI.CELSIUS);
|
||||
private static UnitConverter kelvinToCelsius = SI.KELVIN
|
||||
.getConverterTo(SI.CELSIUS);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aTemp) throws ConversionException {
|
||||
// value is in kelvin, but below calculates pixel based on value being
|
||||
// celsius
|
||||
aTemp = kelvinToCelsius.convert(aTemp);
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aTemp) throws ConversionException {
|
||||
// value is in kelvin, but below calculates pixel based on value being
|
||||
// celsius
|
||||
aTemp = kelvinToCelsius.convert(aTemp);
|
||||
|
||||
double result = (63.0 - aTemp) * 2.0;
|
||||
double result = (63.0 - aTemp) * 2.0;
|
||||
|
||||
if (result < 0) {
|
||||
result = 0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
if (result < 0) {
|
||||
result = 0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof SkinTempTempToPixelConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof SkinTempTempToPixelConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new SkinTempPixelToTempConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new SkinTempPixelToTempConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts meters of total precipitation of water to a pixel value
|
||||
|
@ -41,72 +41,72 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class SounderPrecipLengthToPixelConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter meterToMillimeter = SI.METRE.getConverterTo(SI
|
||||
.MILLI(SI.METRE));
|
||||
private static UnitConverter meterToMillimeter = SI.METRE.getConverterTo(SI
|
||||
.MILLI(SI.METRE));
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aLength) throws ConversionException {
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aLength) throws ConversionException {
|
||||
|
||||
// value is in meters, but below calculates pixel based on value being
|
||||
// millimeters
|
||||
aLength = meterToMillimeter.convert(aLength);
|
||||
// value is in meters, but below calculates pixel based on value being
|
||||
// millimeters
|
||||
aLength = meterToMillimeter.convert(aLength);
|
||||
|
||||
double result = aLength * 200.0 / 67.0;
|
||||
double result = aLength * 200.0 / 67.0;
|
||||
|
||||
if (result < 0) {
|
||||
result = 0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
if (result < 0) {
|
||||
result = 0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof SounderPrecipLengthToPixelConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof SounderPrecipLengthToPixelConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new SounderPrecipPixelToLengthConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new SounderPrecipPixelToLengthConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a pixel representation of total precipitation of water to meters
|
||||
|
@ -41,65 +41,65 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class SounderPrecipPixelToLengthConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter millimeterToMeter = (SI.MILLI(SI.METRE))
|
||||
.getConverterTo(SI.METRE);
|
||||
private static UnitConverter millimeterToMeter = (SI.MILLI(SI.METRE))
|
||||
.getConverterTo(SI.METRE);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = aPixel * 67.0 / 200.0;
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = aPixel * 67.0 / 200.0;
|
||||
|
||||
// above converts pixel to millimeters, but we need to change it to
|
||||
// meters
|
||||
result = millimeterToMeter.convert(result);
|
||||
// above converts pixel to millimeters, but we need to change it to
|
||||
// meters
|
||||
result = millimeterToMeter.convert(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof SounderPrecipPixelToLengthConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof SounderPrecipPixelToLengthConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new SounderPrecipLengthToPixelConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new SounderPrecipLengthToPixelConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Represents a pixel value on a satellite IR image
|
||||
|
@ -43,26 +43,26 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class IRPixel extends DerivedUnit<Temperature> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof IRPixel);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof IRPixel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit<Temperature> getStandardUnit() {
|
||||
return SI.KELVIN;
|
||||
}
|
||||
@Override
|
||||
public Unit<Temperature> getStandardUnit() {
|
||||
return SI.KELVIN;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new IRPixelToTempConverter();
|
||||
}
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new IRPixelToTempConverter();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ package com.raytheon.uf.common.dataplugin.satellite.units.ir;
|
|||
import javax.measure.converter.ConversionException;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a pixel value from 0-255 into a temperature in Kelvin
|
||||
|
@ -40,64 +40,64 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class IRPixelToTempConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
|
||||
if (aPixel >= 180) {
|
||||
result = 418.15 - aPixel;
|
||||
} else {
|
||||
result = 328.15 - (aPixel / 2.0);
|
||||
}
|
||||
if (aPixel >= 180) {
|
||||
result = 418.15 - aPixel;
|
||||
} else {
|
||||
result = 328.15 - (aPixel / 2.0);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof IRPixelToTempConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof IRPixelToTempConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new IRTempToPixelConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new IRTempToPixelConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ package com.raytheon.uf.common.dataplugin.satellite.units.ir;
|
|||
import javax.measure.converter.ConversionException;
|
||||
import javax.measure.converter.UnitConverter;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a temperature value in Kelvin to a pixel value.
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Represents a pixel value on a satellite blended total precipitable water(TPW)
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* TODO class description
|
||||
|
@ -41,75 +41,75 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class PrecipLengthToPixelConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter meterToMillimeter = SI.METRE.getConverterTo(SI
|
||||
.MILLI(SI.METRE));
|
||||
private static UnitConverter meterToMillimeter = SI.METRE.getConverterTo(SI
|
||||
.MILLI(SI.METRE));
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPrecip) throws ConversionException {
|
||||
double result = 0.0;
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPrecip) throws ConversionException {
|
||||
double result = 0.0;
|
||||
|
||||
// value is in meters, but below calculates pixel based on value being
|
||||
// millimeters
|
||||
aPrecip = meterToMillimeter.convert(aPrecip);
|
||||
// value is in meters, but below calculates pixel based on value being
|
||||
// millimeters
|
||||
aPrecip = meterToMillimeter.convert(aPrecip);
|
||||
|
||||
if (aPrecip > 0 && aPrecip <= 75) {
|
||||
result = aPrecip + 176.0;
|
||||
}
|
||||
if (aPrecip > 0 && aPrecip <= 75) {
|
||||
result = aPrecip + 176.0;
|
||||
}
|
||||
|
||||
if (result < 0) {
|
||||
result = 0.0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
if (result < 0) {
|
||||
result = 0.0;
|
||||
} else if (result > 255) {
|
||||
result = 255;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof PrecipLengthToPixelConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof PrecipLengthToPixelConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new PrecipPixelToLengthConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new PrecipPixelToLengthConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import javax.measure.unit.DerivedUnit;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Represents a pixel value on a POES or DMSP satellite precipitation image
|
||||
|
@ -43,26 +43,26 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class PrecipPixel extends DerivedUnit<Length> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof PrecipPixel);
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof PrecipPixel);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Unit<Length> getStandardUnit() {
|
||||
return SI.METRE;
|
||||
}
|
||||
@Override
|
||||
public Unit<Length> getStandardUnit() {
|
||||
return SI.METRE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new PrecipPixelToLengthConverter();
|
||||
}
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new PrecipPixelToLengthConverter();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import javax.measure.converter.ConversionException;
|
|||
import javax.measure.converter.UnitConverter;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* TODO class description
|
||||
|
@ -41,68 +41,68 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class PrecipPixelToLengthConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter millimeterToMeter = (SI.MILLI(SI.METRE))
|
||||
.getConverterTo(SI.METRE);
|
||||
private static UnitConverter millimeterToMeter = (SI.MILLI(SI.METRE))
|
||||
.getConverterTo(SI.METRE);
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
if (aPixel > 176 && aPixel <= 251) {
|
||||
result = aPixel - 176.0;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
if (aPixel > 176 && aPixel <= 251) {
|
||||
result = aPixel - 176.0;
|
||||
}
|
||||
|
||||
// above converts pixel to millimeters, but we need to change it to
|
||||
// meters
|
||||
result = millimeterToMeter.convert(result);
|
||||
// above converts pixel to millimeters, but we need to change it to
|
||||
// meters
|
||||
result = millimeterToMeter.convert(result);
|
||||
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof PrecipPixelToLengthConverter);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof PrecipPixelToLengthConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new PrecipLengthToPixelConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new PrecipLengthToPixelConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a rainfall rate pixel from a satellite image to a rate of mm/hr
|
||||
|
@ -43,71 +43,72 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class RainfallPixelToRateConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter milimtrPerHrToMtrPerSec = ((SI.MILLI(SI.METRE)).divide(NonSI.HOUR))
|
||||
.getConverterTo((SI.METRE).divide(SI.SECOND));
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
private static UnitConverter milimtrPerHrToMtrPerSec = ((SI.MILLI(SI.METRE))
|
||||
.divide(NonSI.HOUR)).getConverterTo((SI.METRE).divide(SI.SECOND));
|
||||
|
||||
if (aPixel <= 108) {
|
||||
result = 0.0;
|
||||
} else if (aPixel <= 133) {
|
||||
result = (aPixel - 108.0) * 6.0 / 25.0;
|
||||
} else if (aPixel <= 168) {
|
||||
result = 6 + ((aPixel - 133.0) * 14.0 / 35.0);
|
||||
} else {
|
||||
result = (aPixel / 2.0) - 64.0;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aPixel) throws ConversionException {
|
||||
double result = 0.0;
|
||||
|
||||
result = milimtrPerHrToMtrPerSec.convert(result);
|
||||
return result;
|
||||
}
|
||||
if (aPixel <= 108) {
|
||||
result = 0.0;
|
||||
} else if (aPixel <= 133) {
|
||||
result = (aPixel - 108.0) * 6.0 / 25.0;
|
||||
} else if (aPixel <= 168) {
|
||||
result = 6 + ((aPixel - 133.0) * 14.0 / 35.0);
|
||||
} else {
|
||||
result = (aPixel / 2.0) - 64.0;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof RainfallPixelToRateConverter);
|
||||
}
|
||||
result = milimtrPerHrToMtrPerSec.convert(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof RainfallPixelToRateConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new RainfallRateToPixelConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new RainfallRateToPixelConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import javax.measure.unit.NonSI;
|
|||
import javax.measure.unit.SI;
|
||||
import javax.measure.unit.Unit;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Represents a pixel value of a rainfall rate (mm/hr) on a POES or DMSP
|
||||
|
@ -46,27 +46,26 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class RainfallRatePixel extends DerivedUnit<Velocity> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof RainfallRatePixel);
|
||||
}
|
||||
@Override
|
||||
public boolean equals(Object anObject) {
|
||||
return (anObject instanceof RainfallRatePixel);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Unit<Velocity> getStandardUnit() {
|
||||
return (Unit<Velocity>) (SI.MILLI(SI.METRE))
|
||||
.divide(NonSI.HOUR);
|
||||
}
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Unit<Velocity> getStandardUnit() {
|
||||
return (Unit<Velocity>) (SI.MILLI(SI.METRE)).divide(NonSI.HOUR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new RainfallPixelToRateConverter();
|
||||
}
|
||||
@Override
|
||||
public UnitConverter toStandardUnit() {
|
||||
return new RainfallPixelToRateConverter();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import javax.measure.converter.UnitConverter;
|
|||
import javax.measure.unit.NonSI;
|
||||
import javax.measure.unit.SI;
|
||||
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
|
||||
/**
|
||||
* Converts a rainfall rate of mm/hr to a pixel value
|
||||
|
@ -43,77 +43,79 @@ import org.apache.commons.lang.builder.HashCodeBuilder;
|
|||
*/
|
||||
public class RainfallRateToPixelConverter extends UnitConverter {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private static UnitConverter mtrPerSecToMilimtrPerHr = ((SI.METRE).divide(SI.SECOND))
|
||||
.getConverterTo((SI.MILLI(SI.METRE)).divide(NonSI.HOUR));
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aRate) throws ConversionException {
|
||||
double result = 0.0;
|
||||
|
||||
aRate = mtrPerSecToMilimtrPerHr.convert(aRate);
|
||||
if (aRate == 0) {
|
||||
result = 0.0;
|
||||
} else if (aRate <= 6.0) {
|
||||
result = (aRate * 25.0 / 6.0) + 108.0;
|
||||
} else if (aRate <= 20.0) {
|
||||
result = 133.0 + (35.0 / 14.0 * (aRate - 6.0));
|
||||
} else {
|
||||
result = 2.0 * (aRate + 64.0);
|
||||
}
|
||||
private static UnitConverter mtrPerSecToMilimtrPerHr = ((SI.METRE)
|
||||
.divide(SI.SECOND)).getConverterTo((SI.MILLI(SI.METRE))
|
||||
.divide(NonSI.HOUR));
|
||||
|
||||
if (result < 0) {
|
||||
result = 0.0;
|
||||
} else if (result > 255) {
|
||||
result = 255.0;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#convert(double)
|
||||
*/
|
||||
@Override
|
||||
public double convert(double aRate) throws ConversionException {
|
||||
double result = 0.0;
|
||||
|
||||
return result;
|
||||
}
|
||||
aRate = mtrPerSecToMilimtrPerHr.convert(aRate);
|
||||
if (aRate == 0) {
|
||||
result = 0.0;
|
||||
} else if (aRate <= 6.0) {
|
||||
result = (aRate * 25.0 / 6.0) + 108.0;
|
||||
} else if (aRate <= 20.0) {
|
||||
result = 133.0 + (35.0 / 14.0 * (aRate - 6.0));
|
||||
} else {
|
||||
result = 2.0 * (aRate + 64.0);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof RainfallRateToPixelConverter);
|
||||
}
|
||||
if (result < 0) {
|
||||
result = 0.0;
|
||||
} else if (result > 255) {
|
||||
result = 255.0;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new RainfallPixelToRateConverter();
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#equals(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aConverter) {
|
||||
return (aConverter instanceof RainfallRateToPixelConverter);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#hashCode()
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HashCodeBuilder.reflectionHashCode(this);
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#inverse()
|
||||
*/
|
||||
@Override
|
||||
public UnitConverter inverse() {
|
||||
return new RainfallPixelToRateConverter();
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see javax.measure.converter.UnitConverter#isLinear()
|
||||
*/
|
||||
@Override
|
||||
public boolean isLinear() {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,11 +2,10 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 1
|
||||
Bundle-Name: Taf Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.taf
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Version: 1.15.1.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Export-Package: com.raytheon.uf.common.dataplugin.taf
|
||||
Require-Bundle: org.apache.commons.lang,
|
||||
javax.persistence
|
||||
Require-Bundle: javax.persistence
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Import-Package: com.raytheon.uf.common.dataplugin,
|
||||
com.raytheon.uf.common.dataplugin.annotations,
|
||||
|
|
|
@ -2,12 +2,13 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: Textdb Plug-in
|
||||
Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.text
|
||||
Bundle-Version: 1.14.0.qualifier
|
||||
Bundle-Version: 1.15.0.qualifier
|
||||
Bundle-Vendor: RAYTHEON
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
|
||||
Require-Bundle: com.raytheon.uf.common.serialization,
|
||||
org.hibernate,
|
||||
com.raytheon.uf.common.localization;bundle-version="1.12.1174"
|
||||
com.raytheon.uf.common.localization;bundle-version="1.12.1174",
|
||||
org.apache.commons.lang3;bundle-version="3.4.0"
|
||||
Import-Package: com.raytheon.uf.common.dataplugin.persist,
|
||||
com.raytheon.uf.common.message,
|
||||
com.raytheon.uf.common.serialization,
|
||||
|
@ -17,8 +18,7 @@ Import-Package: com.raytheon.uf.common.dataplugin.persist,
|
|||
com.raytheon.uf.common.status,
|
||||
com.raytheon.uf.common.util,
|
||||
com.raytheon.uf.common.wmo,
|
||||
javax.persistence,
|
||||
org.apache.commons.lang.builder
|
||||
javax.persistence
|
||||
Export-Package: com.raytheon.uf.common.dataplugin.text;uses:="com.raytheon.uf.common.dataplugin.text.db,com.raytheon.uf.common.serialization",
|
||||
com.raytheon.uf.common.dataplugin.text.alarms,
|
||||
com.raytheon.uf.common.dataplugin.text.db;uses:="com.raytheon.uf.common.dataplugin.persist,com.raytheon.uf.common.wmo,com.raytheon.uf.common.serialization",
|
||||
|
|
|
@ -23,9 +23,9 @@ import javax.persistence.EmbeddedId;
|
|||
import javax.persistence.Entity;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.apache.commons.lang.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||
import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.hibernate.annotations.Index;
|
||||
|
||||
import com.raytheon.uf.common.dataplugin.persist.PersistableDataObject;
|
||||
|
@ -103,15 +103,18 @@ public class AfosToAwips extends PersistableDataObject implements
|
|||
id.setAfosid(afosid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this).append("afosid", getAfosid())
|
||||
.append("wmottaaii", getWmottaaii())
|
||||
.append("wmocccc", getWmocccc()).toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
if (!(other instanceof AfosToAwips))
|
||||
if (!(other instanceof AfosToAwips)) {
|
||||
return false;
|
||||
}
|
||||
AfosToAwips castOther = (AfosToAwips) other;
|
||||
return new EqualsBuilder()
|
||||
.append(this.getAfosid(), castOther.getAfosid())
|
||||
|
@ -119,6 +122,7 @@ public class AfosToAwips extends PersistableDataObject implements
|
|||
.append(this.getWmocccc(), castOther.getWmocccc()).isEquals();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return new HashCodeBuilder().append(getAfosid()).append(getWmottaaii())
|
||||
.append(getWmocccc()).toHashCode();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue