RAS2PNT

Convert a raster to points


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


Generates a point location (x-coordinate and y-coordinate) for each input pixel region.
Back to top

Parameters


ras2pnt(fili, dbic, filo, dbsd, ftype, foptions)

Name Type Caption Length Value range
FILI * str Input file name 1 -    
DBIC * List[int] Input raster channel 1 - 1  
FILO * str Output file name 1 -    
DBSD str Output segment descriptor 0 - 64 Default: Point Layer
FTYPE str Output file type 0 - 4 Default: PIX
FOPTIONS str Output file options 0 - 64  

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the file that contains the input raster channel to be processed.

DBIC

Specifies the input raster channel to be processed.

FILO

Specifies the name of the file to which the new point layer will be saved. This file is created if it does not already exist.

DBSD

Specifies a descriptor for the output point segment. Descriptor may be up to 64 characters long.

The default value is "Point Layer".

FTYPE

Optionally specifies the output file format type, represented by a three- or four-letter code. The format type must be a GDB-recognized file type. If FILO specifies an existing file, FTYPE should not be specified since the existing file will be updated and its type won't be changed.

Supported file format codes include: The default value is PIX.

For a complete list of GDB-recognized file types and their codes, see GDB file formats in the Technical Reference section of the CATALYST Professional online Help.

FOPTIONS

Optionally specifies the file creation options to be applied when creating the output file. These are specific to the file format; in each case, the default of no options is allowed. FOPTIONS can be used to specify the compression schemes, file format subtypes, and other information.

Different options are available for different file types (see the FTYPE parameter). The options are described in GDB file formats in the Technical Reference section of the CATALYST Professional online Help.

Back to top

Details

RAS2PNT converts a raster to a point (vector) layer by producing an interior point for each contiguous region of equal-valued pixels within the input raster layer.

The generated coordinates are of the same projection as the input raster layer.

If the input raster has attributes those are copied to the corresponding point in the point layer. The resulting point layer will have an attribute for each pixel value. Because contiguous pixel areas will generate a single point, many points can map to the same pixel value. If only one point per pixel value is desired, use CRCENTROID.

Back to top

Example

Convert irvine.pix channel 6 to a new point layer in a new file irv6points.pix.

from pci.ras2pnt import ras2pnt

fili     = "irvine.pix"        # input raster file
dbic     = [6]                 # using channel 6 from irvine.pix
filo     = "irv6points.pix"    # output file to be created
dbsd     = ""                  # defaults to "Point Layer"
ftype    = ""                  # defaults to PIX
foptions = ""                  # output format options

ras2pnt(fili, dbic, filo, dbsd, ftype, foptions)

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