Class GeometryParser<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>
org.apache.sis.internal.filter.sqlmm.GeometryParser<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:
ST_FromBinary,ST_FromText
SQLMM spatial functions taking non-geometry operands and parsing a geometry.
Geometries can be created from Well-Known Text (WKT), Well-Known Binary (WKB)
or Geographic Markup Language (GML).
- Since:
- 1.1
- Version:
- 1.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longFor cross-version compatibility.Fields inherited from class org.apache.sis.internal.filter.sqlmm.GeometryConstructor
geometry, libraryFields inherited from class org.apache.sis.internal.filter.sqlmm.FunctionWithSRID
ABSENT, literalCRS, MAYBE, PRESENT, sridFields inherited from class org.apache.sis.internal.filter.sqlmm.SpatialFunction
operation -
Constructor Summary
ConstructorsConstructorDescriptionGeometryParser(SQLMM operation, Expression<? super R, ?>[] parameters, Geometries<G> library) Creates a new function for the given parameters. -
Method Summary
Modifier and TypeMethodDescriptionfinal ObjectCreates a geometry from the content of the given object.final StringReturns a Backus-Naur Form (BNF) of this function.(package private) abstract StringReturns the name of the kind of input expected by this expression.protected abstract GeometryWrapper<G>Parses the given value.abstract Expression<R,Object> 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.GeometryConstructor
getGeometryLibrary, getParametersMethods inherited from class org.apache.sis.internal.filter.sqlmm.FunctionWithSRID
expectedType, getTargetCRSMethods inherited from class org.apache.sis.internal.filter.sqlmm.SpatialFunction
getChildren, getFunctionName, getValueClass, toValueTypeMethods inherited from class org.apache.sis.internal.filter.Node
createName, createType, equals, getGeometryLibrary, hashCode, symbol, toGeometryWrapper, toString, unwrap, warningMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.sis.filter.Optimization.OnExpression
optimize
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
-
Constructor Details
-
GeometryParser
GeometryParser(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.- Specified by:
recreatein interfaceOptimization.OnExpression<R,G> - Overrides:
recreatein classGeometryConstructor<R,G> - Parameters:
effective- the expressions to use as a replacement of this expression parameters.- Returns:
- the new expression, or
thisif unsupported.
-
getSyntax
Returns a Backus-Naur Form (BNF) of this function.- Overrides:
getSyntaxin classSpatialFunction<R>
-
inputName
Returns the name of the kind of input expected by this expression.- Returns:
"text"or"wkb".
-
apply
Creates a geometry from the content of the given object. -
parse
Parses the given value.- Parameters:
value- the WKT, WKB or GML value.- Returns:
- the geometry parsed from the given value.
- Throws:
ClassCastException- if the given value is not an instance of the type expected by this operationException- if parsing failed for another reason. This is an implementation-specific exception.
-