contour-creator/documentation/report.md

27 lines
1.6 KiB
Markdown

% INF205 Project report
% Esther and Trygve
% 7. May 2024
## Group: Trygve and Esther
# Functionality
Our program usees the marching squares algorithm to create a vector contour map from a raster heightmap (DTM).
It outputs a geojson file that can be read by gis software. [https://mapshaper.org/](https://mapshaper.org/) is a simple website where you can view geojson files.
# data structures and input/output
![ER diagram](ER_diagram.svg)
The HeightMap class stores the heightmap as a array on the heap. It was not nececarry to copy or move this class, so we did not implement copy or move constructors/assignment operators.
The Point class represents a point in a line. The points are stored in vectors, wich are again stored in a big vector containing all the lines.
The `produce_cellmap` function finds the points for a contour at a given elevation. The `create_lines` uses `produce_cellmap` the get the points and then sorts them into contiguous lines before returning a `std::vector<std::vector<Point>>`{.cpp} thats used by the function `write_output_file` to write them to a geojson file.
# Performance
# Functionality of special interest
## Trygve
I can created a blur method that performs a simple box blur on the whole heigtmap. This is usefull to smooth out noise and create a more readable output.
I wanted to implement a gaussion blur, and the code is ready for that, but in the end we became short on time.
## Esther
Calculated some statistical estimates for the average, variance and standard deviation for the pixels in the image. Also tried to calculate the steepness around each pixel. However, we didn't manage to get the Gdal to work for this.