Package org.geotools.data.shapefile.shp
Class PolygonHandler
Object
PolygonHandler
- All Implemented Interfaces:
- ShapeHandler
Wrapper for a Shapefile polygon.
- Author:
- aaime, Ian Schneider
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintGet the length of the given geometry Object in bytes not 16-bit words.Get the ShapeType of this handler.read(ByteBuffer buffer, ShapeType type, boolean flatFeature) Read a geometry from the ByteBuffer.voidwrite(ByteBuffer buffer, Object geometry) Write the geometry into the ByteBuffer.
- 
Field Details- 
LOGGER
 
- 
- 
Constructor Details- 
PolygonHandler
- 
PolygonHandler- Throws:
- ShapefileException
 
 
- 
- 
Method Details- 
getShapeTypeDescription copied from interface:ShapeHandlerGet the ShapeType of this handler.- Specified by:
- getShapeTypein interface- ShapeHandler
- Returns:
- The ShapeType.
 
- 
getLengthDescription copied from interface:ShapeHandlerGet the length of the given geometry Object in bytes not 16-bit words. This is easier to keep track of, since the ByteBuffer deals with bytes. Do not include the 8 bytes of record.- Specified by:
- getLengthin interface- ShapeHandler
- Parameters:
- geometry- The geometry to analyze.
- Returns:
- The number of bytes the shape will take up.
 
- 
readDescription copied from interface:ShapeHandlerRead a geometry from the ByteBuffer. The buffer's position, byteOrder, and limit are set to that which is needed. The record has been read as well as the shape type integer. The handler need not worry about reading unused information as the ShapefileReader will correctly adjust the buffer position after this call.- Specified by:
- readin interface- ShapeHandler
- Parameters:
- buffer- The ByteBuffer to read from.
- Returns:
- A geometry object.
 
- 
writeDescription copied from interface:ShapeHandlerWrite the geometry into the ByteBuffer. The position, byteOrder, and limit are all set. The handler is not responsible for writing the record or shape type integer.- Specified by:
- writein interface- ShapeHandler
- Parameters:
- buffer- The ByteBuffer to write to.
- geometry- The geometry to write.
 
 
-