0

I want to receive information about the number of pixels by category in a multi-polygon using NASA's MODIS landcover dataset. I would use QGIS's raster histogram operator to do so. The polygons are the second administrative units of the DRC, Burundi, and Uganda. Combined they would result in 2.5 million rows and 2.1 million columns. So I am dealing with a huge dataset and even for just one administrative unit my computer is unable to cope with the amount of data.

Currently, I am accessing the MODIS data via the following python code:

import ee
from ee_plugin import Map
cover = ee.Image('MODIS/051/MCD12Q1/2012_01_01').select('Land_Cover_Type_1')
igbpPalette = ['aec3d4', '152106', '225129', '369b47', '30eb5b', '387242', '6a2325', 'c3aa69', 'b76031', 'd9903d', '91af40', '111149','cdb33b','cc0013', '33280d', 'd7cdcc', 'f7e084', '6f6f6f'] 
Map.addLayer (cover,{'min': 0, 'max': 17, 'palette': igbpPalette}, 'IGBP classification')

I also tried clipping the data to the polygons, this however did not work as the data is accessed online.

Is there any solution for my problem?

3
  • 2
    What are the dimensions of the raster dataset? Is it global at 500x500metres? SO how many rows and columns is that? How big are your polygons? How many rows and columns (500m cells) do they span? Thousands, millions, billions? How long does it take to do anything? Have you tried with small polygons first?
    – Spacedman
    Dec 14, 2022 at 14:50
  • The dataset is global at 500x500 meters. The polygons are the second administrative units of the DRC, Burundi, and Uganda. Combined they would result in 2.5 million rows and 2.1 million columns. So far I tried to download a subset containing the needed observations for my three countries. That did not work as it would apparently need 21 terabytes of storage. I also tried clipping the dataset, which was unsuccessful as the raster data is accessed online...
    – KC15
    Dec 14, 2022 at 15:38
  • 1
    We use a Focused question/Best answer model. Please Edit the Question to focus on the unsuccessful clipping effort.
    – Vince
    Dec 21, 2022 at 16:23

0

Your Answer

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

Browse other questions tagged or ask your own question.