break; case DWITHIN: geometry = ( (DWithin) operator ).getGeometry(); distance = ( (DWithin) operator ).getDistance(); break; case EQUALS:
break; case DWITHIN: propertyName = ( (DWithin) operator ).getPropName(); geometry = ( (DWithin) operator ).getGeometry(); distance = ( (DWithin) operator ).getDistance(); break; case EQUALS:
@Override public <T> boolean evaluate( T obj, XPathEvaluator<T> xpathEvaluator ) throws FilterEvaluationException { for ( TypedObjectNode param1Value : propName.evaluate( obj, xpathEvaluator ) ) { Geometry geom = checkGeometryOrNull( param1Value ); if ( geom != null ) { Geometry transformedLiteral = getCompatibleGeometry( geom, geometry ); // TODO what about the units of the distance when transforming? return geom.isWithinDistance( transformedLiteral, distance ); } } return false; }
case DWITHIN: DWithin dwithin = (DWithin) op; return new DWithin( copy( dwithin.getPropName() ), dwithin.getGeometry(), copy( dwithin.getDistance() ) ); case EQUALS: Equals equals = (Equals) op;
case DWITHIN: DWithin d = (DWithin) o; return new DWithin( (Expression) os[0], (Geometry) os[1], d.getDistance() ); case EQUALS: return new Equals( (Expression) os[0], (Geometry) os[1] );
String distanceValue = xmlStream.getElementText(); Measure distance = new Measure( distanceValue, distanceUnits ); spatialOperator = new DWithin( param1, param2, distance ); break;
String distanceValue = xmlStream.getElementText(); Measure distance = new Measure( distanceValue, distanceUnits ); spatialOperator = new DWithin( param1, param2, distance ); break;
DWithin dWithin = (DWithin) op; builder.add( propNameExpr ).add( ".STDWithin(" ); builder.add( toProtoSQL( dWithin.getGeometry(), storageCRS, srid ) ); builder.add( "," ); PrimitiveValue value = new PrimitiveValue( dWithin.getDistance().getValue(), pt ); PrimitiveParticleConverter converter = new DefaultPrimitiveConverter( pt, null, false ); SQLArgument argument = new SQLArgument( value, converter );
String distanceValue = xmlStream.getElementText(); Measure distance = new Measure( distanceValue, distanceUnits ); spatialOperator = new DWithin( param1, param2, distance ); break;
builder.add( toProtoSQL( dWithin.getGeometry(), storageCRS, srid ) ); builder.add( "," ); PrimitiveValue value = new PrimitiveValue( dWithin.getDistance().getValue(), pt ); PrimitiveParticleConverter converter = new DefaultPrimitiveConverter( pt, null, false ); SQLArgument argument = new SQLArgument( value, converter );