Merge tag 'OB_14.3.1-19m' into omaha_14.4.1

Conflicts:
	cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/imaging/GLColormappedImageExtension.java
	cave/com.raytheon.viz.satellite/src/com/raytheon/viz/satellite/rsc/SatResource.java
	cave/com.raytheon.viz.volumebrowser/localization/menus/xml/planesMenusPlanView.xml
	edexOsgi/com.raytheon.edex.plugin.satellite/src/com/raytheon/edex/util/satellite/SatSpatialFactory.java
	edexOsgi/com.raytheon.uf.common.colormap/src/com/raytheon/uf/common/colormap/prefs/DataMappingPreferences.java
	edexOsgi/com.raytheon.uf.common.derivparam/utility/common_static/base/derivedParameters/definitions/mmp.xml
	nativeLib/files.native/awipsShare/hydroapps/lib/native/linux32/library.ohd.pproc.so
	nativeLib/files.native/edex/lib/native/linux32/library.ohd.pproc.so
	ohd/gov.noaa.nws.ohd.edex.plugin.hydrodualpol/src/gov/noaa/nws/ohd/edex/plugin/hydrodualpol/DSAProductProcessor.java

Former-commit-id: b979960b7b [formerly 72f387d2802c12eedfe5643616fe5a54420aef66]
Former-commit-id: 7692e3f21d
This commit is contained in:
Steve Harris 2014-09-23 11:41:10 -05:00
commit 2e2072a963
32 changed files with 476 additions and 167 deletions

View file

@ -150,7 +150,7 @@
<substitute key="stationId" value="72248"/> <substitute key="stationId" value="72248"/>
</contribute> </contribute>
<contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml" <contribute xsi:type="bundleItem" file="bundles/UpperAirRaob.xml"
menuText="Tallahasee, FL (KTAE)" id="raobTallahasee_FL" menuText="Tallahassee, FL (KTAE)" id="raobTallahassee_FL"
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor"> editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="72214"/> <substitute key="stationId" value="72214"/>
</contribute> </contribute>
@ -179,4 +179,4 @@
editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor"> editorType="gov.noaa.nws.ncep.ui.nsharp.display.NsharpEditor">
<substitute key="stationId" value="74001"/> <substitute key="stationId" value="74001"/>
</contribute> </contribute>
</menuTemplate> </menuTemplate>

View file

