SetGeoInfoParm

Demonstrates how to set the geoinfo parameter of a file.

Remarks

This example illustrates how to read the geoinfo from an existing file, then changing the geoinfo parameters and writing it back to the file.

Code

 local integer tfid
 local geoinfo gi, geoinfo giout 
 local string Parm
 local integer Success
 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, giout)      
    Parm = GetGeoInfoParm(giout)
    success = SetGeoInfoParm( giout.units, Parm, gi)
    call DBClose(tfid)
    print "Parameter string ", Parm
    print "Map Units:", gi.Units
 onerror
   print "Error: "+ GetLastErrorMessage()
 endonerror

Output

 Parameter string 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
 Map Units:UTM     11S    E000

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