Class ST_FromText<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>

final class ST_FromText<R,G> extends GeometryParser<R,G>
Constructor for a geometry which is transformed from a Well-Known Text (WKT) representation.
Since:
1.1
Version:
1.1
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      For cross-version compatibility.
      See Also:
  • Constructor Details

    • ST_FromText

      ST_FromText(SQLMM operation, Expression<? super R,?>[] parameters, Geometries<G> library)
      Creates a new function for the given parameters.
  • Method Details

    • recreate

      public Expression<R,Object> recreate(Expression<? super R,?>[] effective)
      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:
      recreate in interface Optimization.OnExpression<R,G>
      Specified by:
      recreate in class GeometryParser<R,G>
      Parameters:
      effective - the expressions to use as a replacement of this expression parameters.
      Returns:
      the new expression, or this if unsupported.
    • inputName

      final String inputName()
      Returns the name of the kind of input expected by this expression.
      Specified by:
      inputName in class GeometryParser<R,G>
      Returns:
      "text" or "wkb".
    • parse

      protected GeometryWrapper<G> parse(Object value) throws Exception
      Parses the given value.
      Specified by:
      parse in class GeometryParser<R,G>
      Parameters:
      value - the WKT value.
      Returns:
      the geometry parsed from the given value.
      Throws:
      ClassCastException - if the given value is not a String or an array of bytes.
      Exception - if parsing failed for another reason. This is an implementation-specific exception.