Create a python file and two output directories under your assignment directory.

Create a python file and two output directories under your assignment directory. 
• The file names should be
i. a09_Schramm.py 
ii. “data” directory
iii. “output” directory (Creating the output directory can be implemented in your
script) 
1. Write python codes to create a new output text file, named “output_yourlastname.txt” under the
output directly. Read the “SDSU_3Color.jpg” and output the following raster dataset information to
the output text file. After writing outputs, close the output text file.
– Number of rows and columns
– Number of raster bands
– Projection
– Metadata
– Geotransform information (i.e., origin x, origin y, pixel width, pixel height)
* Check GDAL APIs at https://gdal.org/python/ to find gdal raster  Dataset class properties and
methods to access to the above information.
2. For each band in “SDSU_3Color.jpg”, find the lowest and highest pixel values. 
* Check GDAL APIs at https://gdal.org/python/ to find gdal raster band class methods to access
to the lowest and highest pixel values. 
3. For each band in “SDSU_3Color.jpg”, find total (i.e., sum of all pixel values) and mean pixel values
using Numpy modules, mean() and sum().
* https://docs.scipy.org/doc/numpy/reference/generated/numpy.mean.html 
* https://docs.scipy.org/doc/numpy/reference/generated/numpy.sum.html 
4. Read the “imgn33w118_13.img” DEM file (driver=”HFA”). Get the elevation values at the following
3 locations.
• San Diego Zoo Entrance: (-117.149033, 32.735362)
• Old Point Loma Lighthouse: (-117.240978, 32.671992)
• Storm Hall @ SDSU: (-117.074080, 32.777427)
5. Find the highest elevation value in the DEM data. Then find pixel offsets and pixel coordinates (i.e.,
longitude, latitude) of the cell with the highest elevation value. 
6. Output a subset of the DEM, “imgn33w118_13.img”, with a size of 512 x 512 pixels. The output raster
image should contain at least one pixel with an elevation value greater than 0 (i.e., use appropriate
offset values to get land surface pixels).
7. Use the same offset values in Q6, output a subset of the DEM, “imgn33w118_13.img”, with a size of
512 x 512 pixels. The output raster image values should have some modifications of your choice (e.g.,
add random value, apply a smoothing filter using a local mean value, classify pixel values by a set of
elevation ranges, etc.).
Extra Credit:
1. Calculate the Landsat Normalized Difference Vegetation Index (NDVI)
a) Read  the  following  materials  to  understand  what  is  NDVI,  how  to  calculate  NDVI,  and  the
Landsat-8 raster bands information. 
i. https://www.usgs.gov/core-science-systems/eros/phenology/science/ndvi-foundation-
remote-sensing-phenology?qt-science_center_objects=0#qt-science_center_objects
ii. https://www.usgs.gov/core-science-systems/nli/landsat/landsat-normalized-difference-
vegetation-index?qt-science_support_page_related_con=0#qt-
science_support_page_related_con
iii. https://landsat.gsfc.nasa.gov/landsat-8/landsat-8-bands 
b) Download Landsat-8 OLI/TIRS C1 Level-1 data (Band 4 & 5) using USGS EarthExplorer at a
location and a date/time of your choice. 
EarthExplorer: 
o https://earthexplorer.usgs.gov 
o Need to register to download the data
o EarthExplorer Introduction video: https://www.youtube.com/watch?v=eAmTxsg6ZYE 
c) Write python codes to read the Landsat 8 data, compute NDVI, and output the result as a
raster data. 

Posted in Uncategorized

Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount