public class MTBPolygon2D_GeoPolygonsWrapper extends Object
Webpage: GeoLib Homepage
Constructor and Description |
---|
MTBPolygon2D_GeoPolygonsWrapper() |
Modifier and Type | Method and Description |
---|---|
protected static MTBPolygon2D |
C2DtoMTB(uk.co.geolib.geopolygons.C2DPolygon cPoly)
Converts a C2D polygon to the MiToBo polygon data type.
|
protected static boolean |
containsPoint(MTBPolygon2D p,
double x,
double y)
Checks if a point lies inside of the polygon.
|
protected static boolean |
isClockwiseOriented(MTBPolygon2D p)
Checks if polygon is oriented counter-clockwise.
|
protected static boolean |
isConvex(MTBPolygon2D p)
Checks if a polygon is convex.
|
protected static boolean |
isCounterClockwiseOriented(MTBPolygon2D p)
Checks if polygon is oriented counter-clockwise.
|
protected static boolean |
isSimple(MTBPolygon2D p)
Checks if a polygon is simple.
|
protected static MTBPolygon2D |
makePolySimple(MTBPolygon2D p)
Simplifies the given polygon.
|
protected static uk.co.geolib.geopolygons.C2DPolygon |
MTBtoC2D(MTBPolygon2D mPoly)
Converts a MiToBo polygon to C2D data type.
|
private static boolean |
pointOrderWasChanged(MTBPolygon2D mPoly,
uk.co.geolib.geopolygons.C2DPolygon cPoly)
Checks if order of points was changed during initialization.
|
protected static boolean isSimple(MTBPolygon2D p)
p
- Input polygon.protected static boolean isConvex(MTBPolygon2D p)
p
- Input polygon.protected static boolean isCounterClockwiseOriented(MTBPolygon2D p)
p
- Input polygon.protected static boolean isClockwiseOriented(MTBPolygon2D p)
p
- Input polygon.protected static MTBPolygon2D makePolySimple(MTBPolygon2D p)
p
- Input polygon.protected static boolean containsPoint(MTBPolygon2D p, double x, double y)
Note that the boundary does not belong to the interior.
p
- Input polygon.x
- x coordinate of point to check.y
- y coordinate of point to check.protected static uk.co.geolib.geopolygons.C2DPolygon MTBtoC2D(MTBPolygon2D mPoly)
Note that the result polygon is always in clockwise ordering, independent of how the input polygon was sorted.
mPoly
- Input MiToBo polygon.protected static MTBPolygon2D C2DtoMTB(uk.co.geolib.geopolygons.C2DPolygon cPoly)
Note that the result polygon is always in clockwise ordering.
mPoly
- Input C2D polygon.private static boolean pointOrderWasChanged(MTBPolygon2D mPoly, uk.co.geolib.geopolygons.C2DPolygon cPoly)
C2DPolygons are always ordered clockwise. Consequently, if the point order was changed during initialization the input polygon has a counter-clockwise ordering, otherwise it is ordered clockwise.
mPoly
- Input MiToBo polygon.cPoly
- Input C2DPolygon.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.