APS

Alter pixel size


EnvironmentsPYTHON :: EASI
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples :: Related

Back to top

Description


Alters the ground pixel size (in meters) for the database file. APS works only if georeferencing units are either PIXEL or LONG/LAT. If georeferencing units are anything else (such as UTM or METER), use GEOSET to alter the pixel size.
Back to top

Parameters


aps(file, pxsz)

Name Type Caption Length Value range
FILE * str Input file name 1 -    
PXSZ * List[float] Pixel ground-size, in meters 2 - 2 Default: 1.0,1.0

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK image file to be altered.

PXSZ

Specifies the horizontal (x) and vertical (y) dimensions of one image pixel, in meters.

Setting this size to a meaningful value is important for ground area calculations (in classification, for example).

Back to top

Details

APS modifies the pixel ground size (PXSZ) for a specified image database (FILE). It overwrites the pixel size that was specified when the file was created by CIM. The pixel ground size is used for generating statistics and ground area calculations of classified data (performed by MLC and MLR).

APS alters the pixel size on a database file only if the output units for the georeferencing segment are "PIXEL" or "LONG/LAT". This avoids the possibility of inconsistency between the pixel size stored in the master header of the database file and the pixel size derived from the georeferencing segment.

There are two options for changing the pixel size in database files for which georeferencing units are "UTM" or "METER":
Back to top

Examples

Alter the ground size of the pixels in the file MSS.PIX to 30 meters in the x-direction and 40.3 meters in the y-direction, assuming that MSS.PIX has not been georeferenced.

from pci.aps import aps

file = "mss.pix"
pxsz = [30,40.3]

aps( file, pxsz )
            

Change the pixel size of the demo image file irvine.pix to 5 by 5 meters. You must run GEOSET first, to default the georeferencing transform.

from pci.geoset import geoset

file = "irvine.pix"
upleft = []
loright = []
mapunits = "PIXEL"

geoset( file, upleft, loright, mapunits )
            

Use APS to alter the pixel size.

from pci.aps import aps

file="irvine.pix"
pxsz=[5,5]

aps( file, pxsz )
            

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