|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectJTSUtilities
public class JTSUtilities
A collection of utility methods for use with JTS and the shapefile package.
trunk/gt/modules
(gt-modules.jar
) (Maven report) (SVN head)Method Summary | |
---|---|
static Geometry |
convertToCollection(Geometry geom,
ShapeType type)
|
static Class |
findBestGeometryClass(ShapeType type)
|
static ShapeType |
findBestGeometryType(Geometry geom)
Determine the best ShapeType for a given Geometry. |
static ShapeType |
getShapeType(Class featureClass)
Determine the default ShapeType for a featureClass. |
static ShapeType |
getShapeType(Geometry geom,
int shapeFileDimentions)
Determine the best ShapeType for a geometry with the given dimension. |
static int |
guessCoorinateDims(Coordinate[] cs)
Returns: 2 for 2d (default) 4 for 3d - one of the oordinates has a non-NaN z value (3 is for x,y,m but thats not supported yet) |
static MultiPolygon |
makeGoodShapeMultiPolygon(MultiPolygon mp)
Like makeGoodShapePolygon, but applied towards a multi polygon. |
static Polygon |
makeGoodShapePolygon(Polygon p)
Create a nice Polygon from the given Polygon. |
static LinearRing |
reverseRing(LinearRing lr)
Does what it says, reverses the order of the Coordinates in the ring. |
static double[] |
zMinMax(Coordinate[] cs)
Deprecated. use zMinMax(CoordinateSequence) |
static void |
zMinMax(CoordinateSequence cs,
double[] target)
Determine the min and max "z" values in an array of Coordinates. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static final double[] zMinMax(Coordinate[] cs)
cs
- The array to search.
public static final void zMinMax(CoordinateSequence cs, double[] target)
cs
- The array to search.target
- array with at least two elements where to hold the min and max
zvalues. target[0] will be filled with the minimum zvalue,
target[1] with the maximum. The array current values, if not
NaN, will be taken into acount in the computation.public static final ShapeType findBestGeometryType(Geometry geom)
geom
- The Geometry to analyze.
public static final Class findBestGeometryClass(ShapeType type)
public static final LinearRing reverseRing(LinearRing lr)
lr
- The ring to reverse.
public static final Polygon makeGoodShapePolygon(Polygon p)
p
- The Polygon to make "nice".
public static final MultiPolygon makeGoodShapeMultiPolygon(MultiPolygon mp)
mp
- The MultiPolygon to "niceify".
public static final int guessCoorinateDims(Coordinate[] cs)
cs
- The array of Coordinates to search.
public static Geometry convertToCollection(Geometry geom, ShapeType type)
public static final ShapeType getShapeType(Geometry geom, int shapeFileDimentions) throws ShapefileException
geom
- The Geometry to examine.shapeFileDimentions
- The dimension 2,3 or 4.
ShapefileException
- If theres a problem, like a bogus Geometry.public static final ShapeType getShapeType(Class featureClass) throws ShapefileException
featureClass
- The Geometry to examine.
ShapefileException
- If theres a problem, like a bogus feature class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |