Skip to content

Commit

Permalink
Move geospatial headers to subfolder (#289)
Browse files Browse the repository at this point in the history
This simplifies the logic required for packaging.
Update Migration guide

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters authored Jan 19, 2022
1 parent 28eb6c7 commit e0a5490
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 19 deletions.
3 changes: 2 additions & 1 deletion Migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/geospatial/HeightmapData.hh>`)

## Ignition Common 3.X to 4.X

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <string>
Expand All @@ -24,8 +24,8 @@
#include <ignition/math/Vector3.hh>
#include <ignition/math/Angle.hh>

#include <ignition/common/HeightmapData.hh>
#include <ignition/common/graphics/Export.hh>
#include <ignition/common/geospatial/Export.hh>
#include <ignition/common/geospatial/HeightmapData.hh>

#include <ignition/utils/ImplPtr.hh>

Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string>
#include <vector>
#include <ignition/math/Vector3.hh>
#include <ignition/common/graphics/Export.hh>
#include <ignition/common/geospatial/Export.hh>

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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@
* 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 <limits>
#include <string>
#include <vector>
#include <ignition/math/Vector3.hh>

#include <ignition/common/graphics/Export.hh>
#include <ignition/common/HeightmapData.hh>
#include <ignition/common/geospatial/Export.hh>
#include <ignition/common/geospatial/HeightmapData.hh>
#include <ignition/common/Image.hh>

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
Expand Down
2 changes: 1 addition & 1 deletion geospatial/src/Dem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <ogr_spatialref.h>

#include "ignition/common/Console.hh"
#include "ignition/common/Dem.hh"
#include "ignition/common/geospatial/Dem.hh"
#include "ignition/math/SphericalCoordinates.hh"

using namespace ignition;
Expand Down
2 changes: 1 addition & 1 deletion geospatial/src/Dem_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <ignition/math/Angle.hh>
#include <ignition/math/Vector3.hh>

#include "ignition/common/Dem.hh"
#include "ignition/common/geospatial/Dem.hh"
#include "test_config.h"

using namespace ignition;
Expand Down
2 changes: 1 addition & 1 deletion geospatial/src/ImageHeightmap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion geospatial/src/ImageHeightmap_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
#include <gtest/gtest.h>

#include "ignition/common/ImageHeightmap.hh"
#include "ignition/common/geospatial/ImageHeightmap.hh"
#include "test_config.h"

#define ELEVATION_TOL 1e-8
Expand Down

0 comments on commit e0a5490

Please sign in to comment.