You are on page 1of 13

Appendix A: ASCII Data File Formats Page 1 of 13

Appendix A: ASCII Data File Formats


This appendix demonstrates the file conventions, parameters, and formats of project data files used by Intergraph
photogrammetric products.

File Conventions
The following comments apply to project ASCII data files. Any keyword fields that are italicized are valid but obsolete
fields.
# ~ comment lines
#
# Conventions:
# STRING is used to specify an ascii string with no white space
# C is used to specify a printable character (non-white space)
# 1 is used to denote an integer number
# 9.9 is used to denote a decimal number
# [] is used to specify optional fields
# {} is used to denote that contents may appear any number of times
# (including 0 times)
# "" is used to specify exactly what is inside the quotes
#
# ( | ) is used to denote that exactly 1 of these is required (more than
# 2 choices may exist)
#
# . Any number of the above line may be present. This will usually
# . be followed by a copy of the original line.
#
#

Project File
The Project file contains setup information for the orientation process.
# **************************************************************************
# PROJECT FILE
# **************************************************************************
#
# Notes:
# This file follows a general block format, roughly described by the
# following rules:
# (1) All data appears in "blocks," which consist of a
# "begin blockname" line, an "end blockname" line, and
# intervening lines possibly containing data.
# (2) Comment lines (those beginning with a #) and blank lines may
# appear anywhere and are ignored.
# (3) Within a line any sequence of spaces and tabs is a separator
# equivalent to a single space.
# (4) Case is ignored throughout; in particular, keyword matching
# is case-insensitive.
#

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 2 of 13

# One type of block may appear in this file; the blockname is


# "project_parameters". There can be only one block of
# project_parameters in this file.
#
# Special Note:
# The CAMERA and CONTROL files can also be contained within this file.
# **************************************************************************
# PROJECT_PARAMETERS are project parameters that may be needed or used
# to define project-wise processing.
# **************************************************************************
begin project_parameters STRING
# STRING is the project id
# The version that wrote this file
version: STRING
# file type defining the project as ascii or binary files
file_type: ("ascii"|"binary")
# flying_height: (> 0) in project linear_units
# This value is used for approximation of the single photo resection for
# aerial projects and also for atmospheric refraction in Relative
# Orientation.
flying_height: 9.9
# average_elev_grnd: in project linear_units
average_elev_grnd: 9.9
# The earth's approximate radius in project linear_units (used for
# earth curvature correction.
earth_radius: 9.9
# flags for atmospheric refraction and earth curvature
# default is off
atmospheric_flag: ("off"|"on")
curvature_flag: ("off"|"on")
# std_dev_meas: (> 0) microns. default is 3
std_dev_meas: 9.9
# type_of_imagery: default is aerial
type_of_imagery: ("aerial"|"terrestrial"|"multi-sensor")
# coordinate system type
coordinate_type: STRING ("geographic"|"xyz")
# max iteration: (> 0) default is 5
io_max_iterations: 1
eo_max_iterations: 1
# change in variance tolerance test (0 to 1, default to 0.80)
io_dvar_tolerance: 9.9
eo_dvar_tolerance: 9.9
# apply variance test for Interior and/or exterior orientations?
io_variance_test: ("on"|"off")
eo_variance_test: ("on"|"off")
# Maximum acceptable values for each orientation. If the computed

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 3 of 13

# values in the orientation exceed this value, warn user.


