Skip to main content

Feature Class Z To ASCII (3D Analyst Tools)

Summary

Exports 3D features to ASCII text files storing GENERATE, XYZ, or profile data.

Usage

  • The Profile option writes a two-column ASCII file that converts 3D line features into records which can be used to generate line graphs. Each line from the source feature class will be written to a separate file whose name is appended with the line's unique ID. Each row in the ASCII file will contain the distance from the starting position of the line to the vertex (D) followed by the elevation at that vertex. When loading the resulting ASCII file into a graphing application, the first column would be used to define the x-axis and the second column would be used to define the y-axis.

    0 z<sub>1</sub>
    D<sub>1</sub> z<sub>2</sub>
    D<sub>2</sub> z<sub>3</sub>
    D<sub>3</sub> z<sub>4</sub>
    
  • The XYZ option writes x-, y-, and z-coordinates as floating-point values, where each row represents a point record.

    x<sub>1</sub> y<sub>1</sub> z<sub>1</sub>
    x<sub>2</sub> y<sub>2</sub> z<sub>2</sub>
    x<sub>3</sub> y<sub>3</sub> z<sub>3</sub>
    x<sub>4</sub> y<sub>4</sub> z<sub>4</sub>
    
    Note:

    Point and multipoint features are written to the same file, whereas each polygon and polyline feature is written to a separate text file whose name is appended with the feature's ID. Each part of a multi-part feature is written to a separate file with its part number following the feature's ID in the file's name.

  • The GENERATE format does not support header lines, but it stores all input features in one file.

    • Point features are stored with their respective ID and XYZ coordinates, and the last line is denoted by the END keyword:

      id<sub>1</sub> x<sub>1</sub> y<sub>1</sub> z<sub>1</sub>
      id<sub>2</sub> x<sub>2</sub> y<sub>2</sub> z<sub>2</sub>
      id<sub>3</sub> x<sub>3</sub> y<sub>3</sub> z<sub>3</sub>
      id<sub>4</sub> x<sub>4</sub> y<sub>4</sub> z<sub>4</sub>END
      
      Note:

      Multipoint features that originate from the same record in the originating feature class will share the same ID.

    • Line and polygon features are separated by the END keyword, and two successive END keywords indicate the end of the file:

      id<sub>1</sub>
      x<sub>1</sub> y<sub>1</sub> z<sub>1</sub>
      x<sub>2</sub> y<sub>2</sub> z<sub>2</sub>
      x<sub>3</sub> y<sub>3</sub> z<sub>3</sub>
      x<sub>4</sub> y<sub>4</sub> z<sub>4</sub>
      END
      
      id<sub>2</sub>
      x<sub>1</sub> y<sub>1</sub> z<sub>1</sub>
      x<sub>2</sub> y<sub>2</sub> z<sub>2</sub>
      END
      
      END
      
      Note:

      The first and last XYZ coordinates for polygon features are always identical.

Parameters

Label Explanation Data type

Input Features

The 3D point, multipoint, polyline, or polygon feature class that will be exported to an ASCII file.

Feature Layer

Output Location

The folder to which output files will be written.

Folder

Output Text File

The name of the resulting ASCII file.

If a line or polygon feature class is exported to XYZ format, the file name is used as a base name. Each feature will have a unique file output, since the XYZ format only supports one line or polygon per file. Multipart features will also have each part written to a separate file. The file name will be appended with the OID of each feature, as well as any additional characters needed to make each file name unique.

String

ASCII Format

(Optional)

Specifies the format of the ASCII file being created.

  • GENERATEWrites output in the GENERATE format. This is the default.

  • XYZWrites XYZ information of input features. One file will be created for each line or polygon in the input feature.

  • ProfileWrites profile information for line features that can be used in external graphing applications.

String

Delimiter

(Optional)

Specifies the delimiter that will indicate the separation of entries in the columns of the text file table.

  • SpaceA space will be used to delimit field values. This is the default.

  • CommaA comma will be used to delimit field values. This option is not applicable if the decimal separator is also a comma.

String

Decimal Notation

(Optional)

Specifies the method that will determine the number of significant digits stored in the output files.

  • Automatically DeterminedThe number of significant digits needed to preserve the available precision, while removing unnecessary trailing zeros, is automatically determined. This is the default.

  • Specified NumberThe number of significant digits is defined in the Digits after Decimal parameter.

String

Digits after Decimal

(Optional)

The number of digits written after the decimal for floating-point values written to the output files. This parameter is used when the Decimal Notation parameter is set to Specified Number (decimal_format=FIXED in Python).

Long

Decimal Separator

(Optional)

Specifies the decimal character that will differentiate the integer of a number from its fractional part.

  • PointA point is used as the decimal character. This is the default.

  • CommaA comma is used as the decimal character.

String

Derived output

Label Explanation Data type

Updated Folder

The folder to which output files will be written.

Folder; File

Environments

Current Workspace, Extent, Output Coordinate System, Geographic Transformations

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes