Class JtsShapeFactory.JtsPolygonBuilder
- java.lang.Object
-
- org.locationtech.spatial4j.shape.jts.JtsShapeFactory.CoordinatesAccumulator<JtsShapeFactory.JtsPolygonBuilder>
-
- org.locationtech.spatial4j.shape.jts.JtsShapeFactory.JtsPolygonBuilder
-
- All Implemented Interfaces:
ShapeFactory.PointsBuilder<ShapeFactory.PolygonBuilder>
,ShapeFactory.PolygonBuilder
- Enclosing class:
- JtsShapeFactory
private class JtsShapeFactory.JtsPolygonBuilder extends JtsShapeFactory.CoordinatesAccumulator<JtsShapeFactory.JtsPolygonBuilder> implements ShapeFactory.PolygonBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
JtsShapeFactory.JtsPolygonBuilder.JtsHoleBuilder
-
Nested classes/interfaces inherited from interface org.locationtech.spatial4j.shape.ShapeFactory.PolygonBuilder
ShapeFactory.PolygonBuilder.HoleBuilder
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<org.locationtech.jts.geom.LinearRing>
holes
-
Fields inherited from class org.locationtech.spatial4j.shape.jts.JtsShapeFactory.CoordinatesAccumulator
coordinates
-
-
Constructor Summary
Constructors Modifier Constructor Description private
JtsPolygonBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Shape
build()
Builds the polygon and renders this builder instance invalid.Shape
buildOrRect()
(package private) org.locationtech.jts.geom.Polygon
buildPolygonGeom()
JtsShapeFactory.JtsPolygonBuilder.JtsHoleBuilder
hole()
Starts a new hole.-
Methods inherited from class org.locationtech.spatial4j.shape.jts.JtsShapeFactory.CoordinatesAccumulator
getCoordsArray, getThis, pointXY, pointXYZ
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.locationtech.spatial4j.shape.ShapeFactory.PointsBuilder
pointLatLon, pointXY, pointXYZ
-
-
-
-
Method Detail
-
hole
public JtsShapeFactory.JtsPolygonBuilder.JtsHoleBuilder hole()
Description copied from interface:ShapeFactory.PolygonBuilder
Starts a new hole. You must add at least 4 points; furthermore the first and last must be the same. And don't forget to callShapeFactory.PolygonBuilder.HoleBuilder.endHole()
!- Specified by:
hole
in interfaceShapeFactory.PolygonBuilder
-
build
public Shape build()
Description copied from interface:ShapeFactory.PolygonBuilder
Builds the polygon and renders this builder instance invalid.- Specified by:
build
in interfaceShapeFactory.PolygonBuilder
-
buildOrRect
public Shape buildOrRect()
- Specified by:
buildOrRect
in interfaceShapeFactory.PolygonBuilder
-
buildPolygonGeom
org.locationtech.jts.geom.Polygon buildPolygonGeom()
-
-