├── .gitattributes
├── .github
└── workflows
│ └── ci.yml
├── .gitignore
├── .gitlab-ci.yml
├── .gitlab
└── codechecker_skip.lst
├── .idea
├── .gitignore
├── CloudTools.iml
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
├── misc.xml
└── vcs.xml
├── AHN.Buildings.Aggregate
├── CMakeLists.txt
├── Region.h
└── main.cpp
├── AHN.Buildings.MPI
├── CMakeLists.txt
└── main.cpp
├── AHN.Buildings.Parallel
├── CMakeLists.txt
└── main.cpp
├── AHN.Buildings.Verify
├── CMakeLists.txt
├── Coverage.h
└── main.cpp
├── AHN.Buildings
├── BuildingChangeDetection.hpp
├── BuildingExtraction.cpp
├── BuildingExtraction.h
├── CMakeLists.txt
├── Comparison.cpp
├── Comparison.h
├── ContourClassification.cpp
├── ContourClassification.h
├── ContourConvexHullRasterizer.cpp
├── ContourConvexHullRasterizer.h
├── ContourDetection.cpp
├── ContourDetection.h
├── ContourFiltering.cpp
├── ContourFiltering.h
├── ContourSimplification.cpp
├── ContourSimplification.h
├── ContourSplitting.cpp
├── ContourSplitting.h
├── IOMode.cpp
├── IOMode.h
├── Process.cpp
├── Process.h
└── main.cpp
├── BUILD.md
├── CMakeLists.txt
├── CMakeSettings.json.sample
├── CONTRIBUTING.md
├── CloudTools.Common
├── CMakeLists.txt
├── Helper.h
├── IO
│ ├── IO.cpp
│ ├── IO.h
│ ├── Reporter.cpp
│ ├── Reporter.h
│ ├── Result.cpp
│ ├── Result.h
│ ├── ResultCollection.cpp
│ └── ResultCollection.h
├── Operation.cpp
└── Operation.h
├── CloudTools.DEM.Difference
├── CMakeLists.txt
└── main.cpp
├── CloudTools.DEM.Mask
├── CMakeLists.txt
└── main.cpp
├── CloudTools.DEM
├── Algorithms
│ ├── HierachicalClustering.hpp
│ ├── MatrixTransformation.cpp
│ └── MatrixTransformation.h
├── CMakeLists.txt
├── Calculation.cpp
├── Calculation.h
├── ClusterMap.cpp
├── ClusterMap.h
├── Color.cpp
├── Color.h
├── Comparers
│ └── Difference.hpp
├── Creation.cpp
├── Creation.h
├── DatasetCalculation.hpp
├── DatasetTransformation.hpp
├── Filters
│ ├── ClusterFilter.hpp
│ ├── MajorityFilter.hpp
│ ├── MorphologyFilter.hpp
│ └── NoiseFilter.hpp
├── Helper.cpp
├── Helper.h
├── Metadata.cpp
├── Metadata.h
├── Rasterize.cpp
├── Rasterize.h
├── SweepLineCalculation.hpp
├── SweepLineTransformation.hpp
├── Transformation.cpp
├── Transformation.h
└── Window.hpp
├── CloudTools.Vegetation.Verify
├── CMakeLists.txt
└── main.cpp
├── CloudTools.Vegetation
├── BuildingFacadeSeedRemoval.hpp
├── CMakeLists.txt
├── CentroidDistance.cpp
├── CentroidDistance.h
├── DistanceCalculation.h
├── EliminateNonTrees.cpp
├── EliminateNonTrees.h
├── HausdorffDistance.cpp
├── HausdorffDistance.h
├── HeightDifference.cpp
├── HeightDifference.h
├── InterpolateNoData.cpp
├── InterpolateNoData.h
├── MorphologyClusterFilter.cpp
├── MorphologyClusterFilter.h
├── NoiseFilter.cpp
├── NoiseFilter.h
├── PostProcess.cpp
├── PostProcess.h
├── PreProcess.cpp
├── PreProcess.h
├── RiverMask.hpp
├── TreeCrownSegmentation.cpp
├── TreeCrownSegmentation.h
├── VolumeDifference.cpp
├── VolumeDifference.h
└── main.cpp
├── Folder.DotSettings
├── LICENSE
├── README.md
├── Shell.bat
├── Shell.config.cmd.sample
├── WINDOWS_QUICK_START.md
└── doc
├── UML_Buildings_Model.png
├── UML_Operation_Model.png
├── UML_Vegetation_Model.png
├── screenshot_building_small.png
└── screenshot_vegetation_small.png
/.gitattributes:
--------------------------------------------------------------------------------
1 | ###############################################################################
2 | # Set default behavior to automatically normalize line endings.
3 | ###############################################################################
4 | * text=auto
5 |
6 | ###############################################################################
7 | # Set default behavior for command prompt diff.
8 | #
9 | # This is need for earlier builds of msysgit that does not have it on by
10 | # default for csharp files.
11 | # Note: This is only used by command line
12 | ###############################################################################
13 | #*.cs diff=csharp
14 |
15 | ###############################################################################
16 | # Set the merge driver for project and solution files
17 | #
18 | # Merging from the command prompt will add diff markers to the files if there
19 | # are conflicts (Merging from VS is not affected by the settings below, in VS
20 | # the diff markers are never inserted). Diff markers may cause the following
21 | # file extensions to fail to load in VS. An alternative would be to treat
22 | # these files as binary and thus will always conflict and require user
23 | # intervention with every merge. To do so, just uncomment the entries below
24 | ###############################################################################
25 | #*.sln merge=binary
26 | #*.csproj merge=binary
27 | #*.vbproj merge=binary
28 | #*.vcxproj merge=binary
29 | #*.vcproj merge=binary
30 | #*.dbproj merge=binary
31 | #*.fsproj merge=binary
32 | #*.lsproj merge=binary
33 | #*.wixproj merge=binary
34 | #*.modelproj merge=binary
35 | #*.sqlproj merge=binary
36 | #*.wwaproj merge=binary
37 |
38 | ###############################################################################
39 | # behavior for image files
40 | #
41 | # image files are treated as binary by default.
42 | ###############################################################################
43 | #*.jpg binary
44 | #*.png binary
45 | #*.gif binary
46 |
47 | ###############################################################################
48 | # diff behavior for common document formats
49 | #
50 | # Convert binary document formats to text before diffing them. This feature
51 | # is only available from the command line. Turn it on by uncommenting the
52 | # entries below.
53 | ###############################################################################
54 | #*.doc diff=astextplain
55 | #*.DOC diff=astextplain
56 | #*.docx diff=astextplain
57 | #*.DOCX diff=astextplain
58 | #*.dot diff=astextplain
59 | #*.DOT diff=astextplain
60 | #*.pdf diff=astextplain
61 | #*.PDF diff=astextplain
62 | #*.rtf diff=astextplain
63 | #*.RTF diff=astextplain
64 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: Build project
2 |
3 | on: [push]
4 |
5 | env:
6 | # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7 | BUILD_TYPE: Release
8 |
9 | jobs:
10 | build:
11 | strategy:
12 | matrix:
13 | os: [ubuntu-20.04, ubuntu-22.04]
14 |
15 | runs-on: ${{ matrix.os }}
16 |
17 | steps:
18 | - uses: actions/checkout@v2
19 |
20 | - name: Update package repository
21 | run: sudo apt-get update
22 |
23 | - name: Install required packages
24 | run: sudo apt-get install libboost-all-dev libgdal-dev libopencv-dev libopenmpi-dev
25 |
26 | - name: Create build environment
27 | run: cmake -E make_directory ${{runner.workspace}}/build
28 |
29 | - name: Configure CMake
30 | working-directory: ${{runner.workspace}}/build
31 | run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE
32 |
33 | - name: Build
34 | working-directory: ${{runner.workspace}}/build
35 | run: cmake --build . --config $BUILD_TYPE
--------------------------------------------------------------------------------
/.gitlab-ci.yml:
--------------------------------------------------------------------------------
1 | stages:
2 | - build
3 | - test
4 |
5 | variables:
6 | # No interactive timezone dialog for tzdata
7 | DEBIAN_FRONTEND: noninteractive
8 |
9 | # SAST
10 | include:
11 | - template: Jobs/SAST.gitlab-ci.yml
12 |
13 | # Build
14 | .build:
15 | stage: build
16 | before_script:
17 | - apt-get update -yqq
18 | - apt-get install -yqq build-essential cmake
19 | - apt-get install -yqq libboost-all-dev libgdal-dev libopencv-dev
20 | - apt-get install -yqq libopenmpi-dev
21 | script:
22 | - mkdir -p build
23 | - cd build
24 | - cmake ..
25 | - make
26 |
27 | build_focal:
28 | extends: .build
29 | image: ubuntu:20.04
30 |
31 | build_jammy:
32 | extends: .build
33 | image: ubuntu:22.04
34 |
35 | # Code Quality with CodeChecker
36 | cq_codecheker:
37 | stage: test
38 | image: tmselte/evaluator:cpp-ubuntu-22.04
39 | extends: .build
40 | script:
41 | - mkdir -p build
42 | - cd build
43 | - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 ..
44 | - cd ..
45 | # Analyze the project
46 | - >
47 | CodeChecker analyze
48 | --analyzers clangsa clang-tidy
49 | --ctu
50 | -o ./reports
51 | ./build/compile_commands.json
52 | # Create the report file
53 | - >
54 | CodeChecker parse
55 | --trim-path-prefix $(pwd)
56 | -e codeclimate
57 | -i .gitlab/codechecker_skip.lst
58 | ./reports > gl-code-quality-report.json || true
59 | # Note: 'CodeChecker parse' would return a non-zero exit code when any issues found
60 | - test -f gl-code-quality-report.json
61 | artifacts:
62 | expose_as: Code Quality Report
63 | reports:
64 | codequality: gl-code-quality-report.json
65 | paths: [gl-code-quality-report.json]
66 | expire_in: 2 weeks
67 |
--------------------------------------------------------------------------------
/.gitlab/codechecker_skip.lst:
--------------------------------------------------------------------------------
1 | -/usr/*
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /workspace.xml
3 |
4 | # Thrift plugin
5 | /thriftCompiler.xml
6 |
--------------------------------------------------------------------------------
/.idea/CloudTools.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/AHN.Buildings.Aggregate/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 |
3 | add_executable(ahn_buildings_agg
4 | main.cpp
5 | Region.h)
6 | target_link_libraries(ahn_buildings_agg
7 | dem common)
8 |
9 | install(TARGETS ahn_buildings_agg
10 | DESTINATION ${CMAKE_INSTALL_PREFIX})
11 |
--------------------------------------------------------------------------------
/AHN.Buildings.Aggregate/Region.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace AHN
4 | {
5 | ///
6 | /// Represents an administrative region.
7 | ///
8 | struct Region
9 | {
10 | ///
11 | /// The identifier of the region.
12 | ///
13 | int id;
14 | ///
15 | /// The cumulative altimetry gained.
16 | ///
17 | float gained;
18 | ///
19 | /// The cumulative altimetry lost.
20 | ///
21 | float lost;
22 | ///
23 | /// The cumulative altimetry moved (gained + lost).
24 | ///
25 | float moved;
26 | ///
27 | /// The cumulative altimetry difference (gained - lost).
28 | ///
29 | float difference;
30 | };
31 | } // AHN
32 |
--------------------------------------------------------------------------------
/AHN.Buildings.MPI/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 | include_directories(${MPI_CXX_INCLUDE_PATH})
3 |
4 | link_libraries(${MPI_CXX_LIBRARIES})
5 |
6 | add_executable(ahn_buildings_mpi
7 | main.cpp)
8 | target_link_libraries(ahn_buildings_mpi
9 | ahn_buildings
10 | dem common)
11 |
12 | install(TARGETS ahn_buildings_mpi
13 | DESTINATION ${CMAKE_INSTALL_PREFIX})
14 |
--------------------------------------------------------------------------------
/AHN.Buildings.Parallel/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 |
3 | add_executable(ahn_buildings_par
4 | main.cpp)
5 | target_link_libraries(ahn_buildings_par
6 | ahn_buildings
7 | dem common
8 | Threads::Threads)
9 |
10 | install(TARGETS ahn_buildings_par
11 | DESTINATION ${CMAKE_INSTALL_PREFIX})
12 |
--------------------------------------------------------------------------------
/AHN.Buildings.Verify/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 |
3 | add_executable(ahn_buildings_ver
4 | main.cpp
5 | Coverage.h)
6 | target_link_libraries(ahn_buildings_ver
7 | dem common)
8 |
9 | install(TARGETS ahn_buildings_ver
10 | DESTINATION ${CMAKE_INSTALL_PREFIX})
11 |
--------------------------------------------------------------------------------
/AHN.Buildings.Verify/Coverage.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | enum Coverage : GByte
6 | {
7 | NoData = 0,
8 | Accept = 1,
9 | Reject = 2
10 | };
11 |
--------------------------------------------------------------------------------
/AHN.Buildings/BuildingChangeDetection.hpp:
--------------------------------------------------------------------------------
1 | #include