@ -178,7 +178,7 @@ public class SyncLocalizationEditor extends BooleanFieldEditor {
MessageBox msgBox = new MessageBox(button.getShell(), SWT.YES MessageBox msgBox = new MessageBox(button.getShell(), SWT.YES
| SWT.NO | SWT.CANCEL | SWT.ICON_WARNING); | SWT.NO | SWT.CANCEL | SWT.ICON_WARNING);
msgBox.setText("Do you want to synchronize?"); msgBox.setText("Do you want to synchronize?");
msgBox.setMessage("If there are files missing locally, your CAVE might not work correctly. It is recommended that you synchronize all localization files with edex before enabling this option. Synchronizing will take lots of time and bandwidth.\n\n Would you like to syncronize now?"); msgBox.setMessage("If there are files missing locally, your CAVE might not work correctly. It is recommended that you synchronize all localization files with edex before enabling this option. Synchronizing will take lots of time and bandwidth.\n\n Would you like to synchronize now?");
int result = msgBox.open(); int result = msgBox.open();
if (result == SWT.CANCEL) { if (result == SWT.CANCEL) {
getChangeControl(button.getParent()).setSelection(false); getChangeControl(button.getParent()).setSelection(false);

View file

@ -28,6 +28,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channel; import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channel;
/** /**
@ -41,7 +42,7 @@ import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channe
* ------------- -------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Aug 20, 2012 mschenke Initial creation * Aug 20, 2012 mschenke Initial creation
* Apr 18, 2014 2947 bsteffen Support unitless data. * Apr 18, 2014 2947 bsteffen Support unitless data.
* * Sep 9, 2014 DR 17313 jgerth Support for ColorMapParameters
* *
* </pre> * </pre>
* *
@ -60,7 +61,9 @@ public class ChannelInfo {
@XmlElement @XmlElement
private double rangeMax = 1.0; private double rangeMax = 1.0;
private Unit<?> unit = Unit.ONE; private Unit<?> unit;
private ColorMapParameters parameters;
/** /**
* @return the channel * @return the channel
@ -144,6 +147,14 @@ public class ChannelInfo {
: null; : null;
} }
public ColorMapParameters getParameters() {
return parameters;
}
public void setParameters(ColorMapParameters parameters) {
this.parameters = parameters;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *

View file

@ -25,6 +25,7 @@ import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import com.raytheon.uf.viz.core.rsc.AbstractResourceData; import com.raytheon.uf.viz.core.rsc.AbstractResourceData;
import com.raytheon.uf.viz.core.rsc.LoadProperties;
import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channel; import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channel;
/** /**
@ -37,18 +38,26 @@ import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channe
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Aug 16, 2012 mschenke Initial creation * Aug 16, 2012 mschenke Initial creation
* Aug 22, 2014 DR 17313 jgerth Support for load properties
* *
* </pre> * </pre>
* *
* @author mschenke * @author mschenke
* @version 1.0 * @version 1.0
*/ */
/**
* @author awips
*
*/
@XmlAccessorType(XmlAccessType.NONE) @XmlAccessorType(XmlAccessType.NONE)
public class ChannelResource { public class ChannelResource {
@XmlElement @XmlElement
protected AbstractResourceData resourceData; protected AbstractResourceData resourceData;
@XmlElement
protected LoadProperties loadProperties;
@XmlElement @XmlElement
protected Channel channel; protected Channel channel;
@ -100,6 +109,21 @@ public class ChannelResource {
this.channelName = channelName; this.channelName = channelName;
} }
/**
* @return the loadProperties
*/
public LoadProperties getLoadProperties() {
return loadProperties;
}
/**
* @param loadProperties
* the loadProperties to set
*/
public void setLoadProperties(LoadProperties loadProperties) {
this.loadProperties = loadProperties;
}
/* /*
* (non-Javadoc) * (non-Javadoc)
* *

View file

@ -25,11 +25,13 @@ import java.util.IdentityHashMap;
import java.util.Map; import java.util.Map;
import javax.measure.converter.UnitConverter; import javax.measure.converter.UnitConverter;
import javax.measure.unit.Unit;
import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.graphics.Rectangle;
import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.crs.CoordinateReferenceSystem;
import com.raytheon.uf.common.colormap.prefs.ColorMapParameters; import com.raytheon.uf.common.colormap.prefs.ColorMapParameters;
import com.raytheon.uf.common.geospatial.ReferencedCoordinate;
import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.status.UFStatus.Priority;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.DrawableImage; import com.raytheon.uf.viz.core.DrawableImage;
@ -69,6 +71,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* ------------- -------- ----------- -------------------------- * ------------- -------- ----------- --------------------------
* Aug 06, 2012 mschenke Initial creation * Aug 06, 2012 mschenke Initial creation
* Apr 18, 2014 2947 bsteffen Support unitless data. * Apr 18, 2014 2947 bsteffen Support unitless data.
* Sep 10, 2014 DR 17313 jgerth Add inspect method
* *
* </pre> * </pre>
* *
@ -140,7 +143,7 @@ public class TrueColorResourceGroup extends
* Mapping to keep colormap parameters in sync with ChannelInfo in * Mapping to keep colormap parameters in sync with ChannelInfo in
* resourceData * resourceData
*/ */
private Map<ColorMapParameters, ChannelInfo> channelInfoMap = new IdentityHashMap<ColorMapParameters, ChannelInfo>(); private Map<ColorMapCapability, ChannelInfo> channelInfoMap = new IdentityHashMap<ColorMapCapability, ChannelInfo>();
/** /**
* @param resourceData * @param resourceData
@ -246,9 +249,9 @@ public class TrueColorResourceGroup extends
for (ChannelResource cr : resourceData.getChannelResources()) { for (ChannelResource cr : resourceData.getChannelResources()) {
for (ResourcePair rp : resources) { for (ResourcePair rp : resources) {
if (cr.getResourceData() == rp.getResourceData()) { if (cr.getResourceData() == rp.getResourceData()) {
DisplayedChannelResource displayedResource = new DisplayedChannelResource( DisplayedChannelResource displayedResource = new DisplayedChannelResource(
cr, rp.getResource()); cr, rp.getResource());
AbstractVizResource<?, ?> resource = rp.getResource(); AbstractVizResource<?, ?> resource = rp.getResource();
resource.init(target); resource.init(target);
// Check resource for required capabilities // Check resource for required capabilities
@ -256,16 +259,7 @@ public class TrueColorResourceGroup extends
if (resource.hasCapability(ImagingCapability.class)) { if (resource.hasCapability(ImagingCapability.class)) {
ImagingCapability imaging = resource ImagingCapability imaging = resource
.getCapability(ImagingCapability.class); .getCapability(ImagingCapability.class);
if (imaging.getProvider() != null) { if (imaging.getProvider() == null) {
if (resource
.hasCapability(ColorMapCapability.class) == false) {
error = "does not have ColorMapCapability";
} else if (resource.getCapability(
ColorMapCapability.class)
.getColorMapParameters() == null) {
error = "does not have ColorMapParameters set";
}
} else {
error = "does not have image provider set on the ImagingCapability"; error = "does not have image provider set on the ImagingCapability";
} }
} else { } else {
@ -279,35 +273,32 @@ public class TrueColorResourceGroup extends
if (error == null) { if (error == null) {
// No errors so far, check for ChannelInfo override // No errors so far, check for ChannelInfo override
ColorMapParameters params = resource.getCapability( ColorMapCapability cmapCap = resource
ColorMapCapability.class) .getCapability(ColorMapCapability.class);
ColorMapParameters params = cmapCap
.getColorMapParameters(); .getColorMapParameters();
ChannelInfo ci = resourceData ChannelInfo ci = resourceData
.getChannelInfo(displayedResource.getChannel()); .getChannelInfo(displayedResource.getChannel());
if (ci == null if (ci == null) {
|| ci.getUnit().isCompatible( ci = new ChannelInfo();
params.getDataUnit())) { ci.setChannel(displayedResource.getChannel());
if (ci == null) { if (params != null) {
ci = new ChannelInfo(); ci.setUnit(params.getColorMapUnit());
ci.setChannel(displayedResource.getChannel()); ci.setRangeMin(params.getColorMapMin());
resourceData.setChannelInfo(ci); ci.setRangeMax(params.getColorMapMax());
} else {
params.setDisplayUnit(ci.getUnit());
params.setColorMapMin((float) params
.getDisplayToDataConverter().convert(
ci.getRangeMin()));
params.setColorMapMax((float) params
.getDisplayToDataConverter().convert(
ci.getRangeMax()));
} }
channelInfoMap.put(params, ci); resourceData.setChannelInfo(ci);
resourceChanged(
ChangeType.CAPABILITY,
resource.getCapability(ColorMapCapability.class));
} else {
error = "is not compatible with custom ChannelInfo for Channel="
+ displayedResource.getChannel();
} }
channelInfoMap.put(cmapCap, ci);
if (params != null && params.getColorMapUnit() == null) {
// no colormap units set, default to ChannelInfo
params.setColorMapUnit(ci.getUnit());
}
initializeParameters(ci, params);
} }
if (error != null) { if (error != null) {
@ -317,7 +308,9 @@ public class TrueColorResourceGroup extends
+ error); + error);
resources.remove(rp); resources.remove(rp);
} else { } else {
resource.getResourceData().addChangeListener(this); // Listener will handle case where params are changed
// after the fact and we will reinitialize
resource.getResourceData().addChangeListener(this);
displayedResources.put(displayedResource.getChannel(), displayedResources.put(displayedResource.getChannel(),
displayedResource); displayedResource);
} }
@ -430,19 +423,90 @@ public class TrueColorResourceGroup extends
if (toDisplay == null) { if (toDisplay == null) {
toDisplay = UnitConverter.IDENTITY; toDisplay = UnitConverter.IDENTITY;
} }
ChannelInfo ci = channelInfoMap.get(params); ChannelInfo ci = channelInfoMap.get(object);
if (ci != null) { if (ci != null) {
ci.setRangeMin(toDisplay.convert( if (ci.getParameters() != params) {
params.getColorMapMin())); // Reinitialize params from channel info
ci.setRangeMax(toDisplay.convert( initializeParameters(ci, params);
params.getColorMapMax())); } else {
ci.setUnit(params.getDisplayUnit()); ci.setRangeMin(toDisplay.convert(params
.getColorMapMin()));
ci.setRangeMax(toDisplay.convert(params
.getColorMapMax()));
ci.setUnit(params.getDisplayUnit());
}
} }
} }
} }
issueRefresh(); issueRefresh();
} }
@Override
public String inspect(ReferencedCoordinate coord) throws VizException {
String label = "";
for (Channel c : Channel.values()) {
DisplayedChannelResource dcr = displayedResources.get(c);
if (dcr != null) {
String ri = dcr.resource.inspect(coord);
label += c.name() + ": " + ri;
if (dcr.resource.hasCapability(ColorMapCapability.class) && ri.replaceAll("[^\\d]", "").length() > 0) {
ColorMapParameters cmp = dcr.resource.getCapability(ColorMapCapability.class).getColorMapParameters();
UnitConverter uc = cmp.getColorMapToDisplayConverter();
if (uc == null)
uc = UnitConverter.IDENTITY;
double cmmax = uc.convert(cmp.getColorMapMax());
double cmmin = uc.convert(cmp.getColorMapMin());
String rirall;
if (ri.charAt(0) == ('-'))
rirall = "-" + (ri.substring(1) + "x").replaceAll("[^\\d.]", " ");
else
rirall = (ri + "x").replaceAll("[^\\d.]", " ");
try {
double value = Double.parseDouble(rirall.substring(0,rirall.indexOf(" ")));
double percent = ((value - cmmin) * 100.0 / (cmmax - cmmin));
if (percent < 0)
percent = 0.0;
else if (percent > 100)
percent = 100.0;
label += " (" + Math.round(percent) + "%)\n";
} catch (Exception e) {
label += "\n";
}
} else
label += "\n";
}
}
if (label.length() > 0)
return label;
else
return "NO DATA";
}
private static void initializeParameters(ChannelInfo ci,
ColorMapParameters params) {
if (params != null) {
ci.setParameters(params);
if (ci.getUnit() != null && params.getColorMapUnit() != null
&& ci.getUnit().isCompatible(params.getColorMapUnit())) {
params.setDisplayUnit(ci.getUnit());
UnitConverter displayToCmap = params
.getDisplayToColorMapConverter();
params.setColorMapMin(
(float) displayToCmap.convert(ci.getRangeMin()),
true);
params.setColorMapMax(
(float) displayToCmap.convert(ci.getRangeMax()),
true);
} else {
UnitConverter cmapToDisplay = params
.getColorMapToDisplayConverter();
ci.setRangeMin(cmapToDisplay.convert(params.getColorMapMin()));
ci.setRangeMax(cmapToDisplay.convert(params.getColorMapMax()));
ci.setUnit(params.getDisplayUnit());
}
}
}
public Collection<DisplayedChannelResource> getChannelResources() { public Collection<DisplayedChannelResource> getChannelResources() {
return displayedResources.values(); return displayedResources.values();
} }

View file

@ -50,6 +50,7 @@ import com.raytheon.uf.viz.truecolor.extension.ITrueColorImagingExtension.Channe
* Date Ticket# Engineer Description * Date Ticket# Engineer Description
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Aug 6, 2012 mschenke Initial creation * Aug 6, 2012 mschenke Initial creation
* Aug 22, 2014 DR 17313 jgerth Support for load properties
* *
* </pre> * </pre>
* *
@ -94,16 +95,19 @@ public class TrueColorResourceGroupData extends AbstractResourceData implements
} }
}; };
for (ChannelResource resource : channelResources) { for (ChannelResource resource : channelResources) {
addResource(resource.getResourceData()); addResource(resource.getResourceData(), resource.getLoadProperties());
} }
} }
return resourceList; return resourceList;
} }
private void addResource(AbstractResourceData resourceData) { private void addResource(AbstractResourceData resourceData, LoadProperties loadProp) {
ResourcePair rp = new ResourcePair(); ResourcePair rp = new ResourcePair();
rp.setResourceData(resourceData); rp.setResourceData(resourceData);
rp.setLoadProperties(new LoadProperties()); if (loadProp == null)
rp.setLoadProperties(new LoadProperties());
else
rp.setLoadProperties(loadProp);
rp.setProperties(new ResourceProperties()); rp.setProperties(new ResourceProperties());
resourceList.add(rp); resourceList.add(rp);
} }

View file

@ -22,6 +22,8 @@ package com.raytheon.viz.grid.rsc.general;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@ -64,12 +66,14 @@ import com.raytheon.uf.common.style.contour.ContourPreferences;
import com.raytheon.uf.common.style.image.ColorMapParameterFactory; import com.raytheon.uf.common.style.image.ColorMapParameterFactory;
import com.raytheon.uf.common.style.image.ImagePreferences; import com.raytheon.uf.common.style.image.ImagePreferences;
import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.common.time.DataTime;
import com.raytheon.uf.viz.core.DrawableImage;
import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.IGraphicsTarget;
import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.VizApp;
import com.raytheon.uf.viz.core.drawables.ColorMapLoader; import com.raytheon.uf.viz.core.drawables.ColorMapLoader;
import com.raytheon.uf.viz.core.drawables.IRenderable; import com.raytheon.uf.viz.core.drawables.IRenderable;
import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.PaintProperties;
import com.raytheon.uf.viz.core.drawables.PaintStatus; import com.raytheon.uf.viz.core.drawables.PaintStatus;
import com.raytheon.uf.viz.core.drawables.ext.IImagingExtension.ImageProvider;
import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.exception.VizException;
import com.raytheon.uf.viz.core.map.IMapDescriptor; import com.raytheon.uf.viz.core.map.IMapDescriptor;
import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData; import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData;
@ -125,7 +129,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* Jan 14, 2014 2594 bsteffen Switch vector mag/dir to use data source * Jan 14, 2014 2594 bsteffen Switch vector mag/dir to use data source
* instead of raw float data. * instead of raw float data.
* Feb 28, 2014 2791 bsteffen Switch all data to use data source. * Feb 28, 2014 2791 bsteffen Switch all data to use data source.
* * Aug 21, 2014 DR 17313 jgerth Implements ImageProvider
* *
* </pre> * </pre>
* *
@ -134,7 +138,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* @param <T> * @param <T>
*/ */
public abstract class AbstractGridResource<T extends AbstractResourceData> public abstract class AbstractGridResource<T extends AbstractResourceData>
extends AbstractVizResource<T, IMapDescriptor> { extends AbstractVizResource<T, IMapDescriptor> implements ImageProvider {
private static final transient IUFStatusHandler statusHandler = UFStatus private static final transient IUFStatusHandler statusHandler = UFStatus
.getHandler(AbstractGridResource.class); .getHandler(AbstractGridResource.class);
@ -345,6 +349,7 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
this.getCapability(ImagingCapability.class) this.getCapability(ImagingCapability.class)
.setInterpolationState(true); .setInterpolationState(true);
} }
this.getCapability(ImagingCapability.class).setProvider(this);
altDisplayTypes.add(DisplayType.CONTOUR); altDisplayTypes.add(DisplayType.CONTOUR);
break; break;
case BARB: case BARB:
@ -438,43 +443,6 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
} }
} }
@Override
protected void paintInternal(IGraphicsTarget target,
PaintProperties paintProps) throws VizException {
DataTime time = paintProps.getDataTime();
if (time == null) {
time = getTimeForResource();
}
if (time == null) {
return;
}
synchronized (renderableMap) {
if (renderableMap.containsKey(time)) {
for (IRenderable renderable : renderableMap.get(time)) {
renderable.paint(target, paintProps);
}
return;
}
List<GeneralGridData> dataList = requestData(time);
if (dataList == null) {
updatePaintStatus(PaintStatus.INCOMPLETE);
return;
}
List<IRenderable> renderableList = new ArrayList<IRenderable>(
dataList.size());
for (GeneralGridData data : dataList) {
IRenderable renderable = createRenderable(target, data);
if (renderable != null) {
renderableList.add(renderable);
renderable.paint(target, paintProps);
}
}
renderableMap.put(time, renderableList);
}
}
/** /**
* Create a renderable for this data. * Create a renderable for this data.
* *
@ -999,4 +967,63 @@ public abstract class AbstractGridResource<T extends AbstractResourceData>
return new ArrayList<PluginDataObject>(list); return new ArrayList<PluginDataObject>(list);
} }
public Collection<DrawableImage> getImages(IGraphicsTarget target, PaintProperties paintProps) throws VizException {
if (getCapability(DisplayTypeCapability.class).getDisplayType() != DisplayType.IMAGE) {
throw new VizException("Grid resource not configured for image rendering");
}
Collection<IRenderable> renderables = getOrCreateRenderables(target, paintProps);
if (renderables.isEmpty()) {
return Collections.emptyList();
}
List<DrawableImage> images = new ArrayList<DrawableImage>();
for (IRenderable renderable : renderables) {
images.addAll(((TileSetRenderable)renderable).getImagesToRender(target, paintProps));
}
return images;
}
protected Collection<IRenderable> getOrCreateRenderables(
IGraphicsTarget target, PaintProperties paintProps)
throws VizException {
DataTime time = paintProps.getDataTime();
if (time == null) {
time = getTimeForResource();
}
if (time == null) {
return Collections.emptyList();
}
List<IRenderable> renderables;
synchronized (renderableMap) {
if (renderableMap.containsKey(time)) {
renderables = renderableMap.get(time);
} else {
List<GeneralGridData> dataList = requestData(time);
if (dataList == null) {
updatePaintStatus(PaintStatus.INCOMPLETE);
return Collections.emptyList();
}
renderables = new ArrayList<IRenderable>(dataList.size());
for (GeneralGridData data : dataList) {
IRenderable renderable = createRenderable(target, data);
if (renderable != null) {
renderables.add(renderable);
}
}
renderableMap.put(time, renderables);
}
}
return renderables;
}
@Override
protected void paintInternal(IGraphicsTarget target,
PaintProperties paintProps) throws VizException {
for (IRenderable renderable : getOrCreateRenderables(target, paintProps)) {
renderable.paint(target, paintProps);
}
}
} }

View file

@ -49,7 +49,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* 6/27/06 lvenable Initial Creation. * 6/27/06 lvenable Initial Creation.
* 04/07/2010 4671 mpduff Have the map update upon closure of the dialog. * 04/07/2010 4671 mpduff Have the map update upon closure of the dialog.
* 07/02/2013 2088 rferrel Changes for non-blocking ColorScaleMgrDlg. * 07/02/2013 2088 rferrel Changes for non-blocking ColorScaleMgrDlg.
* * 9/4/2014 14448 cgobs Make HydroView redisplay after save of color settings in ColorScaleMgr
* </pre> * </pre>
* *
* @author lvenable * @author lvenable
@ -97,6 +97,25 @@ public class ColorScaleMgrAction extends AbstractHandler {
} }
} }
}); });
colorScaleDlg.setSaveCallback(new ColorScaleMgrDlg.ISaveCallback() {
public void execute() {
HydroDisplayManager displayManager = HydroDisplayManager
.getInstance();
boolean dataChanged = true;
displayManager.setColorChanged(dataChanged);
// redraw the main display
displayManager.setDataChanged(dataChanged);
StationDisplay sd = StationDisplay.getInstance();
sd.redraw();
}
});
colorScaleDlg.open(); colorScaleDlg.open();
} else { } else {
colorScaleDlg.bringToTop(); colorScaleDlg.bringToTop();

View file

@ -73,7 +73,8 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* disappearing after save * disappearing after save
* 01 Jul 2013 2088 rferrel Changes for non-blocking dialogs. * 01 Jul 2013 2088 rferrel Changes for non-blocking dialogs.
* 06 Sep 2013 #2342 lvenable Fixed color memory leaks and a null point exception. * 06 Sep 2013 #2342 lvenable Fixed color memory leaks and a null point exception.
* </pre> * 04 Sep 2014 14448 cgobs Make MPE redisplay after save of color settings in ColorScaleMgr
* </pre>
* *
* @author lvenable * @author lvenable
* @version 1.0 * @version 1.0
@ -96,6 +97,19 @@ public class ColorScaleMgrDlg extends CaveSWTDialog {
*/ */
private ColorChooserDlg colorDlg; private ColorChooserDlg colorDlg;
/**
* callback to be execute upon saving of a color set
* generally used to update the display with the newly-saved color set
*/
private ISaveCallback saveCallback;
public interface ISaveCallback {
public void execute();
}
/** /**
* User's name. * User's name.
*/ */
@ -915,6 +929,7 @@ public class ColorScaleMgrDlg extends CaveSWTDialog {
} }
}; };
/** /**
* Update the color label on the display * Update the color label on the display
* *
@ -2016,9 +2031,17 @@ public class ColorScaleMgrDlg extends CaveSWTDialog {
updateDurationCombo(); updateDurationCombo();
updateColorValueLabelBar(); updateColorValueLabelBar();
if (this.saveCallback != null) {
this.saveCallback.execute();
}
setReturnValue(true); setReturnValue(true);
} }
public void setSaveCallback(ISaveCallback iSaveCallback)
{
this.saveCallback = iSaveCallback;
}
/** /**
* dataType has changed, update dialog * dataType has changed, update dialog

View file

@ -1278,4 +1278,9 @@ public class MPEDisplayManager {
return type; return type;
} }
public int getDisplayedAccumHrs() {
return displayedAccumHrs;
}
} }

View file

@ -36,7 +36,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* ------------ ---------- ----------- -------------------------- * ------------ ---------- ----------- --------------------------
* Jun 17, 2009 snaples Initial creation * Jun 17, 2009 snaples Initial creation
* May 06, 2011 #8994 jpiatt Added set precipitation value as zero * May 06, 2011 #8994 jpiatt Added set precipitation value as zero
* * Sep 04, 2014 283 cgobs Fixed possible selection of filtered-out gages
* </pre> * </pre>
* *
* @author snaples * @author snaples
@ -80,11 +80,25 @@ public class GroupEditPrecipStns {
continue; continue;
} }
//precip filter
if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data < QcPrecipOptionsDialog if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data < QcPrecipOptionsDialog
.getPointFilterValue()) { .getPointFilterValue()) {
continue; continue;
} }
//reverse precip filter
if (DailyQcUtils.pdata[DailyQcUtils.pcpn_day].stn[i].frain[time_pos].data > QcPrecipOptionsDialog
.getPointFilterReverseValue()) {
continue;
}
//elevation filter
if (DailyQcUtils.precip_stations.get(i).elev < DailyQcUtils.elevation_filter_value)
{
continue;
}
/* Retrieve the latitude and longitude of this station. */ /* Retrieve the latitude and longitude of this station. */
lat = DailyQcUtils.precip_stations.get(i).lat; lat = DailyQcUtils.precip_stations.get(i).lat;
lon = DailyQcUtils.precip_stations.get(i).lon; lon = DailyQcUtils.precip_stations.get(i).lon;

View file

@ -48,6 +48,7 @@ import com.raytheon.viz.ui.dialogs.ICloseCallback;
* Jan 16, 2014 #2691 lvenable Fixed null pointer exception that occurs when closing * Jan 16, 2014 #2691 lvenable Fixed null pointer exception that occurs when closing
* the MPE perspective while the ColorScaleMgrDlg is * the MPE perspective while the ColorScaleMgrDlg is
* visible. * visible.
* 04 Sep 2014 14448 cgobs Make MPE redisplay after save of color settings in ColorScaleMgr
* </pre> * </pre>
* *
* @author mschenke * @author mschenke
@ -103,10 +104,54 @@ public class MPEColorScaleMgrAction extends AbstractHandler {
DisplayFieldData dt = MPEDisplayManager.getCurrent() DisplayFieldData dt = MPEDisplayManager.getCurrent()
.getDisplayFieldType(); .getDisplayFieldType();
MPEDisplayManager.getCurrent().displayFieldData(dt); int displayedAccumHrs = mdm.getDisplayedAccumHrs();
mdm.displayFieldData(dt,displayedAccumHrs );
} }
} }
}); });
//anonymous class declaration for the purposes of a callback execute upon save to database
colorScaleDlg.setSaveCallback(new ColorScaleMgrDlg.ISaveCallback() {
public void execute() {
MPEDisplayManager mdm = MPEDisplayManager.getCurrent();
// If the MPE Display Manager is null then return as no
// action is needed.
if (mdm == null) {
return;
}
MPEFieldResource displayedFieldResource = mdm
.getDisplayedFieldResource();
if (displayedFieldResource != null) {
MPEFieldResourceData resourceData = displayedFieldResource
.getResourceData();
displayedFieldResource
.getCapability(ColorMapCapability.class)
.setColorMapParameters(
MPEDisplayManager.createColorMap(
resourceData.getCvUseString(),
resourceData
.getDurationInHours(),
resourceData.getDataUnits(),
resourceData.getDisplayUnits()));
DisplayFieldData dt = MPEDisplayManager.getCurrent()
.getDisplayFieldType();
int displayedAccumHrs = mdm.getDisplayedAccumHrs();
mdm.displayFieldData(dt, displayedAccumHrs);
}
}
});
colorScaleDlg.open(); colorScaleDlg.open();
} else { } else {
colorScaleDlg.bringToTop(); colorScaleDlg.bringToTop();

View file

@ -62,6 +62,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* May 20, 2013 15962 lbousaidi Added a new routine getRadarIdsTrue() * May 20, 2013 15962 lbousaidi Added a new routine getRadarIdsTrue()
* for Radar Sites dialog. * for Radar Sites dialog.
* Mar 05, 2014 17114 lbousaidi display PC data in gage table. * Mar 05, 2014 17114 lbousaidi display PC data in gage table.
* Sep 04, 2014 16699 cgobs Fixed 14.3.1 issue with reading MPE field data.
* </pre> * </pre>
* *
* @author mpduff * @author mpduff
@ -1136,10 +1137,9 @@ public class GageTableDataManager {
double returnValue = -999.0; double returnValue = -999.0;
try { try {
String cv_use = dataType.getCv_use();
String dirname = appsDefaults.getToken(dataType.getDirToken()); String dirname = appsDefaults.getToken(dataType.getDirToken());
String fname = FileUtil.join(dirname, String fname = FileUtil.join(dirname,
cv_use + sdf.format(displayManager.getCurrentEditDate()) + "z"); dataType.getFileNamePrefix() + sdf.format(displayManager.getCurrentEditDate()) + "z");
Rectangle extent = dataManager.getHRAPExtent(); Rectangle extent = dataManager.getHRAPExtent();

View file

@ -21,7 +21,7 @@
</contribute> </contribute>
<contribute xsi:type="bundleItem" file="bundles/DefaultRadarMosaic.xml" <contribute xsi:type="bundleItem" file="bundles/DefaultRadarMosaic.xml"
menuText="Hybrid Scan Refl" id="RadarHybridScanRefl"> menuText="Hybrid Scan Refl" id="RadarHybridScanRefl">
<substitute key="product" value="33" /> <substitute key="product" value="32,33" />
<substitute key="elevation" value="0.0" /> <substitute key="elevation" value="0.0" />
<substitute key="name" value="Hybrid Scan Refl" /> <substitute key="name" value="Hybrid Scan Refl" />
</contribute> </contribute>
@ -113,4 +113,4 @@
<contribute xsi:type="subinclude" fileName="menus/radar/dialRadars.xml" /> <contribute xsi:type="subinclude" fileName="menus/radar/dialRadars.xml" />
</contribute> </contribute>
<contribute xsi:type="subinclude" fileName="menus/radar/baseRadarApplications.xml" /> <contribute xsi:type="subinclude" fileName="menus/radar/baseRadarApplications.xml" />
</menuTemplate> </menuTemplate>

View file

@ -19,7 +19,7 @@
further_licensing_information. further_licensing_information.
--> -->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contribute xsi:type="titleItem" titleText="------ Best Res Z+V ------" <contribute xsi:type="titleItem" titleText="------ Best Res Z+V combo------"
id="BestResZV" /> id="BestResZV" />
<contribute xsi:type="bundleItem" <contribute xsi:type="bundleItem"
file="bundles/DefaultRadarBlendedBestRes.xml" menuText="0.5 Z+V" file="bundles/DefaultRadarBlendedBestRes.xml" menuText="0.5 Z+V"
@ -295,4 +295,4 @@
<substitute key="elevation" value="19.5--19.5" /> <substitute key="elevation" value="19.5--19.5" />
</contribute> </contribute>
</contribute> </contribute>
</menuTemplate> </menuTemplate>

View file

@ -19,7 +19,7 @@
further_licensing_information. further_licensing_information.
--> -->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contribute xsi:type="titleItem" titleText="------ Best Res Z+V ------" <contribute xsi:type="titleItem" titleText="------ Best Res Z+V combo ------"
id="BestResZV" /> id="BestResZV" />
<contribute xsi:type="bundleItem" <contribute xsi:type="bundleItem"
file="bundles/DefaultRadarBlendedBestRes.xml" menuText="0.0 Z+V" file="bundles/DefaultRadarBlendedBestRes.xml" menuText="0.0 Z+V"

View file

@ -121,6 +121,7 @@ import com.vividsolutions.jts.geom.Coordinate;
* parameters, implement ImageProvider * parameters, implement ImageProvider
* May 06, 2014 njensen Improve error message * May 06, 2014 njensen Improve error message
* Jun 12, 2014 3238 bsteffen Implement Interrogatable * Jun 12, 2014 3238 bsteffen Implement Interrogatable
* Aug 21, 2014 DR 17313 jgerth Set no data value if no data mapping
* *
* </pre> * </pre>
* *
@ -394,7 +395,8 @@ public class SatResource extends
if (persisted != null) { if (persisted != null) {
colorMapParameters.applyPersistedParameters(persisted); colorMapParameters.applyPersistedParameters(persisted);
} }
colorMapParameters.setNoDataValue(0); if (colorMapParameters.getDataMapping() == null)
colorMapParameters.setNoDataValue(0);
getCapability(ColorMapCapability.class).setColorMapParameters( getCapability(ColorMapCapability.class).setColorMapParameters(
colorMapParameters); colorMapParameters);
@ -463,7 +465,7 @@ public class SatResource extends
if (dataMapping != null) { if (dataMapping != null) {
// if the pixel value matches the data mapping entry use that // if the pixel value matches the data mapping entry use that
// label instead // label instead
String label = dataMapping.getLabelValueForDataValue(measuredValue); String label = dataMapping.getSampleOrLabelValueForDataValue(measuredValue);
if (label != null) { if (label != null) {
return label; return label;
} }

View file

@ -553,7 +553,7 @@ public class ScriptEditorDialog extends CaveSWTDialog implements IScriptEditor {
item.addSelectionListener(listener); item.addSelectionListener(listener);
item = new MenuItem(subMenu, SWT.PUSH); item = new MenuItem(subMenu, SWT.PUSH);
item.setText("Line\tF7"); item.setText("Line\tF8");
item.setAccelerator(SWT.F8); item.setAccelerator(SWT.F8);
item.setData(EditMenuSelection.DEL_LINE); item.setData(EditMenuSelection.DEL_LINE);
item.addSelectionListener(listener); item.addSelectionListener(listener);

View file

@ -35,7 +35,7 @@
<include installTo="menu:volume?before=VolumeBundles" <include installTo="menu:volume?before=VolumeBundles"
fileName="menus/volume/ModelFamilies.xml"> fileName="menus/volume/ModelFamilies.xml">
</include> </include>
<include subMenu="4-PanelFamilies" installTo="menu:volume?before=ComparisonFamilies" <include subMenu="4-Panel Families" installTo="menu:volume?before=ComparisonFamilies"
fileName="menus/volume/baseFourPanelFamilies.xml"> fileName="menus/volume/baseFourPanelFamilies.xml">
</include> </include>
<include installTo="menu:volume?after=ComparisonFamilies" <include installTo="menu:volume?after=ComparisonFamilies"

View file

@ -19,6 +19,37 @@
further_licensing_information. further_licensing_information.
--> -->
<menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <menuTemplate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<contribute xsi:type="toolbarSubMenu" menuText="100mb Layers">
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="300MB-200MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="400-300MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="500-400MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="600-500MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="700-600MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="800-700MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="900-800MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="1000-900MB" indentText="false"/>
</contribute>
<contribute xsi:type="toolbarSubMenu" menuText="50mb Layers">
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="1000-950MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="950-900MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="900-850MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="850-800MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="800-750MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="750-700MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="700-650MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="650-600MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="600-550MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="550-500MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="500-450MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="450-400MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="400-350MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="350-300MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="300-250MB" indentText="false"/>
<contribute xsi:type="menuItem" textLookup="LevelMapping" key="250-200MB" indentText="false"/>
</contribute>
<!-- <!--
Don't override this file, it exists only to support legacy overrides. Don't override this file, it exists only to support legacy overrides.
Please override menus/volumebrowser/planes/planViewTime-timeSeries.xml instead. Please override menus/volumebrowser/planes/planViewTime-timeSeries.xml instead.

View file

@ -1206,6 +1206,7 @@
</Level> </Level>
<Level displayName="FrzLvl" key="FrzLvl" group="S"> <Level displayName="FrzLvl" key="FrzLvl" group="S">
<DatabaseLevel levelName="FRZ" levelOneValue="0" /> <DatabaseLevel levelName="FRZ" levelOneValue="0" />
<DatabaseLevel levelName="TEMP" levelOneValue="0" unit="C" />
</Level> </Level>
<Level displayName="HghstTropFrz" key="Htfl" group="S"> <Level displayName="HghstTropFrz" key="Htfl" group="S">
<DatabaseLevel levelName="HTFL" levelOneValue="0" /> <DatabaseLevel levelName="HTFL" levelOneValue="0" />

View file

@ -27,7 +27,7 @@
<constraint constraintValue="MWS,SMW,FFW,FLW,FLY,SVR,TOR,EWW,SVS,EWS,FFS,FLS" constraintType="IN" /> <constraint constraintValue="MWS,SMW,FFW,FLW,FLY,SVR,TOR,EWW,SVS,EWS,FFS,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="MA.W,FF.W,FA.W,FA.Y,TO.W,TO.W,EW.W" constraintType="IN" /> <constraint constraintValue="MA.W,FF.W,FA.W,FA.Y,TO.W,SV.W,EW.W,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -198,7 +198,7 @@
<constraint constraintValue="FFW,FFS" constraintType="IN" /> <constraint constraintValue="FFW,FFS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FF.W" constraintType="EQUALS" /> <constraint constraintValue="FF.W,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -232,7 +232,7 @@
<constraint constraintValue="FLW,FLS" constraintType="IN" /> <constraint constraintValue="FLW,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FA.W" constraintType="EQUALS" /> <constraint constraintValue="FA.W,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -266,7 +266,7 @@
<constraint constraintValue="FLY,FLS" constraintType="IN" /> <constraint constraintValue="FLY,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FA.Y" constraintType="EQUALS" /> <constraint constraintValue="FA.Y,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -280,4 +280,4 @@
</descriptor> </descriptor>
</displays> </displays>
</displayList> </displayList>
</bundle> </bundle>

View file

@ -28,7 +28,7 @@
<constraint constraintValue="FFW,FLW,FLY,FFS,FLS" constraintType="IN" /> <constraint constraintValue="FFW,FLW,FLY,FFS,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FF.W,FA.W,FA.Y" constraintType="IN" /> <constraint constraintValue="FF.W,FA.W,FA.Y,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -62,7 +62,7 @@
<constraint constraintValue="FFW,FFS" constraintType="IN" /> <constraint constraintValue="FFW,FFS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FF.W" constraintType="EQUALS" /> <constraint constraintValue="FF.W,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -96,7 +96,7 @@
<constraint constraintValue="FLW,FLS" constraintType="IN" /> <constraint constraintValue="FLW,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FA.W" constraintType="EQUALS" /> <constraint constraintValue="FA.W,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -130,7 +130,7 @@
<constraint constraintValue="FLY,FLS" constraintType="IN" /> <constraint constraintValue="FLY,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FA.Y" constraintType="EQUALS" /> <constraint constraintValue="FA.Y,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -144,4 +144,4 @@
</descriptor> </descriptor>
</displays> </displays>
</displayList> </displayList>
</bundle> </bundle>

View file

@ -27,7 +27,7 @@
<constraint constraintValue="FFW,FLW,FLY,FFS,FLS" constraintType="IN" /> <constraint constraintValue="FFW,FLW,FLY,FFS,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FF.W,FA.W,FA.Y" constraintType="IN" /> <constraint constraintValue="FF.W,FA.W,FA.Y,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -61,7 +61,7 @@
<constraint constraintValue="FFW,FFS" constraintType="IN" /> <constraint constraintValue="FFW,FFS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FF.W" constraintType="EQUALS" /> <constraint constraintValue="FF.W,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -95,7 +95,7 @@
<constraint constraintValue="FLW,FLS" constraintType="IN" /> <constraint constraintValue="FLW,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FA.W" constraintType="EQUALS" /> <constraint constraintValue="FA.W,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -129,7 +129,7 @@
<constraint constraintValue="FLY,FLS" constraintType="IN" /> <constraint constraintValue="FLY,FLS" constraintType="IN" />
</mapping> </mapping>
<mapping key="phensig"> <mapping key="phensig">
<constraint constraintValue="FA.Y" constraintType="EQUALS" /> <constraint constraintValue="FA.Y,FL.Y" constraintType="IN" />
</mapping> </mapping>
<mapping key="pluginName"> <mapping key="pluginName">
<constraint constraintValue="warning" constraintType="EQUALS" /> <constraint constraintValue="warning" constraintType="EQUALS" />
@ -143,4 +143,4 @@
</descriptor> </descriptor>
</displays> </displays>
</displayList> </displayList>
</bundle> </bundle>

View file

@ -23,7 +23,7 @@
</model> </model>
<model> <model>
<name>MPE-Mosaic</name> <name>MPE-Local</name>
<center>9</center> <center>9</center>
<subcenter>0</subcenter> <subcenter>0</subcenter>
<grid>304</grid> <grid>304</grid>
@ -52,6 +52,7 @@
</process> </process>
</model> </model>
<!-- END SUBCENTER 0 --> <!-- END SUBCENTER 0 -->
<!-- SUBCENTER 105: San Juan PR WFO --> <!-- SUBCENTER 105: San Juan PR WFO -->

View file

@ -44,7 +44,7 @@ import com.vividsolutions.jts.geom.Envelope;
* Apr 15, 2014 3017 bsteffen Add new getCoverage methods to support * Apr 15, 2014 3017 bsteffen Add new getCoverage methods to support
* either one corner + dx/dy or two corners. * either one corner + dx/dy or two corners.
* Jun 05, 2014 3243 bsteffen Remove deprecated lambert conformal call. * Jun 05, 2014 3243 bsteffen Remove deprecated lambert conformal call.
* * Sep 15, 2014 DR 17303 jgerth Support for second standard latitude
* *
* </pre> * </pre>
*/ */
@ -143,18 +143,20 @@ public class SatSpatialFactory {
* @param ny * @param ny
* the number of rows of data. * the number of rows of data.
* @param lov * @param lov
* the longitude orientatition, used by * the longitude orientation, used by
* {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT},
* {@link #PROJ_POLAR}. * {@link #PROJ_POLAR}.
* @param latin * @param latin
* the latitude at which the projection is tangent to the earths * the latitude at which the projection is tangent to the earths
* surface, used by {@link #PROJ_CYLIN_EQUIDISTANT}, * surface, used by {@link #PROJ_CYLIN_EQUIDISTANT},
* {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}. * {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}.
* @param latin2
* the second standard latitude, used by {@link #PROJ_LAMBERT}.
* @param la1 * @param la1
* the latitude of a corner of the grid, if dy is positive this * the latitude of a corner of the grid, if dy is positive this
* is an upper corner. * is an upper corner.
* @param lo1 * @param lo1
* the longitide of a corner of the grid, if dx is positive this * the longitude of a corner of the grid, if dx is positive this
* is a left corner * is a left corner
* @param dx * @param dx
* the distance between columns measured in CRS meters. * the distance between columns measured in CRS meters.
@ -165,10 +167,10 @@ public class SatSpatialFactory {
* @throws DecoderException * @throws DecoderException
*/ */
public SatMapCoverage getCoverageSingleCorner(int crsType, int nx, int ny, public SatMapCoverage getCoverageSingleCorner(int crsType, int nx, int ny,
double lov, double latin, double la1, double lo1, double dx, double lov, double latin, double latin2, double la1, double lo1, double dx,
double dy) throws DecoderException { double dy) throws DecoderException {
try { try {
ProjectedCRS crs = createCRS(crsType, lov, latin, 0.0); ProjectedCRS crs = createCRS(crsType, lov, latin, latin2, 0.0);
DirectPosition2D corner = new DirectPosition2D(lo1, la1); DirectPosition2D corner = new DirectPosition2D(lo1, la1);
MathTransform fromLatLon = MapUtil.getTransformFromLatLon(crs); MathTransform fromLatLon = MapUtil.getTransformFromLatLon(crs);
fromLatLon.transform(corner, corner); fromLatLon.transform(corner, corner);
@ -195,10 +197,19 @@ public class SatSpatialFactory {
} }
} }
/**
* @see {@link #getCoverageSingleCorner(int, int, int, double, double, double, double, double, double, double)}
*/
public SatMapCoverage getCoverageSingleCorner(int crsType, int nx, int ny,
double lov, double latin, double la1, double lo1, double dx,
double dy) throws DecoderException {
return getCoverageSingleCorner(crsType, nx, ny, lov, latin, latin, la1, lo1, dx, dy);
}
/** /**
* *
* Create a {@link SatMapCoverage} with an area defined by two corners. The * Create a {@link SatMapCoverage} with an area defined by two corners. The
* two corners must be opposite(diagnol) from eachother. They caan be either * two corners must be opposite (diagonal) from each other. They can be either
* the upper left and lower right or the upper right and lower left corners. * the upper left and lower right or the upper right and lower left corners.
* *
* @param crsType * @param crsType
@ -206,36 +217,38 @@ public class SatSpatialFactory {
* {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT},
* {@link #PROJ_MERCATOR}, {@link #PROJ_POLAR}. * {@link #PROJ_MERCATOR}, {@link #PROJ_POLAR}.
* @param lov * @param lov
* the longitude orientatition, used by * the longitude orientation, used by
* {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT},
* {@link #PROJ_POLAR}. * {@link #PROJ_POLAR}.
* @param latin * @param latin
* the latitude at which the projection is tangent to the earths * the latitude at which the projection is tangent to the earths
* surface, used by {@link #PROJ_CYLIN_EQUIDISTANT}, * surface, used by {@link #PROJ_CYLIN_EQUIDISTANT},
* {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}. * {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}.
* @param latin2
* the second standard latitude, used by {@link #PROJ_LAMBERT}.
* @param la1 * @param la1
* the latitude of a corner of the grid. * the latitude of a corner of the grid.
* @param lo1 * @param lo1
* the longitide of a corner of the grid. * the longitude of a corner of the grid.
* @param la2 * @param la2
* the latitude of a corner of the grid., should be opposite * the latitude of a corner of the grid., should be opposite
* corner from la1. * corner from la1.
* @param lo2 * @param lo2
* the longitide of a corner of the grid, should be opposite * the longitude of a corner of the grid, should be opposite
* corner from lo1 * corner from lo1
* @return a {@link SatMapCoverage} matching these parameters that has been * @return a {@link SatMapCoverage} matching these parameters that has been
* loaded from or persisted to the database. * loaded from or persisted to the database.
* @throws DecoderException * @throws DecoderException
*/ */
public SatMapCoverage getCoverageTwoCorners(int crsType, int nx, int ny, public SatMapCoverage getCoverageTwoCorners(int crsType, int nx, int ny,
double lov, double latin, double la1, double lo1, double la2, double lov, double latin, double latin2, double la1, double lo1, double la2,
double lo2) throws DecoderException { double lo2) throws DecoderException {
try { try {
double cm = 0.0; double cm = 0.0;
if ((lo1 > 0.0) && (lo2 < 0.0)) { if ((lo1 > 0.0) && (lo2 < 0.0)) {
cm = 180.0; cm = 180.0;
} }
ProjectedCRS crs = createCRS(crsType, lov, latin, cm); ProjectedCRS crs = createCRS(crsType, lov, latin, latin2, cm);
DirectPosition2D corner1 = new DirectPosition2D(lo1, la1); DirectPosition2D corner1 = new DirectPosition2D(lo1, la1);
DirectPosition2D corner2 = new DirectPosition2D(lo2, la2); DirectPosition2D corner2 = new DirectPosition2D(lo2, la2);
MathTransform fromLatLon = MapUtil.getTransformFromLatLon(crs); MathTransform fromLatLon = MapUtil.getTransformFromLatLon(crs);
@ -264,6 +277,15 @@ public class SatSpatialFactory {
} }
} }
/**
* @see {@link #getCoverageTwoCorners(int, int, int, double, double, double, double, double, double, double)}
*/
public SatMapCoverage getCoverageTwoCorners(int crsType, int nx, int ny,
double lov, double latin, double la1, double lo1, double la2,
double lo2) throws DecoderException {
return getCoverageTwoCorners(crsType, nx, ny, lov, latin, latin, la1, lo1, la2, lo2);
}
/** Load or persist a {@link SatMapCoverage} */ /** Load or persist a {@link SatMapCoverage} */
private synchronized SatMapCoverage checkPersisted( private synchronized SatMapCoverage checkPersisted(
SatMapCoverage mapCoverage) { SatMapCoverage mapCoverage) {
@ -296,25 +318,27 @@ public class SatSpatialFactory {
* {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT},
* {@link #PROJ_MERCATOR}, {@link #PROJ_POLAR}. * @param lov * {@link #PROJ_MERCATOR}, {@link #PROJ_POLAR}. * @param lov
* @param lov * @param lov
* the longitude orientatition, used by * the longitude orientation, used by
* {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT}, * {@link #PROJ_CYLIN_EQUIDISTANT}, {@link #PROJ_LAMBERT},
* {@link #PROJ_POLAR}. * {@link #PROJ_POLAR}.
* @param latin * @param latin
* the latitude at which the projection is tangent to the earths * the latitude at which the projection is tangent to the earths
* surface, used by {@link #PROJ_CYLIN_EQUIDISTANT}, * surface, used by {@link #PROJ_CYLIN_EQUIDISTANT},
* {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}. * {@link #PROJ_LAMBERT}, {@link #PROJ_MERCATOR}.
* @param latin2
* the second standard latitude, used by {@link #PROJ_LAMBERT}.
* @param cm * @param cm
* the central meridian of the projection, only used by * the central meridian of the projection, only used by
* {@link #PROJ_MERCATOR}. * {@link #PROJ_MERCATOR}.
* @return * @return
*/ */
private static ProjectedCRS createCRS(int crsType, double lov, private static ProjectedCRS createCRS(int crsType, double lov,
double latin, double cm) { double latin, double latin2, double cm) {
switch (crsType) { switch (crsType) {
case PROJ_MERCATOR: case PROJ_MERCATOR:
return createMercatorCrs(latin, cm); return createMercatorCrs(latin, cm);
case PROJ_LAMBERT: case PROJ_LAMBERT:
return createLambertCrs(latin, lov); return createLambertCrs(latin, latin2, lov);
case PROJ_CYLIN_EQUIDISTANT: case PROJ_CYLIN_EQUIDISTANT:
return createEqCylCrs(latin, lov); return createEqCylCrs(latin, lov);
default: default:
@ -327,9 +351,9 @@ public class SatSpatialFactory {
MapUtil.AWIPS_EARTH_RADIUS, latin, cm); MapUtil.AWIPS_EARTH_RADIUS, latin, cm);
} }
private static ProjectedCRS createLambertCrs(double latin, double lov) { private static ProjectedCRS createLambertCrs(double latin, double latin2, double lov) {
return MapUtil.constructLambertConformal(MapUtil.AWIPS_EARTH_RADIUS, return MapUtil.constructLambertConformal(MapUtil.AWIPS_EARTH_RADIUS,
MapUtil.AWIPS_EARTH_RADIUS, latin, latin, lov, latin); MapUtil.AWIPS_EARTH_RADIUS, latin, latin2, lov, latin);
} }
private static ProjectedCRS createEqCylCrs(double latin, double lov) { private static ProjectedCRS createEqCylCrs(double latin, double lov) {

View file

@ -2242,7 +2242,7 @@
</styleRule> </styleRule>
<!-- <!--
* NBE, cCin * NBE, cCin
J/kg | 1 | 0 | 1 | 450 | |,x | 29 | 0 | 100 J/kg | 1 | 0 | -1000 | -1 | |,x | 29 | 0 | 100
--> -->
<styleRule> <styleRule>
<paramLevelMatches> <paramLevelMatches>
@ -2253,8 +2253,8 @@
<!-- filterLow="true" --> <!-- filterLow="true" -->
<displayUnits>J/kg</displayUnits> <displayUnits>J/kg</displayUnits>
<range scale="LINEAR"> <range scale="LINEAR">
<minValue>1</minValue> <minValue>-1000</minValue>
<maxValue>450</maxValue> <maxValue>-1</maxValue>
</range> </range>
<defaultColormap>Grid/gridded data</defaultColormap> <defaultColormap>Grid/gridded data</defaultColormap>
<colorbarLabeling> <colorbarLabeling>

View file

@ -416,6 +416,7 @@
<entry displayValue='20' pixelValue='200' /> <entry displayValue='20' pixelValue='200' />
<entry displayValue='40' pixelValue='227' /> <entry displayValue='40' pixelValue='227' />
<entry displayValue='60' pixelValue='245' /> <entry displayValue='60' pixelValue='245' />
<entry displayValue='80' pixelValue='254' label="" />
</dataMapping> </dataMapping>
</imageStyle> </imageStyle>
</styleRule> </styleRule>
@ -672,4 +673,4 @@
</imageStyle> </imageStyle>
</styleRule> </styleRule>
</styleRuleset> </styleRuleset>

View file

@ -1 +1 @@
ca813b5edb6475a6f8bcbf7982997873cd6a0f65 198d9e1b995f9fcf55686c0992f4bb0612f429e0

View file

@ -1 +1 @@
ca813b5edb6475a6f8bcbf7982997873cd6a0f65 198d9e1b995f9fcf55686c0992f4bb0612f429e0

View file

@ -776,8 +776,11 @@ void main_mpe_fieldgen_for_calls_from_editor(int num_args, char ** args)
break; break;
case lsatpre : case lsatpre :
ptrMPEParams->polarizationType = SinglePol ; sprintf( message , "STATUS: BEFORE calling MPEFieldGen_runLSatpre in main \n") ;
runLSatpre ( ptrRunDate, printMessage( message, logFile );
ptrMPEParams->polarizationType = SinglePol ;
MPEFieldGen_runLSatpre ( ptrRunDate,
ptrGeoData, ptrGeoData,
ptrMPEParams, ptrMPEParams,
gageSize, iug, ivg, zg, gageSize, iug, ivg, zg,

View file

@ -61,6 +61,7 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools;
* IDataRecord required by the SatelliteDao * IDataRecord required by the SatelliteDao
* Aug 30, 2013 2298 rjpeter Make getPluginName abstract * Aug 30, 2013 2298 rjpeter Make getPluginName abstract
* Apr 15, 2014 3017 bsteffen Call new methods in SatSpatialFactory * Apr 15, 2014 3017 bsteffen Call new methods in SatSpatialFactory
* Sep 11, 2014 DR 17303 jgerth Support for second standard latitude
* </pre> * </pre>
* *
* @author tk * @author tk
@ -116,26 +117,26 @@ public class RegionalSatDecoder extends AbstractDecoder {
netCdfFile = NetcdfFile.openInMemory(filename, data); netCdfFile = NetcdfFile.openInMemory(filename, data);
// set the source; Alaska Region // set the source; Alaska Region
if (source == null) { String gaSourceStr = "Unknown";
source = "Source"; // use to look up source value; default of Attribute gaSource = netCdfFile.findGlobalAttribute("source");
// Source if (gaSource != null) {
gaSourceStr = gaSource.getStringValue().trim();
} }
record.setSource(getSource(source)); // lookup source value record.setSource(getSource(gaSourceStr).replace("/", " ")); // lookup source value
// set the creating entity // set the creating entity
Attribute satName = netCdfFile.findGlobalAttribute("satelliteName"); Attribute satName = netCdfFile.findGlobalAttribute("satelliteName");
String entity = null; // "HRPT"; "GOESR-PG"; "Blended2"; String entity = null; // "HRPT"; "GOESR-PG"; "Blended2";
if (satName != null) { if (satName != null) {
entity = satName.getStringValue(); entity = satName.getStringValue().trim();
} }
if (entity != null) { if (entity != null) {
String parsed = getCreatingEntity(entity); String parsed = getCreatingEntity(entity);
if ((parsed != null) && (parsed.length() > 0)) { if ((parsed != null) && (parsed.length() > 0)) {
record.setCreatingEntity(parsed); record.setCreatingEntity(parsed.replace("/", " "));
} else { } else {
record.setCreatingEntity(entity); record.setCreatingEntity(entity.replace("/", " "));
} }
} else { } else {
record.setCreatingEntity("Unknown"); record.setCreatingEntity("Unknown");
@ -156,9 +157,9 @@ public class RegionalSatDecoder extends AbstractDecoder {
pev = getPhysicalElement(entity, channel); pev = getPhysicalElement(entity, channel);
String element = pev.name; String element = pev.name;
if (pev.name != null) { if (pev.name != null) {
record.setPhysicalElement(element); record.setPhysicalElement(element.replace("/", " "));
} else { } else {
record.setPhysicalElement(channel); record.setPhysicalElement(channel.replace("/", " "));
} }
} else { } else {
record.setPhysicalElement("Imager Visible"); record.setPhysicalElement("Imager Visible");
@ -181,10 +182,10 @@ public class RegionalSatDecoder extends AbstractDecoder {
// read the valid time in seconds and store the time in milliseconds // read the valid time in seconds and store the time in milliseconds
long time = netCdfFile.findVariable("validTime").readScalarLong(); // time long time = netCdfFile.findVariable("validTime").readScalarLong(); // time
// in // in
// seconds // seconds
calendar.setTimeInMillis(time * 1000); // need to convert seconds to calendar.setTimeInMillis(time * 1000); // need to convert seconds to
// milliseconds // milliseconds
/* /*
* Date date = new Date(); // used for setting the test data time * Date date = new Date(); // used for setting the test data time
@ -199,9 +200,10 @@ public class RegionalSatDecoder extends AbstractDecoder {
.getNumericValue().floatValue(); .getNumericValue().floatValue();
int mapProjection = SatSpatialFactory.PROJ_POLAR; // STEREOGRAPHIC int mapProjection = SatSpatialFactory.PROJ_POLAR; // STEREOGRAPHIC
// projection // projection
// default // default
float latin = 0.0f; // set to zero for Stereographic projections float latin = 0.0f; // set to zero for Stereographic projections
Attribute rot = netCdfFile.findGlobalAttribute("rotation");
float rotation = 0.0f; float rotation = 0.0f;
// read the projection // read the projection
@ -214,6 +216,9 @@ public class RegionalSatDecoder extends AbstractDecoder {
if (projection.equalsIgnoreCase("LAMBERT") if (projection.equalsIgnoreCase("LAMBERT")
|| projection.equalsIgnoreCase("LAMBERT_CONFORMAL")) { || projection.equalsIgnoreCase("LAMBERT_CONFORMAL")) {
mapProjection = SatSpatialFactory.PROJ_LAMBERT; mapProjection = SatSpatialFactory.PROJ_LAMBERT;
if (rot != null) {
rotation = rot.getNumericValue().floatValue();
}
} else if (projection.equalsIgnoreCase("MERCATOR")) { } else if (projection.equalsIgnoreCase("MERCATOR")) {
mapProjection = SatSpatialFactory.PROJ_MERCATOR; mapProjection = SatSpatialFactory.PROJ_MERCATOR;
} else if (projection } else if (projection
@ -222,7 +227,6 @@ public class RegionalSatDecoder extends AbstractDecoder {
} }
} else { } else {
Attribute rot = netCdfFile.findGlobalAttribute("rotation");
if (rot != null) { if (rot != null) {
rotation = rot.getNumericValue().floatValue(); rotation = rot.getNumericValue().floatValue();
// STEREOGRAPHIC projection add rotation to lov // STEREOGRAPHIC projection add rotation to lov
@ -274,9 +278,15 @@ public class RegionalSatDecoder extends AbstractDecoder {
"Unable to decode Satellite: Encountered Unknown projection"); "Unable to decode Satellite: Encountered Unknown projection");
} // end of if map projection block } // end of if map projection block
SatMapCoverage mapCoverage = SatSpatialFactory.getInstance() SatMapCoverage mapCoverage;
.getCoverageTwoCorners(mapProjection, nx, ny, lov, latin, if (mapProjection == SatSpatialFactory.PROJ_LAMBERT && rot != null && rotation != latin)
la1, lo1, la2, lo2); mapCoverage = SatSpatialFactory.getInstance()
.getCoverageTwoCorners(mapProjection, nx, ny, lov, latin, rotation,
la1, lo1, la2, lo2);
else
mapCoverage = SatSpatialFactory.getInstance()
.getCoverageTwoCorners(mapProjection, nx, ny, lov, latin,
la1, lo1, la2, lo2);
record.setTraceId(traceId); record.setTraceId(traceId);
record.setCoverage(mapCoverage); record.setCoverage(mapCoverage);
@ -357,4 +367,4 @@ public class RegionalSatDecoder extends AbstractDecoder {
this.filename = file; this.filename = file;
} }
} }