polygon_tangents library
Computes the tangent Points on a polygon's exterior from an external point.
Classes
- BBox
-
Please make sure, you arrange your parameters like this:
Longitude 1, Latitude 1, Altitude 1 (optional), Longitude 2, Latitude 2, Altitude 2 (optional)
You can either specify 4 or 6 parameters
If you are using the default constructor with two dimensional positions (lng + lat only), please use the constructor like this:
BBox(lng1, lat1, lng2, lat2); - CoordinateType
- Coordinate types, following https://tools.ietf.org/html/rfc7946#section-4
-
Feature<
T extends GeometryObject> - Feature, as specified here https://tools.ietf.org/html/rfc7946#section-3.2
-
FeatureCollection<
T extends GeometryObject> - FeatureCollection, as specified here https://tools.ietf.org/html/rfc7946#section-3.3
- GeoJSONObject
- GeometryCollection
- GeometryCollection, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.8
- GeometryObject
-
GeometryType<
T> - LineString
- LineString, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.4
- MultiLineString
- MultiLineString, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.5
- MultiPoint
- MultiPoint, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.3
- MultiPolygon
- MultiPolygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.7
- Point
- Point, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.2
- Polygon
- Polygon, as specified here https://tools.ietf.org/html/rfc7946#section-3.1.6
- Position
- Please make sure, you arrange your parameters like this:
Enums
Functions
-
isAbove(
Position p1, Position p2, Position p3) → bool -
Returns true if
p3is above the line fromp1top2. -
isBelow(
Position p1, Position p2, Position p3) → bool -
Returns true if
p3is below the line fromp1top2. -
isLeft(
Position p1, Position p2, Position p3) → num -
Returns a positive value if
p3is to the left of the line fromp1top2, negative if to the right, and 0 if collinear. -
polygonTangents(
Point point, GeoJSONObject inputPolys) → FeatureCollection< Point> - Finds the tangents of a Polygon or MultiPolygon from a Point.
-
processPolygon(
List< Position> polygonCoords, Position pointCoords, double eprev, Position rtan, Position ltan) → List<Position> - Processes a polygon to determine the right and left tangents.