use of net.opengis.ogc.SpatialOperatorsType in project arctic-sea by 52North.
the class SosV1GetCapabilitiesResponseEncoder method setSpatialFilterCapabilities.
/**
* Sets the SpatialFilterCapabilities.
*
* !!! Modify method addicted to your implementation !!!
*
* @param spatialCapabilities SpatialCapabilities.
* @param sosFilterCaps the SOS filter capabilities
*/
protected void setSpatialFilterCapabilities(SpatialCapabilitiesType spatialCapabilities, org.n52.shetland.ogc.filter.FilterCapabilities sosFilterCaps) {
// set GeometryOperands
if (!sosFilterCaps.getSpatialOperands().isEmpty()) {
sosFilterCaps.getSpatialOperands().forEach(spatialCapabilities.addNewGeometryOperands()::addGeometryOperand);
}
// set SpatialOperators
if (!sosFilterCaps.getSpatialOperators().isEmpty()) {
SpatialOperatorsType spatialOps = spatialCapabilities.addNewSpatialOperators();
Set<SpatialOperator> keys = sosFilterCaps.getSpatialOperators().keySet();
keys.forEach(spatialOperator -> {
SpatialOperatorType operator = spatialOps.addNewSpatialOperator();
operator.setName(getEnum4SpatialOperator(spatialOperator));
GeometryOperandsType bboxGeomOps = operator.addNewGeometryOperands();
sosFilterCaps.getSpatialOperators().get(spatialOperator).forEach(bboxGeomOps::addGeometryOperand);
});
}
}
Aggregations