Last active
September 4, 2021 12:21
-
-
Save PratyushTripathy/af413caf7c4e9907d29884a160db85d5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from pyrsgis import raster | |
# define the file names | |
mx_file = r"D:\210904_ReduceGeotiffSize\l5_Bangalore2011_raw.tif" | |
sb_file = r"D:\210904_ReduceGeotiffSize\l5_Bangalore2011_builtup.tif" | |
# read both the rasters | |
ds_mx, arr_mx = raster.read(mx_file) | |
ds_sb, arr_sb = raster.read(sb_file) | |
# Display data type | |
print('Data type of multispectral file:', ds_mx.DataType) | |
print('Data type of single band file:', ds_sb.DataType) | |
# Display all the supported data types | |
print('Following data types are supported:\n', str(raster.raster_dtype).replace(', ',',\n ')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment