use of org.opengis.filter.ValueReference in project geotoolkit by Geomatys.
the class FilterFactory2 method disjoint.
public BinarySpatialOperator<Object> disjoint(final String propertyName, final Geometry geometry) {
final ValueReference name = property(propertyName);
final Literal geom = super.literal(geometry);
return disjoint(name, geom);
}
use of org.opengis.filter.ValueReference in project geotoolkit by Geomatys.
the class FilterFactory2 method touches.
public BinarySpatialOperator<Object> touches(final String propertyName, final Geometry geometry) {
final ValueReference name = property(propertyName);
final Literal geom = super.literal(geometry);
return touches(name, geom);
}
use of org.opengis.filter.ValueReference in project geotoolkit by Geomatys.
the class FilterFactory2 method dwithin.
public DistanceOperator<Object> dwithin(final String propertyName, final Geometry geometry, final double distance, final String units) {
final ValueReference name = property(propertyName);
final Literal geom = super.literal(geometry);
return dwithin(name, geom, distance, units);
}
use of org.opengis.filter.ValueReference in project geotoolkit by Geomatys.
the class FilterFactory2 method beyond.
public DistanceOperator<Object> beyond(final String propertyName, final Geometry geometry, final double distance, final String units) {
final ValueReference name = property(propertyName);
final Literal geom = super.literal(geometry);
return beyond(name, geom, distance, units);
}
use of org.opengis.filter.ValueReference in project geotoolkit by Geomatys.
the class GroovyFunction method apply.
@Override
public Object apply(final Object feature) {
Binding bindings = new Binding();
for (int i = 1, n = parameters.size(); i < n; i++) {
final ValueReference property = (ValueReference) parameters.get(i);
final Object value = property.apply(feature);
bindings.setVariable(VAR_CHARACTER + property.getXPath(), value);
}
try {
final Script script = getCompiled();
script.setBinding(bindings);
return script.run();
} catch (CompilationFailedException ex) {
Logger.getLogger("org.geotoolkit.filter.function.groovy").log(Level.WARNING, null, ex);
}
return "";
}
Aggregations