Skip to content

Instantly share code, notes, and snippets.

@PratyushTripathy
Last active September 3, 2019 11:18
Show Gist options
  • Save PratyushTripathy/ca6f971e7f1d2214cadda5b09de85624 to your computer and use it in GitHub Desktop.
Save PratyushTripathy/ca6f971e7f1d2214cadda5b09de85624 to your computer and use it in GitHub Desktop.
DeepLearningLandsat-1
import os
from pyrsgis import raster
os.chdir("E:\\yourDirectoryName")
mxBangalore = 'l5_Bangalore2011_raw.tif'
builtupBangalore = 'l5_Bangalore2011_builtup.tif'
mxHyderabad = 'l5_Hyderabad2011_raw.tif'
# Read the rasters as array
ds1, featuresBangalore = raster.read(mxBangalore, bands='all')
ds2, labelBangalore = raster.read(builtupBangalore, bands=1)
ds3, featuresHyderabad = raster.read(mxHyderabad, bands='all')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment