iLand
Public Slots | Public Member Functions | Static Public Member Functions | Properties | Friends | List of all members
SpatialAnalysis Class Reference

The SpatialAnalysis class is the scripting class related to extra spatial analysis functions. More...

#include <spatialanalysis.h>

Inheritance diagram for SpatialAnalysis:

Public Slots

void saveRumpleGrid (QString fileName)
 save a grid of rumple index values (resource unit level) to a ESRI grid file (ascii) More...
 
void saveCrownCoverGrid (QString fileName)
 save a grid if crown cover percentages (RU level) to a ESRI grid file (ascii) More...
 
void saveCrownCoverGrid (QString fileName, QJSValue grid)
 save a grid of crown cover with the extent/resolution given by 'grid' More...
 
QJSValue patches (QJSValue grid, int min_size)
 

Public Member Functions

 SpatialAnalysis (QObject *parent=0)
 
 ~SpatialAnalysis ()
 
double rumpleIndexFullArea ()
 retrieve the rumple index for the full landscape (one value) More...
 
QList< int > extractPatches (Grid< double > &src, int min_size, QString fileName)
 extract patches ('clumps') and save the resulting grid to 'fileName' (if not empty). More...
 
QList< int > patchsizes () const
 

Static Public Member Functions

static void addToScriptEngine ()
 
static void runCrownProjection2m (FloatGrid *agrid=nullptr)
 internal function that prepares crown cover for the whole landscape More...
 

Properties

double rumpleIndex
 
QList< int > patchsizes
 

Friends

class SpatialLayeredGrid
 

Detailed Description

The SpatialAnalysis class is the scripting class related to extra spatial analysis functions.

rumpleIndex: ratio crown surface area / ground area for the whole project area. saveRumpleGrid(): save RU-based grid of rumple indices to an ASCII grid file.

Constructor & Destructor Documentation

◆ SpatialAnalysis()

SpatialAnalysis::SpatialAnalysis ( QObject *  parent = 0)
inline

◆ ~SpatialAnalysis()

SpatialAnalysis::~SpatialAnalysis ( )

Member Function Documentation

◆ addToScriptEngine()

void SpatialAnalysis::addToScriptEngine ( )
static

◆ extractPatches()

QList< int > SpatialAnalysis::extractPatches ( Grid< double > &  src,
int  min_size,
QString  fileName 
)

extract patches ('clumps') and save the resulting grid to 'fileName' (if not empty).

extract patches (clumps) from the grid 'src'.

Returns a vector with the number of pixels for each patch-id

Patches are defined as adjacent pixels (8-neighborhood) Return: vector with number of pixels per patch (first element: patch 1, second element: patch 2, ...)

◆ patches

QJSValue SpatialAnalysis::patches ( QJSValue  grid,
int  min_size 
)
slot

◆ patchsizes()

QList< int > SpatialAnalysis::patchsizes ( ) const
inline

◆ rumpleIndexFullArea()

double SpatialAnalysis::rumpleIndexFullArea ( )

retrieve the rumple index for the full landscape (one value)

◆ runCrownProjection2m()

void SpatialAnalysis::runCrownProjection2m ( FloatGrid agrid = nullptr)
static

internal function that prepares crown cover for the whole landscape

◆ saveCrownCoverGrid [1/2]

void SpatialAnalysis::saveCrownCoverGrid ( QString  fileName)
slot

save a grid if crown cover percentages (RU level) to a ESRI grid file (ascii)

◆ saveCrownCoverGrid [2/2]

void SpatialAnalysis::saveCrownCoverGrid ( QString  fileName,
QJSValue  grid 
)
slot

save a grid of crown cover with the extent/resolution given by 'grid'

◆ saveRumpleGrid

void SpatialAnalysis::saveRumpleGrid ( QString  fileName)
slot

save a grid of rumple index values (resource unit level) to a ESRI grid file (ascii)

Friends And Related Function Documentation

◆ SpatialLayeredGrid

friend class SpatialLayeredGrid
friend

Property Documentation

◆ patchsizes

QList<int> SpatialAnalysis::patchsizes
read

◆ rumpleIndex

double SpatialAnalysis::rumpleIndex
read

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