├── .gitlab
└── codechecker_skip.lst
├── .idea
├── .gitignore
├── CloudTools.iml
├── codeStyles
│ ├── codeStyleConfig.xml
│ └── Project.xml
├── vcs.xml
└── misc.xml
├── doc
├── UML_Buildings_Model.png
├── UML_Operation_Model.png
├── UML_Vegetation_Model.png
├── screenshot_building_small.png
└── screenshot_vegetation_small.png
├── CloudTools.DEM
├── Transformation.cpp
├── Creation.cpp
├── CMakeLists.txt
├── Algorithms
│ ├── MatrixTransformation.cpp
│ ├── MatrixTransformation.h
│ └── HierachicalClustering.hpp
├── Helper.cpp
├── Transformation.h
├── Creation.h
├── Color.h
├── Color.cpp
├── Helper.h
├── Calculation.h
├── Comparers
│ └── Difference.hpp
├── Filters
│ ├── MajorityFilter.hpp
│ ├── NoiseFilter.hpp
│ └── MorphologyFilter.hpp
├── Window.hpp
├── Rasterize.h
├── Metadata.h
└── ClusterMap.h
├── Shell.config.cmd.sample
├── AHN.Buildings.Verify
├── Coverage.h
└── CMakeLists.txt
├── CloudTools.Common
├── CMakeLists.txt
├── Operation.cpp
├── Helper.h
├── IO
│ ├── ResultCollection.cpp
│ ├── Reporter.cpp
│ ├── IO.cpp
│ ├── IO.h
│ ├── Result.cpp
│ ├── ResultCollection.h
│ ├── Reporter.h
│ └── Result.h
└── Operation.h
├── CloudTools.DEM.Mask
└── CMakeLists.txt
├── CloudTools.DEM.Difference
└── CMakeLists.txt
├── CloudTools.Vegetation.Verify
└── CMakeLists.txt
├── AHN.Buildings.Aggregate
├── CMakeLists.txt
└── Region.h
├── AHN.Buildings.Parallel
└── CMakeLists.txt
├── AHN.Buildings.MPI
└── CMakeLists.txt
├── CloudTools.Vegetation
├── EliminateNonTrees.cpp
├── HeightDifference.cpp
├── HeightDifference.h
├── CentroidDistance.h
├── CMakeLists.txt
├── InterpolateNoData.cpp
├── VolumeDifference.h
├── HausdorffDistance.h
├── NoiseFilter.h
├── NoiseFilter.cpp
├── DistanceCalculation.h
├── RiverMask.hpp
├── MorphologyClusterFilter.h
├── PostProcess.h
├── InterpolateNoData.h
├── EliminateNonTrees.h
├── BuildingFacadeSeedRemoval.hpp
├── VolumeDifference.cpp
├── TreeCrownSegmentation.h
├── MorphologyClusterFilter.cpp
├── CentroidDistance.cpp
├── TreeCrownSegmentation.cpp
├── PreProcess.h
└── HausdorffDistance.cpp
├── AHN.Buildings
├── CMakeLists.txt
├── IOMode.h
├── BuildingExtraction.cpp
├── ContourConvexHullRasterizer.cpp
├── IOMode.cpp
├── ContourSplitting.h
├── BuildingExtraction.h
├── ContourFiltering.h
├── ContourFiltering.cpp
├── ContourSimplification.h
├── ContourDetection.cpp
├── ContourClassification.h
├── ContourConvexHullRasterizer.h
├── ContourDetection.h
├── Comparison.h
├── Comparison.cpp
├── ContourSimplification.cpp
├── ContourSplitting.cpp
├── ContourClassification.cpp
└── BuildingChangeDetection.hpp
├── Shell.bat
├── .github
└── workflows
│ └── ci.yml
├── LICENSE
├── .gitlab-ci.yml
├── README.md
├── CMakeSettings.json.sample
├── CMakeLists.txt
├── .gitattributes
├── WINDOWS_QUICK_START.md
├── CONTRIBUTING.md
└── BUILD.md
/.gitlab/codechecker_skip.lst:
--------------------------------------------------------------------------------
1 | -/usr/*
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /workspace.xml
3 |
4 | # Thrift plugin
5 | /thriftCompiler.xml
6 |
--------------------------------------------------------------------------------
/doc/UML_Buildings_Model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/PointCloudTools/HEAD/doc/UML_Buildings_Model.png
--------------------------------------------------------------------------------
/doc/UML_Operation_Model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/PointCloudTools/HEAD/doc/UML_Operation_Model.png
--------------------------------------------------------------------------------
/.idea/CloudTools.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/doc/UML_Vegetation_Model.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/PointCloudTools/HEAD/doc/UML_Vegetation_Model.png
--------------------------------------------------------------------------------
/CloudTools.DEM/Transformation.cpp:
--------------------------------------------------------------------------------
1 | namespace CloudTools
2 | {
3 | namespace DEM
4 | {
5 |
6 | } // DEM
7 | } // CloudTools
8 |
--------------------------------------------------------------------------------
/Shell.config.cmd.sample:
--------------------------------------------------------------------------------
1 | set GDAL_BIN=%GDAL_BIN%
2 | set GDAL_DATA=%GDAL_DATA%
3 | set GDAL_DRIVER_PATH=%GDAL_DRIVER_PATH%
4 |
--------------------------------------------------------------------------------
/doc/screenshot_building_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/PointCloudTools/HEAD/doc/screenshot_building_small.png
--------------------------------------------------------------------------------
/doc/screenshot_vegetation_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GISLab-ELTE/PointCloudTools/HEAD/doc/screenshot_vegetation_small.png
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/CloudTools.Common/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | add_library(common
2 | Operation.cpp Operation.h
3 | Helper.h
4 | IO/IO.cpp IO/IO.h
5 | IO/Reporter.cpp IO/Reporter.h
6 | IO/Result.cpp IO/Result.h
7 | IO/ResultCollection.cpp IO/ResultCollection.h)
8 |
--------------------------------------------------------------------------------
/CloudTools.DEM.Mask/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 |
3 | add_executable(dem_mask
4 | main.cpp)
5 | target_link_libraries(dem_mask
6 | dem common)
7 |
8 | install(TARGETS dem_mask
9 | DESTINATION ${CMAKE_INSTALL_PREFIX})
10 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/CloudTools.DEM.Difference/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 |
3 | add_executable(dem_diff
4 | main.cpp)
5 | target_link_libraries(dem_diff
6 | dem common
7 | ${GDAL_LIBRARY})
8 |
9 | install(TARGETS dem_diff
10 | DESTINATION ${CMAKE_INSTALL_PREFIX})
11 |
--------------------------------------------------------------------------------
/CloudTools.Vegetation.Verify/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 |
3 | add_executable(vegetation_ver
4 | main.cpp)
5 | target_link_libraries(vegetation_ver
6 | dem common)
7 |
8 | install(TARGETS vegetation_ver
9 | DESTINATION ${CMAKE_INSTALL_PREFIX})
10 |
--------------------------------------------------------------------------------
/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.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.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.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 |
--------------------------------------------------------------------------------
/CloudTools.DEM/Creation.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "Creation.h"
4 |
5 | namespace CloudTools
6 | {
7 | namespace DEM
8 | {
9 | Creation::~Creation()
10 | {
11 | if (_targetOwnerShip && _targetDataset != nullptr)
12 | GDALClose(_targetDataset);
13 | }
14 |
15 | GDALDataset* Creation::target()
16 | {
17 | if (!isExecuted())
18 | throw std::logic_error("The computation is not executed.");
19 | _targetOwnerShip = false;
20 | return _targetDataset;
21 | }
22 | } // DEM
23 | } // CloudTools
24 |
--------------------------------------------------------------------------------
/CloudTools.Vegetation/EliminateNonTrees.cpp:
--------------------------------------------------------------------------------
1 | #include "EliminateNonTrees.h"
2 |
3 | namespace CloudTools
4 | {
5 | namespace Vegetation
6 | {
7 | void EliminateNonTrees::initialize()
8 | {
9 | this->computation = [this](int x, int y, const std::vector>& sources)
10 | {
11 | const Window& source = sources[0];
12 |
13 | if (!source.hasData() || source.data() < this->threshold)
14 | return static_cast(this->nodataValue);
15 | else
16 | return source.data();
17 | };
18 | }
19 | } // Vegetation
20 | } // CloudTools
21 |
--------------------------------------------------------------------------------
/CloudTools.Vegetation/HeightDifference.cpp:
--------------------------------------------------------------------------------
1 | #include "HeightDifference.h"
2 |
3 | namespace CloudTools
4 | {
5 | namespace Vegetation
6 | {
7 | void HeightDifference::calculateDifference()
8 | {
9 | std::map, double> differences;
10 | OGRPoint highestA, highestB;
11 | double diff;
12 | for (const auto& elem : distance->closest())
13 | {
14 | highestA = clusterMapA.highestPoint(elem.first.first);
15 | highestB = clusterMapB.highestPoint(elem.first.second);
16 |
17 | diff = highestB.getZ() - highestA.getZ();
18 | differences.insert(std::make_pair(elem.first, diff));
19 | }
20 | }
21 | } // Vegetation
22 | } // CloudTools
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/CloudTools.DEM/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 |
3 | add_library(dem
4 | Calculation.cpp Calculation.h
5 | Creation.cpp Creation.h
6 | Transformation.cpp Transformation.h
7 | Color.cpp Color.h
8 | Helper.cpp Helper.h
9 | Metadata.cpp Metadata.h
10 | Rasterize.cpp Rasterize.h
11 | ClusterMap.cpp ClusterMap.h
12 | Window.hpp
13 | SweepLineCalculation.hpp
14 | SweepLineTransformation.hpp
15 | DatasetCalculation.hpp
16 | DatasetTransformation.hpp
17 | Filters/ClusterFilter.hpp
18 | Filters/MajorityFilter.hpp
19 | Filters/MorphologyFilter.hpp
20 | Filters/NoiseFilter.hpp
21 | Comparers/Difference.hpp
22 | Algorithms/HierachicalClustering.hpp
23 | Algorithms/MatrixTransformation.cpp Algorithms/MatrixTransformation.h)
24 |
--------------------------------------------------------------------------------
/CloudTools.Common/Operation.cpp:
--------------------------------------------------------------------------------
1 | #include "Operation.h"
2 |
3 | namespace CloudTools
4 | {
5 | #pragma region Operation
6 |
7 | void Operation::prepare(bool force)
8 | {
9 | if (!_isPrepared || force)
10 | {
11 | _isPrepared = false;
12 | _isExecuted = false;
13 | onPrepare();
14 | _isPrepared = true;
15 | }
16 | }
17 |
18 | void Operation::execute(bool force)
19 | {
20 | prepare(force);
21 | if (!_isExecuted || force)
22 | {
23 | _isExecuted = false;
24 | onExecute();
25 | _isExecuted = true;
26 | }
27 | }
28 |
29 | #pragma endregion
30 |
31 | #pragma region OperationSequence
32 |
33 | void OperationSequence::onExecute()
34 | {
35 | while (!end())
36 | executeNext();
37 | }
38 |
39 | #pragma endregion
40 | } // CloudTools
41 |
--------------------------------------------------------------------------------
/CloudTools.Vegetation/HeightDifference.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 |
5 | #include "DistanceCalculation.h"
6 |
7 | using namespace CloudTools::DEM;
8 |
9 | namespace CloudTools
10 | {
11 | namespace Vegetation
12 | {
13 | class HeightDifference
14 | {
15 | public:
16 | ClusterMap clusterMapA, clusterMapB;
17 | DistanceCalculation* distance;
18 |
19 | HeightDifference(ClusterMap& clusterMapA,
20 | ClusterMap& clusterMapB,
21 | DistanceCalculation* distance)
22 | : clusterMapA(clusterMapA), clusterMapB(clusterMapB), distance(distance)
23 | {
24 | calculateDifference();
25 | }
26 |
27 | private:
28 | void calculateDifference();
29 | };
30 | } // Vegetation
31 | } // CloudTools
32 |
--------------------------------------------------------------------------------
/AHN.Buildings/CMakeLists.txt:
--------------------------------------------------------------------------------
1 | include_directories(../)
2 |
3 | add_library(ahn_buildings
4 | BuildingExtraction.cpp BuildingExtraction.h
5 | BuildingChangeDetection.hpp
6 | ContourDetection.cpp ContourDetection.h
7 | ContourFiltering.cpp ContourFiltering.h
8 | ContourSplitting.cpp ContourSplitting.h
9 | ContourSimplification.cpp ContourSimplification.h
10 | ContourClassification.cpp ContourClassification.h
11 | ContourConvexHullRasterizer.cpp ContourConvexHullRasterizer.h
12 | Comparison.cpp Comparison.h
13 | IOMode.cpp IOMode.h
14 | Process.cpp Process.h)
15 |
16 | add_executable(ahn_buildings_sim
17 | main.cpp)
18 | target_link_libraries(ahn_buildings_sim
19 | ahn_buildings
20 | dem common)
21 |
22 | install(TARGETS ahn_buildings_sim
23 | DESTINATION ${CMAKE_INSTALL_PREFIX})
24 |
--------------------------------------------------------------------------------
/CloudTools.Vegetation/CentroidDistance.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include