Parent Topic: Examples

Grids

A file is georeferenced in UTM coordinates. As part of the final processing steps, the user wishes a grid to be superimposed on the imagery along 1000-metre intervals in both the x and y directions. The input imagery is an RGB-enhanced image on channels 1, 2, 3. The output will be to channels 7, 8, and 9.

   if (mod(@geox,1000)<=@sizex) or (mod(@geoy,1000)<=@sizey) then
      %7 = 255;   %8 = 255;   %9 = 255;
   else
      %7 = %1;    %8 = %2;    %9 = %3;
   endif;
The following model prompts the user for the spacing (in pixels) for a regular grid as well as an input and output channel.

   input 'Enter the grid spacing:   ' #s;
   input 'Enter the input  channel: ' %in;
   input 'Enter the output channel: ' %out;
   if (mod(@x,#s)=0) or (mod(@y,#s)=0) then
     %out=255;
   else
     %out=%in;
   endif;

Parent Topic: Examples
About PCI Help Gateway