Stay organized with collections
Save and categorize content based on your preferences.
Returns the input buffered by a given distance. If the distance is positive, the geometry is expanded, and if the distance is negative, the geometry is contracted.
Usage
Returns
MultiPolygon.buffer(distance, maxError, proj)
Geometry
Argument
Type
Details
this: geometry
Geometry
The geometry being buffered.
distance
Float
The distance of the buffering, which may be negative. If no projection is specified, the unit is meters. Otherwise the unit is in the coordinate system of the projection.
maxError
ErrorMargin, default: null
The maximum amount of error tolerated when approximating the buffering circle and performing any necessary reprojection. If unspecified, defaults to 1% of the distance.
proj
Projection, default: null
If specified, the buffering will be performed in this projection and the distance will be interpreted as units of the coordinate system of this projection. Otherwise the distance is interpereted as meters and the buffering is performed in a spherical coordinate system.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[[["`buffer()` returns a modified Geometry by expanding or contracting the input MultiPolygon based on a specified distance."],["A positive distance expands the geometry while a negative distance contracts it."],["The buffering can be performed using either meters (default) or a projected coordinate system if `proj` is specified."],["An optional `maxError` parameter controls the accuracy of the buffering operation."]]],[]]