use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class MeasurementDecodingTest method testProcedure.
@Test
public void testProcedure() {
assertThat(observation, is(notNullValue()));
final OmObservationConstellation oc = observation.getObservationConstellation();
assertThat(oc, is(notNullValue()));
final AbstractFeature p = oc.getProcedure();
assertThat(p, is(notNullValue()));
assertThat(p.getIdentifier(), is(equalTo(PROCEDURE)));
}
use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class MeasurementDecodingTest method testObservationConstellation.
@Test
public void testObservationConstellation() {
assertThat(observation, is(notNullValue()));
final OmObservationConstellation oc = observation.getObservationConstellation();
assertThat(oc, is(notNullValue()));
}
use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class MeasurementDecodingTest method testObservationType.
@Test
public void testObservationType() {
assertThat(observation, is(notNullValue()));
final OmObservationConstellation oc = observation.getObservationConstellation();
assertThat(oc, is(notNullValue()));
assertThat(oc.getObservationType(), is(equalTo(OmConstants.OBS_TYPE_MEASUREMENT)));
}
use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class MeasurementDecodingTest method testFeatureOfInterest.
@Test
public void testFeatureOfInterest() {
assertThat(observation, is(notNullValue()));
final OmObservationConstellation oc = observation.getObservationConstellation();
assertThat(oc, is(notNullValue()));
final AbstractFeature foi = oc.getFeatureOfInterest();
assertThat(foi, is(notNullValue()));
}
use of org.n52.shetland.ogc.om.OmObservationConstellation in project arctic-sea by 52North.
the class MeasurementDecodingTest method testFeatureOfInterestSampledFeatures.
@Test
public void testFeatureOfInterestSampledFeatures() {
assertThat(observation, is(notNullValue()));
final OmObservationConstellation oc = observation.getObservationConstellation();
assertThat(oc, is(notNullValue()));
final AbstractFeature foi = oc.getFeatureOfInterest();
assertThat(foi, is(notNullValue()));
assertThat(foi, is(instanceOf(SamplingFeature.class)));
SamplingFeature sf = (SamplingFeature) foi;
assertThat(sf.getSampledFeatures(), is(notNullValue()));
assertThat(sf.getSampledFeatures().size(), is(3));
final AbstractFeature af1 = sf.getSampledFeatures().get(0);
assertThat(af1, is(notNullValue()));
assertThat(af1.getIdentifierCodeWithAuthority(), is(notNullValue()));
assertThat(af1.getIdentifierCodeWithAuthority().getValue(), is(equalTo("sampledFeature1")));
final AbstractFeature af2 = sf.getSampledFeatures().get(1);
assertThat(af2, is(notNullValue()));
assertThat(af2.getIdentifierCodeWithAuthority(), is(notNullValue()));
assertThat(af2.getIdentifierCodeWithAuthority().getValue(), is(equalTo("sampledFeature2")));
assertThat(af2.getName(), is(notNullValue()));
assertThat(af2.getName().size(), is(1));
assertThat(af2.getName().get(0), is(not(nullValue())));
assertThat(af2.getName().get(0).isSetCodeSpace(), is(false));
assertThat(af2.getName().get(0).getValue(), is(equalTo("sampledFeature2")));
assertThat(af2, is(instanceOf(SamplingFeature.class)));
SamplingFeature sf2 = (SamplingFeature) af2;
assertThat(sf2.getGeometry(), is(notNullValue()));
assertThat(sf2.getGeometry().getCoordinate().x, is(51.0));
assertThat(sf2.getGeometry().getCoordinate().y, is(8.0));
final AbstractFeature af3 = sf.getSampledFeatures().get(2);
assertThat(af3, is(notNullValue()));
assertThat(af3.getIdentifierCodeWithAuthority(), is(notNullValue()));
assertThat(af3.getIdentifierCodeWithAuthority().getValue(), is(equalTo("sampledFeature3")));
}
Aggregations