Class PolygonHandler
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.io.shapefile.PolygonHandler
-
- All Implemented Interfaces:
ShapeHandler
public class PolygonHandler extends java.lang.Object implements ShapeHandler
Wrapper for a Shapefile polygon.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) int
myShapeType
-
Constructor Summary
Constructors Constructor Description PolygonHandler()
PolygonHandler(int type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.util.ArrayList
assignHolesToShells(java.util.ArrayList shells, java.util.ArrayList holes)
private static int
findIndex(java.util.ArrayList list, java.lang.Object o)
Finds a object in a list.int
getLength(Geometry geometry)
int
getShapeType()
(package private) boolean
pointInList(Coordinate testPoint, Coordinate[] pointList)
Geometry
read(EndianDataInputStream file, GeometryFactory geometryFactory, int contentLength)
(package private) double[]
zMinMax(Geometry g)
-
-
-
Constructor Detail
-
PolygonHandler
public PolygonHandler()
-
PolygonHandler
public PolygonHandler(int type) throws InvalidShapefileException
- Throws:
InvalidShapefileException
-
-
Method Detail
-
pointInList
boolean pointInList(Coordinate testPoint, Coordinate[] pointList)
-
read
public Geometry read(EndianDataInputStream file, GeometryFactory geometryFactory, int contentLength) throws java.io.IOException, InvalidShapefileException
- Specified by:
read
in interfaceShapeHandler
- Throws:
java.io.IOException
InvalidShapefileException
-
assignHolesToShells
private java.util.ArrayList assignHolesToShells(java.util.ArrayList shells, java.util.ArrayList holes)
-
findIndex
private static int findIndex(java.util.ArrayList list, java.lang.Object o)
Finds a object in a list. Should be much faster than indexof- Parameters:
list
-o
-- Returns:
-
getShapeType
public int getShapeType()
- Specified by:
getShapeType
in interfaceShapeHandler
-
getLength
public int getLength(Geometry geometry)
- Specified by:
getLength
in interfaceShapeHandler
-
zMinMax
double[] zMinMax(Geometry g)
-
-