Issue #2278 Allow radar interrogation to work without ColorMapParameters.
Former-commit-id:a12573fe31
[formerly9b00422c98
] [formerlya12573fe31
[formerly9b00422c98
] [formerly5e665c4866
[formerly c70156beda53bbc8e68524f98f19f4c671e0c69d]]] Former-commit-id:5e665c4866
Former-commit-id:9a6695ebd6
[formerlyd1a35f47f9
] Former-commit-id:0bed3c5688
This commit is contained in:
parent
57488f4813
commit
03796d5221
1 changed files with 10 additions and 5 deletions
|
@ -54,8 +54,10 @@ import com.vividsolutions.jts.geom.Coordinate;
|
||||||
* SOFTWARE HISTORY
|
* SOFTWARE HISTORY
|
||||||
* Date Ticket# Engineer Description
|
* Date Ticket# Engineer Description
|
||||||
* ------------ ---------- ----------- --------------------------
|
* ------------ ---------- ----------- --------------------------
|
||||||
* Aug 4, 2010 mnash Initial creation
|
* Aug 04, 2010 mnash Initial creation
|
||||||
* 05/02/2013 DR 14587 D. Friedman Refactor to store multiple types.
|
* May 02, 2013 14587 D. Friedman Refactor to store multiple types.
|
||||||
|
* Aug 22, 2013 2278 bsteffen Allow radar interrogation to work
|
||||||
|
* without ColorMapParameters.
|
||||||
*
|
*
|
||||||
* </pre>
|
* </pre>
|
||||||
*
|
*
|
||||||
|
@ -220,7 +222,7 @@ public class RadarDefaultInterrogator implements IRadarInterrogator {
|
||||||
UnitConverter converter = getConverter(params, radarRecord);
|
UnitConverter converter = getConverter(params, radarRecord);
|
||||||
double dispVal = converter.convert(dataValue);
|
double dispVal = converter.convert(dataValue);
|
||||||
dataMap.put(baseName + "numericValue", String.valueOf(dispVal));
|
dataMap.put(baseName + "numericValue", String.valueOf(dispVal));
|
||||||
if (params.getDataMapping() != null) {
|
if (params != null && params.getDataMapping() != null) {
|
||||||
for (DataMappingEntry entry : params.getDataMapping().getEntries()) {
|
for (DataMappingEntry entry : params.getDataMapping().getEntries()) {
|
||||||
if (entry.getSample() == null) {
|
if (entry.getSample() == null) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -239,7 +241,7 @@ public class RadarDefaultInterrogator implements IRadarInterrogator {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
String unitString = "";
|
String unitString = "";
|
||||||
if (params.getDisplayUnit() != Unit.ONE) {
|
if (params != null && params.getDisplayUnit() != Unit.ONE) {
|
||||||
unitString = UnitFormat.getUCUMInstance().format(
|
unitString = UnitFormat.getUCUMInstance().format(
|
||||||
params.getDisplayUnit());
|
params.getDisplayUnit());
|
||||||
}
|
}
|
||||||
|
@ -277,7 +279,9 @@ public class RadarDefaultInterrogator implements IRadarInterrogator {
|
||||||
RadarRecord radarRecord) {
|
RadarRecord radarRecord) {
|
||||||
UnitConverter converter = null;
|
UnitConverter converter = null;
|
||||||
Unit<?> dataUnit = radarRecord.getDataUnit();
|
Unit<?> dataUnit = radarRecord.getDataUnit();
|
||||||
if (dataUnit != null && !dataUnit.equals(params.getDataUnit())) {
|
if (params == null) {
|
||||||
|
converter = UnitConverter.IDENTITY;
|
||||||
|
} else if (dataUnit != null && !dataUnit.equals(params.getDataUnit())) {
|
||||||
Unit<?> displayUnit = params.getDisplayUnit();
|
Unit<?> displayUnit = params.getDisplayUnit();
|
||||||
if (dataUnit.isCompatible(displayUnit)) {
|
if (dataUnit.isCompatible(displayUnit)) {
|
||||||
converter = dataUnit.getConverterTo(displayUnit);
|
converter = dataUnit.getConverterTo(displayUnit);
|
||||||
|
@ -285,6 +289,7 @@ public class RadarDefaultInterrogator implements IRadarInterrogator {
|
||||||
} else {
|
} else {
|
||||||
converter = params.getDataToDisplayConverter();
|
converter = params.getDataToDisplayConverter();
|
||||||
}
|
}
|
||||||
|
|
||||||
return converter;
|
return converter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue