Expand description
§Shape generators – create geographic geometries from parameters
Generate common geometric shapes as GeoCoord rings suitable for
use with the tessellator, vector layers, or direct rendering:
circle– regular polygon approximating a circlearc– partial circle (sector boundary)ellipse– elliptical ringrectangle– axis-aligned geographic rectangleregular_polygon– equilateral N-gonsector– pie-slice shape (arc closed to centre)line_along– sample points along a great-circle path
All generators produce Vec<GeoCoord> suitable for constructing
Polygon exteriors or
LineString coordinates.
Distance calculations use the geodesic destination formula on the WGS-84 sphere (radius 6,378,137 m).
Functions§
- arc
- Generate an arc (partial circle) as a polyline.
- circle
- Generate a circle as a closed polygon ring.
- ellipse
- Generate an ellipse as a closed polygon ring.
- line_
along - Sample
countevenly-spaced points along the great-circle path betweenfromandto. - rectangle
- Generate an axis-aligned geographic rectangle as a closed polygon ring.
- regular_
polygon - Generate a regular N-gon as a closed polygon ring.
- sector
- Generate a sector (pie slice) as a closed polygon ring.