Global Land Cover Analysis works for other shapes, but not for a 1 Square Kilometer input:
Here's the error:
[2024-07-29 16:11:21,796: ERROR/ForkPoolWorker-1] Task 2e90fa92-e8d1-49fc-beb9-8aa423b17031 run from job 443 raised exception: Input shapes do not overlap raster.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/rasterio/mask.py", line 80, in raster_geometry_mask
window = geometry_window(dataset, shapes, pad_x=pad_x, pad_y=pad_y)
File "/usr/local/lib/python3.10/dist-packages/rasterio/features.py", line 477, in geometry_window
window = window.intersection(raster_window)
File "/usr/local/lib/python3.10/dist-packages/rasterio/windows.py", line 775, in intersection
return intersection([self, other])
File "/usr/local/lib/python3.10/dist-packages/rasterio/windows.py", line 125, in wrapper
return function(*args[0])
File "/usr/local/lib/python3.10/dist-packages/rasterio/windows.py", line 239, in intersection
return functools.reduce(_intersection, windows)
File "/usr/local/lib/python3.10/dist-packages/rasterio/windows.py", line 257, in _intersection
raise WindowError(f"Intersection is empty {w1} {w2}")
rasterio.errors.WindowError: Intersection is empty Window(col_off=24017, row_off=89693, width=101, height=101) Window(col_off=0, row_off=0, width=51218, height=89289)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/celery/app/trace.py", line 453, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/celery/app/trace.py", line 736, in __protected_call__
return self.run(*args, **kwargs)
File "/opt/app/apps/geoprocessing_api/stac.py", line 63, in query_histogram
clip_data, clip_transform, clip_meta = clip_and_reproject_tile(
File "/opt/app/apps/geoprocessing_api/stac.py", line 167, in clip_and_reproject_tile
clip_data, clip_transform = mask(src, [reprojected_aoi], crop=True)
File "/usr/local/lib/python3.10/dist-packages/rasterio/mask.py", line 178, in mask
shape_mask, transform, window = raster_geometry_mask(
File "/usr/local/lib/python3.10/dist-packages/rasterio/mask.py", line 86, in raster_geometry_mask
raise ValueError('Input shapes do not overlap raster.')
ValueError: Input shapes do not overlap raster.
Global Land Cover Analysis works for other shapes, but not for a 1 Square Kilometer input:
Here's the error: