ronnyhdez / reclaimed_sites_ab

https://ronnyhdez.github.io/reclaimed_sites_ab/
0 stars 0 forks source link

Create feature collection with first polygons #36

Closed ronnyhdez closed 4 months ago

ronnyhdez commented 4 months ago

Can be done with json file or using geemap library

https://stackoverflow.com/questions/60809197/convert-geopandas-dataframe-to-gee-feature-collection-using-python

ronnyhdez commented 4 months ago

geojson seems a good solution. Already with fiona and geopandas

https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.to_file.html

ronnyhdez commented 4 months ago

Exporting of geojson successful.

Code to export geojson to asset in GEE takes too long:

import geemap
import ee
ee.Initialize()
ee_object = geemap.geojson_to_ee('selected_polygons.geojson')

exportTask = ee.batch.Export.table.toAsset(
    collection = ee_object,
    description = 'description',
    assetId = 'users/ronnyale/reclamation_ab'
)
exportTask.start()
ronnyhdez commented 4 months ago

The polygons dataset is too big to be used with the api. It exceeds the limit. I uploaded the file as a shp file manually to GEE.

Automation to be done later in #53