ASM #95 - Fix 0.0 for NO DATA Issue caused failed back.
Change-Id: Ia27f4061f11c9d6ffe04b0c2888e429824427dac Former-commit-id:98e50ae694
[formerly6e034005e0
] [formerly94fea6748f
] [formerly98e50ae694
[formerly6e034005e0
] [formerly94fea6748f
] [formerly9c1587b92d
[formerly94fea6748f
[formerly 5880dcd0b727c3d473873b8382ace78955ab800b]]]] Former-commit-id:9c1587b92d
Former-commit-id:03dfdaffd4
[formerlyec6053c3f7
] [formerly cf5b27d037d8ebdd2e427efe07f404e425a82240 [formerlybaa1546e39
]] Former-commit-id: b3045b8c7359818619329a1fdacbf426709f3318 [formerlyb82d8bf6fb
] Former-commit-id:7cd2402325
This commit is contained in:
parent
cdd250c2df
commit
f029bd627d
2 changed files with 51 additions and 14 deletions
|
@ -80,7 +80,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData;
|
|||
* July 1, 2013 2155 dhladky Fixed bug that created more rows than were actually needed.
|
||||
* Jul 15, 2013 2184 dhladky Remove all HUC's for storage except ALL
|
||||
* Jul 16, 2013 2197 njensen Use FFMPBasinData.hasAnyBasins() for efficiency
|
||||
* Jan 09, 2014 DR16096 gzhang Fix QPFSCAN not showing M issue for different radar source.
|
||||
* May 19, 2014 DR16096 gzhang Fix QPFSCAN not showing M issue for different radar source.
|
||||
*
|
||||
* </pre>
|
||||
* @author dhladky
|
||||
|
@ -182,14 +182,14 @@ public class FFMPDataGenerator {
|
|||
}
|
||||
|
||||
List<DomainXML> domains = resource.getDomains();
|
||||
|
||||
List<List<Long>> huclistsAll = getOtherSiteQpfBasins(siteKey,FFMPRecord.ALL, domains);// DR 16096
|
||||
if ((centeredAggregationKey == null) || huc.equals(FFMPRecord.ALL)) {
|
||||
|
||||
if (huc.equals(FFMPRecord.ALL)) {
|
||||
|
||||
FFMPBasinData fbd = baseRec.getBasinData();
|
||||
tData = new FFMPTableData(fbd.getBasins().size());
|
||||
List<List<Long>> huclists = getOtherSiteQpfBasins(siteKey,huc, domains);// DR 16096
|
||||
|
||||
for (Long key : fbd.getBasins().keySet()) {
|
||||
|
||||
FFMPBasinMetaData fmdb = ft.getBasin(siteKey, key);
|
||||
|
@ -199,7 +199,7 @@ public class FFMPDataGenerator {
|
|||
continue;
|
||||
|
||||
}
|
||||
this.filterOtherSiteHucs(huclists, key);// DR 16096
|
||||
this.filterOtherSiteHucs(huclistsAll, key, false);// DR 16096
|
||||
for (DomainXML domain : domains) {
|
||||
|
||||
String cwa = domain.getCwa();
|
||||
|
@ -269,7 +269,7 @@ public class FFMPDataGenerator {
|
|||
if (fmdb != null) {
|
||||
|
||||
try {
|
||||
this.filterOtherSiteHucs(huclists, key);// DR 16096
|
||||
this.filterOtherSiteHucs(huclists, key, true);// DR 16096
|
||||
FFMPBasin basin = new FFMPBasin(key, true);
|
||||
setFFMPRow(basin, tData, isVGB, null);
|
||||
|
||||
|
@ -304,7 +304,7 @@ public class FFMPDataGenerator {
|
|||
if ((domain.getCwa().equals(fmdb.getCwa()))
|
||||
|| (domain.isPrimary() && fmdb
|
||||
.isPrimaryCwa())) {
|
||||
|
||||
this.filterOtherSiteHucs(huclistsAll, key,false);
|
||||
setFFMPRow(fbd.get(key), tData, false, null);
|
||||
|
||||
if (virtualBasin != null) {
|
||||
|
@ -538,24 +538,24 @@ public class FFMPDataGenerator {
|
|||
|
||||
//if(siteKey.equalsIgnoreCase(dqpf))//Basin Table same as QPFSCAN's datakey
|
||||
// return huclist;
|
||||
//System.out.println("@541----------- qpf: "+dqpf);//checking qpf type
|
||||
|
||||
System.out.println("@551----------- qpf: "+dqpf);//checking qpf type
|
||||
|
||||
java.util.ArrayList<String> dataKeys = this.getDisplayingQpfDataKeys(dqpf);//more than one datakey for mosaic QPFSCAN
|
||||
for(String site : dataKeys){
|
||||
for(String site : dataKeys){//System.out.println("@545----------- qpf-site: "+site);
|
||||
huclist.add(ft.getHucKeyList(site, huc, domains));
|
||||
}
|
||||
|
||||
return huclist;
|
||||
}
|
||||
|
||||
private FFMPBasinData qpfBasinClone = null;// DR 16096 2014-01-06 initialized @435
|
||||
private FFMPBasinData qpfBasinClone = null;// DR 16096 initialized @435
|
||||
|
||||
public void filterOtherSiteHucs(List<List<Long>> huclists, Long key){
|
||||
public void filterOtherSiteHucs(List<List<Long>> huclists, Long key, boolean isAggregate){
|
||||
if( huclists==null || huclists.size()==0) // QPFSCAN column is not on 2014-01-09
|
||||
return;
|
||||
boolean isInOtherSite = false;
|
||||
|
||||
/*
|
||||
for(List<Long> list : huclists){
|
||||
if(list.contains(key)){
|
||||
isInOtherSite = true;
|
||||
|
@ -568,8 +568,21 @@ public class FFMPDataGenerator {
|
|||
setQPFMissing();
|
||||
setMList(this.siteKey,this.huc, key);
|
||||
}// so in FFMPRowGenerator, qpf value will be Float.NaN
|
||||
*/
|
||||
if(isAggregate){
|
||||
this.setHucLevelQpf(key);
|
||||
return;//FFMPResource.getBasin(,QPF,,) not for aggregate
|
||||
}
|
||||
|
||||
//if(key==31051 || key==31119){setQPFMissing(); setMList(this.siteKey,this.huc, key);}//hard-code for testing
|
||||
//Only for non-aggregates; fix NO DATA shows 0.0
|
||||
try{
|
||||
if( Float.isNaN(resource.getBasin(key, FFMPRecord.FIELDS.QPF, this.paintRefTime, false).getValue()))
|
||||
setQPFMissing();
|
||||
else
|
||||
this.qpfBasin = this.qpfBasinClone;
|
||||
}catch(Exception e){
|
||||
statusHandler.info("FFMPResource.getBasin Exception: "+e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -642,6 +655,29 @@ public class FFMPDataGenerator {
|
|||
//Utilize the fact FFMPRowGenerator set QPFSCAN M if qpfBasin null
|
||||
private void setQPFMissing(){
|
||||
this.qpfBasin = null;
|
||||
}
|
||||
}
|
||||
|
||||
//Loop through the HUC's basins to check if there are values not NaN
|
||||
//then set qpf; otherwise set the HUC level M.
|
||||
//centeredAggregationKey NULL: not a specific huc (COUNTY,HUC0,etc) clicked
|
||||
|
||||
private void setHucLevelQpf(Long key){
|
||||
|
||||
List<Long> list = this.monitor.getTemplates(this.siteKey).getAggregatePfafs(key, this.siteKey, this.huc);
|
||||
boolean hasValue = false;
|
||||
|
||||
for(Long bkey : list){
|
||||
try {
|
||||
if( ! Float.isNaN(resource.getBasin(bkey, FFMPRecord.FIELDS.QPF, this.paintRefTime, false).getValue())){
|
||||
hasValue = true;
|
||||
break; // one is enough
|
||||
}
|
||||
} catch (VizException e) {
|
||||
statusHandler.info("FFMPResource.getBasin Exception: "+e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
qpfBasin = hasValue ? this.qpfBasinClone : null;
|
||||
}
|
||||
|
||||
}
|
|
@ -174,6 +174,7 @@ import com.vividsolutions.jts.geom.Point;
|
|||
* Jul 17, 2013 2197 njensen Improved speed of getName()
|
||||
* Oct 18, 2013 DR 16151 gzhang Used getAverageValue() for QPF Graph.
|
||||
* Jan 21, 2014 DR 15874 gzhang Use getValue() for QPFSCAN independent.
|
||||
* May 19, 2014 DR 16096 gzhang Make getBasin() protected for FFMPDataGenerator.
|
||||
* </pre>
|
||||
* @author dhladky
|
||||
* @version 1.0
|
||||
|
@ -596,7 +597,7 @@ public class FFMPResource extends
|
|||
* @return
|
||||
* @throws VizException
|
||||
*/
|
||||
private FFMPBasin getBasin(Long key, FFMPRecord.FIELDS bfield,
|
||||
protected/*private*/ FFMPBasin getBasin(Long key, FFMPRecord.FIELDS bfield,
|
||||
Date recentTime, boolean aggregate) throws VizException {
|
||||
FFMPBasin basin = null;
|
||||
if (aggregate) {
|
||||
|
|
Loading…
Add table
Reference in a new issue