Environments | PYTHON :: EASI :: MODELER |
Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
Back to top |
Back to top |
poly2pnt(fili, dbvs, filo, dbsd, ftype, foptions)
Name | Type | Caption | Length | Value range |
---|---|---|---|---|
FILI* | str | Input file name | 1 - | |
DBVS* | List[int] | Input polygon layer | 1 - 1 | |
FILO* | str | Output file name | 1 - | |
DBSD | str | Output segment description | 0 - 64 | Default: |
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 polygon vector layer to convert to a point layer.
DBVS
Specifies the polygon layer containing the vectors for which the point layer will be constructed. The input vector layer can either be whole polygons or topological polygons.
FILO
Specifies the output file name. If the specified file does not exist, it will be created automatically. If the file does exist the ouptut point layer will be appended to it.
DBSD
Specifies a descriptor for the output line segment. Descriptor may be up to 64 characters long. When nothing is specified a default description is generated.
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.
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.
For PIX format, FOPTIONS defaults to BAND.
Back to top |
POLY2PNT creates a point layer by producing an interior point for each polygon of the input layer (either a whole polygon or a topological polygon). The attributes of the polygon layer are copied to the point layer.
Back to top |
A point layer is built based on the polygon segment 31 in irvine.pix. The output point layer is saved to a new shapefile, irv31points.shp.
from pci.poly2pnt import * fili = "irvine.pix" # input polygon file dbvs = [31] # polygon layer filo = "irv31points.shp" # output file to be created dbsd = "" # use default ftype = "SHP" # output format type foptions = "" # output options poly2pnt(fili, dbvs, filo, dbsd, ftype, foptions)
© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.