use of net.opengis.fes._2.BinarySpatialOpType in project ddf by codice.
the class CswFilterFactory method createBinarySpatialOpType.
private BinarySpatialOpType createBinarySpatialOpType(PropertyNameType propertyName, String wkt, BinarySpatialOperand geometryOrEnvelope) {
BinarySpatialOpType binarySpatialOpType = null;
if (geometryOrEnvelope == BinarySpatialOperand.GEOMETRY) {
wkt = convertWktToLatLonOrdering(wkt);
Geometry geometry = getGeometryFromWkt(wkt);
JAXBElement<? extends AbstractGeometryType> geometryJaxbElement = convertGeometry(geometry);
binarySpatialOpType = createBinarySpatialOpTypeUsingGeometry(propertyName, geometryJaxbElement);
} else {
JAXBElement<EnvelopeType> envelopeJaxbElement = createEnvelopeType(wkt);
binarySpatialOpType = createBinarySpatialOpTypeUsingEnvelope(propertyName, envelopeJaxbElement);
}
return binarySpatialOpType;
}
use of net.opengis.fes._2.BinarySpatialOpType in project ddf by codice.
the class CswQueryFactoryTest method testPostGetRecordsSpatialTouchesOgcFilter.
@Test
public void testPostGetRecordsSpatialTouchesOgcFilter() throws CswException, UnsupportedQueryException, SourceUnavailableException, FederationException {
BinarySpatialOpType op = createBinarySpatialOpType();
ogcSpatialQuery(Touches.class, filterObjectFactory.createTouches(op));
}
use of net.opengis.fes._2.BinarySpatialOpType in project ddf by codice.
the class CswQueryFactoryTest method testPostGetRecordsSpatialWithinOgcFilter.
@Test
public void testPostGetRecordsSpatialWithinOgcFilter() throws CswException, UnsupportedQueryException, SourceUnavailableException, FederationException {
BinarySpatialOpType op = createBinarySpatialOpType();
ogcSpatialQuery(Within.class, filterObjectFactory.createWithin(op));
}
use of net.opengis.fes._2.BinarySpatialOpType in project ddf by codice.
the class CswQueryFactoryTest method testPostGetRecordsSpatialIntersectsOgcFilter.
@Test
public void testPostGetRecordsSpatialIntersectsOgcFilter() throws CswException, UnsupportedQueryException, SourceUnavailableException, FederationException {
BinarySpatialOpType op = createBinarySpatialOpType();
ogcSpatialQuery(Intersects.class, filterObjectFactory.createIntersects(op));
}
use of net.opengis.fes._2.BinarySpatialOpType in project ddf by codice.
the class CswQueryFactoryTest method createBinarySpatialOpType.
private BinarySpatialOpType createBinarySpatialOpType() {
BinarySpatialOpType binarySpatialOps = new BinarySpatialOpType();
PropertyNameType propName = new PropertyNameType();
propName.getContent().add(SPATIAL_TEST_ATTRIBUTE);
binarySpatialOps.getPropertyName().add(propName);
binarySpatialOps.setGeometry(createPolygon());
return binarySpatialOps;
}
Aggregations