Package org.elasticsearch.geometry
Class Polygon
java.lang.Object
org.elasticsearch.geometry.Polygon
- All Implemented Interfaces:
Geometry
public final class Polygon extends java.lang.Object implements Geometry
Represents a closed polygon on the earth's surface with optional holes
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Polygon(LinearRing polygon)
Creates a new Polygon from the supplied latitude/longitude array, and optionally any holes.Polygon(LinearRing polygon, java.util.List<LinearRing> holes)
Creates a new Polygon from the supplied latitude/longitude array, and optionally any holes. -
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object o)
LinearRing
getHole(int i)
int
getNumberOfHoles()
LinearRing
getPolygon()
int
hashCode()
boolean
hasZ()
boolean
isEmpty()
java.lang.String
toString()
ShapeType
type()
<T, E extends java.lang.Exception>
Tvisit(GeometryVisitor<T,E> visitor)
-
Field Details
-
Constructor Details
-
Method Details
-
type
-
getNumberOfHoles
public int getNumberOfHoles() -
getPolygon
-
getHole
-
visit
public <T, E extends java.lang.Exception> T visit(GeometryVisitor<T,E> visitor) throws E extends java.lang.Exception -
isEmpty
public boolean isEmpty() -
hasZ
public boolean hasZ() -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-