Skip to content

Commit 1e5820a

Browse files
authored
Clarify units for the DEM classes (#595)
* Avoid users asking whether the height and elevation functions are the same * Match common conventions like in GDAL to refer to things in "raster" coordinates with "pixels" indicating each point on a DEM * https://gdal.org/tutorials/raster_api_tut.html Signed-off-by: Ryan Friedman <[email protected]>
1 parent 5794473 commit 1e5820a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

geospatial/include/gz/common/geospatial/Dem.hh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ namespace gz
5858
public: int Load(const std::string &_filename = "");
5959

6060
/// \brief Get the elevation of a terrain's point in meters.
61-
/// \param[in] _x X coordinate of the terrain.
62-
/// \param[in] _y Y coordinate of the terrain.
61+
/// \param[in] _x X coordinate of the terrain in raster coordinates.
62+
/// \param[in] _y Y coordinate of the terrain in raster coordinates.
6363
/// \return Terrain's elevation at (x,y) in meters or infinity if illegal
6464
/// coordinates were provided.
6565
public: double Elevation(double _x, double _y);

geospatial/include/gz/common/geospatial/HeightmapData.hh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace gz
3737
/// Ex: A subsampling of 2 in a terrain of 129x129 means that the height
3838
/// vector will be 257 * 257.
3939
/// \param[in] _vertSize Number of points per row.
40-
/// \param[in] _size Real dimmensions of the terrain.
40+
/// \param[in] _size Real dimensions of the terrain.
4141
/// \param[in] _scale Vector3 used to scale the height.
4242
/// \param[in] _flipY If true, it inverts the order in which the vector
4343
/// is filled.
@@ -48,11 +48,11 @@ namespace gz
4848
std::vector<float> &_heights) const = 0;
4949

5050
/// \brief Get the terrain's height.
51-
/// \return The terrain's height.
51+
/// \return The terrain's height [pixels].
5252
public: virtual unsigned int Height() const = 0;
5353

5454
/// \brief Get the terrain's width.
55-
/// \return The terrain's width.
55+
/// \return The terrain's width [pixels].
5656
public: virtual unsigned int Width() const = 0;
5757

5858
/// \brief Get the maximum terrain's elevation.

0 commit comments

Comments
 (0)