use of net.opengis.filter.v_1_1_0.DistanceType in project ddf by codice.
the class CswQueryFactoryTest method createDistanceBufferType.
private DistanceBufferType createDistanceBufferType() {
DistanceBufferType distanceBuffer = new DistanceBufferType();
PropertyNameType propName = new PropertyNameType();
propName.getContent().add(SPATIAL_TEST_ATTRIBUTE);
distanceBuffer.setPropertyName(propName);
DistanceType distance = filterObjectFactory.createDistanceType();
distance.setUnits(REL_GEO_UNITS);
distance.setContent(Double.toString(REL_GEO_DISTANCE));
distanceBuffer.setDistance(distance);
distanceBuffer.setGeometry(createPolygon());
return distanceBuffer;
}
use of net.opengis.filter.v_1_1_0.DistanceType in project ddf by codice.
the class CswFilterFactory method createDistanceBufferType.
@SuppressWarnings("unchecked")
private DistanceBufferType createDistanceBufferType(PropertyNameType propertyName, JAXBElement<? extends AbstractGeometryType> geometry, DistanceType distance) {
DistanceBufferType distanceBuffer = new DistanceBufferType();
distanceBuffer.setDistance(distance);
distanceBuffer.setGeometry((JAXBElement<AbstractGeometryType>) geometry);
distanceBuffer.setPropertyName(propertyName);
return distanceBuffer;
}
use of net.opengis.filter.v_1_1_0.DistanceType in project ddf by codice.
the class WfsFilterDelegate method buildDistanceBufferType.
private JAXBElement<DistanceBufferType> buildDistanceBufferType(JAXBElement<DistanceBufferType> dbt, String propertyName, String wkt, double distance) {
DistanceType distanceType = new DistanceType();
distanceType.setContent(Double.toString(distance));
// the filter adapter normalizes all distances to meters
distanceType.setUnits(WfsConstants.METERS);
dbt.getValue().setDistance(distanceType);
dbt.getValue().setGeometry(createPoint(wkt));
dbt.getValue().setPropertyName(createPropertyNameType(propertyName).getValue());
return dbt;
}
use of net.opengis.filter.v_1_1_0.DistanceType in project ddf by codice.
the class CswFilterFactory method createBeyondType.
private JAXBElement<DistanceBufferType> createBeyondType(String propertyName, String wkt, double distance) {
wkt = convertWktToLatLonOrdering(wkt);
Geometry geometry = getGeometryFromWkt(wkt);
JAXBElement<? extends AbstractGeometryType> geometryJaxbElement = convertGeometry(geometry);
PropertyNameType propertyNameType = createPropertyNameType(propertyName);
DistanceType distanceType = createDistanceType(distance, CswConstants.METERS);
DistanceBufferType distanceBufferType = createDistanceBufferType(propertyNameType, geometryJaxbElement, distanceType);
return filterObjectFactory.createBeyond(distanceBufferType);
}
use of net.opengis.filter.v_1_1_0.DistanceType in project ddf by codice.
the class CswFilterFactory method createDWithinType.
private JAXBElement<DistanceBufferType> createDWithinType(String propertyName, String wkt, double distance) {
wkt = convertWktToLatLonOrdering(wkt);
Geometry geometry = getGeometryFromWkt(wkt);
JAXBElement<? extends AbstractGeometryType> geometryJaxbElement = convertGeometry(geometry);
PropertyNameType propertyNameType = createPropertyNameType(propertyName);
DistanceType distanceType = createDistanceType(distance, CswConstants.METERS);
DistanceBufferType distanceBufferType = createDistanceBufferType(propertyNameType, geometryJaxbElement, distanceType);
return filterObjectFactory.createDWithin(distanceBufferType);
}
Aggregations