use of net.opengis.swe.x101.EnvelopeType in project arctic-sea by 52North.
the class SweCommonEncoderv101 method createEnvelope.
private EnvelopeType createEnvelope(SweEnvelope sosSweEnvelope) throws EncodingException {
EnvelopeType envelopeType = EnvelopeType.Factory.newInstance(getXmlOptions());
addAbstractDataComponentValues(envelopeType, sosSweEnvelope);
if (sosSweEnvelope.isReferenceFrameSet()) {
envelopeType.setReferenceFrame(sosSweEnvelope.getReferenceFrame());
}
if (sosSweEnvelope.isLowerCornerSet()) {
envelopeType.setLowerCorner(createVectorProperty(sosSweEnvelope.getLowerCorner()));
}
if (sosSweEnvelope.isUpperCornerSet()) {
envelopeType.setUpperCorner(createVectorProperty(sosSweEnvelope.getUpperCorner()));
}
if (sosSweEnvelope.isTimeSet()) {
envelopeType.addNewTime().setTimeRange(createTimeRange(sosSweEnvelope.getTime()));
}
return envelopeType;
}
Aggregations