Package org.locationtech.jts.jump.warp
Class Quadrilateral
- java.lang.Object
-
- org.locationtech.jts.jump.warp.Quadrilateral
-
-
Constructor Summary
Constructors Constructor Description Quadrilateral(org.locationtech.jts.geom.Coordinate p1, org.locationtech.jts.geom.Coordinate p2, org.locationtech.jts.geom.Coordinate p3, org.locationtech.jts.geom.Coordinate p4)Creates a Quadrilateral.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Objectclone()org.locationtech.jts.geom.EnvelopegetEnvelope()org.locationtech.jts.geom.CoordinategetP1()Returns the first vertex.org.locationtech.jts.geom.CoordinategetP2()Returns the second vertex.org.locationtech.jts.geom.CoordinategetP3()Returns the third vertex.org.locationtech.jts.geom.CoordinategetP4()Returns the fourth vertex.booleanisConvex()Returns whether this Quadrilateral is a convex polygon.org.locationtech.jts.geom.PolygontoPolygon()Converts this Quadrilateral to a JTS Polygon.StringtoString()Listtriangles()Creates two Triangles from this Quadrilateral.CollectionverticesOutside(Collection vertices)Filters out points that lie inside this Quadrilateral
-
-
-
Constructor Detail
-
Quadrilateral
public Quadrilateral(org.locationtech.jts.geom.Coordinate p1, org.locationtech.jts.geom.Coordinate p2, org.locationtech.jts.geom.Coordinate p3, org.locationtech.jts.geom.Coordinate p4)Creates a Quadrilateral.- Parameters:
p1- one vertexp2- another vertexp3- another vertexp4- another vertex
-
-
Method Detail
-
getEnvelope
public org.locationtech.jts.geom.Envelope getEnvelope()
-
isConvex
public boolean isConvex()
Returns whether this Quadrilateral is a convex polygon.- Returns:
- whether the diagonals intersect
-
triangles
public List triangles()
Creates two Triangles from this Quadrilateral.- Returns:
- two Triangles: P1-P2-P3 and P1-P4-P3
-
getP1
public org.locationtech.jts.geom.Coordinate getP1()
Returns the first vertex.- Returns:
- the first vertex
-
getP2
public org.locationtech.jts.geom.Coordinate getP2()
Returns the second vertex.- Returns:
- the second vertex
-
getP3
public org.locationtech.jts.geom.Coordinate getP3()
Returns the third vertex.- Returns:
- the third vertex
-
getP4
public org.locationtech.jts.geom.Coordinate getP4()
Returns the fourth vertex.- Returns:
- the fourth vertex
-
toPolygon
public org.locationtech.jts.geom.Polygon toPolygon()
Converts this Quadrilateral to a JTS Polygon.- Returns:
- a new JTS Polygon with one shell and no holes
-
verticesOutside
public Collection verticesOutside(Collection vertices)
Filters out points that lie inside this Quadrilateral- Parameters:
vertices- points to check- Returns:
- those points which lie outside this Quadrilateral
-
-