public class Quadrilateral
extends java.lang.Object
implements java.lang.Cloneable
Constructor and Description |
---|
Quadrilateral(com.vividsolutions.jts.geom.Coordinate p1,
com.vividsolutions.jts.geom.Coordinate p2,
com.vividsolutions.jts.geom.Coordinate p3,
com.vividsolutions.jts.geom.Coordinate p4)
Creates a Quadrilateral.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
clone() |
com.vividsolutions.jts.geom.Envelope |
getEnvelope() |
com.vividsolutions.jts.geom.Coordinate |
getP1()
Returns the first vertex.
|
com.vividsolutions.jts.geom.Coordinate |
getP2()
Returns the second vertex.
|
com.vividsolutions.jts.geom.Coordinate |
getP3()
Returns the third vertex.
|
com.vividsolutions.jts.geom.Coordinate |
getP4()
Returns the fourth vertex.
|
boolean |
isConvex()
Returns whether this Quadrilateral is a convex polygon.
|
com.vividsolutions.jts.geom.Polygon |
toPolygon()
Converts this Quadrilateral to a JTS Polygon.
|
java.lang.String |
toString() |
java.util.List |
triangles()
Creates two Triangles from this Quadrilateral.
|
java.util.Collection |
verticesOutside(java.util.Collection vertices)
Filters out points that lie inside this Quadrilateral
|
public Quadrilateral(com.vividsolutions.jts.geom.Coordinate p1, com.vividsolutions.jts.geom.Coordinate p2, com.vividsolutions.jts.geom.Coordinate p3, com.vividsolutions.jts.geom.Coordinate p4)
p1
- one vertexp2
- another vertexp3
- another vertexp4
- another vertexpublic com.vividsolutions.jts.geom.Envelope getEnvelope()
protected java.lang.Object clone()
clone
in class java.lang.Object
public boolean isConvex()
public java.util.List triangles()
public java.lang.String toString()
toString
in class java.lang.Object
public com.vividsolutions.jts.geom.Coordinate getP1()
public com.vividsolutions.jts.geom.Coordinate getP2()
public com.vividsolutions.jts.geom.Coordinate getP3()
public com.vividsolutions.jts.geom.Coordinate getP4()
public com.vividsolutions.jts.geom.Polygon toPolygon()
public java.util.Collection verticesOutside(java.util.Collection vertices)
vertices
- points to check