Computing buffers in Google Earth Engine.

Google Earth Engine supports a wide variety of geometric operations. These include operations on individual geometries such as computing buffers, centroid, bounding box, perimeter, convex hull, etc. A buffer is a zone that is drawn around a point, line or polygon that includes all the area within a specified distance of the geometric feature. For example, to determine the number of settlements adjacent to a major road, a buffer of 10 meters may be carried out. Buffers are important and have applications. They are meant to protect conservation areas such as parks, wetlands, lakes and other surrounding habitats.

This article outlines the process of computing buffers around a feature collection using the Google Earth Engine.

Select an Area of Interest

In the Google Earth Engine, select the area of interest. It can be a point, line or polygon using the geometry tool.

Computing buffer geometry import

Instantiate a Feature Collection

Derive a feature collection from the geometry points imported along the area of interest.

var centerlinePoints = [
      ee.Geometry.Point(37.00898626137325,-0.30111640543307067) ),
var rdPoints = ee.FeatureCollection(centerlinePoints);

Compute the Buffer Around the Feature Collection

Calculate the buffer by mapping a function over the feature collection to buffer each point. The buffer in this case is 1km from the centerline of the road and an error margin is set to 100. The buffer is set in meters.

var buffered = {
  return f.buffer(1000, 100); 

Display the Final Result

Map.addLayer(buffered, {color: ‘800080’}, ‘buffer’);

Map.setCenter( 36.9, -0.35, 11);

Area of Interest

Computing buffers

Buffer Outputs

Computing buffers

Link to the full code:

Leave a Reply

Your email address will not be published. Required fields are marked *

Risper Mutinda

Hello. I am Risper Mutinda. I am a passionate Web and GIS Developer but more importantly, I am passionate about Technology.

More Reading

Post navigation