io_max_sigma: 9.9
io_max_residual: 9.9
ro_max_sigma: 9.9
ro_max_parallax: 9.9
eo_max_sigma: 9.9
# X, Y, Z
eo_max_residuals: 9.9 9.9 9.9
eo_max_rms: 9.9 9.9 9.9
# camera station position tolerances
camera_XYZ_tolerances: 9.9 9.9 9.9
# and attitude tolerances (omega, phi, kappa) both in project units
# defaults are 0.001
camera_att_tolerances: 9.9 9.9 9.9
# ground position tolerances
# defaults are 0.001
ground_XYZ_tolerances: 9.9 9.9 9.9
report_lock: ("on"|"off")
overwrite_reports: ("on"|"off")
# water refraction data; default is off
# ref_index_water: (> 0) default is 1.34
# water_surf_above_msl: default is 0
# chart_datum_above_msl: default is 0
under_water_ref: ("on"|"off")
ref_index_water: 9.9
water_surf_above_msl: 9.9
chart_datum_above_msl: 9.9
# point symbol size in screen pixels
point_size: 1
# point colors (integers from 0 to 15 inclusive)
# point highlight color; default is 4 (YELLOW)
highlight_color: 1
# point measured color; default is 8 (GREEN)
measured_color: 1
# other point colors; default is 9 (RED)
other_color: 1
# global_origin: (X Y Z) defaults are 0 (obsolete)
global_origin: 9.9 9.9 9.9
# report_lock: (on or off) default is off
report_lock: ("on"|"off")
# auto_save: (0 = off, > 0 is number of minutes to next auto save)
# default is 0
# new point ids.
point_id_mask: STRING
# user_point_pad1: this is the character to appear between the photo & strip
# ids in user point ids

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 4 of 13

user_point_pad1: C
# any number of user points are allowed
# if x,y values exceed absolute value of 1.0 for any value then it is assumed
# that the values are in mm. If the values are between 0 and 1.0, inclusive,
# then they are assumed to be percentages of the film format (or image format,
# as appropriate).
user_point: STRING 9.9 9.9
.
.
user_point: STRING 9.9 9.9
end project_parameters

Camera File
The Camera file contains camera information for the orientation processes.
# **************************************************************************
# CAMERA FILE
# **************************************************************************
#
# Notes:
# This file follows a general block format, roughly described by the
# following rules:
# (1) All data appears in "blocks," which consist of a
# (4) Case is ignored throughout; in particular, keyword matching
# is case-insensitive.
#
# One type of block may appear in this file; the blockname is
# "camera_parameters". There can be any number of blocks of
# camera_parameters (one for each camera).
# for processing any photo information.
# *************************************************************************
begin camera_parameters STRING
#Note: If camera id is not specified, a numeric id will be assigned by default.
# the version that wrote this file
version: STRING
# focal_length: (> 0) in mm
focal_length: 9.9
# principle point of auto-collimation: (x y) in mm. default is 0 0
ppac: 9.9 9.9
# principle point of best-symmetry: (x y) in mm. default is 0 0
ppbs: 9.9 9.9
# film_format: (x y; > 0) in mm. default is 230 230
film_format: 9.9 9.9
# film_format_scale: (>0) default is 1
film_format_scale: 9.9
# fiducial: (id x y in mm); list until done
fiducial: STRING 9.9 9.9

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 5 of 13

.
.
fiducial: STRING 9.9 9.9
# reseau: (id x y in mm); list until done
reseau: STRING 9.9 9.9
.
.
reseau: STRING 9.9 9.9
# lens_distortion_flag: default is off
lens_distortion_flag: ("off" | "on")
# Note: Lens distortion is computed as defined in the Manual of Photogrammetry.
# input_mode: (default is linear)
input_mode: ("linear" | "angular")
# distortion_spacing: (> 0) in mm or degrees (spacing for distortion table)
# single value for even increment or list for each increment
#Note:an illegal distortion_spacing will result with the lens_distortion_flag
# being turned off automatically with no warning.
distortion_spacing: 9.9 {9.9}
#Note: Concerning the below values/keywords. The precedence used here is:
# distortions, quad1-4, coeffs, and finally coeffs_quad1-4
# distortions: (list of distortions at distortion_spacing) in microns
# list can be continued to several lines
distortions: 9.9 {9.9}
.
.
distortions: 9.9 {9.9}
# quad1-4 are same as distortions but allows quadrant-wise distortion
# corrections.
quad1: 9.9 {9.9}
.
.
quad1: 9.9 {9.9}
quad2: 9.9 {9.9}
.
.
quad2: 9.9 {9.9}
quad3: 9.9 {9.9}
.
.
quad3: 9.9 {9.9}
quad4: 9.9 {9.9}
.
.
quad4: 9.9 {9.9}
# coeffs: k1 k2 k3 (real values) for sym. lens distortion
coeffs: 9.9 9.9 9.9

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 6 of 13

