public class Polygon extends Object
TODO: Howto design inner rings in the polygon?
Constructor and Description |
---|
Polygon(double[] lat,
double[] lon) |
Modifier and Type | Method and Description |
---|---|
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) . |
static Polygon |
create(com.vividsolutions.jts.geom.Polygon polygon)
Lossy conversion to a GraphHopper Polygon.
|
double |
getMaxLat() |
double |
getMaxLon() |
double |
getMinLat() |
double |
getMinLon() |
public static Polygon create(com.vividsolutions.jts.geom.Polygon polygon)
public boolean contains(GHPoint point)
contains(double, double)
.public boolean contains(double lat, double lon)
lat
- Latitude of the point to be checkedlon
- Longitude of the point to be checkedpublic double getMinLat()
public double getMinLon()
public double getMaxLat()
public double getMaxLon()
Copyright © 2012–2018. All rights reserved.