Package mil.nga.sf
Class Polygon
- java.lang.Object
-
- mil.nga.sf.Geometry
-
- mil.nga.sf.Surface
-
- mil.nga.sf.CurvePolygon<LineString>
-
- mil.nga.sf.Polygon
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Triangle
public class Polygon extends CurvePolygon<LineString>
A restricted form of CurvePolygon where each ring is defined as a simple, closed LineString.- Author:
- osbornb
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description Polygon()
ConstructorPolygon(boolean hasZ, boolean hasM)
ConstructorPolygon(List<LineString> rings)
Constructorprotected
Polygon(GeometryType type, boolean hasZ, boolean hasM)
ConstructorPolygon(LineString ring)
ConstructorPolygon(Polygon polygon)
Copy Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Geometry
copy()
Copy the geometryboolean
isSimple()
Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangency-
Methods inherited from class mil.nga.sf.CurvePolygon
addRing, addRings, equals, getExteriorRing, getInteriorRing, getRing, getRings, hashCode, isEmpty, numInteriorRings, numRings, setRings
-
Methods inherited from class mil.nga.sf.Geometry
expandEnvelope, getCentroid, getDegreesCentroid, getDimension, getEnvelope, getGeometryType, hasM, hasZ, is3D, isMeasured, setHasM, setHasZ, updateZM
-
-
-
-
Constructor Detail
-
Polygon
public Polygon()
Constructor
-
Polygon
public Polygon(boolean hasZ, boolean hasM)
Constructor- Parameters:
hasZ
- has zhasM
- has m
-
Polygon
public Polygon(List<LineString> rings)
Constructor- Parameters:
rings
- list of rings
-
Polygon
public Polygon(LineString ring)
Constructor- Parameters:
ring
- ring
-
Polygon
public Polygon(Polygon polygon)
Copy Constructor- Parameters:
polygon
- polygon to copy
-
Polygon
protected Polygon(GeometryType type, boolean hasZ, boolean hasM)
Constructor- Parameters:
type
- geometry typehasZ
- has zhasM
- has m
-
-
Method Detail
-
copy
public Geometry copy()
Copy the geometry- Overrides:
copy
in classCurvePolygon<LineString>
- Returns:
- geometry copy
-
isSimple
public boolean isSimple()
Determine if this Geometry has no anomalous geometric points, such as self intersection or self tangency- Overrides:
isSimple
in classCurvePolygon<LineString>
- Returns:
- true if simple
-
-