Class GeometryConstructor<R,G>
java.lang.Object
org.apache.sis.internal.filter.Node
org.apache.sis.internal.filter.sqlmm.SpatialFunction<R>
org.apache.sis.internal.filter.sqlmm.FunctionWithSRID<R>
org.apache.sis.internal.filter.sqlmm.GeometryConstructor<R,G>
- Type Parameters:
R
- the type of resources (e.g.Feature
) used as inputs.G
- the implementation type of geometry objects.
- All Implemented Interfaces:
Serializable
,Function<R,
,Object> Expression<R,
,Object> Optimization.OnExpression<R,
,Object> FeatureExpression<R,
Object>
- Direct Known Subclasses:
GeometryParser
SQLMM spatial functions taking non-geometry operands and creating a geometry.
Geometries can be created from Well-Known Text (WKT), Well-Known Binary (WKB)
Geographic Markup Language (GML), or a list of points or coordinates.
- Since:
- 1.1
- Version:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final Expression
<? super R, ?> The expression giving the geometry.(package private) final Geometries
<G> The library to use for creating geometry objects.private static final long
For cross-version compatibility.Fields inherited from class org.apache.sis.internal.filter.sqlmm.FunctionWithSRID
ABSENT, literalCRS, MAYBE, PRESENT, srid
Fields inherited from class org.apache.sis.internal.filter.sqlmm.SpatialFunction
operation
-
Constructor Summary
ConstructorsConstructorDescriptionGeometryConstructor
(SQLMM operation, Expression<? super R, ?>[] parameters, Geometries<G> library) Creates a new function for the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionCreates a geometry from the content of the given object.(package private) final Geometries
<?> Returns a handler for the library of geometric objects used by this expression.final List
<Expression<? super R, ?>> Returns the sub-expressions that will be evaluated to provide the parameters to the function.recreate
(Expression<? super R, ?>[] effective) Creates a new expression of the same type than this expression, but with an optimized geometry.Methods inherited from class org.apache.sis.internal.filter.sqlmm.FunctionWithSRID
expectedType, getTargetCRS
Methods inherited from class org.apache.sis.internal.filter.sqlmm.SpatialFunction
getChildren, getFunctionName, getSyntax, getValueClass, toValueType
Methods inherited from class org.apache.sis.internal.filter.Node
createName, createType, equals, getGeometryLibrary, hashCode, symbol, toGeometryWrapper, toString, unwrap, warning
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.sis.filter.Optimization.OnExpression
optimize
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
geometry
The expression giving the geometry. -
library
The library to use for creating geometry objects.
-
-
Constructor Details
-
GeometryConstructor
GeometryConstructor(SQLMM operation, Expression<? super R, ?>[] parameters, Geometries<G> library) Creates a new function for the given parameters.
-
-
Method Details
-
recreate
Creates a new expression of the same type than this expression, but with an optimized geometry. The optimization may be a geometry computed immediately if all operator parameters are literals.- Parameters:
effective
- the expressions to use as a replacement of this expression parameters.- Returns:
- the new expression, or
this
if unsupported.
-
getParameters
Returns the sub-expressions that will be evaluated to provide the parameters to the function.- Returns:
- the sub-expressions to be evaluated, or an empty list if none.
-
getGeometryLibrary
Returns a handler for the library of geometric objects used by this expression.- Specified by:
getGeometryLibrary
in classSpatialFunction<R>
- Returns:
- the geometry library (never
null
). - See Also:
-
apply
Creates a geometry from the content of the given object.- Parameters:
input
- the object to be evaluated by the expression.- Returns:
- geometry created by the expression, or
null
if the operation failed..
-