use of net.opengis.gml.x32.LineStringType in project ddf by codice.
the class WfsFilterDelegateTest method testLineStringLonLatOrder.
@Test
public void testLineStringLonLatOrder() {
final WfsFilterDelegate delegate = setupFilterDelegate(SPATIAL_OPERATORS.INTERSECTS.getValue(), new LonLatCoordinateStrategy());
final FilterType filter = delegate.intersects(Metacard.ANY_GEO, LINESTRING);
assertThat(filter.getSpatialOps().getValue(), is(instanceOf(BinarySpatialOpType.class)));
final BinarySpatialOpType binarySpatialOpType = (BinarySpatialOpType) filter.getSpatialOps().getValue();
assertThat(binarySpatialOpType.getGeometry().getValue(), is(instanceOf(LineStringType.class)));
final LineStringType lineStringType = (LineStringType) binarySpatialOpType.getGeometry().getValue();
assertThat(lineStringType.getCoordinates().getValue(), is("30.0,10.0 10.0,30.0 50.0,40.0"));
}
use of net.opengis.gml.x32.LineStringType in project ddf by codice.
the class WfsFilterDelegateTest method testLineStringLatLonOrder.
@Test
public void testLineStringLatLonOrder() {
final WfsFilterDelegate delegate = setupFilterDelegate(SPATIAL_OPERATORS.INTERSECTS.getValue(), new LatLonCoordinateStrategy());
final FilterType filter = delegate.intersects(Metacard.ANY_GEO, LINESTRING);
assertThat(filter.getSpatialOps().getValue(), is(instanceOf(BinarySpatialOpType.class)));
final BinarySpatialOpType binarySpatialOpType = (BinarySpatialOpType) filter.getSpatialOps().getValue();
assertThat(binarySpatialOpType.getGeometry().getValue(), is(instanceOf(LineStringType.class)));
final LineStringType lineStringType = (LineStringType) binarySpatialOpType.getGeometry().getValue();
assertThat(lineStringType.getCoordinates().getValue(), is("10.0,30.0 30.0,10.0 40.0,50.0"));
}
Aggregations