6#ifndef VIEWSHED_TYPES_H_INCLUDED
7#define VIEWSHED_TYPES_H_INCLUDED
21using DatasetPtr = std::unique_ptr<GDALDataset>;
144 return static_cast<size_t>(
xSize()) *
ySize();
197inline std::ostream &operator<<(std::ostream &out,
const Window &w)
199 out <<
"Xstart/stop Ystart/stop = " << w.xStart <<
"/" << w.xStop <<
" "
200 << w.yStart <<
"/" << w.yStop;
210 LineLimits(
int leftArg,
int leftMinArg,
int rightMinArg,
int rightArg)
222inline std::ostream &operator<<(std::ostream &out,
const LineLimits &ll)
224 out <<
"Left/LeftMin RightMin/Right = " << ll.
left <<
"/" << ll.
leftMin
229constexpr int INVALID_ISECT = std::numeric_limits<int>::max();
String list class designed around our use of C "char**" string lists.
Definition cpl_string.h:454
Generates a cumulative viewshed from a matrix of observers.
Definition cumulative.h:26
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:208
int rightMin
Starting (leftmost) cell on the right side.
Definition viewshed_types.h:218
int leftMin
One past the rightmost cell on the left side.
Definition viewshed_types.h:217
int right
One past the rightmost cell on the right side.
Definition viewshed_types.h:219
int left
Starting (leftmost) cell on the left side.
Definition viewshed_types.h:216
LineLimits(int leftArg, int leftMinArg, int rightMinArg, int rightArg)
Constructor that takes the members in order.
Definition viewshed_types.h:210
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:100
double startAngle
start angle of observable range
Definition viewshed_types.h:71
double targetHeight
target height above the DEM surface
Definition viewshed_types.h:66
double outOfRangeVal
raster output value for pixels outside of max distance.
Definition viewshed_types.h:63
double highPitch
maximum pitch (vertical angle) of observable points
Definition viewshed_types.h:75
CPLStringList creationOpts
options for output raster creation
Definition viewshed_types.h:82
double curveCoeff
coefficient for atmospheric refraction
Definition viewshed_types.h:77
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:72
double lowPitch
minimum pitch (vertical angle) of observable points
Definition viewshed_types.h:73
bool lowPitchMasking() const
True if low pitch masking will occur.
Definition viewshed_types.h:94
double nodataVal
raster output value for pixels with no data
Definition viewshed_types.h:65
uint8_t numJobs
Relative number of jobs in cumulative mode.
Definition viewshed_types.h:85
std::string outputFormat
output raster format
Definition viewshed_types.h:80
OutputMode outputMode
Normal, Height from DEM or Height from ground.
Definition viewshed_types.h:78
std::string outputFilename
output raster filename
Definition viewshed_types.h:81
bool angleMasking() const
True if angle masking will occur.
Definition viewshed_types.h:88
double maxDistance
maximum distance from observer to compute value
Definition viewshed_types.h:67
double visibleVal
raster output value for visible pixels.
Definition viewshed_types.h:61
CellMode cellMode
Mode of cell height calculation.
Definition viewshed_types.h:83
int observerSpacing
Observer spacing in cumulative mode.
Definition viewshed_types.h:84
bool pitchMasking() const
True if pitch masking will occur.
Definition viewshed_types.h:106
double minDistance
minimum distance from observer to compute value.
Definition viewshed_types.h:69
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:116
void shiftX(int nShift)
Shift the X dimension by nShift.
Definition viewshed_types.h:190
int xStart
X start position.
Definition viewshed_types.h:117
int clampX(int nX) const
Clamp the argument to be in the window in the X dimension.
Definition viewshed_types.h:175
bool containsX(int nX) const
Determine if the X window contains the index.
Definition viewshed_types.h:150
int yStop
Y end position.
Definition viewshed_types.h:120
int xStop
X end position.
Definition viewshed_types.h:118
int yStart
Y start position.
Definition viewshed_types.h:119
int clampY(int nY) const
Clamp the argument to be in the window in the Y dimension.
Definition viewshed_types.h:183
bool operator==(const Window &w2) const
Returns true when one window is equal to the other.
Definition viewshed_types.h:123
size_t size() const
Number of cells.
Definition viewshed_types.h:142
int ySize() const
Window size in the Y direction.
Definition viewshed_types.h:136
bool containsY(int nY) const
Determine if the Y window contains the index.
Definition viewshed_types.h:158
bool contains(int nX, int nY) const
Determine if the window contains the index.
Definition viewshed_types.h:167
int xSize() const
Window size in the X direction.
Definition viewshed_types.h:130