added ws202425 courses
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
# Lab Assignment 1 - Cartopgraphy, Colors, and Displaying Remotely-Sensed Data
|
||||
|
||||
Name: Joaquin Gottlebe
|
||||
Matrikelnummer: 829101
|
||||
|
||||
## Map 1
|
||||
|
||||

|
||||
|
||||
## Question 1
|
||||
|
||||
#### Data
|
||||
Data: The Land Surface Temperature (LST) and Emissivity daily data are retrieved at 1km pixels by the generalized split-window algorithm and at 6km grids by the day/night algorithm. In the split-window algorithm, emissivities in bands 31 and 32 are estimated from land cover types, atmospheric column water vapor and lower boundary air surface temperature are separated into tractable sub-ranges for optimal retrieval. In the day/night algorithm, daytime and nighttime LSTs and surface emissivities are retrieved from pairs of day and night MODIS observations in seven TIR bands. The product is comprised of LSTs, quality assessment, observation time, view angles, and emissivities.
|
||||
|
||||
Satelite: eMODIS Global LST V6
|
||||
|
||||
Entity ID: EMGLSTA20220911202209206
|
||||
|
||||
Begin Date: 2022-09-11 00:00:00-05
|
||||
|
||||
End Date: 2022-09-20 00:00:00-05
|
||||
|
||||
Source: https://earthexplorer.usgs.gov/
|
||||
|
||||
#### Map
|
||||
|
||||

|
||||
|
||||
## Question 2
|
||||
|
||||

|
||||
Binary file not shown.
@@ -0,0 +1,11 @@
|
||||
.PHONY: all run pdf clean
|
||||
|
||||
PYTHON=venv/bin/python
|
||||
PANDOC=pandoc
|
||||
|
||||
all: run pdf
|
||||
|
||||
run:
|
||||
$(PYTHON) script.py
|
||||
pdf:
|
||||
$(PANDOC) Lab1.md -o rcm01_2425_lab1_gottlebe_829101.pdf
|
||||
@@ -0,0 +1,48 @@
|
||||
import geopandas as gpd
|
||||
import rasterio
|
||||
from rasterio.mask import mask
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
from matplotlib.ticker import ScalarFormatter
|
||||
|
||||
# Read the original shapefile
|
||||
gdf = gpd.read_file('continent_overlay/Continent_Outlines.shp')
|
||||
|
||||
# Path to the raster file
|
||||
raster_path = 'gtopo_world_dem_6m.tif'
|
||||
|
||||
# Open the raster file
|
||||
with rasterio.open(raster_path) as src:
|
||||
plt.figure(figsize=(14, 8)) # Create a larger figure for better visualization
|
||||
|
||||
# Loop through each unique continent
|
||||
for continent in gdf['CONTINENT'].unique():
|
||||
# Filter GeoDataFrame for the current continent
|
||||
gdf_continent = gdf[gdf['CONTINENT'] == continent]
|
||||
|
||||
# Clip the raster with the geometry of the current continent
|
||||
out_image, out_transform = mask(src, gdf_continent.geometry, crop=True)
|
||||
|
||||
# Flatten the array and remove masked values
|
||||
data = out_image[0].flatten() # Assuming a single-band raster
|
||||
data = data[(data != src.nodata) & (data >= 0) & (data <= 7000)] # Remove nodata values and filter the range
|
||||
|
||||
# Calculate histogram data (bin counts)
|
||||
counts, bin_edges = np.histogram(data, bins=50, range=(0, 7000))
|
||||
|
||||
# Plot the line for this continent
|
||||
plt.plot(bin_edges[:-1], counts, label=continent, linewidth=1.5)
|
||||
|
||||
# Add x-axis and y-axis limits, legend, title, and labels
|
||||
plt.xlim(0, 7000)
|
||||
plt.ylim(0, 40000)
|
||||
plt.gca().yaxis.set_major_formatter(ScalarFormatter(useOffset=False)) # Ensure y-axis shows whole numbers
|
||||
plt.ticklabel_format(style='plain', axis='y') # Disable scientific notation
|
||||
plt.legend(loc='upper right')
|
||||
plt.xlabel('Elevation (m)')
|
||||
plt.ylabel('Count')
|
||||
|
||||
# Save the plot to a file
|
||||
plt.savefig('plot1.png')
|
||||
|
||||
print('Line plot saved as "plot1.png"')
|
||||
Binary file not shown.
Reference in New Issue
Block a user