Package com.graphhopper.util.shapes
Class Polygon
java.lang.Object
com.graphhopper.util.shapes.Polygon
- All Implemented Interfaces:
Shape
This class represents a polygon that is defined by a set of points.
Every point i is connected to point i-1 and i+1.
- Author:
- Robin Boldt
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal BBox
final org.locationtech.jts.geom.Envelope
final org.locationtech.jts.geom.prep.PreparedGeometry
final boolean
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
prepPolygon
public final org.locationtech.jts.geom.prep.PreparedGeometry prepPolygon -
rectangle
public final boolean rectangle -
envelope
public final org.locationtech.jts.geom.Envelope envelope -
bbox
-
-
Constructor Details
-
Polygon
public Polygon(org.locationtech.jts.geom.prep.PreparedPolygon prepPolygon) -
Polygon
public Polygon(double[] lats, double[] lons)
-
-
Method Details
-
create
-
intersects
- Specified by:
intersects
in interfaceShape
-
contains
public boolean contains(double lat, double lon) Does the point in polygon check. -
getBounds
-
getMinLat
public double getMinLat() -
getMinLon
public double getMinLon() -
getMaxLat
public double getMaxLat() -
getMaxLon
public double getMaxLon() -
isRectangle
public boolean isRectangle() -
toString
-