GDAL
Classes | Public Types | Public Member Functions | List of all members
gdal::Viewshed Class Reference

Class to support viewshed raster generation. More...

#include <viewshed.h>

Classes

struct  Options
 Options for viewshed generation. More...
 
struct  Point
 A point. More...
 
struct  Window
 A window in a raster including pixels in [xStart, xStop) and [yStart, yStop). More...
 

Public Types

enum class  OutputMode { Normal , DEM , Ground }
 Raster output mode. More...
 
enum class  CellMode { Diagonal , Edge , Max , Min }
 Cell height calculation mode. More...
 

Public Member Functions

 Viewshed (const Options &opts)
 Constructor. More...
 
 Viewshed (const Viewshed &)=delete
 
Viewshedoperator= (const Viewshed &)=delete
 
bool run (GDALRasterBandH hBand, GDALProgressFunc pfnProgress=GDALDummyProgress, void *pProgressArg=nullptr)
 Compute the viewshed of a raster band. More...
 
std::unique_ptr< GDALDatasetoutput ()
 Fetch a pointer to the created raster band. More...
 

Detailed Description

Class to support viewshed raster generation.

Member Enumeration Documentation

◆ CellMode

Cell height calculation mode.

Enumerator
Diagonal 

Diagonal Mode.

Edge 

Edge Mode.

Max 

Maximum value produced by Diagonal and Edge mode.

Min 

Minimum value produced by Diagonal and Edge mode.

◆ OutputMode

Raster output mode.

Enumerator
Normal 

Normal output mode (visibility only)

DEM 

Output height from DEM.

Ground 

Output height from ground.

Constructor & Destructor Documentation

◆ Viewshed()

gdal::Viewshed::Viewshed ( const Options opts)
inlineexplicit

Constructor.

Parameters
optsOptions to use when calculating viewshed.

Member Function Documentation

◆ output()

std::unique_ptr<GDALDataset> gdal::Viewshed::output ( )
inline

Fetch a pointer to the created raster band.

Returns
Unique pointer to the viewshed dataset.

◆ run()

bool gdal::Viewshed::run ( GDALRasterBandH  band,
GDALProgressFunc  pfnProgress = GDALDummyProgress,
void *  pProgressArg = nullptr 
)

Compute the viewshed of a raster band.

Parameters
bandPointer to the raster band to be processed.
pfnProgressPointer to the progress function. Can be null.
pProgressArgArgument passed to the progress function
Returns
True on success, false otherwise.

The documentation for this class was generated from the following files: