public class PolygonHandler extends Object implements ShapeHandler
| Constructor and Description |
|---|
PolygonHandler() |
PolygonHandler(ShapeType type) |
| Modifier and Type | Method and Description |
|---|---|
static int |
computeOrientation(org.locationtech.jts.geom.CoordinateSequence cs,
int p1,
int p2,
int q) |
int |
getLength(Object geometry)
Get the length of the given geometry Object in bytes not 16-bit words.
|
ShapeType |
getShapeType()
Get the ShapeType of this handler.
|
static boolean |
isCCW(org.locationtech.jts.geom.CoordinateSequence ring)
Computes whether a ring defined by an array of
Coordinates is
oriented counter-clockwise. |
org.locationtech.jts.geom.Geometry |
read(ReadBufferManager buffer,
ShapeType type)
Read a geometry from the ByteBuffer.
|
void |
write(WriteBufferManager buffer,
Object geometry)
Write the geometry into the ByteBuffer.
|
public PolygonHandler()
public PolygonHandler(ShapeType type) throws ShapefileException
ShapefileExceptionpublic ShapeType getShapeType()
ShapeHandlergetShapeType in interface ShapeHandlerpublic int getLength(Object geometry)
ShapeHandlergetLength in interface ShapeHandlergeometry - The geometry to analyze.public org.locationtech.jts.geom.Geometry read(ReadBufferManager buffer, ShapeType type) throws IOException
ShapeHandlerread in interface ShapeHandlerbuffer - The ByteBuffer to read from.IOExceptionpublic static boolean isCCW(org.locationtech.jts.geom.CoordinateSequence ring)
Coordinates is
oriented counter-clockwise.
ring - an array of Coordinates forming a ringpublic static int computeOrientation(org.locationtech.jts.geom.CoordinateSequence cs,
int p1,
int p2,
int q)
public void write(WriteBufferManager buffer, Object geometry) throws IOException
ShapeHandlerwrite in interface ShapeHandlerbuffer - The ByteBuffer to write to.geometry - The geometry to write.IOExceptionCopyright © 2019 CNRS. All rights reserved.