# coeffs_quad1-4: k1 k2 k3 (real values) for lens distortion by quad


coeffs_quad1: 9.9 9.9 9.9
coeffs_quad2: 9.9 9.9 9.9
coeffs_quad3: 9.9 9.9 9.9
coeffs_quad4: 9.9 9.9 9.9
# tangential lens distortion coefficients (P1, P2)
tangential_coeffs: 9.9 9.9
# Does this camera require an interior orientation be performed?
IO_required: ("yes"|"no")
# Define the camera type.
camera_type: ("frame"|"spot"|"landsat"|"map"|"ortho"|"unknown")
# Define the original input media type.
media_type: ("digital"|"film")
# pixel_size: x pixel size y pixel size
pixel_size: 9.9 9.9
end camera_parameters

Photo File
The Photo file contains the results of photo-specific processing, such as point measurements and photo parameters.
# **************************************************************************
# PHOTO FILE
# **************************************************************************
# Description: This file follows the same general block format rules
# as the PROJECT file. In this case there are two
# block types as indicated below, each of which may
# be repeated any number of times in any order.
#
# A new block type, coincidentally named "block", has been
# added to the end of the PHOTO file to define which photos
# are contained within which block. A block can contain
# 0 photos; blocks can also contain photos which are
# also contained within other blocks.
begin photo_measurements STRING [stripid STRING] [version STRING]
# where the first string is the photo id and the second is the strip id.
# Note: photoid & stripid may not contain the tilde character (~).
# id x-raw-coords y-raw-coords [x-refined-coords y-refined-coords status]
# point status: 1=measured, 2 = withheld
STRING 9.9 9.9 [9.9 9.9 1]
.
.
STRING 9.9 9.9 [9.9 9.9 1]
# Note: If version is 2.0 or greater, then the format is as follows:
# id x-raw-coords y-raw-coords [x-refined-coords y-refined-coords status tag]
# point status: 1=measured, 2 = withheld
# tag: any integer.
STRING 9.9 9.9 [9.9 9.9 1 234]

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 7 of 13

end photo_measurements
begin photo_parameters STRING [stripid STRING]
# where the first string is the photo id and the second is the strip id.
# Note: photoid & stripid may not contain the tilde character (~).
# the version that wrote this file
version: STRING
# the camera_name must be in the project list of cameras. If not supplied,
# the most recently used camera is used as default. If the camera_name
# is not in the project list of cameras, this photo is not loaded.
camera_name: STRING
# camera_orientation has a default of 0, or the most recently assigned
# value. It can be entered by quadrant or degrees.
camera_orientation: ( ("1"|"0") | ("2"|"90") | ("3"|"180") | ("4"| "270") )
# The raster image file name and directory as d:\images\image.tif
# If a single file use image_id only, otherwise use the others as well.
image_id: STRING
green_id: STRING
blue_id: STRING
# The viewing geometry of this photo as oblique or nadir.
view_geometry: STRING ("oblique" | "nadir")
# io_to_full_image is a list of affine IO parameters for ??????????
io_to_full_image: 9.9 9.9 9.9 9.9 9.9 9.9
# io_to_full_image: a0 b0 a1 a2 b1 b2
# |col| |a1 a2| |x| |a0|
# | | = | | * | | + | |
# |row| |b1 b2| |y| |b0|
# or col = a1 * x + a2 * y + a0
# row = b1 * x + b2 * y + b0
# The default standard deviation of measurement for this photo. Optional.
std_dev: 9.9 (>0)
# type_of_IO is an ascii definition of the type of IO used.
type_of_IO: ("RIGID_BODY" | "CONFORMAL" | "AFFINE" | "PROJECTIVE")
# IO_parameters is a list of IO parameters dependent upon the type_of_IO.
# 6 parameters for CONFORMAL, AFFINE, RIGID_BODY
# 8 parameters for PROJECTIVE
IO_parameters: 9.9 9.9 9.9 9.9 9.9 9.9 [9.9 9.9]
# If not PROJECTIVE
# IO_parameters: a0 b0 a1 a2 b1 b2
# |col| |a1 a2| |x| |a0|
# | | = | | * | | + | |
# |row| |b1 b2| |y| |b0|
# or col = a1 * x + a2 * y + a0
# row = b1 * x + b2 * y + b0
# If PROJECTIVE
# IO_parameters: a0 a1 a2 b0 b1 b2 c0 c1
# den = 1.0 + c0 * x + c1 * y

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 8 of 13

