3

Is there an advantage to work with Polygons versus MultiPolygons in Google Earth Engine? I need to subdivide a region of interest into many sub-areas for which I will calculate the evolution of some variable. In GEE you can draw many different polygons and then repeat the operation but you can also define a MultiPolygon but I don't see the benefits of doing it. As an example, I'm calculating the mean of the values of B (a collection of images filtered by dates) over time.

    var C = Chart.image.series(B, MultiPolygon, ee.Reducer.mean(),
    1000, 'system:time_start');
    print(C);
1

In a Multipolygon, the polygons are part of the same structure and share the same projection and polarity.

Earth Engine can perform the same operations on a ee.Geometry.MultiPolygon as a ee.Geometry.Poygon, e.g. calculate the area, bounds, centroid, etc.

So use whatever is convenient for your application.

  • I have an example where I don't know how to proceed. A Multipolygon has one feature only, and I want to: 1. add labels to each polygon of a Multipolygon (consisting of a bunch of buffers), 2. download time series of a reducer for each polygon (the average sea surface temperature in each polygon). code.earthengine.google.com/c22f5f5c1fa795c74e9f8a1311d8817a – Raimundo Apr 16 at 19:09
  • The Multipolygon does not have a feature, its the other way around. "add labels to each polygon" suggests adding each polygon to a FeatureCollection with a Feature for each polygon and each point. Each feature holds the label as a property. Then reduce the feature collection according to the labels. Perhaps ask a new question if this is not helpful. – intotecho Apr 17 at 1:05
  • Thanks. Helps a lot but I'm trying to figure out how to make it work. Posting a new question. – Raimundo Apr 18 at 16:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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