DBWriteArray

Demonstrate how to write an array of data to a file.

Remarks

This example illustrates how to create a linear array of column coefficients and writes it to an array segment.

Code

  local  double column_coef[512]
  local int i, int tfid
  local string temp_file

  for i = 1 to 512
    column_coef[i] = i+1 
  endfor

  temp_file = "./my.pix"
  delete temp_file noerror
  Call CopyFile( GetPCIHOME() + "/demo/irvine.pix", \
                temp_file)

  tfid = DBOpen( temp_file, "r+" )
  call DBWriteArray( tfid, 0, column_coef, 512 )
  call DBClose( tfid )

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.