Parent Topic: Data File Manipulation

Read GCP Text File

The ``Read GCP Text File'' panel is used to read GCPs from a text file with a user described format. It can be launched from the File menu of the GCP Selection and Editing panel of GCPWorks, or the primary File menu of OrthoEngine.

The general idea of the panel is for the user to select a text file containing GCPs, enter a format string to parse the file with, and examine the extracted GCPs to see if they are what was expected. The user can also set the projection of the GCPs.

At the top of the panel the user can type in the name of the text file to work with, or launch a file selector by pressing the Select button. As soon as a file is successfully selected the contents of the file will be displayed for user review in the list box titled Example Lines from GCP Text File.

Once a file has been selected, the user should enter a format string in the Format Description field which describes how to parse the GCP file. Further information about format strings follows in a subtopic. The format string may be entered directly in the text field, or selected from the list of example format strings to its right.

Once a format string has been entered or selected it is necessary to press the Apply Format button in order to perform a test parsing. The contents of the GCP text file will be parsed with the format string, and the extracted GCPs will be displayed for review in the GCPs Extracted from Text File list box.

The extracted GCPs will always display all the GCP fields, even those that were not extracted from the source file. They are displayed with the GCP Id, image pixel, image line, georef easting, georef northing and elevation.

The View/Edit Projections button can be used to define the georeferencing system of the GCPs being read so that the application can reproject them if necessary.

Formats
The format string, or ``Format Description'' field on the Read and Write GCP Text File panels is used to enter a symbolic representation of the GCP file format. Each character in the format string represents a field in the text file to be read or written.

There are currently seven different field types supported, of which X and Y are required.

The input lines from the text file are split into fields based on white space (spaces and tabs) as well as commas. If a line contains text in double quotes the text in double quotes will be considered all part of one field. Each GCP must appear on its own line in the text file.

Examples:

 1,17000, 12000                -> 3 fields: "1", "17000", "12000"
 1 17000 12000                 -> 3 fields: "1", "17000", "12000"
 Pig Farm   17000 12000        -> 4 fields: "Pig", "Farm", "17000", "12000"
 1 17000m 12000m               -> 3 fields: "1", "17000m", "12000m"
 1 17000 m 12000 m             -> 5 fields: "1", "17000", "m", "12000", "m"
 "Pig Farm" 17000 12000        -> 3 fields: "Pig Farm", "17000", "12000"
The numeric values can be integral (123), decimal (123.456), or exponential (1.234+E05). Numeric fields may have alphabetic text at the end of the field which will be ignored. Lat/long values must appear in decimal degrees (123.5) rather than DMS form (123 30 00).

Text lines that can't be parsed according to the entered format string will be ignored. For a line to match a format string it must have exactly the right number of fields for the format string. The number of ignored lines will be reported if it is greater than zero.

Example lines:

  1     76    90  430915.00000 3731875.00000
  2    140   117  432995.00000 3730885.00000
In the above example lines there are five fields. The first is a GCP identification number, the second is the pixel offset in the image, the third is the line offset, the fourth is the UTM easting value and the last is the UTM northing value. For this we would use a format string of "IPLXY".

Example lines:

  1    M   76    90  71.753326N 16.189745W   117.3
  2    H  140   117  71.751354N 16.188130W   140.9
In the above example lines we have seven fields. The second field is a confidence value, but we can't use this so we use a field value of ``D'' to indicate a dummy field at this location. The fifth field is a latitude expressed in decimal degrees, followed by a longitude in decimal degrees. The last item on the line is an elevation in metres.

We use a format string of "IDPLYXE". Because the latitude (north/south) value comes before the longitude (east/west), we have to put YX instead of the more common XY. The `N' and `W' indicators after the lat/long values are ignored so we will have to go in later and add a negative sign to all the longitudes to express the fact that they are west (negative).

 Example lines:
  RH00107   4.309150+E05   3.731875+E06
  RH00108   4.329950+E05   3.730885+E06
In the above example lines an alpha numeric identifier is given with the easting and northing values in exponential format. In OrthoEngine we would use a format string of "IXY" for this, while in GCPWorks we would have to use a format string of "DXY" as OrthoEngine supports alphanumeric GCP Ids and GCPWorks does not. The user will have to interactively set the image location for these GCPs before they will actually be useful, and without meaningful GCP Id's in GCPWorks this will be difficult.


Parent Topic: Data File Manipulation
About PCI Help Gateway