turf.buffer
How Turf.js runs Buffer: turf.buffer.
| Engine | Turf.js |
|---|---|
| Tool name | turf.buffer |
| Interface | js |
| Implements | Buffer |
| Documentation | Not stated |
| Effects | modifies input: no, network: no |
| Notes | From @turf/buffer. |
| Status | active |
Parameters
| Name | Type | Required | Default | Choices | Note |
|---|---|---|---|---|---|
geojson | T | yes | Not stated | Not stated | Not stated |
radius | number | no | Not stated | Not stated | Not stated |
options | { units?: Units; steps?: number; } | no | Not stated | Not stated | Not stated |
options.units | Units | no | Not stated | Not stated | field of options |
options.steps | number | no | Not stated | Not stated | field of options |
How it maps to the operation
| Operation parameter | Parameter here | Note |
|---|---|---|
layer | geojson | Not stated |
distance | radius | Not stated |
unit | options.units | m = meters; ft = feet; km = kilometers; mi = miles. not supported: us-ft |
dissolve | Not stated | always no. Call turf.dissolve or turf.union on the result. |
segments | options.steps | Not stated |
Differences from the operation
- units defaults to kilometers.
- Each feature is buffered in an azimuthal equidistant projection centred on it, so distances are true ground distances near the feature.
- Turf works on GeoJSON in longitude/latitude (WGS 84); data in another CRS must be reprojected first.
Harvested by the turf harvester from engine version
7.4.0. Names can change when an engine is harvested again.