2024-04-06 15:50:03 +00:00
|
|
|
|
# Contour Creator 🗺️
|
|
|
|
|
This program takes a tiff heightmap and produces vector contours.
|
|
|
|
|
This is our project for the INF205: Resource-efficient programming course
|
|
|
|
|
## Status
|
|
|
|
|
- [x] Read .tif file into memory using gdal
|
2024-04-22 14:13:06 +00:00
|
|
|
|
- [x] Run the marching squares algorithm and produce a "cellmap"
|
|
|
|
|
- [ ] Use a lookuptable to produce a vector file from the "cellmap"
|
2024-04-10 10:07:04 +00:00
|
|
|
|
## Dependencies
|
2024-04-23 20:28:40 +00:00
|
|
|
|
- GDAL >= 3.5
|
2024-04-10 10:07:04 +00:00
|
|
|
|
- OpenMP
|
2024-04-23 20:28:40 +00:00
|
|
|
|
- CMake
|
|
|
|
|
|
|
|
|
|
If you want to clone the repo with the example files you need [git-lfs](https://git-lfs.com/) installed and activated with ´git lfs install´
|
|
|
|
|
To install the packages on Fedora run
|
|
|
|
|
```
|
|
|
|
|
dnf install g++ git-lfs cmake gdal-devel
|
|
|
|
|
```
|
|
|
|
|
on Debian:
|
|
|
|
|
```
|
|
|
|
|
apt install g++ git-lfs cmake libgdal-dev
|
|
|
|
|
```
|
2024-04-06 15:50:03 +00:00
|
|
|
|
## How to build:
|
|
|
|
|
```
|
|
|
|
|
mkdir build
|
|
|
|
|
cd build
|
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Debug ..
|
|
|
|
|
cmake --build . --parallel
|
|
|
|
|
```
|
2024-04-23 20:28:40 +00:00
|
|
|
|
Then you can run `./contour-creator PATH/TO/HEIGTHMAP.TIF`
|
|
|
|
|
Run an example file: `./contour-creator "../example_files/Follo 2014-dtm.tif"`
|
|
|
|
|
Currently the program outputs to ´out.shp´ in the current directory.
|
|
|
|
|
|
|
|
|
|
## Docs
|
|
|
|
|
[Doxygen output](https://trygve.gitlab.io/contour-creator/)
|