Computing a Buffer in Google Earth Engine.

Google Earth Engine supports a wide variety of geometric operations. These include operations on individual geometries such as computing a buffer, 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, in order 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 focuses on outlining the process of computing a buffer around a feature collection using goggle earth engine.

Select an area of interest.

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

Instantiate a Feature Collection.

Derive a feature collection from the geometry points import 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

Link to the full code:

Previous Post
Next Post

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.