ComputeOpenness Data Member Function

Computes topographics openness from an array of floating point elevation data and quantizes the results into RGB colorspace ( although only 8-bits of information are explicitly required ).

Prototype

int32 ComputeOpenness( Float32Array p_afElevationData, Int32Array p_aiParams, Float32Array p_afSpacingValues, Float32Array p_afPositiveOpenness, Float32Array p_afNegativeOpenness, Int32Array p_aiAzimuths )

Parameters

Parameter Type Parameter Name Documentation
<Float32Array>p_afElevationDataA pointer to a <Float32Array> containing the elevation data.
<Int32Array>p_aiParamsA pointer to an <Int32Array> containing the configuration parameters. This <Int32Array> must contain 3 <int32> values. 0 = the width of the elevation data in pixels, 1 = the height of the elevation data in pixels, 2 = the radius of values to include around each elevation data. Larger radii increase quality but require increased computation time. Be careful not to reverse the width and height values.
<Float32Array>p_afSpacingValuesA pointer to a <Float32Array> containing two values. The first value is the distance between elevation points on the x axis, and the second value is the distance between elevation points on the y axis. Be careful not to reverse the x and y values.
<Float32Array>p_afPositiveOpennessA pointer to a <Float32Array> that will be populated with positive openness values for each elevation sample. You can pass in a non-null zero count array and this function will allocate sufficient storage. Alternatively, you can pre-allocate enough storage if you need precise control over when memory allocation occurs.
<Float32Array>p_afNegativeOpennessA pointer to a <Float32Array> that will be populated with negative openness values for each elevation sample. You can pass in a non-null zero count array and this function will allocate sufficient storage. Alternatively, you can pre-allocate enough storage if you need precise control over when memory allocation occurs.
<Int32Array>p_aiAzimuthsA pointer to an <Int32Array> that contains the directions to use during computation. This <Int32Array> must have 8 values that are either zero or non-zero. The values correspond to the eight possible azimuths of computation: N, NE, E, SE, S, SE, W, NW. An <Int32Array> with an incorrect number of values will be formatted to compute openness using all 8 azimuths.

Examples

Copy Text To Clipboard

None published. Please look for an example in the Scenome Scripting Language code base.