Class GeometryFunction
- java.lang.Object
-
- com.vividsolutions.jump.workbench.ui.plugin.analysis.GeometryFunction
-
public abstract class GeometryFunction extends Object
A function object forGeometryfunctions (which return a Geometry). Provides metadata about the function.- Version:
- 1.0
- Author:
- Martin Davis
-
-
Constructor Summary
Constructors Constructor Description GeometryFunction(String name, int nArgs, int nParams)GeometryFunction(String name, int nArgs, int nParams, String description)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract org.locationtech.jts.geom.Geometryexecute(org.locationtech.jts.geom.Geometry[] geom, double[] param)Exectute the function on the geometry(s) in the geom array.StringgetDescription()static GeometryFunctiongetFunction(String name)static GeometryFunctiongetFunction(Collection<GeometryFunction> functions, String name)static GeometryFunction[]getFunctions()intgetGeometryArgumentCount()StringgetName()static List<String>getNames()static List<String>getNames(Collection<GeometryFunction> functions)intgetParameterCount()StringtoString()
-
-
-
Method Detail
-
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 argumentsparam- any non-geometric arguments.- Returns:
- the geometry result, or null if no result could be computed.
-
-