DBWriteGeoInfo

Demonstrates how to write georeferencing information to a file.

Remarks

This example illustrates how to set the georeferencing units to PIXEL.

Code

  local GeoInfo gi, int tfid;
  local string temp_file
  try
    temp_file = "./my.pix"
    delete temp_file noerror
    call CopyFile( GetPCIHOME() + "/demo/irvine.pix", \
                 temp_file)

    tfid = DBOpen(temp_file, "r+")
 
    call DBReadGeoInfo( tfid, gi)
    gi.Units = "PIXEL"
    call DBWriteGeoInfo( tfid, gi )
    call DBClose( tfid )
 onerror
   print "Error: "+ GetLastErrorMessage()
 endonerror

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