From c996e5c9a1e76889d47621f7e5acc02c949801f5 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 18 Jan 2022 18:13:38 -0800 Subject: [PATCH 1/3] Move geospatial headers to subfolder This simplifies the logic required for packaging. Signed-off-by: Steve Peters --- .../include/ignition/common/{ => geospatial}/Dem.hh | 10 +++++----- .../ignition/common/{ => geospatial}/HeightmapData.hh | 8 ++++---- .../ignition/common/{ => geospatial}/ImageHeightmap.hh | 10 +++++----- geospatial/src/Dem.cc | 2 +- geospatial/src/Dem_TEST.cc | 2 +- geospatial/src/ImageHeightmap.cc | 2 +- geospatial/src/ImageHeightmap_TEST.cc | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) rename geospatial/include/ignition/common/{ => geospatial}/Dem.hh (95%) rename geospatial/include/ignition/common/{ => geospatial}/HeightmapData.hh (92%) rename geospatial/include/ignition/common/{ => geospatial}/ImageHeightmap.hh (94%) diff --git a/geospatial/include/ignition/common/Dem.hh b/geospatial/include/ignition/common/geospatial/Dem.hh similarity index 95% rename from geospatial/include/ignition/common/Dem.hh rename to geospatial/include/ignition/common/geospatial/Dem.hh index 2d251b7ec..927076b11 100644 --- a/geospatial/include/ignition/common/Dem.hh +++ b/geospatial/include/ignition/common/geospatial/Dem.hh @@ -14,8 +14,8 @@ * limitations under the License. * */ -#ifndef IGNITION_COMMON_DEM_HH_ -#define IGNITION_COMMON_DEM_HH_ +#ifndef IGNITION_COMMON_GEOSPATIAL_DEM_HH_ +#define IGNITION_COMMON_GEOSPATIAL_DEM_HH_ #include #include @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include @@ -36,7 +36,7 @@ namespace ignition { /// \class DEM DEM.hh common/common.hh /// \brief Encapsulates a DEM (Digital Elevation Model) file. - class IGNITION_COMMON_GRAPHICS_VISIBLE Dem : public HeightmapData + class IGNITION_COMMON_GEOSPATIAL_VISIBLE Dem : public HeightmapData { /// \brief Constructor. public: Dem(); diff --git a/geospatial/include/ignition/common/HeightmapData.hh b/geospatial/include/ignition/common/geospatial/HeightmapData.hh similarity index 92% rename from geospatial/include/ignition/common/HeightmapData.hh rename to geospatial/include/ignition/common/geospatial/HeightmapData.hh index a67b1135a..16acb544e 100644 --- a/geospatial/include/ignition/common/HeightmapData.hh +++ b/geospatial/include/ignition/common/geospatial/HeightmapData.hh @@ -14,20 +14,20 @@ * limitations under the License. * */ -#ifndef IGNITION_COMMON_HEIGHTMAPDATA_HH_ -#define IGNITION_COMMON_HEIGHTMAPDATA_HH_ +#ifndef IGNITION_COMMON_GEOSPATIAL_HEIGHTMAPDATA_HH_ +#define IGNITION_COMMON_GEOSPATIAL_HEIGHTMAPDATA_HH_ #include #include #include -#include +#include namespace ignition { namespace common { /// \brief Encapsulates a generic heightmap data file. - class IGNITION_COMMON_GRAPHICS_VISIBLE HeightmapData + class IGNITION_COMMON_GEOSPATIAL_VISIBLE HeightmapData { /// \brief Destructor. public: virtual ~HeightmapData() = default; diff --git a/geospatial/include/ignition/common/ImageHeightmap.hh b/geospatial/include/ignition/common/geospatial/ImageHeightmap.hh similarity index 94% rename from geospatial/include/ignition/common/ImageHeightmap.hh rename to geospatial/include/ignition/common/geospatial/ImageHeightmap.hh index 5ee7431e8..98b3095ce 100644 --- a/geospatial/include/ignition/common/ImageHeightmap.hh +++ b/geospatial/include/ignition/common/geospatial/ImageHeightmap.hh @@ -14,16 +14,16 @@ * limitations under the License. * */ -#ifndef IGNITION_COMMON_IMAGEHEIGHTMAPDATA_HH_ -#define IGNITION_COMMON_IMAGEHEIGHTMAPDATA_HH_ +#ifndef IGNITION_COMMON_GEOSPATIAL_IMAGEHEIGHTMAPDATA_HH_ +#define IGNITION_COMMON_GEOSPATIAL_IMAGEHEIGHTMAPDATA_HH_ #include #include #include #include -#include -#include +#include +#include #include namespace ignition @@ -31,7 +31,7 @@ namespace ignition namespace common { /// \brief Encapsulates an image that will be interpreted as a heightmap. - class IGNITION_COMMON_GRAPHICS_VISIBLE ImageHeightmap + class IGNITION_COMMON_GEOSPATIAL_VISIBLE ImageHeightmap : public ignition::common::HeightmapData { /// \brief Constructor diff --git a/geospatial/src/Dem.cc b/geospatial/src/Dem.cc index eb9318555..d25b1c909 100644 --- a/geospatial/src/Dem.cc +++ b/geospatial/src/Dem.cc @@ -21,7 +21,7 @@ #include #include "ignition/common/Console.hh" -#include "ignition/common/Dem.hh" +#include "ignition/common/geospatial/Dem.hh" #include "ignition/math/SphericalCoordinates.hh" using namespace ignition; diff --git a/geospatial/src/Dem_TEST.cc b/geospatial/src/Dem_TEST.cc index 5a8fcde20..248ce255e 100644 --- a/geospatial/src/Dem_TEST.cc +++ b/geospatial/src/Dem_TEST.cc @@ -20,7 +20,7 @@ #include #include -#include "ignition/common/Dem.hh" +#include "ignition/common/geospatial/Dem.hh" #include "test_config.h" using namespace ignition; diff --git a/geospatial/src/ImageHeightmap.cc b/geospatial/src/ImageHeightmap.cc index 6c8630835..4dcf9bc32 100644 --- a/geospatial/src/ImageHeightmap.cc +++ b/geospatial/src/ImageHeightmap.cc @@ -15,7 +15,7 @@ * */ #include "ignition/common/Console.hh" -#include "ignition/common/ImageHeightmap.hh" +#include "ignition/common/geospatial/ImageHeightmap.hh" using namespace ignition; using namespace common; diff --git a/geospatial/src/ImageHeightmap_TEST.cc b/geospatial/src/ImageHeightmap_TEST.cc index 2b93f845a..3fc52788a 100644 --- a/geospatial/src/ImageHeightmap_TEST.cc +++ b/geospatial/src/ImageHeightmap_TEST.cc @@ -16,7 +16,7 @@ */ #include -#include "ignition/common/ImageHeightmap.hh" +#include "ignition/common/geospatial/ImageHeightmap.hh" #include "test_config.h" #define ELEVATION_TOL 1e-8 From 92e2c7ebd84d404311f161360e04c7ffe7aafe83 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Tue, 18 Jan 2022 18:39:27 -0800 Subject: [PATCH 2/3] Update Migration guide Signed-off-by: Steve Peters --- Migration.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Migration.md b/Migration.md index 7b9385355..3a65efc72 100644 --- a/Migration.md +++ b/Migration.md @@ -17,7 +17,8 @@ release will remove the deprecated code. 1. `HeightmapData.hh` and `ImageHeightmap.hh` have been moved out of the `graphics` component and into the new `geospatial` component + To use the heightmap features, users must add the `geospatial` component - to the `find_package` call + to the `find_package` call and update the include paths to use + the geospatial subfolder (`#include `) ## Ignition Common 3.X to 4.X From c3d60533fdf331bed6b8e80ee76ef9c15ad9b098 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Wed, 19 Jan 2022 09:26:09 -0800 Subject: [PATCH 3/3] Use HeightmapData.hh as example in migration guide Signed-off-by: Steve Peters --- Migration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Migration.md b/Migration.md index 3a65efc72..16477163e 100644 --- a/Migration.md +++ b/Migration.md @@ -18,7 +18,7 @@ release will remove the deprecated code. `graphics` component and into the new `geospatial` component + To use the heightmap features, users must add the `geospatial` component to the `find_package` call and update the include paths to use - the geospatial subfolder (`#include `) + the geospatial subfolder (`#include `) ## Ignition Common 3.X to 4.X