org.geotools.shapefile
Class PolygonHandler
java.lang.Object
org.geotools.shapefile.PolygonHandler
- All Implemented Interfaces:
- ShapeHandler
public class PolygonHandler
- extends java.lang.Object
- implements ShapeHandler
Wrapper for a Shapefile Polygon.
|
Field Summary |
protected static com.vividsolutions.jts.algorithm.CGAlgorithms |
cga
|
|
Method Summary |
com.vividsolutions.jts.geom.Geometry |
getEmptyGeometry(com.vividsolutions.jts.geom.GeometryFactory factory)
Return a empty geometry. |
int |
getLength(com.vividsolutions.jts.geom.Geometry geometry)
|
int |
getShapeType()
Returns one of the ShapeType int defined by the specification. |
com.vividsolutions.jts.geom.Geometry |
read(EndianDataInputStream file,
com.vividsolutions.jts.geom.GeometryFactory geometryFactory,
int contentLength)
|
void |
write(com.vividsolutions.jts.geom.Geometry geometry,
EndianDataOutputStream file)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cga
protected static com.vividsolutions.jts.algorithm.CGAlgorithms cga
PolygonHandler
public PolygonHandler()
PolygonHandler
public PolygonHandler(int type)
throws InvalidShapefileException
- Throws:
InvalidShapefileException
read
public com.vividsolutions.jts.geom.Geometry read(EndianDataInputStream file,
com.vividsolutions.jts.geom.GeometryFactory geometryFactory,
int contentLength)
throws java.io.IOException,
InvalidShapefileException
- Specified by:
read in interface ShapeHandler
- Throws:
java.io.IOException
InvalidShapefileException
write
public void write(com.vividsolutions.jts.geom.Geometry geometry,
EndianDataOutputStream file)
throws java.io.IOException
- Specified by:
write in interface ShapeHandler
- Throws:
java.io.IOException
getShapeType
public int getShapeType()
- Description copied from interface:
ShapeHandler
- Returns one of the ShapeType int defined by the specification.
- 0 Null Shape
- 1 Point
- 3 PolyLine
- 5 Polygon
- 8 MultiPoint
- 11 PointZ
- 13 PolyLineZ
- 15 PolygonZ
- 18 MultiPointZ
- 21 PointM
- 23 PolyLineM
- 25 PolygonM
- 28 MultiPointM
- 31 MultiPatch
- Specified by:
getShapeType in interface ShapeHandler
getLength
public int getLength(com.vividsolutions.jts.geom.Geometry geometry)
- Specified by:
getLength in interface ShapeHandler
getEmptyGeometry
public com.vividsolutions.jts.geom.Geometry getEmptyGeometry(com.vividsolutions.jts.geom.GeometryFactory factory)
- Return a empty geometry.
- Specified by:
getEmptyGeometry in interface ShapeHandler