Search in sources :

Example 1 with MultiPointCoverage

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));
    }
}
Also used : MultiPointCoverage(org.n52.shetland.ogc.om.values.MultiPointCoverage) PointValuePair(org.n52.shetland.ogc.om.PointValuePair)

Example 2 with 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;
}
Also used : PointValueLists(org.n52.shetland.ogc.om.values.MultiPointCoverage.PointValueLists)

Aggregations

PointValuePair (org.n52.shetland.ogc.om.PointValuePair)1 MultiPointCoverage (org.n52.shetland.ogc.om.values.MultiPointCoverage)1 PointValueLists (org.n52.shetland.ogc.om.values.MultiPointCoverage.PointValueLists)1