contour-creator/documentation/report.md

23 lines
1.4 KiB
Markdown
Raw Normal View History

2024-05-07 20:26:11 +00:00
% INF205 Project report
% Esther and Trygve
% 7. May 2024
2024-03-21 14:10:28 +00:00
## Group: Trygve and Esther
2024-04-10 10:32:22 +00:00
# Functionality
2024-05-07 20:26:11 +00:00
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.
2024-03-21 14:10:28 +00:00
2024-05-07 20:26:11 +00:00
# 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.