6#ifndef VIEWSHED_TYPES_H_INCLUDED
7#define VIEWSHED_TYPES_H_INCLUDED
21using DatasetPtr = std::unique_ptr<GDALDataset>;
146 return static_cast<size_t>(
xSize()) *
ySize();
199inline std::ostream &operator<<(std::ostream &out,
const Window &w)
201 out <<
"Xstart/stop Ystart/stop = " << w.xStart <<
"/" << w.xStop <<
" "
202 << w.yStart <<
"/" << w.yStop;
212 LineLimits(
int leftArg,
int leftMinArg,
int rightMinArg,
int rightArg)
224inline std::ostream &operator<<(std::ostream &out,
const LineLimits &ll)
226 out <<
"Left/LeftMin RightMin/Right = " << ll.
left <<
"/" << ll.
leftMin
231constexpr int INVALID_ISECT = std::numeric_limits<int>::max();
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:476
This file is legacy since GDAL 3.12, but will be kept at least in the whole GDAL 3....
Processing limits based on min/max distance restrictions.
Definition viewshed_types.h:210
int rightMin
Starting (leftmost) cell on the right side.
Definition viewshed_types.h:220
int leftMin
One past the rightmost cell on the left side.
Definition viewshed_types.h:219
int right
One past the rightmost cell on the right side.
Definition viewshed_types.h:221
int left
Starting (leftmost) cell on the left side.
Definition viewshed_types.h:218
LineLimits(int leftArg, int leftMinArg, int rightMinArg, int rightArg)
Constructor that takes the members in order.
Definition viewshed_types.h:212
Options for viewshed generation.
Definition viewshed_types.h:59
Point observer
x, y, and z of the observer
Definition viewshed_types.h:60
bool highPitchMasking() const
True if high pitch masking will occur.
Definition viewshed_types.h:102
double startAngle
start angle of observable range
Definition viewshed_types.h:73
double targetHeight
target height above the DEM surface
Definition viewshed_types.h:68
double outOfRangeVal
raster output value for pixels outside of max distance.
Definition viewshed_types.h:65
double highPitch
maximum pitch (vertical angle) of observable points
Definition viewshed_types.h:77
CPLStringList creationOpts
options for output raster creation
Definition viewshed_types.h:84
double curveCoeff
coefficient for atmospheric refraction
Definition viewshed_types.h:79
double invisibleVal
raster output value for non-visible pixels.
Definition viewshed_types.h:62
double endAngle
end angle of observable range
Definition viewshed_types.h:74
double lowPitch
minimum pitch (vertical angle) of observable points
Definition viewshed_types.h:75
bool lowPitchMasking() const
True if low pitch masking will occur.
Definition viewshed_types.h:96
double nodataVal
raster output value for pixels with no data
Definition viewshed_types.h:67
uint8_t numJobs
Relative number of jobs in cumulative mode.
Definition viewshed_types.h:87
std::string outputFormat
output raster format
Definition viewshed_types.h:82
OutputMode outputMode
Output information.
Definition viewshed_types.h:80
std::string outputFilename
output raster filename
Definition viewshed_types.h:83
bool angleMasking() const
True if angle masking will occur.
Definition viewshed_types.h:90
double maybeVisibleVal
raster output for potentially visible pixels.
Definition viewshed_types.h:63
double maxDistance
maximum distance from observer to compute value
Definition viewshed_types.h:69
double visibleVal
raster output value for visible pixels.
Definition viewshed_types.h:61
CellMode cellMode
Mode of cell height calculation.
Definition viewshed_types.h:85
int observerSpacing
Observer spacing in cumulative mode.
Definition viewshed_types.h:86
bool pitchMasking() const
True if pitch masking will occur.
Definition viewshed_types.h:108
double minDistance
minimum distance from observer to compute value.
Definition viewshed_types.h:71
A point.
Definition viewshed_types.h:49
double y
Y value.
Definition viewshed_types.h:51
double x
X value.
Definition viewshed_types.h:50
double z
Z value.
Definition viewshed_types.h:52
A window in a raster including pixels in [xStart, xStop) and [yStart, yStop).
Definition viewshed_types.h:118
void shiftX(int nShift)
Shift the X dimension by nShift.
Definition viewshed_types.h:192
int xStart
X start position.
Definition viewshed_types.h:119
int clampX(int nX) const
Clamp the argument to be in the window in the X dimension.
Definition viewshed_types.h:177
bool containsX(int nX) const
Determine if the X window contains the index.
Definition viewshed_types.h:152
int yStop
Y end position.
Definition viewshed_types.h:122
int xStop
X end position.
Definition viewshed_types.h:120
int yStart
Y start position.
Definition viewshed_types.h:121
int clampY(int nY) const
Clamp the argument to be in the window in the Y dimension.
Definition viewshed_types.h:185
bool operator==(const Window &w2) const
Returns true when one window is equal to the other.
Definition viewshed_types.h:125
size_t size() const
Number of cells.
Definition viewshed_types.h:144
int ySize() const
Window size in the Y direction.
Definition viewshed_types.h:138
bool containsY(int nY) const
Determine if the Y window contains the index.
Definition viewshed_types.h:160
bool contains(int nX, int nY) const
Determine if the window contains the index.
Definition viewshed_types.h:169
int xSize() const
Window size in the X direction.
Definition viewshed_types.h:132