# col = (a0 + a1 * x + a2 * y) / den


# row = (b0 + b1 * x + b2 * y) / den
IO_num_iters: 1
IO_num_DOF: 1
IO_apost_std_dev: 9.9
# fiducial_msmt: id x-pixel y-pixel x-residual y-residual x-stdz-residual
# y-stdz-residual status
# note: x = column, y = row
fiducial_msmt: STRING 9.9 9.9 [9.9 9.9 9.9 9.9] [1]
.
.
fiducial_msmt: STRING 9.9 9.9 [1]
# If using GIVEN, then the GIVEN_std_devs are assumed to be -1 (free)
# unless otherwise specified. If the GIVEN_std_devs are supplied, any
# negative value may be supplied to indicate that the parameter is not
# known.
# The order of the standard EO values is as such:
# XC YC ZC OMEGA PHI KAPPA, all in project units.
# Omega about X-ground, Phi (once rotated) about Y-ground, and
# Kappa (twice rotated) about Z-ground.
RO_parameters: 9.9 9.9 9.9 9.9 9.9 9.9
EO_parameters: 9.9 9.9 9.9 9.9 9.9 9.9
GIVEN_parameters: 9.9 9.9 9.9 9.9 9.9 9.9
GIVEN_std_devs: 9.9 9.9 9.9 9.9 9.9 9.9
# | c2*c3 -c2*s3 s2 |
# Note: R = | s1*s2*c3+s3*c1 -s1*s2*s3+c3*c1 -s1*c2 |
# |-c1*s2*c3+s3*s1 c1*s2*s3+c3*s1 c1*c2 |
#
# R is the 3x3 rotation matrix from photo to ground
#
# where s = sine and c = cosine and
# 1 = omega, 2 = phi, 3 = kappa
#
# So if we let M = R-transpose then
# | m11 m12 m13 |
# where M = | m21 m22 m23 |
# | m31 m32 m33 |
# m11 * dx + m12 * dy + m13 * dz
# x = -f ------------------------------
# m31 * dx + m32 * dy + m33 * dz
# m21 * dx + m22 * dy + m23 * dz
# y = -f ------------------------------
# m31 * dx + m32 * dy + m33 * dz
# where dx = X - XC, dy = Y - YC, and dz = Z - ZC
# FOOTPRINT: x,y; x,y; x,y; x,y
FOOTPRINT: { 9.9[,] 9.9[;] }

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 9 of 13

