@Override public boolean isWithin( Geometry geometry ) { return getReferencedObject().isWithin( geometry ); }
public <T> boolean evaluate( T obj, XPathEvaluator<T> xpathEvaluator ) throws FilterEvaluationException { for ( TypedObjectNode paramValue : propName.evaluate( obj, xpathEvaluator ) ) { Geometry geom = checkGeometryOrNull( paramValue ); if ( geom != null ) { Geometry transformedLiteral = getCompatibleGeometry( geom, geometry ); return geom.isWithin( transformedLiteral ); } } return false; }
private void evaluateValidDomain( ICRS crs, Geometry geometry, String handle ) throws OWSException { double[] validDomain = crs.getValidDomain(); if ( validDomain == null ) { LOG.warn( "Valid domain of crs {} is not available. Check if geometry is inside the valid " + "domain not possible. The check is skipped and insert processed.", crs.getAlias() ); return; } Envelope validDomainBbox = GEOM_FACTORY.createEnvelope( validDomain[0], validDomain[1], validDomain[2], validDomain[3], crs ); if ( !geometry.isWithin( validDomainBbox ) ) { String message = "At least one geometry is not in the valid domain of the srs."; if ( handle == null || "".equals( handle ) ) handle = "Transaction"; throw new OWSException( message, OWSException.OPERATION_PROCESSING_FAILED, handle ); } }