CMSC 246 Systems Programming
Fall 2019
Working with GeoTiff data or Obfuscated C
Due Saturday Dec 14 before Midnight
I will consider requests for extensions on a case by case basis, but only if the request is made in person (not in class) and only if the request is made by Thursday Dec 12.
NASA recently published a dataset describing tailpipe emissions of C02 covering the continental united states. You can read about this dataset at https://daac.ornl.gov/CMS/guides/CMS_CO2_Relationships.html. Briefly, this dataset gives, for the past 33 years, an estimate of tailpipe CO2 emissions (cars and trucks) for every kilometer of road in the united states.
I have obtained this dataset for your final assignment.
You task is:
- Write a program to extract data for the kilometer cor road nearest the Bryn Mawr campus for each of the 33 years that the dataset covers. Alternately, you may use the Haverford campus. Alternately, you can use the location of the place where you live when not at college (if you live in the US.)
The data for this assignment is in /home/gtowell/Public246/CO2/. This directory contains 3 subdiectories with the actual data in /home/gtowell/Public246/CO2/data/*.tiff. That if correct; the information is in tiff files. Specifically, geotiff files. The good news in that tiff is a well defined file format. Likewise geotiff is well defined. The bad news is that I have not found any code that easily reads these files.
With those 33 years worth of data, draw an graph showing the CO2 emissions changes.
Some thoughts.
- You may use any online reference.
- You may use any code you find on-line
- Geotiff files generally contain data in greyscale. That is they have one number describing the "color" at each point. In this case, the color is the level of CO2 emissions. In other geotiff file the color might be elevation, ice thickness, etc.
- The gimp program (it is on powerpuff, gimp is an acronym for GNU IMage Processor) can read a geotiff file and spit out the grey scale value for every "pixel". This might be useful if you can correlate the pixels to longitude and latitudes.
- For an example of the use of this data see this article from the New York Times. (On google search for "NY times CO2".)
You may work in pairs if you are so inclined. If you work with a partner, you need to do more. Specifically, rather than just extracting the data for a single place you need to produce a program that can extract data a region. With the regional data make a plot, or perhaps a series of plots showing the data for the region. I leave it to you to work out the details, but I am looking for something pretty. For example, think about a movie with 32 (or 33) frames showing the the changing CO2 emissions over time for a 20x20 (e.g.) region.
If you work in a pair you I must receive email from both partners in the pair by Friday Dec 6 stating this intention.
What to Hand in
- The usual README
- A reflection on what went well / poorly.
- If you use code that you (or your partner) did not write, completely document that code. Gives its source, Author, ...
- If working in a pair each person should write a reflection independently and turn in at least the README file. One of the pair should turn in a complete code and graph set.
- All code. Be sure to include Makefile and build instructions
- At least one graph. Preferably several with interesting colors, ... I would like to be able to post these graphs on the CS department screen (which has been dominated by CS110 projects in the fall of 2019.)
Alternative Assignment
Write a block of code in the style of the obfuscated C code competition. It can do anything. Some constraints:
- It must be short. Ideally the total code length is under 500 characters. It can be more, but do not exceed 2000 characters.
- The code must do something. It could be that the something is quite trivial, but it must do something. A classic in OCC is to draw some sort of picture
- The code must be your own.
- You must include a detailed writeup of exactly what your codes does and why. I would expect that this writeup will be 5 to 10 times longer than the code (or more).
- All thoughts of good coding style should be forgotten. Good style is about readability which is the exact opposite of this task.
- The code must not require any file other than itself to do its task. For instance, you may have the code read a file from standard input, but the only file you can have it read is itself.
- Ideally, I should not be able to figure out how you code works without reading the detailed writeup.
- I will be disappointed if I do not see a lot of variables named "a", "aa", "aaa", etc.
What to Hand in
- The usual README including instructions on how to run your code
- A reflection on what went well / poorly.
- Your code
- Your detailed writeup of what your code does and why