Download this file as a Jupyter Notebook@ http://54.243.252.9/ce-3372-webroot/2-Exercises/ES2/ES2.ipynb
Copyright © 2021 Theodore G. Cleveland
Demonstrate ability to interpret and render from an image a topographic map, and overlay the topographic map onto the basemap.
Figure 1 is a subdivision conceptual map for Somewhere, USA. The numbers on the map are land surface elevations located at the decimal points in the drawing. Along the bottom edge of the map is a black line segment (with arrowheads at each end) that indicates a distance of 1,100 feet on the map. The black circle in the lower left hand corner is to be used as an origin for X-Y measurements for making XYZ data files.
Figure 1. Somewhere USA Study Area
The semester design project is the conceptual design and analysis of a water distribution, stormwater collection, and wastewater collection system for this subdivision. All such systems will be influenced by the local topography, so a first step is to build a topographic map to guide design decisions, especially for the stormwater part of the design. The .png file is http://54.243.252.9/ce-3372-webroot/2-Exercises/ES2/SomewhereUSABaseMap.png so you can render a larger graphic if needed.
Construct a topographic contour map of the area.
TTUStudent
password==id10t
) A short report (1 page) where you describe your map making activity, including how you built the ASCII input file, and your rendered topographic map. Put both of these into a single PDF file to upload to the Blackboard Server.
U.S. Air Force (1985). AFR 64-4 Survival, Evasion, Escape, and Rescue Manual Ch. 20 LAND NAVIGATION (... How to interpret topographic maps) http://54.243.252.9/ce-3372-webroot/3-Readings/UsingTopographicMaps/Pages%20from%20USAF-Survival-Manual-644.pdf
Ammann, A., and Stone, A. L. 1991. Method for the Comparative Evaluation of Nontidal Wetlands in New Hampshire, Appendix E Interpreting Topographic Maps http://54.243.252.9/ce-3372-webroot/2-Exercises/ES2/Topowatershed.pdf
The script block below is an example of how one could process the XYZ file for a contouring program. You can make these maps using methods you learned in ENGR-1330. The xyz values are found using a ruler and measuring from a horizontal datum (for y) and a vertical datum (for x). Once you have built the file, either grid using methods from ENGR-1330 (example below), or use SURFER, or ArcGIS, or qGIS, or use the on-line tool at http://54.243.252.9/toolbox/ordinarytools/SimpleContourMap/
# CCMR from ENGR-1330:
# http://54.243.252.9/engr-1330-webroot/8-Labs/Lab07/Lab07.html
# https://clouds.eos.ubc.ca/~phil/docs/problem_solving/06-Plotting-with-Matplotlib/06.14-Contour-Plots.html
# https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.griddata.html
# https://stackoverflow.com/questions/332289/how-do-you-change-the-size-of-figures-drawn-with-matplotlib
# https://stackoverflow.com/questions/18730044/converting-two-lists-into-a-matrix
# https://stackoverflow.com/questions/3242382/interpolation-over-an-irregular-grid
# https://stackoverflow.com/questions/33919875/interpolate-irregular-3d-data-from-a-xyz-file-to-a-regular-grid
import pandas
my_xyz = pandas.read_csv('XYZSomewhereUSA.txt',sep='\t') # read an ascii file already prepared, delimiter is tabs
my_xyz = pandas.DataFrame(my_xyz) # convert into a data frame
print(my_xyz) #examine the dataframe
import numpy
import matplotlib
from scipy.interpolate import griddata
# extract lists from the dataframe
coord_x = my_xyz['X-Easting'].values.tolist()
coord_y = my_xyz['Y-Northing'].values.tolist()
coord_z = my_xyz['Z-Elevation'].values.tolist()
coord_xy = numpy.column_stack((coord_x, coord_y))
# Set plotting range in original data units
lon = numpy.linspace(min(coord_x), max(coord_x), 200)
lat = numpy.linspace(min(coord_y), max(coord_y), 200)
X, Y = numpy.meshgrid(lon, lat)
# Grid the data; use cubic spline interpolation (other choices are nearest and linear)
Z = griddata(numpy.array(coord_xy), numpy.array(coord_z), (X, Y), method='cubic')
# Build the map
fig, ax = matplotlib.pyplot.subplots()
fig.set_size_inches(14, 7)
CS = ax.contour(X, Y, Z, levels = 36)
ax.clabel(CS, inline=2, fontsize=10)
ax.set_title('Contour Plot from Gridded Data File')