| Constructor and Description |
|---|
Polygon(double[] lat,
double[] lon) |
Polygon(double[] lat,
double[] lon,
double growFactor) |
| Modifier and Type | Method and Description |
|---|---|
double |
calculateArea() |
boolean |
contains(double lat,
double lon)
Implements the ray casting algorithm
Code is inspired from here: http://stackoverflow.com/a/218081/1548788
|
boolean |
contains(GHPoint point)
Wrapper method for
contains(double, double). |
boolean |
contains(Shape s) |
static Polygon |
create(com.vividsolutions.jts.geom.Polygon polygon)
Lossy conversion to a GraphHopper Polygon.
|
BBox |
getBounds() |
GHPoint |
getCenter() |
double |
getMaxLat() |
double |
getMaxLon() |
double |
getMinLat() |
double |
getMinLon() |
boolean |
intersect(Shape o) |
static Polygon |
parsePoints(String pointsStr,
double growFactor) |
String |
toString() |
public Polygon(double[] lat,
double[] lon,
double growFactor)
public Polygon(double[] lat,
double[] lon)
public static Polygon create(com.vividsolutions.jts.geom.Polygon polygon)
public boolean contains(GHPoint point)
contains(double, double).public boolean intersect(Shape o)
public boolean contains(double lat,
double lon)
public boolean contains(Shape s)
public BBox getBounds()
public GHPoint getCenter()
public double calculateArea()
calculateArea in interface Shapepublic double getMinLat()
public double getMinLon()
public double getMaxLat()
public double getMaxLon()
Copyright © 2012–2018. All rights reserved.