0

I have a polygon shapefile and want to divide them into very small regions using python.

This is being done as Google Earth Engine does not download data over large areas, hence I want to divide the whole shapefile and download the data individually. I realise there is an option to export data to google cloud/drive but it is not what I'm looking for.

dataset = ee.ImageCollection('IDAHO_EPSCOR/GRIDMET').filter(ee.Filter.date('2021-06-01','2021-10-31'));
Fuel_Moisture_1000Hr = dataset.select('fm1000').median() 
geemap.ee_export_image(Fuel_Moisture_1000Hr, filename=os.path.join(export_path, 'fm_1000hr.tif'), scale=4638.3, region=roi, file_per_band=False)

The ROI is large and I want to divide them into small regions and run the above command in a for loop.

3
  • Are you wanting to do this using the Google Earth Engine Python API? In any event, no matter which Python library you wish to ask about, please include a code attempt.
    – PolyGeo
    Commented Aug 24, 2022 at 5:16
  • 1
    Create a grid, intersect it with your polygons
    – Bera
    Commented Aug 24, 2022 at 5:23
  • 1
    Thanks @BERA it worked perfectly!
    – Hrushi
    Commented Aug 24, 2022 at 7:34

1 Answer 1

0

You could use QGIS tool for this task: Split vector layer

If you want to use python specifically, you can call this tool in pyqgis.

1
  • I want to split them in a python script, pyqgis I think pyqgis is not a very good choice then as we can't directly import it
    – Hrushi
    Commented Aug 24, 2022 at 5:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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