|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.data.shapefile.shp.JTSUtilities
A collection of utility methods for use with JTS and the shapefile package.
Method Summary | |
static com.vividsolutions.jts.geom.Geometry |
convertToCollection(com.vividsolutions.jts.geom.Geometry geom,
ShapeType type)
|
static java.lang.Class |
findBestGeometryClass(ShapeType type)
|
static ShapeType |
findBestGeometryType(com.vividsolutions.jts.geom.Geometry geom)
Determine the best ShapeType for a given Geometry. |
static ShapeType |
getShapeType(java.lang.Class featureClass)
Determine the default ShapeType for a featureClass. |
static ShapeType |
getShapeType(com.vividsolutions.jts.geom.Geometry geom,
int shapeFileDimentions)
Determine the best ShapeType for a geometry with the given dimension. |
static int |
guessCoorinateDims(com.vividsolutions.jts.geom.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 com.vividsolutions.jts.geom.MultiPolygon |
makeGoodShapeMultiPolygon(com.vividsolutions.jts.geom.MultiPolygon mp)
Like makeGoodShapePolygon, but applied towards a multi polygon. |
static com.vividsolutions.jts.geom.Polygon |
makeGoodShapePolygon(com.vividsolutions.jts.geom.Polygon p)
Create a nice Polygon from the given Polygon. |
static com.vividsolutions.jts.geom.LinearRing |
reverseRing(com.vividsolutions.jts.geom.LinearRing lr)
Does what it says, reverses the order of the Coordinates in the ring. |
static double[] |
zMinMax(com.vividsolutions.jts.geom.Coordinate[] cs)
Determine the min and max "z" values in an array of Coordinates. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final double[] zMinMax(com.vividsolutions.jts.geom.Coordinate[] cs)
cs
- The array to search.
public static final ShapeType findBestGeometryType(com.vividsolutions.jts.geom.Geometry geom)
geom
- The Geometry to analyze.
public static final java.lang.Class findBestGeometryClass(ShapeType type)
public static final com.vividsolutions.jts.geom.LinearRing reverseRing(com.vividsolutions.jts.geom.LinearRing lr)
lr
- The ring to reverse.
public static final com.vividsolutions.jts.geom.Polygon makeGoodShapePolygon(com.vividsolutions.jts.geom.Polygon p)
p
- The Polygon to make "nice".
public static final com.vividsolutions.jts.geom.MultiPolygon makeGoodShapeMultiPolygon(com.vividsolutions.jts.geom.MultiPolygon mp)
mp
- The MultiPolygon to "niceify".
public static final int guessCoorinateDims(com.vividsolutions.jts.geom.Coordinate[] cs)
cs
- The array of Coordinates to search.
public static com.vividsolutions.jts.geom.Geometry convertToCollection(com.vividsolutions.jts.geom.Geometry geom, ShapeType type)
public static final ShapeType getShapeType(com.vividsolutions.jts.geom.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(java.lang.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 |