VLab Issue #5929 - NSHARP freezes when loading a sounding from MDCRS
products in Volume Browser Change-Id: I6578174c6f446a2d702eeca0577717715d13fcfa Former-commit-id: 209e62cc40160cd023e42711a008afb0ef39d3ea
This commit is contained in:
parent
5da7d7e78b
commit
ea9ef0f93e
8 changed files with 597 additions and 471 deletions
|
@ -19,6 +19,9 @@ import java.util.List;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 04/23/2012 229 Chin Chen Initial coding
|
||||
* 01/27/2015 DR#17006,
|
||||
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||
* in Volume Browser
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -37,9 +40,10 @@ public class NsharpSoundingElementStateProperty {
|
|||
private int compColorIndex;
|
||||
private List<NcSoundingLayer> sndLyLst;
|
||||
private List<NcSoundingLayer> sndLyLstBk;
|
||||
private boolean goodData = true; //#5929
|
||||
public NsharpSoundingElementStateProperty(String elementDescription,
|
||||
String stnDescription,
|
||||
String timeDescription, NsharpStationInfo stnInfo, List<NcSoundingLayer> sndLyLst) {
|
||||
String timeDescription, NsharpStationInfo stnInfo, List<NcSoundingLayer> sndLyLst, boolean goodData) {
|
||||
super();
|
||||
this.elementDescription = elementDescription;
|
||||
//this.elementState = elementState;
|
||||
|
@ -49,6 +53,7 @@ public class NsharpSoundingElementStateProperty {
|
|||
this.sndType = stnInfo.getSndType();
|
||||
this.compColorIndex = NsharpConstants.LINE_COMP1;;
|
||||
this.sndLyLst = sndLyLst;
|
||||
this.goodData = goodData; //#5929
|
||||
sndLyLstBk= new ArrayList<NcSoundingLayer>(sndLyLst.size());
|
||||
for(NcSoundingLayer ly : sndLyLst){
|
||||
try {
|
||||
|
@ -134,5 +139,13 @@ public class NsharpSoundingElementStateProperty {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isGoodData() {
|
||||
return goodData;
|
||||
}
|
||||
|
||||
public void setGoodData(boolean goodData) {
|
||||
this.goodData = goodData;
|
||||
}
|
||||
|
||||
}
|
|
@ -13,6 +13,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
|||
* 04/23/2012 229 Chin Chen Initial coding
|
||||
* 04/23/2014 Chin Chen Add d2d lite page
|
||||
* 08/11/2014 Chin Chen fix typo
|
||||
* 01/27/2015 DR#17006,
|
||||
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||
* in Volume Browser
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -60,7 +63,8 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
|||
// number of this page. index 0
|
||||
// point to a dummy.
|
||||
|
||||
private static final String NO_DATA = "NO VALID DATA AVAILABLE";
|
||||
private static final String NO_DATA = "NO VALID DATA AVAILABLE FOR THIS PAGE";
|
||||
private static final String INSUFFICIENT_DATA = "INSUFFICIENT DATA FOR PARAMETERS COMPUTATION";
|
||||
|
||||
// private double charHeight = NsharpConstants.CHAR_HEIGHT_;
|
||||
private double curY;
|
||||
|
@ -160,7 +164,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
|||
handleResize();
|
||||
}
|
||||
|
||||
if ((soundingLys != null) && (soundingLys.size() >= 4)) {
|
||||
if ((soundingLys != null) && (rscHandler.isGoodData())) {//#5929
|
||||
this.defaultFont.setSmoothing(false);
|
||||
this.defaultFont.setScaleFont(false);
|
||||
// write to panels
|
||||
|
@ -187,6 +191,9 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
|||
}
|
||||
}
|
||||
}
|
||||
else { //#5929
|
||||
drawInsuffDataMessage(target, panelRectArray[0]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -239,6 +246,28 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
|||
super.resetData(soundingLys, prevsoundingLys);
|
||||
currentParcel = NsharpNativeConstants.PARCELTYPE_MOST_UNSTABLE;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation") //#5929
|
||||
private void drawInsuffDataMessage(IGraphicsTarget target, Rectangle rect)
|
||||
throws VizException {
|
||||
IFont myfont;
|
||||
if (paneConfigurationName.equals(NsharpConstants.PANE_LITE_D2D_CFG_STR))
|
||||
myfont = font9;
|
||||
else
|
||||
myfont = font20;
|
||||
|
||||
defineCharHeight(myfont);
|
||||
myfont.setSmoothing(false);
|
||||
myfont.setScaleFont(false);
|
||||
sumP1Visible = true;
|
||||
extent = new PixelExtent(rect);
|
||||
target.setupClippingPlane(extent);
|
||||
target.drawString(myfont, INSUFFICIENT_DATA, rect.x,
|
||||
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
||||
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
private void drawPanel(IGraphicsTarget target, int pageOrderNumber,
|
||||
int dsiplayPanelNumber) throws VizException {
|
||||
|
@ -344,7 +373,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
|||
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
||||
// have enough raw data
|
||||
if ((nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0)) {
|
||||
target.drawString(myfont, " " + NO_DATA, rect.x,
|
||||
target.drawString(myfont, NO_DATA, rect.x,
|
||||
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
||||
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
||||
return;
|
||||
|
@ -1053,7 +1082,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
|||
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
||||
// have enough raw data
|
||||
if (nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0) {
|
||||
target.drawString(myfont, " " + NO_DATA, rect.x,
|
||||
target.drawString(myfont,NO_DATA, rect.x,
|
||||
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
||||
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
||||
return;
|
||||
|
@ -3749,7 +3778,7 @@ public class NsharpDataPaneResource extends NsharpAbstractPaneResource {
|
|||
// if we can not Interpolates a temp with 700 mb pressure, then we dont
|
||||
// have enough raw data
|
||||
if ((nsharpNative.nsharpLib.qc(nsharpNative.nsharpLib.itemp(700.0F)) == 0)) {
|
||||
target.drawString(myfont, " " + NO_DATA, rect.x,
|
||||
target.drawString(myfont, NO_DATA, rect.x,
|
||||
rect.y, 0.0, TextStyle.NORMAL, NsharpConstants.color_cyan,
|
||||
HorizontalAlignment.LEFT, VerticalAlignment.TOP, null);
|
||||
return;
|
||||
|
|
|
@ -10,6 +10,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 04/23/2012 229 Chin Chen Initial coding
|
||||
* 01/27/2015 DR#17006,
|
||||
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||
* in Volume Browser
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -127,7 +130,7 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
|||
hodoWindRscShapeList.add(shNcolor);
|
||||
}
|
||||
|
||||
|
||||
float surfaceLevel = soundingLays.get(0).getGeoHeight(); //#5929
|
||||
for (NcSoundingLayer layer : soundingLays){
|
||||
if(layer.getPressure() < 100 || layer.getWindSpeed() <0)
|
||||
continue;
|
||||
|
@ -138,15 +141,15 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
|||
double [][] lines = {{world.mapX(c0.x), world.mapY(c0.y)},{world
|
||||
.mapX(c1.x), world.mapY(c1.y)}};
|
||||
if(incolor == null){
|
||||
if(layer.getGeoHeight() <nsharpNative.nsharpLib.msl(3000)){
|
||||
//red
|
||||
//use MSL here, so Converts height from (meters) AGL to MSL. #5929
|
||||
if(layer.getGeoHeight() < (3000+surfaceLevel)){
|
||||
shapeR.addLineSegment(lines);
|
||||
}
|
||||
else if(layer.getGeoHeight() < nsharpNative.nsharpLib.msl(6000))
|
||||
else if(layer.getGeoHeight() < (6000+surfaceLevel))
|
||||
shapeG.addLineSegment(lines);
|
||||
else if(layer.getGeoHeight() < nsharpNative.nsharpLib.msl(9000))
|
||||
else if(layer.getGeoHeight() < (9000+surfaceLevel))
|
||||
shapeY.addLineSegment(lines);
|
||||
else if(layer.getGeoHeight() < nsharpNative.nsharpLib.msl(12000))
|
||||
else if(layer.getGeoHeight() < (12000+surfaceLevel))
|
||||
shapeC.addLineSegment(lines);
|
||||
else
|
||||
shapeV.addLineSegment(lines);
|
||||
|
@ -177,6 +180,7 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
|||
}
|
||||
hodoWindRscShapeList.clear();
|
||||
}
|
||||
|
||||
world = hodoBackground.computeWorld();
|
||||
boolean compareStnIsOn = rscHandler.isCompareStnIsOn();
|
||||
int currentTimeListIndex = rscHandler.getCurrentTimeElementListIndex();
|
||||
|
@ -575,7 +579,7 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
|||
return;
|
||||
|
||||
hodoBackground.paintInternal(target, paintProps);
|
||||
if((soundingLys != null) && (soundingLys.size()>= 4))
|
||||
if((soundingLys != null) && (soundingLys.size()> 2) )
|
||||
{
|
||||
this.font10.setSmoothing(false);
|
||||
this.font10.setScaleFont(false);
|
||||
|
@ -602,13 +606,11 @@ public class NsharpHodoPaneResource extends NsharpAbstractPaneResource{
|
|||
}
|
||||
target.clearClippingPlane();
|
||||
if(cursorInHodo){
|
||||
|
||||
|
||||
drawHodoDynamicData(target, currentZoomLevel);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,6 +10,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 04/23/2012 229 Chin Chen Initial coding
|
||||
* 01/27/2015 DR#17006,
|
||||
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||
* in Volume Browser
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -181,7 +184,7 @@ public class NsharpInsetPaneResource extends NsharpAbstractPaneResource{
|
|||
//Chin, since we only display 4 insets and their backgrounds have same size, only draws 4 backgrounds.
|
||||
//psblWatchTypeBackground.paint(target, paintProps);
|
||||
//thetaEPresureBackground.paint(target, paintProps);
|
||||
if((soundingLys != null) && (soundingLys.size()>= 4))
|
||||
if((soundingLys != null) && rscHandler.isGoodData()) //#5929)
|
||||
{
|
||||
this.font10.setSmoothing(false);
|
||||
this.font10.setScaleFont(false);
|
||||
|
@ -294,7 +297,7 @@ public class NsharpInsetPaneResource extends NsharpAbstractPaneResource{
|
|||
return;
|
||||
//System.out.println("createRscWireFrameShapes called");
|
||||
disposeInsetWireFrameShapes();
|
||||
if(soundingLys != null){
|
||||
if(soundingLys != null && rscHandler.isGoodData()){ //#5929
|
||||
|
||||
WGraphics WGc= thetaEPresureBackground.getWorld();
|
||||
createRscThetaEPressureShape(WGc);
|
||||
|
|
|
@ -15,6 +15,9 @@
|
|||
* 02/03/2014 1106 Chin Chen Need to be able to use clicking on the Src,Time, or StnId to select display
|
||||
* 08/12/2014 Chin Chen fixed issue that "load archive file with wrong time line displayed"
|
||||
* 12/04/2014 DR16888 Chin Chen fixed issue that "Comp(Src) button not functioning properly in NSHARP display"
|
||||
* 01/27/2015 DR#17006,
|
||||
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||
* in Volume Browser
|
||||
* </pre>
|
||||
*
|
||||
* @author Chin Chen
|
||||
|
@ -161,6 +164,8 @@ public class NsharpResourceHandler {
|
|||
|
||||
private int[] pageDisplayOrderNumberArray = new int[NsharpConstants.PAGE_MAX_NUMBER + 1];
|
||||
|
||||
//#5929
|
||||
private boolean goodData=false;
|
||||
// index is the real page defined in NsharpConstants to be shown, value is
|
||||
// the order number of this page.
|
||||
// index 0 point to a dummy.
|
||||
|
@ -188,7 +193,7 @@ public class NsharpResourceHandler {
|
|||
private int currentSoundingLayerIndex = 0;
|
||||
|
||||
private int hodoEditingSoundingLayerIndex = 0;
|
||||
|
||||
|
||||
private boolean plotInteractiveTemp = false;
|
||||
|
||||
private Coordinate interactiveTempPointCoordinate;
|
||||
|
@ -981,6 +986,7 @@ public class NsharpResourceHandler {
|
|||
if (skewtPaneRsc != null)
|
||||
skewtPaneRsc
|
||||
.setCurrentSkewTEditMode(NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT);
|
||||
elem.setGoodData(checkDataIntegrity(soundingLys));//#5929
|
||||
resetData();
|
||||
}
|
||||
|
||||
|
@ -993,7 +999,12 @@ public class NsharpResourceHandler {
|
|||
|
||||
// update active sounding layer and picked stn info
|
||||
// re-populate snd data to nsharp native code lib for later calculating
|
||||
nsharpNative.populateSndgData(soundingLys);
|
||||
//#5929 dont populate sounding data if data is bad
|
||||
|
||||
if(getCurSoundingElementStateProperty()!=null)
|
||||
goodData= getCurSoundingElementStateProperty().isGoodData();
|
||||
if(goodData)
|
||||
nsharpNative.populateSndgData(soundingLys);
|
||||
|
||||
if (skewtPaneRsc != null)
|
||||
skewtPaneRsc.resetData(soundingLys, previousSoundingLys);
|
||||
|
@ -1013,7 +1024,7 @@ public class NsharpResourceHandler {
|
|||
// if soundingLys is null, then we stop here, after reset data.
|
||||
if (soundingLys == null)
|
||||
return;
|
||||
if (soundingLys.size() > 0) {
|
||||
if (soundingLys.size() > 0 && (goodData)) {
|
||||
// set initial hodohouseC
|
||||
|
||||
// ----- set hodo circle at Bunkers Right, Chin according to TTR6065
|
||||
|
@ -1044,11 +1055,7 @@ public class NsharpResourceHandler {
|
|||
* that really meant to reset parcel type.
|
||||
*/
|
||||
}
|
||||
// Chin: TBD remove handle resize here to fix sizing issue when swapped
|
||||
// nsharp from side pane back to main pane
|
||||
// but, may cause other problem?
|
||||
// if(skewtPaneRsc!=null)
|
||||
// skewtPaneRsc.handleResize();
|
||||
|
||||
if (skewtPaneRsc != null)
|
||||
skewtPaneRsc.createRscWireFrameShapes();
|
||||
if (hodoPaneRsc != null)
|
||||
|
@ -1057,7 +1064,7 @@ public class NsharpResourceHandler {
|
|||
insetPaneRsc.createInsetWireFrameShapes();
|
||||
if (witoPaneRsc != null)
|
||||
witoPaneRsc.createAllWireFrameShapes();
|
||||
if (spcGraphsPaneRsc != null) {
|
||||
if (spcGraphsPaneRsc != null && (goodData) ){//#5929
|
||||
// Chin: SPC graphs performance concern, as it need to call get
|
||||
// info functions from bigSharo.so and cause long delay.
|
||||
// Therefore, do it once only when reset data.
|
||||
|
@ -1177,7 +1184,7 @@ public class NsharpResourceHandler {
|
|||
|
||||
private void addElementToTableAndLists(String stnId_timeLine_sndType,
|
||||
String stnId, String tmLine, String sndType,
|
||||
NsharpStationInfo stnInfo, List<NcSoundingLayer> sndLyLst) {
|
||||
NsharpStationInfo stnInfo, List<NcSoundingLayer> sndLyLst, boolean goodData) {
|
||||
// System.out.println("stn to be added "+ stnId + " timeline "+tmLine);
|
||||
NsharpSoundingElementStateProperty newSndPropElem = null;
|
||||
int tmIndex = getIndexFromElementList(tmLine, timeElementList);
|
||||
|
@ -1197,7 +1204,7 @@ public class NsharpResourceHandler {
|
|||
// NsharpSoundingElementStateProperty object
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||
sndLyLst);
|
||||
sndLyLst,goodData); //#5929
|
||||
stnTimeSndTable.get(stnIndex).get(tmIndex)
|
||||
.set(sndTpyeIndex, newSndPropElem);
|
||||
}
|
||||
|
@ -1214,7 +1221,7 @@ public class NsharpResourceHandler {
|
|||
// NsharpSoundingElementStateProperty object
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||
sndLyLst);
|
||||
sndLyLst,goodData);
|
||||
stnTimeSndTable.get(currentStnElementListIndex)
|
||||
.get(currentTimeElementListIndex)
|
||||
.set(currentSndElementListIndex, newSndPropElem);
|
||||
|
@ -1231,7 +1238,7 @@ public class NsharpResourceHandler {
|
|||
// NsharpSoundingElementStateProperty object
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||
sndLyLst);
|
||||
sndLyLst,goodData);
|
||||
stnTimeSndTable.get(currentStnElementListIndex)
|
||||
.get(currentTimeElementListIndex)
|
||||
.set(currentSndElementListIndex, newSndPropElem);
|
||||
|
@ -1253,7 +1260,7 @@ public class NsharpResourceHandler {
|
|||
// NsharpSoundingElementStateProperty object
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||
sndLyLst);
|
||||
sndLyLst,goodData);
|
||||
stnTimeSndTable.get(currentStnElementListIndex)
|
||||
.get(currentTimeElementListIndex)
|
||||
.set(currentSndElementListIndex, newSndPropElem);
|
||||
|
@ -1274,7 +1281,7 @@ public class NsharpResourceHandler {
|
|||
// NsharpSoundingElementStateProperty object
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||
sndLyLst);
|
||||
sndLyLst,goodData);
|
||||
stnTimeSndTable.get(currentStnElementListIndex)
|
||||
.get(currentTimeElementListIndex)
|
||||
.set(currentSndElementListIndex, newSndPropElem);
|
||||
|
@ -1296,7 +1303,7 @@ public class NsharpResourceHandler {
|
|||
// NsharpSoundingElementStateProperty object
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||
sndLyLst);
|
||||
sndLyLst,goodData);
|
||||
stnTimeSndTable.get(currentStnElementListIndex)
|
||||
.get(currentTimeElementListIndex)
|
||||
.set(currentSndElementListIndex, newSndPropElem);
|
||||
|
@ -1321,7 +1328,7 @@ public class NsharpResourceHandler {
|
|||
// NsharpSoundingElementStateProperty object
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||
sndLyLst);
|
||||
sndLyLst,goodData);
|
||||
stnTimeSndTable.get(currentStnElementListIndex)
|
||||
.get(currentTimeElementListIndex)
|
||||
.set(currentSndElementListIndex, newSndPropElem);
|
||||
|
@ -1357,7 +1364,7 @@ public class NsharpResourceHandler {
|
|||
// one new loaded sounding data
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId,
|
||||
tmLine, stnInfo, sndLyLst);
|
||||
tmLine, stnInfo, sndLyLst,goodData);
|
||||
|
||||
sndlistForTm.add(newSndPropElem);
|
||||
} else {
|
||||
|
@ -1405,7 +1412,7 @@ public class NsharpResourceHandler {
|
|||
|
||||
newSndPropElem = new NsharpSoundingElementStateProperty(
|
||||
stnId_timeLine_sndType, stnId, tmLine, stnInfo,
|
||||
sndLyLst);
|
||||
sndLyLst,goodData);
|
||||
newList.add(newSndPropElem);
|
||||
newListList.add(newList);
|
||||
stnTimeSndTable.add(newListList);
|
||||
|
@ -1862,6 +1869,21 @@ public class NsharpResourceHandler {
|
|||
*
|
||||
* }
|
||||
*/
|
||||
//task#5929
|
||||
private boolean checkDataIntegrity(List<NcSoundingLayer> sndLayers){
|
||||
boolean gooddata = false;
|
||||
int numberOfTemp=0;
|
||||
int numberOfGoodDewPt=0;
|
||||
for(NcSoundingLayer layer: sndLayers){
|
||||
if(layer.getTemperature() > -999)
|
||||
numberOfTemp++;
|
||||
if(layer.getDewpoint() > -999)
|
||||
numberOfGoodDewPt++;
|
||||
}
|
||||
if(numberOfGoodDewPt >= 2 && numberOfTemp>=2)
|
||||
gooddata=true;
|
||||
return gooddata;
|
||||
}
|
||||
|
||||
// This api peforms real load data function
|
||||
private void addRsc(boolean displayNewData,
|
||||
|
@ -1875,8 +1897,8 @@ public class NsharpResourceHandler {
|
|||
// // newkey=
|
||||
// String newkey =key.replace("NCUAIR", "gpduair"); // String newkey =
|
||||
// String newkey= key.replace("NAMS", "SSS");
|
||||
//String newkey = key.replace("130925/00(Wed)V000", "130925/00(Thu)V000");
|
||||
// soundMap.put(newkey, sndLy);
|
||||
// String newkey = key.replace("130925/17(Wed)V017", "131001/00(Thu)V000");
|
||||
// soundMap.put(newkey, sndLy);
|
||||
// }
|
||||
// // stnInfo.setSndType(stnInfo.getSndType().replace("NCUAIR", //
|
||||
// // "gpduair")); // stnInfo.setSndType(stnInfo.getSndType().replace(
|
||||
|
@ -1931,9 +1953,15 @@ public class NsharpResourceHandler {
|
|||
// based on this KEY string format "KGRI 100616/03(Wed)Vxxx GFSSND"
|
||||
String stnId, sndType, timeLine, timeLine_sndType, stnId_timeLine_sndType;
|
||||
List<NcSoundingLayer> sndLyLst;
|
||||
|
||||
try {
|
||||
stnId_timeLine_sndType = tempTimeLineArr[i].toString();
|
||||
if(stnId_timeLine_sndType.equals("N/A"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
sndLyLst = soundMap.get(stnId_timeLine_sndType);
|
||||
|
||||
stnId = stnId_timeLine_sndType.substring(0,
|
||||
stnId_timeLine_sndType.indexOf(" "));
|
||||
timeLine_sndType = stnId_timeLine_sndType
|
||||
|
@ -2022,8 +2050,10 @@ public class NsharpResourceHandler {
|
|||
// No more needed? timeLine = timeLine.replace(" ", "-"); //fixed
|
||||
// DR15325 - sorting time line issue in D2D
|
||||
// add time line to stnTimeTable and set its index
|
||||
//task#5929
|
||||
boolean goodData = checkDataIntegrity( sndLyLst);
|
||||
addElementToTableAndLists(stnId_timeLine_sndType, stnId, timeLine,
|
||||
sndType, stnInfo, sndLyLst);
|
||||
sndType, stnInfo, sndLyLst, goodData);
|
||||
}
|
||||
if (displayNewData) {
|
||||
// Set default parcel trace data
|
||||
|
@ -2627,10 +2657,7 @@ public class NsharpResourceHandler {
|
|||
|
||||
break;
|
||||
}
|
||||
if (compareSndIsOn) {
|
||||
handleUserPickNewTimeLine(currentTimeElementListIndex) ;
|
||||
return;
|
||||
}
|
||||
|
||||
curTimeLinePage = currentTimeElementListIndex / numTimeLinePerPage
|
||||
+ 1;
|
||||
setCurSndProfileProp();
|
||||
|
@ -2767,9 +2794,6 @@ public class NsharpResourceHandler {
|
|||
// we should get out of here
|
||||
break;
|
||||
} else if (compareSndIsOn) {
|
||||
handleUserPickNewTimeLine(targetIndex) ;
|
||||
return;
|
||||
/* Chin TBD 12112014
|
||||
boolean found = false;
|
||||
if (currentStnElementListIndex >= 0
|
||||
&& currentSndElementListIndex >= 0
|
||||
|
@ -2795,7 +2819,6 @@ public class NsharpResourceHandler {
|
|||
if (!found) {
|
||||
currentSndElementListIndex = -1;
|
||||
} else {
|
||||
|
||||
int colorIndex = NsharpConstants.LINE_COMP1;
|
||||
for (NsharpOperationElement elm : sndElementList) {
|
||||
if (elm.getActionState() == NsharpConstants.ActState.INACTIVE)
|
||||
|
@ -2811,13 +2834,11 @@ public class NsharpResourceHandler {
|
|||
if (colorIndex > NsharpConstants.LINE_COMP10)
|
||||
colorIndex = NsharpConstants.LINE_COMP1;
|
||||
}
|
||||
|
||||
}
|
||||
// no matter we find current snd type for this stn or
|
||||
// not
|
||||
// we should get out of here
|
||||
break;
|
||||
*/
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
@ -4043,7 +4064,13 @@ public class NsharpResourceHandler {
|
|||
// re-populate snd data to nsharp native code lib for later calculating
|
||||
Collections.sort(soundingLys,
|
||||
NsharpDataHandling.reversePressureHeightWindComparator());
|
||||
nsharpNative.populateSndgData(soundingLys);
|
||||
//#5929
|
||||
goodData = checkDataIntegrity( soundingLys);
|
||||
if(getCurSoundingElementStateProperty()!=null){
|
||||
getCurSoundingElementStateProperty().setGoodData(goodData);
|
||||
}
|
||||
if(goodData)
|
||||
nsharpNative.populateSndgData(soundingLys);
|
||||
// get storm motion wind data after populate sounding from NsharpLib
|
||||
// refresh test area if it is shown now
|
||||
NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess();
|
||||
|
@ -4069,6 +4096,13 @@ public class NsharpResourceHandler {
|
|||
}
|
||||
if (dataPaneRsc != null)
|
||||
dataPaneRsc.setSoundingLys(soundingLys);
|
||||
|
||||
if (spcGraphsPaneRsc != null && (goodData) ){//#5929
|
||||
// Chin: SPC graphs performance concern, as it need to call get
|
||||
// info functions from bigSharo.so and cause long delay.
|
||||
// Therefore, do it once only when reset data.
|
||||
spcGraphsPaneRsc.getSpcGraphsInfo();
|
||||
}
|
||||
}
|
||||
|
||||
public void addNewLayer(float tp, float dp, float ws, float wd,
|
||||
|
@ -4086,7 +4120,13 @@ public class NsharpResourceHandler {
|
|||
// re-populate snd data to nsharp native code lib for later calculating
|
||||
Collections.sort(soundingLys,
|
||||
NsharpDataHandling.reversePressureHeightWindComparator());
|
||||
nsharpNative.populateSndgData(soundingLys);
|
||||
//#5929
|
||||
goodData = checkDataIntegrity( soundingLys);
|
||||
if(getCurSoundingElementStateProperty()!=null){
|
||||
getCurSoundingElementStateProperty().setGoodData(goodData);
|
||||
}
|
||||
if(goodData)
|
||||
nsharpNative.populateSndgData(soundingLys);
|
||||
// get storm motion wind data after populate sounding from NsharpLib
|
||||
// refresh text area if it is shown now
|
||||
NsharpShowTextDialog textarea = NsharpShowTextDialog.getAccess();
|
||||
|
@ -4112,6 +4152,12 @@ public class NsharpResourceHandler {
|
|||
}
|
||||
if (dataPaneRsc != null)
|
||||
dataPaneRsc.setSoundingLys(soundingLys);
|
||||
if (spcGraphsPaneRsc != null && (goodData) ){//#5929
|
||||
// Chin: SPC graphs performance concern, as it need to call get
|
||||
// info functions from bigSharo.so and cause long delay.
|
||||
// Therefore, do it once only when reset data.
|
||||
spcGraphsPaneRsc.getSpcGraphsInfo();
|
||||
}
|
||||
}
|
||||
|
||||
public void setGraphConfigProperty(NsharpGraphProperty graphConfigProperty) {
|
||||
|
@ -4440,4 +4486,9 @@ public class NsharpResourceHandler {
|
|||
refreshPane();
|
||||
return true;
|
||||
}
|
||||
//#5929
|
||||
public boolean isGoodData() {
|
||||
return goodData;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
|||
* May 08, 2013 1847 bsteffen Allow painting with no Wind Data.
|
||||
* 02/03/2014 1106 Chin Chen Need to be able to use clicking on the Src,Time, or StnId to select display
|
||||
* 08/04/2014 Chin Chen fixed effective level line drawing, height marker drawing
|
||||
* 12/11/2014 DR16888 Chin Chen fixed issue that "Comp(Src) button not functioning properly in NSHARP display"
|
||||
* 01/27/2015 DR#17006,
|
||||
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||
* in Volume Browser
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -1740,6 +1742,8 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
|||
// box
|
||||
}
|
||||
target.drawStrings(str, latlonstr);
|
||||
if(wwTypeColor == null)
|
||||
wwTypeColor = NsharpConstants.color_gold;
|
||||
target.drawRect(boxExt, wwTypeColor, 2f, 1f); // box border line colored
|
||||
// with "Psbl Watch Type"
|
||||
// color
|
||||
|
@ -1768,7 +1772,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
|||
// to check a scenario that sounding data is removed while
|
||||
// thread is locked
|
||||
if (soundingLys == null
|
||||
|| (soundingLys != null && soundingLys.size() <= 0)) {
|
||||
|| (soundingLys != null && soundingLys.size() < 2)) {
|
||||
reentryLock.unlock();
|
||||
return;
|
||||
}
|
||||
|
@ -1779,7 +1783,7 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
|||
} else if (justBackToMainPane) {
|
||||
reentryLock.lock();
|
||||
if (soundingLys == null
|
||||
|| (soundingLys != null && soundingLys.size() <= 0)) {
|
||||
|| (soundingLys != null && soundingLys.size() < 2)) {
|
||||
reentryLock.unlock();
|
||||
return;
|
||||
}
|
||||
|
@ -1828,376 +1832,384 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
|||
this.font12.setScaleFont(false);
|
||||
// nsharpNative.populateSndgData(soundingLys);
|
||||
if (currentGraphMode == NsharpConstants.GRAPH_SKEWT) {
|
||||
target.setupClippingPlane(pe);
|
||||
// plot temp curve, when constructing pressureTempRscShapeList,
|
||||
// it already considered
|
||||
// comparison, overlay, etc..so, just draw it.
|
||||
for (NsharpShapeAndLineProperty shapeNLp : pressureTempRscShapeList) {
|
||||
target.drawWireframeShape(shapeNLp.getShape(), shapeNLp
|
||||
.getLp().getLineColor(), shapeNLp.getLp()
|
||||
.getLineWidth(), shapeNLp.getLp().getLineStyle(),
|
||||
font10);// commonLinewidth*2,commonLineStyle,font10);
|
||||
}
|
||||
// plot real temp parcel trace, when constructing
|
||||
// parcelRtShapeList, it already considered
|
||||
// comparison, overlay, etc..so, just draw it.
|
||||
// color is following comparison/overlay lines' configuration.
|
||||
// line width and line style are following parcel line
|
||||
// configuration
|
||||
if (graphConfigProperty.isParcel() == true) {
|
||||
NsharpLineProperty parcelLp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL]);
|
||||
for (NsharpShapeAndLineProperty shapeNLp : parcelRtShapeList) {
|
||||
target.drawWireframeShape(shapeNLp.getShape(), shapeNLp
|
||||
.getLp().getLineColor(), parcelLp
|
||||
.getLineWidth(), parcelLp.getLineStyle(),
|
||||
font10);// commonLinewidth*2,commonLineStyle,font10);
|
||||
}
|
||||
}
|
||||
boolean compareStnIsOn = rscHandler.isCompareStnIsOn();
|
||||
boolean compareSndIsOn = rscHandler.isCompareSndIsOn();
|
||||
boolean compareTmIsOn = rscHandler.isCompareTmIsOn();
|
||||
boolean editGraphOn = rscHandler.isEditGraphOn();
|
||||
boolean overlayIsOn = rscHandler.isOverlayIsOn();
|
||||
if (graphConfigProperty != null) {
|
||||
if (graphConfigProperty.isTemp() == true && !compareStnIsOn
|
||||
&& !compareTmIsOn && !compareSndIsOn) {
|
||||
if (editGraphOn)
|
||||
plotPressureTempEditPoints(target, world,
|
||||
NsharpConstants.color_red, TEMP_TYPE,
|
||||
this.soundingLys);
|
||||
}
|
||||
// dew point curve
|
||||
if (graphConfigProperty.isDewp() == true && !compareStnIsOn
|
||||
&& !compareTmIsOn && !compareSndIsOn) {
|
||||
if (editGraphOn)
|
||||
plotPressureTempEditPoints(target, world,
|
||||
NsharpConstants.color_green, DEWPOINT_TYPE,
|
||||
this.soundingLys);
|
||||
}
|
||||
// plot wet bulb trace
|
||||
if (graphConfigProperty.isWetBulb() == true
|
||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
|
||||
target.drawWireframeShape(wetBulbTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
}
|
||||
// plot virtual temperature trace
|
||||
if (graphConfigProperty.isVTemp() == true
|
||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
|
||||
target.drawWireframeShape(vtempTraceCurveRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
}
|
||||
// virtual temperature parcel trace curve
|
||||
if (graphConfigProperty.isParcelTv() == true
|
||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn
|
||||
&& !overlayIsOn) {
|
||||
if (soundingLys.size() > 0) {
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_TV]);
|
||||
target.drawWireframeShape(parcelVtTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
}
|
||||
}
|
||||
|
||||
if (graphConfigProperty.isDcape() == true
|
||||
&& dacpeTraceRscShape != null && !compareStnIsOn && !compareSndIsOn
|
||||
&& !compareTmIsOn && !overlayIsOn) {
|
||||
if (soundingLys.size() > 0) {
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]);
|
||||
target.drawWireframeShape(dacpeTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
target.setupClippingPlane(pe);
|
||||
// plot temp curve, when constructing pressureTempRscShapeList,
|
||||
// it already considered
|
||||
// comparison, overlay, etc..so, just draw it.
|
||||
for (NsharpShapeAndLineProperty shapeNLp : pressureTempRscShapeList) {
|
||||
target.drawWireframeShape(shapeNLp.getShape(), shapeNLp
|
||||
.getLp().getLineColor(), shapeNLp.getLp()
|
||||
.getLineWidth(), shapeNLp.getLp().getLineStyle(),
|
||||
font10);// commonLinewidth*2,commonLineStyle,font10);
|
||||
}
|
||||
// plot real temp parcel trace, when constructing
|
||||
// parcelRtShapeList, it already considered
|
||||
// comparison, overlay, etc..so, just draw it.
|
||||
// color is following comparison/overlay lines' configuration.
|
||||
// line width and line style are following parcel line
|
||||
// configuration
|
||||
if (graphConfigProperty.isParcel() == true && rscHandler.isGoodData()) { //#5929
|
||||
NsharpLineProperty parcelLp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL]);
|
||||
for (NsharpShapeAndLineProperty shapeNLp : parcelRtShapeList) {
|
||||
target.drawWireframeShape(shapeNLp.getShape(), shapeNLp
|
||||
.getLp().getLineColor(), parcelLp
|
||||
.getLineWidth(), parcelLp.getLineStyle(),
|
||||
font10);// commonLinewidth*2,commonLineStyle,font10);
|
||||
}
|
||||
}
|
||||
boolean compareStnIsOn = rscHandler.isCompareStnIsOn();
|
||||
boolean compareSndIsOn = rscHandler.isCompareSndIsOn();
|
||||
boolean compareTmIsOn = rscHandler.isCompareTmIsOn();
|
||||
boolean editGraphOn = rscHandler.isEditGraphOn();
|
||||
boolean overlayIsOn = rscHandler.isOverlayIsOn();
|
||||
if (graphConfigProperty != null) {
|
||||
if (graphConfigProperty.isTemp() == true && !compareStnIsOn
|
||||
&& !compareTmIsOn) {
|
||||
if (editGraphOn)
|
||||
plotPressureTempEditPoints(target, world,
|
||||
NsharpConstants.color_red, TEMP_TYPE,
|
||||
this.soundingLys);
|
||||
}
|
||||
// dew point curve
|
||||
if (graphConfigProperty.isDewp() == true && !compareStnIsOn
|
||||
&& !compareTmIsOn) {
|
||||
if (editGraphOn)
|
||||
plotPressureTempEditPoints(target, world,
|
||||
NsharpConstants.color_green, DEWPOINT_TYPE,
|
||||
this.soundingLys);
|
||||
}
|
||||
// plot wet bulb trace
|
||||
if (graphConfigProperty.isWetBulb() == true && rscHandler.isGoodData() //#5929
|
||||
&& !compareStnIsOn && !compareTmIsOn) {
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
|
||||
target.drawWireframeShape(wetBulbTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
}
|
||||
// plot virtual temperature trace
|
||||
if (graphConfigProperty.isVTemp() == true && rscHandler.isGoodData() //#5929
|
||||
&& !compareStnIsOn && !compareTmIsOn) {
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
|
||||
target.drawWireframeShape(vtempTraceCurveRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
}
|
||||
// virtual temperature parcel trace curve
|
||||
if (graphConfigProperty.isParcelTv() == true && rscHandler.isGoodData() //#5929
|
||||
&& !compareStnIsOn && !compareTmIsOn
|
||||
&& !overlayIsOn) {
|
||||
if (soundingLys.size() > 0) {
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_TV]);
|
||||
target.drawWireframeShape(parcelVtTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (graphConfigProperty.isEffLayer() == true
|
||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
||||
// draw effective layer lines
|
||||
// drawEffectiveLayerLines(target);
|
||||
target.drawWireframeShape(effectiveLayerLineShape,
|
||||
NsharpConstants.color_cyan_md, 2,
|
||||
commonLineStyle, font10);
|
||||
}
|
||||
// cloud
|
||||
if (graphConfigProperty.isCloud() == true
|
||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
||||
if (cloudFMShape != null)
|
||||
target.drawShadedShape(cloudFMShape, 1f);
|
||||
if (cloudFMLabelShape != null)
|
||||
target.drawWireframeShape(cloudFMLabelShape,
|
||||
NsharpConstants.color_chocolate,
|
||||
commonLinewidth * 3, commonLineStyle, font9);
|
||||
if (cloudCEShape != null)
|
||||
target.drawShadedShape(cloudCEShape, 1f);
|
||||
}
|
||||
if (graphConfigProperty.isOmega() == true
|
||||
&& !compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
||||
if (NsharpLoadDialog.getAccess() != null
|
||||
&& (NsharpLoadDialog.getAccess()
|
||||
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
|
||||
.getAccess()
|
||||
.getActiveLoadSoundingType() == NsharpLoadDialog.PFC_SND)) {
|
||||
// plot omega
|
||||
drawOmega();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// by default, draw everything
|
||||
if (!compareStnIsOn && !compareTmIsOn && !compareSndIsOn) {
|
||||
if (editGraphOn)
|
||||
plotPressureTempEditPoints(target, world,
|
||||
NsharpConstants.color_red, TEMP_TYPE,
|
||||
this.soundingLys);
|
||||
// dew point curve
|
||||
if (editGraphOn)
|
||||
plotPressureTempEditPoints(target, world,
|
||||
NsharpConstants.color_green, DEWPOINT_TYPE,
|
||||
this.soundingLys);
|
||||
// plot wetbulb trace
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
|
||||
target.drawWireframeShape(wetBulbTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
// plot virtual temp trace
|
||||
lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
|
||||
target.drawWireframeShape(vtempTraceCurveRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
if (graphConfigProperty.isDcape() == true && rscHandler.isGoodData() //#5929
|
||||
&& dacpeTraceRscShape != null && !compareStnIsOn
|
||||
&& !compareTmIsOn && !overlayIsOn) {
|
||||
if (soundingLys.size() > 0) {
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]);
|
||||
target.drawWireframeShape(dacpeTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
|
||||
// virtual temperature parcel trace curve
|
||||
if (!overlayIsOn) {
|
||||
lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_TV]);
|
||||
target.drawWireframeShape(parcelVtTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
if (dacpeTraceRscShape != null) {
|
||||
lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]);
|
||||
target.drawWireframeShape(dacpeTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
}
|
||||
}
|
||||
// draw effective layer lines
|
||||
// drawEffectiveLayerLines(target);
|
||||
target.drawWireframeShape(effectiveLayerLineShape,
|
||||
NsharpConstants.color_cyan_md, 2,
|
||||
commonLineStyle, font10);
|
||||
if (NsharpLoadDialog.getAccess() != null
|
||||
&& (NsharpLoadDialog.getAccess()
|
||||
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
|
||||
.getAccess()
|
||||
.getActiveLoadSoundingType() == NsharpLoadDialog.PFC_SND)) {
|
||||
// plot omega
|
||||
drawOmega();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (plotInteractiveTemp == true) {
|
||||
if (currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT)
|
||||
plotNsharpInteractiveEditingTemp(target,
|
||||
currentZoomLevel, world,
|
||||
NsharpConstants.color_white);
|
||||
else if (currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_MOVELINE)
|
||||
plotNsharpMovingTempLine(target, world,
|
||||
NsharpConstants.color_white);
|
||||
}
|
||||
}
|
||||
if (graphConfigProperty.isEffLayer() == true && rscHandler.isGoodData() //#5929
|
||||
&& !compareStnIsOn && !compareTmIsOn) {
|
||||
// draw effective layer lines
|
||||
// drawEffectiveLayerLines(target);
|
||||
target.drawWireframeShape(effectiveLayerLineShape,
|
||||
NsharpConstants.color_cyan_md, 2,
|
||||
commonLineStyle, font10);
|
||||
}
|
||||
// cloud
|
||||
if (graphConfigProperty.isCloud() == true && rscHandler.isGoodData() //#5929
|
||||
&& !compareStnIsOn && !compareTmIsOn) {
|
||||
if (cloudFMShape != null)
|
||||
target.drawShadedShape(cloudFMShape, 1f);
|
||||
if (cloudFMLabelShape != null)
|
||||
target.drawWireframeShape(cloudFMLabelShape,
|
||||
NsharpConstants.color_chocolate,
|
||||
commonLinewidth * 3, commonLineStyle, font9);
|
||||
if (cloudCEShape != null)
|
||||
target.drawShadedShape(cloudCEShape, 1f);
|
||||
}
|
||||
if (graphConfigProperty.isOmega() == true
|
||||
&& !compareStnIsOn && !compareTmIsOn) {
|
||||
if (NsharpLoadDialog.getAccess() != null
|
||||
&& (NsharpLoadDialog.getAccess()
|
||||
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
|
||||
.getAccess()
|
||||
.getActiveLoadSoundingType() == NsharpLoadDialog.PFC_SND)) {
|
||||
// plot omega
|
||||
drawOmega();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// by default, draw everything
|
||||
if (!compareStnIsOn && !compareTmIsOn) {
|
||||
if (editGraphOn)
|
||||
plotPressureTempEditPoints(target, world,
|
||||
NsharpConstants.color_red, TEMP_TYPE,
|
||||
this.soundingLys);
|
||||
// dew point curve
|
||||
if (editGraphOn)
|
||||
plotPressureTempEditPoints(target, world,
|
||||
NsharpConstants.color_green, DEWPOINT_TYPE,
|
||||
this.soundingLys);
|
||||
if(rscHandler.isGoodData()) { //#5929
|
||||
// plot wetbulb trace
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_WETBULB]);
|
||||
target.drawWireframeShape(wetBulbTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
// plot virtual temp trace
|
||||
lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_VIRTUAL_TEMP]);
|
||||
target.drawWireframeShape(vtempTraceCurveRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
|
||||
}
|
||||
target.clearClippingPlane();
|
||||
// virtual temperature parcel trace curve
|
||||
if (!overlayIsOn) {
|
||||
lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_PARCEL_TV]);
|
||||
target.drawWireframeShape(parcelVtTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
if (dacpeTraceRscShape != null) {
|
||||
lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_DCAPE]);
|
||||
target.drawWireframeShape(dacpeTraceRscShape,
|
||||
lp.getLineColor(), lp.getLineWidth(),
|
||||
lp.getLineStyle(), font10);
|
||||
}
|
||||
}
|
||||
// draw effective layer lines
|
||||
// drawEffectiveLayerLines(target);
|
||||
target.drawWireframeShape(effectiveLayerLineShape,
|
||||
NsharpConstants.color_cyan_md, 2,
|
||||
commonLineStyle, font10);
|
||||
}
|
||||
if (NsharpLoadDialog.getAccess() != null
|
||||
&& (NsharpLoadDialog.getAccess()
|
||||
.getActiveLoadSoundingType() == NsharpLoadDialog.MODEL_SND || NsharpLoadDialog
|
||||
.getAccess()
|
||||
.getActiveLoadSoundingType() == NsharpLoadDialog.PFC_SND)) {
|
||||
// plot omega
|
||||
drawOmega();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (plotInteractiveTemp == true) {
|
||||
if (currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_EDITPOINT)
|
||||
plotNsharpInteractiveEditingTemp(target,
|
||||
currentZoomLevel, world,
|
||||
NsharpConstants.color_white);
|
||||
else if (currentSkewTEditMode == NsharpConstants.SKEWT_EDIT_MODE_MOVELINE)
|
||||
plotNsharpMovingTempLine(target, world,
|
||||
NsharpConstants.color_white);
|
||||
|
||||
}
|
||||
target.clearClippingPlane();
|
||||
|
||||
// Wind Barb
|
||||
if ((graphConfigProperty != null && graphConfigProperty
|
||||
.isWindBarb() == true) || graphConfigProperty == null) {
|
||||
double xPos = skewTBackground.getWindBarbXPosition();
|
||||
if (overlayIsOn == true && this.previousSoundingLys != null) {
|
||||
drawNsharpWindBarb(
|
||||
target,
|
||||
currentZoomLevel,
|
||||
world,
|
||||
linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_OVERLAY1])
|
||||
.getLineColor(), this.soundingLys,
|
||||
xPos, 100);
|
||||
if (!previousSoundingLys.equals(soundingLys))
|
||||
drawNsharpWindBarb(
|
||||
target,
|
||||
currentZoomLevel,
|
||||
world,
|
||||
linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_OVERLAY2])
|
||||
.getLineColor(),
|
||||
this.previousSoundingLys,
|
||||
xPos - NsharpResourceHandler.BARB_LENGTH,
|
||||
100);
|
||||
} else {
|
||||
if (!compareStnIsOn && !compareTmIsOn
|
||||
&& !compareSndIsOn) {
|
||||
drawNsharpWindBarb(target, currentZoomLevel, world,
|
||||
graphConfigProperty.getWindBarbColor(),
|
||||
this.soundingLys, xPos, 100);
|
||||
} else {
|
||||
int currentTimeListIndex = rscHandler
|
||||
.getCurrentTimeElementListIndex();
|
||||
int currentStnListIndex = rscHandler
|
||||
.getCurrentStnElementListIndex();
|
||||
int currentSndListIndex = rscHandler
|
||||
.getCurrentSndElementListIndex();
|
||||
List<NsharpOperationElement> stnElemList = rscHandler
|
||||
.getStnElementList();
|
||||
List<NsharpOperationElement> timeElemList = rscHandler
|
||||
.getTimeElementList();
|
||||
List<NsharpOperationElement> sndElemList = rscHandler
|
||||
.getSndElementList();
|
||||
List<List<List<NsharpSoundingElementStateProperty>>> stnTimeSndTable = rscHandler
|
||||
.getStnTimeSndTable();
|
||||
if (compareTmIsOn && currentStnListIndex >= 0
|
||||
&& currentSndListIndex >= 0) {
|
||||
int colorIndex;
|
||||
for (NsharpOperationElement elm : timeElemList) {
|
||||
if (elm.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||
&& stnTimeSndTable
|
||||
.get(currentStnListIndex)
|
||||
.get(timeElemList
|
||||
.indexOf(elm))
|
||||
.get(currentSndListIndex) != null) {
|
||||
List<NcSoundingLayer> soundingLayeys = stnTimeSndTable
|
||||
.get(currentStnListIndex)
|
||||
.get(timeElemList.indexOf(elm))
|
||||
.get(currentSndListIndex)
|
||||
.getSndLyLst();
|
||||
colorIndex = stnTimeSndTable
|
||||
.get(currentStnListIndex)
|
||||
.get(timeElemList.indexOf(elm))
|
||||
.get(currentSndListIndex)
|
||||
.getCompColorIndex();
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||
drawNsharpWindBarb(target,
|
||||
currentZoomLevel, world,
|
||||
lp.getLineColor(),
|
||||
soundingLayeys, xPos, 100);
|
||||
}
|
||||
}
|
||||
} else if (compareStnIsOn
|
||||
&& currentTimeListIndex >= 0
|
||||
&& currentSndListIndex >= 0) {
|
||||
int colorIndex;
|
||||
for (NsharpOperationElement elm : stnElemList) {
|
||||
if (elm.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||
&& stnTimeSndTable
|
||||
.get(stnElemList
|
||||
.indexOf(elm))
|
||||
.get(currentTimeListIndex)
|
||||
.get(currentSndListIndex) != null) {
|
||||
List<NcSoundingLayer> soundingLayeys = stnTimeSndTable
|
||||
.get(stnElemList.indexOf(elm))
|
||||
.get(currentTimeListIndex)
|
||||
.get(currentSndListIndex)
|
||||
.getSndLyLst();
|
||||
colorIndex = stnTimeSndTable
|
||||
.get(stnElemList.indexOf(elm))
|
||||
.get(currentTimeListIndex)
|
||||
.get(currentSndListIndex)
|
||||
.getCompColorIndex();
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||
drawNsharpWindBarb(target,
|
||||
currentZoomLevel, world,
|
||||
lp.getLineColor(),
|
||||
soundingLayeys, xPos, 100);
|
||||
}
|
||||
}
|
||||
} else if (compareSndIsOn
|
||||
&& currentStnListIndex >= 0
|
||||
&& currentTimeListIndex >= 0) {
|
||||
int colorIndex;
|
||||
// start FixMark:nearByStnCompSnd
|
||||
List<NsharpResourceHandler.CompSndSelectedElem> sndCompElementList = rscHandler
|
||||
.getCompSndSelectedElemList();
|
||||
for (NsharpResourceHandler.CompSndSelectedElem compElem : sndCompElementList) {
|
||||
NsharpSoundingElementStateProperty elemProp = stnTimeSndTable
|
||||
.get(compElem.getStnIndex())
|
||||
.get(compElem.getTimeIndex())
|
||||
.get(compElem.getSndIndex());
|
||||
if (sndElemList.get(compElem.getSndIndex())
|
||||
.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||
&& elemProp != null) {
|
||||
List<NcSoundingLayer> soundingLayeys = elemProp
|
||||
.getSndLyLst();
|
||||
colorIndex = elemProp
|
||||
.getCompColorIndex();
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||
drawNsharpWindBarb(target,
|
||||
currentZoomLevel, world,
|
||||
lp.getLineColor(),
|
||||
soundingLayeys, xPos, 100);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* original code for(NsharpOperationElement elm:
|
||||
* sndElemList) { if(elm.getActionState() ==
|
||||
* NsharpConstants.ActState.ACTIVE &&
|
||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||
* currentTimeListIndex
|
||||
* ).get(sndElemList.indexOf(elm))!=null){
|
||||
* List<NcSoundingLayer> soundingLayeys =
|
||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||
* currentTimeListIndex
|
||||
* ).get(sndElemList.indexOf(
|
||||
* elm)).getSndLyLst(); colorIndex =
|
||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||
* currentTimeListIndex
|
||||
* ).get(sndElemList.indexOf(
|
||||
* elm)).getCompColorIndex(); NsharpLineProperty
|
||||
* lp =
|
||||
* linePropertyMap.get(NsharpConstants.lineNameArray
|
||||
* [colorIndex]); drawNsharpWindBarb(target,
|
||||
* currentZoomLevel, world, lp.getLineColor(),
|
||||
* soundingLayeys, xPos,100); } }
|
||||
*/
|
||||
// end start FixMark:nearByStnCompSnd
|
||||
}
|
||||
}
|
||||
}
|
||||
// System.out.println("x1 pos"+xPos+ " x2 pos="+ (xPos -
|
||||
// NsharpResourceHandler.BARB_LENGTH));
|
||||
}
|
||||
if( rscHandler.isGoodData() ){ //#5929)
|
||||
drawHeightMark(target);
|
||||
// draw EL, LFC, LCL, FZL, -20C, -30C lines
|
||||
// drawLclLine(target);
|
||||
target.drawWireframeShape(lclShape,
|
||||
NsharpConstants.color_green, 2, LineStyle.SOLID, font10);
|
||||
target.drawWireframeShape(elShape, NsharpConstants.color_red,
|
||||
2, LineStyle.SOLID, font10);
|
||||
target.drawWireframeShape(lfcShape,
|
||||
NsharpConstants.color_yellow, 2, LineStyle.SOLID,
|
||||
font10);
|
||||
target.drawWireframeShape(fzlShape, NsharpConstants.color_cyan,
|
||||
2, LineStyle.SOLID, font10);
|
||||
|
||||
}
|
||||
drawNsharpFileNameAndSampling(target, currentZoomLevel);
|
||||
// draw cursor data
|
||||
if (cursorInSkewT == true && rscHandler.isGoodData()) {
|
||||
if ((curseToggledFontLevel < CURSER_STRING_OFF)
|
||||
&& (cursorTopWindBarb == false || windBarbMagnify == false))
|
||||
drawNsharpSkewtCursorData(target);
|
||||
}
|
||||
|
||||
// Wind Barb
|
||||
if ((graphConfigProperty != null && graphConfigProperty
|
||||
.isWindBarb() == true) || graphConfigProperty == null) {
|
||||
double xPos = skewTBackground.getWindBarbXPosition();
|
||||
if (overlayIsOn == true && this.previousSoundingLys != null) {
|
||||
drawNsharpWindBarb(
|
||||
target,
|
||||
currentZoomLevel,
|
||||
world,
|
||||
linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_OVERLAY1])
|
||||
.getLineColor(), this.soundingLys,
|
||||
xPos, 100);
|
||||
if (!previousSoundingLys.equals(soundingLys))
|
||||
drawNsharpWindBarb(
|
||||
target,
|
||||
currentZoomLevel,
|
||||
world,
|
||||
linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[NsharpConstants.LINE_OVERLAY2])
|
||||
.getLineColor(),
|
||||
this.previousSoundingLys,
|
||||
xPos - NsharpResourceHandler.BARB_LENGTH,
|
||||
100);
|
||||
} else {
|
||||
if (!compareStnIsOn && !compareTmIsOn
|
||||
&& !compareSndIsOn) {
|
||||
drawNsharpWindBarb(target, currentZoomLevel, world,
|
||||
graphConfigProperty.getWindBarbColor(),
|
||||
this.soundingLys, xPos, 100);
|
||||
} else {
|
||||
int currentTimeListIndex = rscHandler
|
||||
.getCurrentTimeElementListIndex();
|
||||
int currentStnListIndex = rscHandler
|
||||
.getCurrentStnElementListIndex();
|
||||
int currentSndListIndex = rscHandler
|
||||
.getCurrentSndElementListIndex();
|
||||
List<NsharpOperationElement> stnElemList = rscHandler
|
||||
.getStnElementList();
|
||||
List<NsharpOperationElement> timeElemList = rscHandler
|
||||
.getTimeElementList();
|
||||
List<NsharpOperationElement> sndElemList = rscHandler
|
||||
.getSndElementList();
|
||||
List<List<List<NsharpSoundingElementStateProperty>>> stnTimeSndTable = rscHandler
|
||||
.getStnTimeSndTable();
|
||||
if (compareTmIsOn && currentStnListIndex >= 0
|
||||
&& currentSndListIndex >= 0) {
|
||||
int colorIndex;
|
||||
for (NsharpOperationElement elm : timeElemList) {
|
||||
if (elm.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||
&& stnTimeSndTable
|
||||
.get(currentStnListIndex)
|
||||
.get(timeElemList
|
||||
.indexOf(elm))
|
||||
.get(currentSndListIndex) != null) {
|
||||
List<NcSoundingLayer> soundingLayeys = stnTimeSndTable
|
||||
.get(currentStnListIndex)
|
||||
.get(timeElemList.indexOf(elm))
|
||||
.get(currentSndListIndex)
|
||||
.getSndLyLst();
|
||||
colorIndex = stnTimeSndTable
|
||||
.get(currentStnListIndex)
|
||||
.get(timeElemList.indexOf(elm))
|
||||
.get(currentSndListIndex)
|
||||
.getCompColorIndex();
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||
drawNsharpWindBarb(target,
|
||||
currentZoomLevel, world,
|
||||
lp.getLineColor(),
|
||||
soundingLayeys, xPos, 100);
|
||||
}
|
||||
}
|
||||
} else if (compareStnIsOn
|
||||
&& currentTimeListIndex >= 0
|
||||
&& currentSndListIndex >= 0) {
|
||||
int colorIndex;
|
||||
for (NsharpOperationElement elm : stnElemList) {
|
||||
if (elm.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||
&& stnTimeSndTable
|
||||
.get(stnElemList
|
||||
.indexOf(elm))
|
||||
.get(currentTimeListIndex)
|
||||
.get(currentSndListIndex) != null) {
|
||||
List<NcSoundingLayer> soundingLayeys = stnTimeSndTable
|
||||
.get(stnElemList.indexOf(elm))
|
||||
.get(currentTimeListIndex)
|
||||
.get(currentSndListIndex)
|
||||
.getSndLyLst();
|
||||
colorIndex = stnTimeSndTable
|
||||
.get(stnElemList.indexOf(elm))
|
||||
.get(currentTimeListIndex)
|
||||
.get(currentSndListIndex)
|
||||
.getCompColorIndex();
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||
drawNsharpWindBarb(target,
|
||||
currentZoomLevel, world,
|
||||
lp.getLineColor(),
|
||||
soundingLayeys, xPos, 100);
|
||||
}
|
||||
}
|
||||
} else if (compareSndIsOn
|
||||
&& currentStnListIndex >= 0
|
||||
&& currentTimeListIndex >= 0) {
|
||||
int colorIndex;
|
||||
// start FixMark:nearByStnCompSnd
|
||||
List<NsharpResourceHandler.CompSndSelectedElem> sndCompElementList = rscHandler
|
||||
.getCompSndSelectedElemList();
|
||||
for (NsharpResourceHandler.CompSndSelectedElem compElem : sndCompElementList) {
|
||||
NsharpSoundingElementStateProperty elemProp = stnTimeSndTable
|
||||
.get(compElem.getStnIndex())
|
||||
.get(compElem.getTimeIndex())
|
||||
.get(compElem.getSndIndex());
|
||||
if (sndElemList.get(compElem.getSndIndex())
|
||||
.getActionState() == NsharpConstants.ActState.ACTIVE
|
||||
&& elemProp != null) {
|
||||
List<NcSoundingLayer> soundingLayeys = elemProp
|
||||
.getSndLyLst();
|
||||
colorIndex = elemProp
|
||||
.getCompColorIndex();
|
||||
NsharpLineProperty lp = linePropertyMap
|
||||
.get(NsharpConstants.lineNameArray[colorIndex]);
|
||||
drawNsharpWindBarb(target,
|
||||
currentZoomLevel, world,
|
||||
lp.getLineColor(),
|
||||
soundingLayeys, xPos, 100);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* original code for(NsharpOperationElement elm:
|
||||
* sndElemList) { if(elm.getActionState() ==
|
||||
* NsharpConstants.ActState.ACTIVE &&
|
||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||
* currentTimeListIndex
|
||||
* ).get(sndElemList.indexOf(elm))!=null){
|
||||
* List<NcSoundingLayer> soundingLayeys =
|
||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||
* currentTimeListIndex
|
||||
* ).get(sndElemList.indexOf(
|
||||
* elm)).getSndLyLst(); colorIndex =
|
||||
* stnTimeSndTable.get(currentStnListIndex).get(
|
||||
* currentTimeListIndex
|
||||
* ).get(sndElemList.indexOf(
|
||||
* elm)).getCompColorIndex(); NsharpLineProperty
|
||||
* lp =
|
||||
* linePropertyMap.get(NsharpConstants.lineNameArray
|
||||
* [colorIndex]); drawNsharpWindBarb(target,
|
||||
* currentZoomLevel, world, lp.getLineColor(),
|
||||
* soundingLayeys, xPos,100); } }
|
||||
*/
|
||||
// end start FixMark:nearByStnCompSnd
|
||||
}
|
||||
}
|
||||
}
|
||||
// System.out.println("x1 pos"+xPos+ " x2 pos="+ (xPos -
|
||||
// NsharpResourceHandler.BARB_LENGTH));
|
||||
}
|
||||
drawHeightMark(target);
|
||||
// draw EL, LFC, LCL, FZL, -20C, -30C lines
|
||||
// drawLclLine(target);
|
||||
target.drawWireframeShape(lclShape,
|
||||
NsharpConstants.color_green, 2, LineStyle.SOLID, font10);
|
||||
target.drawWireframeShape(elShape, NsharpConstants.color_red,
|
||||
2, LineStyle.SOLID, font10);
|
||||
target.drawWireframeShape(lfcShape,
|
||||
NsharpConstants.color_yellow, 2, LineStyle.SOLID,
|
||||
font10);
|
||||
target.drawWireframeShape(fzlShape, NsharpConstants.color_cyan,
|
||||
2, LineStyle.SOLID, font10);
|
||||
drawNsharpFileNameAndSampling(target, currentZoomLevel);
|
||||
// draw cursor data
|
||||
if (cursorInSkewT == true) {
|
||||
if ((curseToggledFontLevel < CURSER_STRING_OFF)
|
||||
&& (cursorTopWindBarb == false || windBarbMagnify == false))
|
||||
drawNsharpSkewtCursorData(target);
|
||||
}
|
||||
}// end of currentGraphMode= NsharpConstants.GRAPH_SKEWT
|
||||
else if (currentGraphMode == NsharpConstants.GRAPH_ICING) {
|
||||
else if (currentGraphMode == NsharpConstants.GRAPH_ICING && rscHandler.isGoodData()) {//#5929
|
||||
paintIcing(currentZoomLevel, target);
|
||||
} else if (currentGraphMode == NsharpConstants.GRAPH_TURB) {
|
||||
} else if (currentGraphMode == NsharpConstants.GRAPH_TURB && rscHandler.isGoodData()) {//#5929
|
||||
paintTurbulence(currentZoomLevel, target);
|
||||
}
|
||||
// drawNsharpFileNameAndSampling(target, currentZoomLevel);
|
||||
|
@ -3506,31 +3518,37 @@ public class NsharpSkewTPaneResource extends NsharpAbstractPaneResource {
|
|||
*/
|
||||
|
||||
public void createRscWireFrameShapes() {
|
||||
// System.out.println("createRscWireFrameShapes called");
|
||||
if (target != null) {
|
||||
disposeRscWireFrameShapes();
|
||||
if (soundingLys != null) {
|
||||
// createRscOmegaShape();
|
||||
// createRscHeightMarkShape();
|
||||
createRscwetBulbTraceShape();
|
||||
createRscPressTempCurveShapeAll(target);
|
||||
createRscVTempTraceShape();
|
||||
createRscParcelRtTraceShapesList(rscHandler.getCurrentParcel(),
|
||||
rscHandler.getCurrentParcelLayerPressure());// real temp
|
||||
// trace
|
||||
createRscParcelTraceShapes(rscHandler.getCurrentParcel(),
|
||||
rscHandler.getCurrentParcelLayerPressure()); // Virtual
|
||||
// Temp
|
||||
// Trace
|
||||
// and
|
||||
// DCAPE
|
||||
// trace
|
||||
createLCLEtcLinesShape();
|
||||
createEffectiveLayerLinesShape();
|
||||
createCloudsShape();
|
||||
updatePsblWatchColor();
|
||||
}
|
||||
}
|
||||
// System.out.println("createRscWireFrameShapes called");
|
||||
if (target != null) {
|
||||
disposeRscWireFrameShapes();
|
||||
if (soundingLys != null){
|
||||
if( rscHandler.isGoodData()) {//#5929
|
||||
|
||||
// createRscOmegaShape();
|
||||
// createRscHeightMarkShape();
|
||||
createRscwetBulbTraceShape();
|
||||
createRscPressTempCurveShapeAll(target);
|
||||
createRscVTempTraceShape();
|
||||
createRscParcelRtTraceShapesList(rscHandler.getCurrentParcel(),
|
||||
rscHandler.getCurrentParcelLayerPressure());// real temp
|
||||
// trace
|
||||
createRscParcelTraceShapes(rscHandler.getCurrentParcel(),
|
||||
rscHandler.getCurrentParcelLayerPressure()); // Virtual
|
||||
// Temp
|
||||
// Trace
|
||||
// and
|
||||
// DCAPE
|
||||
// trace
|
||||
createLCLEtcLinesShape();
|
||||
createEffectiveLayerLinesShape();
|
||||
createCloudsShape();
|
||||
updatePsblWatchColor();
|
||||
}
|
||||
else {//#5929
|
||||
createRscPressTempCurveShapeAll(target);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void disposeRscWireFrameShapes() {
|
||||
|
|
|
@ -17,7 +17,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
|||
* bigsharp version 2013Jun12
|
||||
* 12/03/2014 DR#16884 Chin Chen fixed issue, NSHARP crashes if user loops a product and
|
||||
* then clicks WINTER/FIRE buttons in Toolbar
|
||||
*
|
||||
* 01/27/2015 DR#17006,
|
||||
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||
* in Volume Browser
|
||||
* </pre>
|
||||
*
|
||||
* @author Chin Chen
|
||||
|
@ -1896,7 +1898,7 @@ public class NsharpSpcGraphsPaneResource extends NsharpAbstractPaneResource {
|
|||
PaintProperties paintProps) throws VizException {
|
||||
super.paintInternal(target, paintProps);
|
||||
// defineCharHeight(font10);
|
||||
if (rscHandler == null || rscHandler.getSoundingLys() == null)
|
||||
if (rscHandler == null || rscHandler.getSoundingLys() == null || !rscHandler.isGoodData())//#5929
|
||||
return;
|
||||
this.font10.setSmoothing(false);
|
||||
this.font10.setScaleFont(false);
|
||||
|
|
|
@ -10,6 +10,9 @@ package gov.noaa.nws.ncep.ui.nsharp.display.rsc;
|
|||
* Date Ticket# Engineer Description
|
||||
* ------- ------- -------- -----------
|
||||
* 04/23/2012 229 Chin Chen Initial coding
|
||||
* 01/27/2015 DR#17006,
|
||||
* Task#5929 Chin Chen NSHARP freezes when loading a sounding from MDCRS products
|
||||
* in Volume Browser
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -159,11 +162,14 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
|||
float x1 = verticalWindXOrig+ (verticalWindWidth/2);
|
||||
target.drawLine(x1, verticalWindYOrig, 0, x1, verticalWindYOrig+verticalWindHeight, 0,
|
||||
NsharpConstants.color_white, 1, LineStyle.DASHED);
|
||||
target.drawWireframeShape(verticalWindLabelShape, NsharpConstants.color_white,
|
||||
if(verticalWindLabelShape!=null) //#5929
|
||||
target.drawWireframeShape(verticalWindLabelShape, NsharpConstants.color_white,
|
||||
0.3F, commonLineStyle,font10);
|
||||
target.drawWireframeShape(verticalWindRShape, NsharpConstants.color_red,
|
||||
if(verticalWindRShape!=null)
|
||||
target.drawWireframeShape(verticalWindRShape, NsharpConstants.color_red,
|
||||
0.3F, commonLineStyle,font10);
|
||||
target.drawWireframeShape(verticalWindSbShape, NsharpConstants.color_skyblue,
|
||||
if(verticalWindSbShape!=null)
|
||||
target.drawWireframeShape(verticalWindSbShape, NsharpConstants.color_skyblue,
|
||||
0.3F, commonLineStyle,font10);
|
||||
target.clearClippingPlane();
|
||||
}
|
||||
|
@ -304,7 +310,7 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
|||
windBoxWindRscShapeList.add(shNcolor);
|
||||
|
||||
|
||||
|
||||
float surfaceLevel = soundingLys.get(0).getGeoHeight(); //#5929
|
||||
//System.out.println("my wolrd minvY="+ myYViewMin+ " maxVY="+myYViewMax+ " YRange="+myYViewRange);
|
||||
for (NcSoundingLayer layer : soundingLys) {
|
||||
float pressure = layer.getPressure();
|
||||
|
@ -321,13 +327,14 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
|||
//System.out.println("Wind p="+pressure+" yP="+ windBoxY+ " ratio="+yRatio);
|
||||
float geoHt = layer.getGeoHeight();
|
||||
double [][] lines = {{windBoxX, windBoxY},{windBoxX + (spd) * xRatio,windBoxY}};
|
||||
if(geoHt <nsharpNative.nsharpLib.msl(3000))
|
||||
//use MSL here, so Converts height from (meters) AGL to MSL. #5929
|
||||
if(geoHt < (3000+surfaceLevel))
|
||||
shapeR.addLineSegment(lines);
|
||||
else if(geoHt < nsharpNative.nsharpLib.msl(6000))
|
||||
else if(geoHt < (6000+surfaceLevel))
|
||||
shapeG.addLineSegment(lines);
|
||||
else if(geoHt < nsharpNative.nsharpLib.msl(9000))
|
||||
else if(geoHt < (9000+surfaceLevel))
|
||||
shapeY.addLineSegment(lines);
|
||||
else if(geoHt < nsharpNative.nsharpLib.msl(12000))
|
||||
else if(geoHt < (12000+surfaceLevel))
|
||||
shapeC.addLineSegment(lines);
|
||||
else
|
||||
shapeV.addLineSegment(lines);
|
||||
|
@ -437,7 +444,6 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
|||
verticalWindLabelShape.compile();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create all wire frame shapes at one place.
|
||||
* Should be used only when a new resource is becoming Current active resource to be displayed.
|
||||
|
@ -447,23 +453,24 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
|||
if(target== null || rscHandler== null || inSidePane )
|
||||
return;
|
||||
//System.out.println("whitoPane="+this.toString()+" createAllWireFrameShapes called");
|
||||
rscHandler.repopulateSndgData();
|
||||
|
||||
disposeAllWireFrameShapes();
|
||||
if(soundingLys != null){
|
||||
NsharpGenericPaneBackground skewtBgd = rscHandler.getSkewtPaneRsc().getActiveBackground();
|
||||
if(skewtBgd!=null){
|
||||
vpc = skewtBgd.getViewablePressureContainer(soundingLys);
|
||||
vplc = skewtBgd.getViewablePressureLinesContainer();
|
||||
}
|
||||
createRscOmegaShape();
|
||||
createRscWindBoxWindShape();
|
||||
createRscVerticalWindShape();
|
||||
//rscHandler.repopulateSndgData();//#5929 TBD why need this?????
|
||||
|
||||
disposeAllWireFrameShapes();
|
||||
if(soundingLys != null){
|
||||
NsharpGenericPaneBackground skewtBgd = rscHandler.getSkewtPaneRsc().getActiveBackground();
|
||||
if(skewtBgd!=null){
|
||||
vpc = skewtBgd.getViewablePressureContainer(soundingLys);
|
||||
vplc = skewtBgd.getViewablePressureLinesContainer();
|
||||
}
|
||||
//create static shape
|
||||
createBkgOmegaShape();
|
||||
createBkgWindBoxShape();
|
||||
|
||||
createRscOmegaShape();
|
||||
createRscWindBoxWindShape();
|
||||
if(rscHandler.isGoodData())//#5929
|
||||
createRscVerticalWindShape();
|
||||
}
|
||||
//create static shape
|
||||
createBkgOmegaShape();
|
||||
createBkgWindBoxShape();
|
||||
|
||||
}
|
||||
public void createRscWireFrameShapes(){
|
||||
//System.out.println("createRscWireFrameShapes called");
|
||||
|
@ -477,7 +484,8 @@ public class NsharpWitoPaneResource extends NsharpAbstractPaneResource{
|
|||
}
|
||||
createRscOmegaShape();
|
||||
createRscWindBoxWindShape();
|
||||
createRscVerticalWindShape();
|
||||
if(rscHandler.isGoodData())//#5929
|
||||
createRscVerticalWindShape();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue