Calculates polygon or multipolygon that contains all points within the given radius of the input line or multiline on Earth.


geo_line_buffer(lineString, radius, tolerance)

Learn more about syntax conventions.


Name Type Required Description
lineString dynamic ✔️ A LineString or MultiLineString in the GeoJSON format.
radius real ✔️ Buffer radius in meters. Valid value must be positive.
tolerance real Defines the tolerance in meters that determines how much a polygon can deviate from the ideal radius. If unspecified, the default value 10 is used. Tolerance should be no lower than 0.0001% of the radius. Specifying tolerance bigger than radius lowers the tolerance to biggest possible value below the radius.


Polygon or MultiPolygon around the input LineString or MultiLineString. If the coordinates or radius or tolerance is invalid, the query produces a null result.


  • The geospatial coordinates are interpreted as represented by the WGS-84 coordinate reference system.
  • The geodetic datum used to measure distance on Earth is a sphere.
  • If input line edges are straight cartesian lines, consider using geo_line_densify() in order to convert planar edges to geodesics.
  • Endcaps of the lines are round.
  • Both sides of the lines are buffered.

LineString definition and constraints

dynamic({"type": "LineString","coordinates": [[lng_1,lat_1], [lng_2,lat_2], ..., [lng_N,lat_N]]})

dynamic({"type": "MultiLineString","coordinates": [[line_1, line_2, ..., line_N]]})

  • LineString coordinates array must contain at least two entries.
  • Coordinates [longitude, latitude] must be valid where longitude is a real number in the range [-180, +180] and latitude is a real number in the range [-90, +90].
  • Edge length must be less than 180 degrees. The shortest edge between the two vertices will be chosen.


The following query calculates polygon around line, with radius of 4 meters and 0.1 meter tolerance

let line = dynamic({"type":"LineString","coordinates":[[-80.66634997047466,24.894526340592122],[-80.67373241820246,24.890808090321286]]});
print buffer = geo_line_buffer(line, 4, 0.1)
{"type": "Polygon", "coordinates": [ ... ]}

The following query calculates buffer around each line and unifies result

| project buffer = geo_line_buffer(line, 2, 0.1)
| summarize polygons = make_list(buffer)
| project result = geo_union_polygons_array(polygons)
{"type": "Polygon","coordinates": [ ... ]}

The following example will return true, due to invalid line.

print buffer = isnull(geo_line_buffer(dynamic({"type":"LineString"}), 5))

The following example will return true, due to invalid radius.

print buffer = isnull(geo_line_buffer(dynamic({"type":"LineString","coordinates":[[0,0],[1,1]]}), 0))