1

I am trying to create a buffer of specific radius around a feature present in a feature collection through the following code:

var cellular_data= ee.FeatureCollection("users/jazibimran_farmdar/Cellular_Data1");
Map.addLayer(cellular_data, {color: '#FF0000'}, 'Cellular Data');

var UMTS= cellular_data.filter(ee.Filter.eq('GSM', 'UMTS'));
Map.addLayer(UMTS, {color: '#0000FF'}, '3G Tower');

var feature= ee.Feature(UMTS)
var UMTS_Coverage = feature.buffer(2000);
Map.addLayer(UMTS_Coverage, {color: 'brown'},'3G Coverage')

but it's giving me the following error: Layer error: Feature.buffer: Unable to use a collection in an algorithm that requires a feature or image. This may happen when trying to use a collection of collections where a collection of features is expected; use flatten, or map a function to convert inner collections to features. Use clipToCollection (instead of clip) to clip an image to a collection.

1 Answer 1

1

Please get the geometry of the feature collection and then apply a buffer

var featureCollection = ee.FeatureCollection('');
    var featureColl_to_geometry = FC.geometry();
    var buff = featureColl_to_geometry.buffer(100000)
    Map.addLayer(buff)

https://code.earthengine.google.com/7aa1cd5489f8adba772968e0ede1d585

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.