Skip to main content
edited title, improved formatting
Link
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404

Exporting an image using a FeatureCollection as region in Google Earth Engine (Python)

Google Earth Engine Python: Export Exporting an image using a FeatureCollection as region in Google Earth Engine

I'm trying to export an image using a FeatureCollectionFeatureCollection as region. My code is as follow:

params = {
    'description': 'ndviChange_to_gtiff',
    'scale': 30,
    'region': AOI
  }
ee.batch.Export.image.toDrive(ndviChange, **params)

the AOI is a Feature CollectionFeatureCollection defined earlier in my code:

AOI = ee.FeatureCollection("users/..../AOI")

I'm getting this error:

TypeError: Object of type FeatureCollection is not JSON serializable

Note that I'm running the code in QGIS GEE plugin.

Google Earth Engine Python: Export an image using a FeatureCollection as region

I'm trying to export an image using a FeatureCollection as region. My code is as follow:

params = {
    'description': 'ndviChange_to_gtiff',
    'scale': 30,
    'region': AOI
  }
ee.batch.Export.image.toDrive(ndviChange, **params)

the AOI is a Feature Collection defined earlier in my code:

AOI = ee.FeatureCollection("users/..../AOI")

I'm getting this error:

TypeError: Object of type FeatureCollection is not JSON serializable

Note that I'm running the code in QGIS GEE plugin.

Exporting an image using a FeatureCollection as region in Google Earth Engine

I'm trying to export an image using a FeatureCollection as region. My code is as follow:

params = {
    'description': 'ndviChange_to_gtiff',
    'scale': 30,
    'region': AOI
  }
ee.batch.Export.image.toDrive(ndviChange, **params)

the AOI is a FeatureCollection defined earlier in my code:

AOI = ee.FeatureCollection("users/..../AOI")

I'm getting this error:

TypeError: Object of type FeatureCollection is not JSON serializable

Note that I'm running the code in QGIS GEE plugin.

Source Link

Google Earth Engine Python: Export an image using a FeatureCollection as region

I'm trying to export an image using a FeatureCollection as region. My code is as follow:

params = {
    'description': 'ndviChange_to_gtiff',
    'scale': 30,
    'region': AOI
  }
ee.batch.Export.image.toDrive(ndviChange, **params)

the AOI is a Feature Collection defined earlier in my code:

AOI = ee.FeatureCollection("users/..../AOI")

I'm getting this error:

TypeError: Object of type FeatureCollection is not JSON serializable

Note that I'm running the code in QGIS GEE plugin.