I have a series of buffers stored in a feature collection. Some but not all of the buffer polygons overlap. I need to dissolve the polygons in a way that Google Earth Engine still recognizes each as a separate polygon with a unique ID (its own feature in a feature collection) so that I can then determine the polygon that each of my sample points falls into.
The user support I've found on this topic uses the union function like this:
This creates a feature collection of one large polygon (one feature). I want a feature collection where each stand-alone polygon (some of them dissolved, some not) is its own unique feature with an ID.
UPDATE: I found that I could create a multipolygon with separate coordinates for each polygon as follows:
The problem is that this is a multipolygon and not a feature collection. When I took this multipolygon and converted it to a feature collection as follows:
var buffsFeature = ee.FeatureCollection(buffsSample)
I end up with the exact feature collection I would have gotten using '''union()''' (only one feature, whereas I want each polygon to be a feature).
Please let me know if you have suggestions for converting the multipolygon into a feature collection where each buffer is its own feature. Or if you have an alternative suggestion for dissolving polygons within a feature collection and returning a feature collection where each polygon is its own feature.