Как я могу построить график из файла hdf4 с помощью Python ⇐ Python
Как я могу построить график из файла hdf4 с помощью Python
I have downloaded MODIS land use land cover data.The key name of the data product is MCD12C1.Now I want to plot/visualize different land use land cover data on map using python.`
import numpy as np import pandas as pd import rioxarray import rasterio as rio from osgeo import gdal import earthpy as et import earthpy.spatial as es import earthpy.plot as ep title='c:/MCD12C1.A2022001.061.2023244164746' all_bands=[] with rio.open(f'{title}.HDF') as dataset: hdf4_meta = dataset.meta crs = dataset.read_crs() for layer_name in [name for name in dataset.subdatasets]: print(layer_name) with rio.open(layer_name) as subdataset: modis_meta = subdataset.profile all_bands.append(subdataset.read(1)) I have written the above code.After this how to proceed ? `
Источник: https://stackoverflow.com/questions/780 ... ing-python
I have downloaded MODIS land use land cover data.The key name of the data product is MCD12C1.Now I want to plot/visualize different land use land cover data on map using python.`
import numpy as np import pandas as pd import rioxarray import rasterio as rio from osgeo import gdal import earthpy as et import earthpy.spatial as es import earthpy.plot as ep title='c:/MCD12C1.A2022001.061.2023244164746' all_bands=[] with rio.open(f'{title}.HDF') as dataset: hdf4_meta = dataset.meta crs = dataset.read_crs() for layer_name in [name for name in dataset.subdatasets]: print(layer_name) with rio.open(layer_name) as subdataset: modis_meta = subdataset.profile all_bands.append(subdataset.read(1)) I have written the above code.After this how to proceed ? `
Источник: https://stackoverflow.com/questions/780 ... ing-python
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Как построить график данных из файла .kml с помощью matplotlib в Python 3.7 и Windows 10"?
Anonymous » » в форуме Python - 0 Ответы
- 19 Просмотры
-
Последнее сообщение Anonymous
-