es.unex.sextante.shapesTools
Class ShapesTools
java.lang.Object
es.unex.sextante.shapesTools.ShapesTools
public class ShapesTools
- extends java.lang.Object
Additional methods for working with vector layers
- Author:
- Victor Olaya
Method Summary |
static IVectorLayer |
addFields(OutputFactory outputFactory,
IVectorLayer layer,
IOutputChannel channel,
java.lang.String[] sFieldNames,
java.lang.Object[][] addedValues,
java.lang.Class[] fieldTypes)
Returns a new vector layer identical to a given one but with
additional fields in its attributes table |
static com.vividsolutions.jts.geom.Geometry |
createCircle(double x,
double y,
double radius)
Creates a circle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShapesTools
public ShapesTools()
addFields
public static IVectorLayer addFields(OutputFactory outputFactory,
IVectorLayer layer,
IOutputChannel channel,
java.lang.String[] sFieldNames,
java.lang.Object[][] addedValues,
java.lang.Class[] fieldTypes)
throws UnsupportedOutputChannelException,
IteratorException
- Returns a new vector layer identical to a given one but with
additional fields in its attributes table
- Parameters:
outputFactory
- the output factory to use to create the
new layerlayer
- the base layerchannel
- the output channel for the resulting layersFieldNames
- an array with field names of the new fields
to addaddedValues
- the values to addfieldTypes
- an array with field types of the fields to add
- Returns:
- a new layer with added attributes
- Throws:
UnsupportedOutputChannelException
IteratorException
createCircle
public static com.vividsolutions.jts.geom.Geometry createCircle(double x,
double y,
double radius)
- Creates a circle
- Parameters:
x
- the x coordinate of the centery
- the y coordinate of the centerradius
- the radius of the circle
- Returns:
- a circle-shaped polygon