VREAD

Read vector data from text file


EnvironmentsPYTHON :: EASI :: MODELER
Batch ModeYes
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Related

Back to top

Description


Reads vector (line and point) data from a text file to a new PCIDSK file vector layer.
Note: Use FIMPORT to read interchange formats generated by many third-party GIS software programs.
Back to top

Parameters


Name Type Length Value range
Input Vector File Name * String 1 -    
Vector Units String 0 - 1 PIXEL | UTM | METER | LONG/LAT
Default: PIXEL
Output Vector Layer: Output vector segment * Vector port 1 -    
Vector Layer Name String 0 -   Default: VREAD
Vector Layer Description String 0 -    

* Required parameter
Back to top

Parameter descriptions

Input Vector File Name

Specifies the name of the text file on disk, from which the vector data values are read.

See 'Formats' in the Details section for information about the layout of vector and point data in the file.

Vector Units

Specifies the type of units in which the vector coordinates are stored. This defines the range and accuracy for coordinates, and ensures that vector segments with different units cannot be merged. VECUNIT cannot specify a map projection (except UTM).

Supported units are:

If LONG/LAT is specified, longitude and latitude may be entered either as real numbers, or as degrees, minutes, seconds, and hemisphere with NO BLANKS OR COMMAS between the d, ' and " symbols, as follows:

-DDD.DDDDD	| decimal degrees (with/without sign)
DDdMM'SS.SS"H	| d ' " symbols are separators (no blanks/commas)

For example: -15.5005 longitude can be specified as 15d30'1.8"W

VECUNIT can specify the UTM grid zone number and row, and Earth model, as follows:

"UTM mm r Ennn"
where:

For more information about how to specify VECUNIT, as well as a list of supported Earth models, refer to "Projections and Earth models" in the Technical Reference section of the Online Help.

PIXEL coordinates have a range of (+ or -) 2097151 and a resolution rounded to the thousandth.

UTM and METRE coordinates handle 0 to 10,000,000 metres N (or E) and have a resolution rounded to the nearest cm.

LONG/LAT coordinates have a range of (+ or -) 180 degrees and a resolution rounded to 2.5 cm at the equator.

Output Vector Layer: Output vector segment

Specifies the vector segment to receive the output vector data.

Vector Layer Name

Specifies a name (up to 8 characters) for the output segment.

If this parameter is not specified, the default segment name "VREAD" is used.

Vector Layer Description

Optionally describes (in up to 64 characters) the contents or origins of the output data.

Back to top

Details

VREAD reads vector information (points and/or lines) of the following format from a user-generated text file. The contents and form of this file are defined in the 'Formats' section below.

When VREAD runs, the contents of the text file (FILV) are read and a new vector segment (Type VEC:116) is created in the PCIDSK file (FILE) to hold the information. The coordinates of the created vector are in units specified by VECUNIT (Vector Units). The created vector segment is given a defined segment name (DBSN) and, optionally, a description (DBSD).

If a text file generated by a third-party software product is to be read, use FIMPORT instead. For a list of supported formats, see "GDB file formats" in the Technical Reference section of the Online Help. For ISIF format, use VECREAD.

Formats

The vector and point information in the text file must have the following form:

   Structure Type       Attribute Value (optional)
   X-Coordinate         Y-Coordinate
   X-Coordinate         Y-Coordinate
   ...
where:

Fields are separated by one or more blanks, one or more tabs, and/or one comma.

For example:

 LINE,0
 428720    3734400
 444080.0  3734400
 444080,   3719040.0
 428720.0, 3719040.0
 428720,   3734400
 POINT 128
 436400.5  3726720

If VECUNIT is set to "LONG/LAT", coordinates may be specified either as real values, or as degrees, minutes, seconds and hemisphere separated by d, ', and " symbols with no blanks in between the symbols. For example:

117d36'10.04"W     or     33.749014

Up to 200 characters per text record may be used for text files. Each field within a text file can have up to 16 characters and is separated by one or more spaces and/or one comma.

A second special format is supported for point information. This has the following layout:

 X-Coordinate Y-Coordinate  Attribute ... Attribute
 X-Coordinate Y-Coordinate  Attribute ... Attribute
 X-Coordinate Y-Coordinate  Attribute ... Attribute
 . . .

In every input line, the third argument is treated as an attribute, and, if numeric, is also assigned to the Z coordinate.

For example:

 433567.0  373400.0   546 1.0 Village
 434000.0  373500.0   456 2.0 Town
 . . .

creates vertices:

 X = 433567.0  Y = 373400.0   Z = 546
    Attributes Integer1 = 546   Real2 = 1.0 String3 = Village
 X = 434000.0  Y = 373500.0   Z = 456
    Attributes Integer1 = 456   Real2 = 2.0 String3 = Town
  . . .

This format is automatically assumed if the first line of the file does not contain the word LINE or POINT, which would mean the first format is being used. This second special format is supported because it is more commonly used for elevation and other data sets. Attribute data can be read in integer, real, or alphanumeric form. The attribute name is derived from the attribute's type and number; for example, "Integer1", "Real2", "String3".

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