Geo.Turf.Transformation (geo_turf v0.3.0)
A collection of functions to transform given geometries
Summary
Functions
Create a circle polygon from a given center and radius. The circle is created by generating a number of points around the center and then connecting them to form a polygon.
Types
Link to this type
circle_options()
Link to this type
steps()
@type steps() :: {:steps, non_neg_integer()}
Link to this type
units()
@type units() :: {:unit, Geo.Turf.Math.length_unit()}
Functions
Link to this function
circle(center, radius, opts \\ [])
@spec circle( center :: Geo.Point.t(), radius :: non_neg_integer(), opts :: circle_options() ) :: Geo.Polygon.t()
Create a circle polygon from a given center and radius. The circle is created by generating a number of points around the center and then connecting them to form a polygon.
Parameters
center
- the center of the circleradius
- the radius of the circleopts
- a keyword list of options
Options
:units
- the unit of the radius, defaults to:kilometers
. seeGeo.Turf.Math.length_unit/0
:steps
- the number of steps to use to create the circle, defaults to64
steps
must be a positive integer or anArgumentError
will be raised- Note the higher the number of steps, the smoother the circle will be, but the more points it will have