Search in sources :

Example 1 with GeometryOperandsType

use of net.opengis.ogc.GeometryOperandsType 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);
        });
    }
}
Also used : SpatialOperatorsType(net.opengis.ogc.SpatialOperatorsType) SpatialOperatorType(net.opengis.ogc.SpatialOperatorType) GeometryOperandsType(net.opengis.ogc.GeometryOperandsType) SpatialOperator(org.n52.shetland.ogc.filter.FilterConstants.SpatialOperator)

Aggregations

GeometryOperandsType (net.opengis.ogc.GeometryOperandsType)1 SpatialOperatorType (net.opengis.ogc.SpatialOperatorType)1 SpatialOperatorsType (net.opengis.ogc.SpatialOperatorsType)1 SpatialOperator (org.n52.shetland.ogc.filter.FilterConstants.SpatialOperator)1