Module polygons

Source
Expand description

A module containing various mapping-algorithms for polygons.

Modules§

double_precision
This module contains polygon mapping-algorithms that are pregenerated for double precision floating points.
single_precision
This module contains polygon mapping-algorithms that are pregenerated for single precision floating points.

Functions§

are_multiple_points_in_polygon
This function will run the is_single_point_in_polygon for each on of the points given, and the provided polygon, But pre-calculates the polygon extents to reduce workloads for larger datasets, please profile this for you specific use-case.
calculate_polygon_extents
This function calculates the extents of the polygon, i.e., the minimum and maximum values for each coordinate dimension.
graham_scan
Computes the convex hull of a set of points using the Graham Scan algorithm. Specifically the Monotone Chain variant This version sorts the points lexicographically before computing the convex hull. A downside of using this algorithm is that it does not handle collinear points well.
is_single_point_in_polygon
Check if the provided point is within the provided polygon.
jarvis_march
Computes the convex hull of a set of points using the Jarvis March algorithm. This algorithm uses a pivot point to find the next point in the convex hull by selecting for each point, the point which makes the largest outwards turn that is less than 180 degrees.