Class GeometryFunction

java.lang.Object
com.vividsolutions.jump.workbench.ui.plugin.analysis.GeometryFunction

public abstract class GeometryFunction extends Object
A function object for Geometry functions (which return a Geometry). Provides metadata about the function.
Version:
1.0
Author:
Martin Davis
  • Constructor Details

    • GeometryFunction

      public GeometryFunction(String name, int nArgs, int nParams)
    • GeometryFunction

      public GeometryFunction(String name, int nArgs, int nParams, String description)
  • Method Details

    • getNames

      public static List<String> getNames()
    • getNames

      public static List<String> getNames(Collection<GeometryFunction> functions)
    • getFunction

      public static GeometryFunction getFunction(String name)
    • getFunction

      public static GeometryFunction getFunction(Collection<GeometryFunction> functions, String name)
    • getFunctions

      public static GeometryFunction[] getFunctions()
    • getName

      public String getName()
    • getGeometryArgumentCount

      public int getGeometryArgumentCount()
    • getParameterCount

      public int getParameterCount()
    • getDescription

      public String getDescription()
    • execute

      public abstract org.locationtech.jts.geom.Geometry execute(org.locationtech.jts.geom.Geometry[] geom, double[] param)
      Exectute the function on the geometry(s) in the geom array. The function can expect that the correct number of geometry arguments is present in the array. Integer parameters must be passed as doubles. If no result can be computed for some reason, null should be returned to indicate this to the caller. Exceptions may be thrown and must be handled by the caller.
      Parameters:
      geom - the geometry arguments
      param - any non-geometric arguments.
      Returns:
      the geometry result, or null if no result could be computed.
    • toString

      public String toString()
      Overrides:
      toString in class Object