0

I uploaded an asset (which was originally a shapefile of points) and imported it into my script as a feature collection. I would like to compute the convex hull of the points, but it seems this function is only available for geometry objects. I have been trying several methods to convert the feature collection to multi-point geometry, but nothing seems to be the correct incantation. How would one convert a feature collection to multi-point geometry (or am I missing the mark in how I'm approaching this)?

I'm open to any GEE solution that accomplishes the main goal.

closed as off-topic by PolyGeo Jun 2 at 3:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "When seeking help to debug/write/improve code always provide the desired behavior, a specific problem/error and the shortest code (as formatted text, not pictures) needed to reproduce it in the question body. Providing a clear problem statement and a code attempt helps others to help you." – PolyGeo
If this question can be reworded to fit the rules in the help center, please edit the question.

1

I am not sure what you want to do exactly, as that is missing. But I guess the problem is you want use convexHull(maxError, proj), which is available on ee.Feature and ee.Geometry. You say you actually have a ee.FeatureCollection, therefore you will need to map every feature of the feature collection to use the convexHull. This would look something like this.

var newFeatures = uploadedAsset.map(function(x){
  return ee.Feature(x.convexHull());
  });
print(newFeatures)

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