Setting Geometry in ee.Image: Facing Challenges in Google Earth Engine JavaScript API

30 views Asked by At

I'm currently working on a project using the Google Earth Engine JavaScript API, and I'm encountering difficulties in setting the geometry for an ee.Image. I've tried using the setGeometry function, but it seems to be unavailable for ee.Image. I've explored the documentation and attempted alternative approaches, but I haven't found a solution yet.

Here's a simplified version of the code I'm working on:

var image = ee.Image(null, {
  'bands': bands,
  'geometry': geometry,
  'target': feature.getNumber('target')
});

// Attempted setGeometry
// image = image.setGeometry(geometry); // Results in an error

// Other attempts...
// image = image.set('system:footprint', geometry);
// image = image.set('system:geometry', geometry);

I would greatly appreciate any insights, alternative methods, or corrections to my approach. Has anyone else faced similar challenges when setting geometry for ee.Image in the Google Earth Engine JavaScript API? Your assistance would be invaluable.

Thank you in advance for your help!

0

There are 0 answers