GEOMETRYBUFFER

Calculates a buffer for input features for a given radius. Units supported are miles, kilometers, and degrees.

Parameters

geometry FeatureCollection | Geometry | Feature (required) - input geometry

radius number (required) - distance (in kilometers)

options object - options

Returns

FeatureCollection | Geometry | Feature - buffered features

Examples

const point = {
  type: 'Point',
  coordinates: [-75.343, 39.984]
};

INSPECT(GEOMETRYBUFFER(point, 0.1))

// returns
// {
//   type: "Feature",
//   properties: {},
//   geometry: {
//     type: "Polygon",
//     coordinates: [
//       [
//         [-75.34182629561941, 39.983999994081074],
//         [-75.34184884506381, 39.984175443005675],
//         [-75.34191563308325, 39.98434414995143],
//         [-75.34202409333683, 39.98449963153198],
//         [-75.34217005794845, 39.984635912568145],
//         [-75.34234791764686, 39.984747755727206],
//         [-75.34255083731667, 39.98483086281039],
//         [-75.3427710186782, 39.984882039949824],
//         [-75.343, 39.98489932036373],
//         [-75.34322898132179, 39.984882039949824],
//         [-75.34344916268333, 39.98483086281039],
//         [-75.34365208235315, 39.984747755727206],
//         [-75.34382994205156, 39.984635912568145],
//         [-75.34397590666316, 39.98449963153198],
//         [-75.34408436691675, 39.98434414995143],
//         [-75.34415115493618, 39.984175443005675],
//         [-75.34417370438058, 39.983999994081074],
//         [-75.34415114902387, 39.983824545607014],
//         [-75.34408435599222, 39.983655839944326],
//         [-75.34397589238958, 39.98350036028401],
//         [-75.34382992660193, 39.983364081512924],
//         [-75.34365206807956, 39.983252240618945],
//         [-75.3434491517588, 39.983169135455995],
//         [-75.34322897540947, 39.98311795959963],
//         [-75.343, 39.98310067963627],
//         [-75.34277102459053, 39.98311795959963],
//         [-75.3425508482412, 39.983169135455995],
//         [-75.34234793192043, 39.983252240618945],
//         [-75.34217007339807, 39.983364081512924],
//         [-75.34202410761043, 39.98350036028401],
//         [-75.34191564400778, 39.983655839944326],
//         [-75.34184885097613, 39.983824545607014],
//         [-75.34182629561941, 39.983999994081074],
//       ],
//     ],
//   },
// };