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.Feature(
      ee.Geometry.Point(37.00898626137325,-0.30111640543307067) ),
  ee.Feature(
      ee.Geometry.Point(37.0092381077034,-0.2999334836841344)),
  ee.Feature(
      ee.Geometry.Point(37.0047624524643,-0.32056462998244917)),
      ee.Feature(
      ee.Geometry.Point(37.00596408210297,-0.33137912169070616)),
      ee.Feature(
      ee.Geometry.Point(37.00356082282563,-0.3420219432761783)),
      ee.Feature(
      ee.Geometry.Point(37.0047624524643,-0.32056462998244917)),
      ee.Feature(
      ee.Geometry.Point(36.999612611155705,-0.35094817165057857))
];
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 = rdPoints.map(function(f) {
  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
Buffer

Link to the full code:

https://code.earthengine.google.com/3c5758d60be31265cc0d1b2119887d49

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.