DRIVE_TYPE: ("COLLINEARITY"|"2D"|"RATIONAL_FUNCTION")
# DRIVE_PARAMETERS: (up to 90 doubles on multiple lines)
# if DRIVE_TYPE is COLLINEARITY
# the parameter order is the same as for GIVEN_PARAMETERS.
# if DRIVE_TYPE is RATIONAL_FUNCTION
# [0..19] = coefficients for the x-numerator
# [20..39] = coefficients for the x-denominator
# [40..41] = coefficients (scale and offset) for x
# [42..61] = coefficients for the y-numerator
# [62..81] = coefficients for the y-denominator
# [82..83] = coefficients (scale and offset) for y
# [84..89] = coefficients for X,Y,Z ground scales and offsets
DRIVE_PARAMETERS: 9.9 {9.9}<=MAX_89
# The computed EO standard deviations from a bundle adjustment.
# These are not to be confused with the GIVEN_STD_DEVS.
COMPUTED_std_devs:
# The location of the raw image-object grid file.
raw_grid: STRING
# The location of the rational function parameter file.
rf_bitmap: STRING
# The shift, in pixels, in the image-object grid file from 0,0 pixel center.
shift_in_grid: 9.9
# The image size (columns, rows)
image_size: 1 1
# The design file location
dgn_file: STRING
# A description of the photo
description: STRING
end photo_parameters
begin block STRING
# where the STRING is the block id.
STRING [strip_id STRING]
# where the first string is the photo id and the second string is the strip id.
end block

Model File
The Model file contains the results of model-specific processing. It follows the same general block format rules as the
Project file.
begin model STRING
# The version that wrote this file
version: STRING
# The left and right photo making this model.
# The format is as stripId~photoId.
left_photo: STRING
right_photo: STRING
# This approach can be used instead of the one above.

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 10 of 13

left_strip: : STRING
left_photo: : STRING
right_strip: : STRING
right_photo: : STRING
# These are locations of the epipolar resampled images. Optional
left_image: STRING
left_green_image: STRING
left_blue_image: STRING
right_image: STRING
right_green_image: STRING
right_blue_image: STRING
# the EO to use for stereo
eo_to_use: ("RO" | "AO" | "GIVEN")
# flags
atmospheric_flag: ("on"|"off")
earth_curve_flag: ("on"|"off")
left_lens_flag: ("on"|"off")
right_lens_flag: ("on"|"off")
# area of interest data
# These are the coordinates of the aoi on each image.
# left_aoi: x1 y1 x2 y2.
# The coordinates are in microns in the raw image space.
left_aoi: 1 1 1 1
right_aoi: 1 1 1 1
# For the definition of the EO parameters, see the PHOTO file specification.
# RO data
RO_parametersL: 9.9 9.9 9.9 9.9 9.9 9.9
RO_parametersR: 9.9 9.9 9.9 9.9 9.9 9.9
RO_num_iters: 1
RO_num_DOF: 1
RO_sum_red: 9.9
RO_apost_std_dev: 9.9
# RO_obs: id status mode VxyL VxyR SVxyL SVxyR py r
# point status: 1 = measured, 2 = withheld
# Where VxyL, VxyR, SVxyL, SVxyR, are all pairs of coordinates.
RO_obs: STRING 1 1 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9
.
.
RO_obs: STRING 1 1 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9
# AO data (scale, X,Y,Z, omega, phi, kappa)
AO_parameters: 9.9 9.9 9.9 9.9 9.9 9.9 9.9
AO_parametersL: 9.9 9.9 9.9 9.9 9.9 9.9
AO_parametersR: 9.9 9.9 9.9 9.9 9.9 9.9
AO_num_iters: 1
AO_num_DOF: 1
AO_sum_red: 9.9

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 11 of 13

AO_apost_std_dev: 9.9
# AO_rms: control X,Y,Z,XY; check X,Y,Z,XY
AO_rms: 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9
# AO_obs: id status mode class type xyz rXYZ VXYZ SVXYZ AXYZ
# point status: 1 = measured, 2 = withheld
# Where xyz, rXYZ, VXYZ, SVXYZ, AXYZ, are all triplets of coordinates.
AO_obs: STRING 1 1 1 1 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9
.
.
AO_obs: STRING 1 1 1 1 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9
# GIVEN data
GIVEN_parametersL: 9.9 9.9 9.9 9.9 9.9 9.9
GIVEN_parametersR: 9.9 9.9 9.9 9.9 9.9 9.9
# Real-time math model data
RTMM_io_parametersl: 9.9 9.9 9.9 9.9 9.9 9.9
RTMM_io_parametersr: 9.9 9.9 9.9 9.9 9.9 9.9
RTMM_type: ("COLLINEARITY"|"3RD_ORDER_RF")
# RTMM_eo_parametersl: (up to 90 doubles on multiple lines)
RTMM_eo_parametersl: 9.9 {9.9}<-MAX_89
# RTMM_eo_parametersr: (up to 90 doubles on multiple lines)
RTMM_eo_parametersr: 9.9 {9.9}<-MAX_89
RTMM_hhc_type: ("MATRIX")
# RTMM_hhc_parameters: (9 doubles)
RTMM_hhc_parameters: 9.9 {9.9}<-MAX_9
# stereo_point: x,y,z
stereo_point: 9.9[,] 9.9[,] 9.9
# The left and right image-object grid file location if using rational functions.
left_grid: STRING
right_grid: STRING
# The left and right rational function bitmap file locations.
left_rf_bitmap: STRING
right_rf_bitmap: STRING
# The pixel size in ground units for the stereo model, if using rational
# functions.
pixel_scale: 9.9
# The primary and secondary projection definitions as defined in the
# design files specified here.
primary_projection: STRING
secondary_projection: STRING
end model

Control File
The Control file contains setup information for the orientation processes.
# Notes:
# This file follows a general block format, roughly described by the
# following rules:

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 12 of 13

# (1) All data appears in "blocks," which consist of a


# "begin blockname" line, an "end blockname" line, and
# intervening lines possibly containing data.
# (2) Comment lines (those beginning with a #) and blank lines may
# appear anywhere and are ignored.
# (3) Within a line any sequence of spaces and tabs is a separator
# equivalent to a single space.
# (4) Case is ignored throughout; in particular, keyword matching
# is case-insensitive.
#
# One type of block may appear in this file; the blockname is
# "control_points". There can be any number of blocks of
# control_points (allowing various types of control points to go
# in separate blocks).
# **************************************************************************
# CONTROL_POINTS is the list of control points needed for processing
# during orientations.
# **************************************************************************
#
# Set the defaults for this block of control points
# /sx=(std dev X), /sy=(std dev Y), /sz=(std dev Z),
# /pc=(point class:Z,XY,XYZ), /pt=(point type: CONTROL, CHECK),
# /desc=(ascii text point description)
#
# Note that desc, if used, must be the last field on the line.
#
# On any given control point the defaults can be overridden.
# The '/' and the '=' are optional. If a default value is not given
# then each line must contain that value.
begin control_points version STRING /sx=9.9 /sy=9.9 /sz=9.9 /pc=("XYZ"|"XY"|"Z"
or any combination of X, Y, Z) /pt=("CONTROL"|"CHECK")
# list each point: id x y z [overrides]
STRING 9.9 9.9 9.9 [/sx=9.9] [/sy=9.9] [/sz=9.9] [/pc=("XYZ"|"XY"|"Z")]
[/pt=("CONTROL"|"CHECK")] [/desc=STRING]
.
.
STRING 9.9 9.9 9.9 [/sx=9.9] [/sy=9.9] [/sz=9.9] [/pc=("XYZ"|"XY"|"Z")]
[/pt=("CONTROL"|"CHECK")] [/desc=STRING]
end control_points

Triang File
The Triang file contains the result of triangulation and will not exist after densification.
# point
# point: id xyz covariance matrix
point: STRING 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9
.

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023
Appendix A: ASCII Data File Formats Page 13 of 13

.
point: STRING 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9 9.9

file:///C:/Users/User/AppData/Local/Temp/~hh51EB.htm 15-03-2023

You might also like