CustomProcess_SetAreaOfInterest Function

Applies To: Implementing a custom process

Sets the ground coordinates of the area of interest.

[C++]

  CustomProcess_API BOOL __stdcall CustomProcess_SetAreaOfInterest(void* clientHandle,

                                                                   void* aoi);

Arguments

[in] clientHandle

Unique ID used to identify the caller.

The client handle is not supposed to be used after the cleanup function. This is generally the last function called for one particular client handle.

[in] aoi

Ground coordinates in the form of an AreaOfInterest object.

Return Value

A Boolean value signifying if the client Area Of Interest was set correctly.

Reporting errors and warnings: Any errors can be obtained by calling the GetLastError function which will give out the error message for the last error in the DLL.

Example

The following example represents a partial C++ implementation of this function:

[C++]

#include "stdafx.h"

#include "malloc.h"

#include "stdlib.h"

 

typedef struct

{

    AreaOfInterest* myAoi;

    NVM* myProcessProps;

    unsigned long myNumProps;

    CustomRasterInfo* myOutputRasterInfo;

    char errorString[2048];

    unsigned char* myOutputBuffer;

    tGetRowfn myGetRowfn;

    tGetPropertyfn myGetPropertyfn;

    tGetRasterMetadatafn myGetRasterMetadatafn;

    tCreateAuxRasterfn myCreateAuxRasterfn;

    tGetAuxRowfn myGetAuxRowfn;

}ClientHandle;

 

typedef struct

{

    double XMin;

    double XMax;

    double YMin;

    double YMax;

    unsigned long NRows;

    unsigned long NCols;

}AreaOfInterest;

 

CustomProcess_API BOOL __stdcall CustomProcess_SetAreaOfInterest(void* clientHandle,

                                                                 void* aoi)

{

    ClientHandle* myClientHandle = (ClientHandle*)clientHandle;

    myClientHandle->myAoi = (AreaOfInterest*)aoi;

    return TRUE;

}

For a detailed example on how to implement this function, see Sample custom process.

Related Topics

See also: CustomProcess_Create, CustomProcess_SetWindow, CustomProcess_Initialize, CustomProcess_GetRow, CustomProcess_GetMetadata, CustomProcess_GetLastError, CustomProcess_Cleanup, CustomProcess_SetCallbackFunctions, CustomProcessUI_Init, CustomProcessUI_ShowModalDialog, CustomProcessUI_GetUpdatedXML, CustomProcessUI_GetStatus, CustomProcessUI_GetProperty, CustomProcessUI_SetProperty, CustomProcessUIForm_GetUpdatedXML, CustomProcessUIForm_Init