-
-
Save eduard-kazakov/6bfa6ca1ab4ead0b2d6a3ed3e94dd277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ee | |
import geemap | |
start_date = "2024-01-01" | |
end_date = "2024-09-13" | |
xMin = 43.4 | |
xMax = 46.7 | |
yMin = 38.7 | |
yMax = 41.4 | |
tile_size = 0.3 | |
i = 0 | |
current_x = xMin | |
while current_x < xMax: | |
current_y = yMin | |
while current_y < yMax: | |
current_file_name = 'landcover_%s.tif' % i | |
print ('saving tile %s to %s:' % (i, current_file_name)) | |
print ('region: %s %s %s %s:' % (current_x,current_y,current_x+tile_size,current_y+tile_size)) | |
current_region = ee.Geometry.BBox(current_x, current_y, current_x+tile_size, current_y+tile_size) | |
current_landcover = geemap.dynamic_world(current_region, start_date, end_date, return_type="class") | |
geemap.ee_export_image( | |
current_landcover, filename=current_file_name, scale=10, region=current_region, file_per_band=False | |
) | |
print ('done!') | |
current_y += tile_size | |
i += 1 | |
current_x += tile_size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment