| Environments | PYTHON :: EASI |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
pnt2ras(fili, dbvs, filo, dboc, fldnme, statatt, pixres, ftype, foptions)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI * | str | Input vector file name | 1 - | |
| DBVS * | List[int] | Input point layer | 1 - 1 | |
| FILO * | str | Output file name | 1 - | |
| DBOC | List[int] | Output raster channel | 0 - 1 | |
| FLDNME | str | Attribute field name | 0 - | Default: SHAPEID |
| STATATT | str | Statistical operation to determine pixel value | 0 - | COUNT|FIRST|LAST|MAX|MAXMAG|MEAN|MIN|MODE|RANGE|STD|SUM Default: MEAN |
| PIXRES | List[float] | Pixel resolution | 0 - 2 | 0.000000000001 - |
| FTYPE | str | Output file type | 0 - 4 | Default: PIX |
| FOPTIONS | str | Output file options | 0 - 64 |
| Back to top |
FILI
Specifies the name of the file containing the point vector layer to rasterize.
DBVS
Specifies the vector segment containing the points to be converted to rasters.
FILO
Specifies the name of the file to receive the output raster.
If FILO specifies an existing file, the DBOC parameter must specify an existing channel, which will be updated. If FILO does not already exist, a new file will be created. The new file will base its georeferencing on the input point data.
DBOC
Specifies the output raster channel to receive the output results.
If the specified output file already exists, this parameter must specify an existing channel. DBOC defaults to 1 only when a new file is created.
When creating a new output channel, its bit depth is automatically determined, depending on the values to be written to the raster.
FLDNME
Specifies the name of the attribute field whose numerical values are to be used to assign values to the output raster pixels. If this parameter is specified as (z-coord), the z-coordinate of the first vertex of each vector shape is used. If the specified attribute does not exist and it is not (z-coord), the ShapeID of the vector shapes are used.
STATATT
PIXRES
This parameter applies only when a new output file is being created. It allows you to specify a pixel resolution (in units of the input vector projection) for the output file. By default, the pixel size is set to be the same as the input file. The pixel size is used to determine the number of pixels and lines in the output file. Thus, decreasing the pixel size results in a larger output file and increased computation time.
Acceptable values are: x > 0.0, y > 0.0
FTYPE
Optionally specifies the output file format type, represented by a three- or four-letter code.
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
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.
For PIX format, FOPTIONS defaults to BAND.
| Back to top |
PNT2RAS converts points in a vector layer to a raster layer. Pixels will be assigned a value based on the point, or points, that they cover. Unless the point data is particularly dense and the output pixels large, you typically end up with a sparse raster with many pixels not having a point value burned into them. The output pixel value depends on the spatial relationship between that pixel and the input points. If a pixel covers no points, then it will not be changed when writing to an existing channel or set to NoData when writing to a new output channel. Except when using STATATT=COUNT, STD or RANGE, when a pixel covers a single point, the value of that pixel will be assigned directly from the corresponding value in the FLDNME field. Finally, if a pixel covers multiple points, the value assigned to that pixel will be determined by applying the specified STATATT operation to the FLDNME values. Unless writing to an existing channel, the output channel type, or bit depth, is automatically determined.
| Back to top |
Points from irvine.pix segment 32 are converted to a raster layer. The output pixel values will be the mean of the Area attribute of the input points over each pixel. A new file to hold the raster will be created called irvine32ras.pix.
from pci.pnt2ras import pnt2ras
fili = "irvine.pix" # input file with point layer
dbvs = [32] # point layer
filo = "irvine32ras.pix" # output file to be created
dboc = [] # output channel will be created
fldnme = "Area" # use Area attribute as pixel values
statatt = "MEAN" # Take the mean of all points in each pixel
pixres = [60,60] # make 60 meter square pixels
ftype = "PIX" # output format type
foptions = "" # output format options
pnt2ras( fili, dbvs, filo, dboc, fldnme, statatt, pixres, ftype, foptions )
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.