class Function extends Expression
A GeoScript Function either wraps an existing GeoTools Function or an CQL String.
You can create a Function from CQL:
Function f = new Function("centroid(the_geom)")
You can also create a Function from CQL and a Closure:
See GeoServer's Function Reference for more details.Function f = new Function("my_centroid(the_geom)", {g-> g.centroid})
Fields inherited from class | Fields |
---|---|
class Expression |
filterFactory |
Constructor and description |
---|
Function(Function f) Create a Function from a GeoTools Function |
Function(java.lang.String str) Create a new Function from a CQL compatible string |
Function(java.lang.String name, Expression[] expressions) Create a new Function from a name and one or more Expressions |
Function(java.lang.String name, groovy.lang.Closure closure, Expression[] expressions) Create a new Function from a Closure with one or more Expressions. |
Function(java.lang.String cql, groovy.lang.Closure closure) Create a new Function from CQL and a Closure. |
Function(Process process, Function[] functions) Create a Rendering Transformation Function from a Process and a variable List of Functions. |
Type Params | Return Type | Name and description |
---|---|---|
|
static java.util.List<java.lang.String> |
getFunctionNames() Get a List of all Function names |
|
static void |
registerFunction(java.lang.String name, groovy.lang.Closure closure) Register a new Function by name with a Closure. |
|
java.lang.String |
toString() The string presentation |
Methods inherited from class | Name |
---|---|
class Expression |
evaluate, fromCQL, getValue, toString |
The GeoTools Function
Create a Function from a GeoTools Function
f
- The GeoTools FunctionCreate a new Function from a CQL compatible string
str
- A CQL StringCreate a new Function from a name and one or more Expressions
name
- The Function nameexpressions
- One or more ExpressionsCreate a new Function from a Closure with one or more Expressions.
name
- The name of the new Functionclosure
- The Closureexpressions
- One or more ExpressionsCreate a new Function from CQL and a Closure.
cql
- The CQL statementclosure
- The ClosureGet a List of all Function names
Register a new Function by name with a Closure.
name
- The name of the new Functionclosure
- The ClosureThe string presentation
Groovy Documentation