POTMAPSTAT

Convert points to raster, based on statistical techniques


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

Back to top

Description


POTMAPSTAT (potential mapping statistics) converts a vector point segment to a surface representative of a statistical model of a selected attribute, referred to as a z-value, of the points. Because an averaging technique is used, this function does not create any new values greater than the maximum value of the input data or less than the minimum value of the input data. This function considers the input point data to be a sample data set as defined by the study of statistics.
Back to top

Parameters


potmapstat(fili, filo, dbvs, dbib, dboc, samprad, maxneigh, nodatval, pixres, denstype, fldnme, datatype, statmodel)

Name Type Caption Length Value range
FILI* str Input file name 1 -    
FILO str Output file name 0 -    
DBVS* List[int] Input vector segment 1 - 1  
DBIB List[int] Input bitmap segment 0 - 1  
DBOC List[int] Output raster channel 0 - 1  
SAMPRAD* List[float] Sampling radius 1 - 1  
MAXNEIGH List[int] Maximum neighbors 0 - 1 1 -
Default: 10
NODATVAL List[float] No Data value 0 - 1 Default: 0.0
PIXRES List[float] Output pixel resolution (m) 0 - 2  
DENSTYPE str Density type 0 - 9 POINT | ATTRIBUTE
Default: POINT
FLDNME str Attribute field name 0 - 64  
DATATYPE str Output raster data type 0 - 3 8U | 16U | 16S | 32R
Default: 32R
STATMODEL str Statistical model 0 - 25 Default: Sum

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the PCIDSK file that contains the input point segment.

If the projection of the point segment is different from the projection of the output raster, each point will be reprojected to the raster projection before the calculation is performed.

FILO

Specifies the name of the PCIDSK image file to receive the raster channel from the point segment. If the output file is not specified, it will be assumed to be the same as the input file. If the specified output file exists, its projection must be the same as that of the input file.

If FILO is specified but does not already exist, a new PCIDSK file will be created. By default, the georeferencing information from FILI will be copied to the new FILO. If a specified pixel X/Y resolution is given that is different from FILI, the extents of FILO will be different.

DBVS

Specifies the vector segment that contains the points to convert.

DBIB

Specifies the bitmap segment that restricts the region to process when generating the weighted average. The results will be generated inside the bitmap segment (value 1); any pixels falling outside the bitmap (value 0) will be assigned a "No Data" value.

The bitmap also defines the georeferencing of the output raster channel, including the projection, geographic extents, and resolution of the resulting output channel.

DBOC

Specifies the output raster channel to receive converted points.

If the output file already exists, this parameter must be specified and must exist. If the output file does not exist, this parameter is ignored.

SAMPRAD

Specifies the length of the sampling radius, in meters. The sampling radius is centered on each point in the raster channel to determine which points are used in the calculation.

MAXNEIGH

Specifies the maximum number of points closest to the center of the pixel and whose radii overlap the center of the pixel to be considered in calculating an output value.

When points represent statistical data values such as population or income, the number of neighboring points should be greater than when the point data represents a non-statistical and continuous nature, such as elevation.

NODATVAL

Specifies the No Data (background) value. Any output pixels that did not receive a calculated value are assigned a No Data value and are excluded from processing. This value should fall within the allowable range for the output raster type.

If this parameter is not specified, the No Data value for each channel defaults to "0.0"

PIXRES

This parameter applies only when a new output file is created; it allows you to specify a pixel resolution or size (in meters) for the output file. By default, the pixel size is taken from the georeferencing segment of the input file. The pixel size determines the number of pixels and lines in the output file. Decreasing the pixel size results in a larger output file and increased computation time.

DENSTYPE

Specifies whether to use an attribute to generate the raster, or if the statistic is based on the number of points within the sample radius.

Available options are:

FLDNME

Specifies the attribute field name to use to generate the raster; for example, PixelValue.

If the density type (DENSTYP) parameter is 'ATTRIBUTE', this parameter must be specified.

DATATYPE

Specifies the data type for the output image channel.

Valid data types are:
Note: If the specified output channel already exists, the data type from that output channel will be used instead of the one specified here.

STATMODEL

Specifies the function to use to generate the output raster.

The potential mapping function can generate the following six statistical models:

See the Details section for more information.

Back to top

Details

This weighted-averaging technique generates a surface by applying a sampling radius to each point in the data segment. No output values are calculated for areas lying outside the sampling radius; these will be assigned a "No Data" value. The value of each raster pixel is calculated based on the value of each point whose sampling radius overlaps the center of the pixel.

You can specify the size of the sampling radius as well as the number of points closest to the center of the quad cell to be considered in the calculation of an output value Depending on the size of the radius, very different surfaces can be generated. A classification scheme can be applied to the output. This function is most appropriate for interval or ratio point data that represents a non-continuous phenomenon. Non-continuous phenomena is data typified by a high degree of variance and uneven distribution and is highly applicable to demographic and socioeconomic statistics such as population or income.

Statistical models

The potential mapping function can generate the following six statistical models:
Back to top

Example

The point layer in segment 32 from "irvine.pix" is converted to a raster layer in a new file named "oirvine.pix". The output raster channel is of type 32R, and the sampling radius used is 100m, with pixres of 30. The statistical model used for the conversion is Sum.

from pci.potmapstat import *

fili	=	"irvine.pix"
filo	=	"oirvine.pix"	# will be created if it does not exist
dbvs	=	[32]	# vector segment containing points
dbib	=	[]	# not using bitmap segment
dboc	=	[1]	# output raster channel
samprad	=	[100]	# sample radius (m)
maxneigh	=	[]	# default, 10
nodatval	=	[]	# default, 0.0
pixres	=	[30,30]	# output pixel resolution 30x30
denstype	=	""	# default, POINT
fldnme	=	""	# not used if denstype=POINT
datatype	=	'32R'	# output channel type
statmodel	=	''	# default, Sum

potmapstat( fili, filo, dbvs, dbib, dboc, samprad, maxneigh, nodatval, pixres, denstype, fldnme, datatype, statmodel )

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