use of org.n52.shetland.ogc.om.values.MultiPointCoverage in project arctic-sea by 52North.
the class MultiPointObservation method setValue.
@Override
public void setValue(ObservationValue<?> value) {
if (value.getValue() instanceof MultiPointCoverage) {
super.setValue(value);
} else {
MultiPointCoverage multiPointCoverage = new MultiPointCoverage(getObservationID());
multiPointCoverage.setUnit(((AbstractObservationValue<?>) value).getUnit());
multiPointCoverage.addValue(new PointValuePair(getPoint(), value.getValue()));
super.setValue(new SingleObservationValue<>(value.getPhenomenonTime(), multiPointCoverage));
}
}
use of org.n52.shetland.ogc.om.values.MultiPointCoverage in project arctic-sea by 52North.
the class AbstractMultiPointCoverageTypeEncoder method encodeMultiPointCoverageType.
/**
* Encode {@link MultiPointCoverage} to {@link DiscreteCoverageType}
*
* @param dct
* {@link DiscreteCoverageType} to add values to
* @param multiPointCoverage
* {@link MultiPointCoverage} to encode
* @return {@link DiscreteCoverageType}
* @throws EncodingException
* If an error occurs
*/
protected DiscreteCoverageType encodeMultiPointCoverageType(DiscreteCoverageType dct, MultiPointCoverage multiPointCoverage) throws EncodingException {
dct.setId(multiPointCoverage.getGmlId());
PointValueLists pointValues = multiPointCoverage.getPointValue();
encodeMultiPointDomain(dct, pointValues);
encodeRangeSet(dct, multiPointCoverage);
return dct;
}
Aggregations