Concord is a program to convert coordinates between the various coordinate systems. It is designed primarily to convert coordinates in data files, but can also be used to convert manually entered coordinates. The program supports conversions which involve projections (Transverse and equatorial Mercator, Polar stereographic, Lambert Conformal Conic, New Zealand Map Grid), and changes of geodetic reference frame (e.g. WGS84 to NZGD49). It also can convert between ellipsoidal and orthometric heights (the accuracy of this is limited by the geoid model used - errors of up to 1 metre are typical).
Coordinate systems used by concord are defined in a file called coordsys.def in the configuration directory used by concord (the config/coordsys subdirectory of the program directory). For each coordinate system this specifies the reference frame, ellipsoid, and projection that is used. This is a simple text file and can be readily edited to include additional coordinate systems.
The coordinate system file also defines vertical datums that may be used to define height coordinates. These are either geoid surfaces, or local vertical datum surfaces defined as offsets from the geoid surface.
Conversions between ellipsoidal and orthometric height are done by defining the vertical datum to use with the coordinate system, for example NZGD2000/NZVD2016.
Alternatively orthometric heights may be defined by directly defining a geoid file and specifying a height type of orthometric heights. The geoid is selected using a geoid model specified with the -g parameter. For converting New Zealand points the nzgeoid2016 model is recommended (-g nzgeoid2016). If overseas points are being converted then the global model EGM96 from NASA and NIMA (http://cddis.gsfc.gov/926/egm96/egm96.html) will need to be used (-g egm96).
The syntax for running concord is one of:
concord
to run an interactive session, or
concord [options] [input_file_name] [output_file_name]
to convert coordinates in a file, or
concord -l coordsys_code ...
to list the available coordinate systems (if no code is supplied) or to describe one or more coordinates systems.
concord -v
to list the available vertical datums.
The two parameters that can be specified are:
|
input_file_name |
Specifies the name of the input file of coordinates. This parameter may only be supplied if the -k option (see below) is not present. If it is not specified input is taken from the standard input channel. A file name of - is equivalent to the standard input channel. The required format of an input file is defined below. |
|
output_file_name |
Defines where output is to be directed. If no output file is specified, or if the file name is - then output is directed to the standard output stream. If a file is specified, then a summary of the processing is sent to the standard output stream. |
The command line options that can be specified are:
|
-i xxxx |
Defines the input coordinate system to be xxxx. The format for the code is described below. |
|
-o xxxx |
Defines the output coordinate system. The code xxxx is described below. |
|
-y yyyymmdd or -Yyyyy.y |
Defines the date at which the transformation is to be applied. This is relevant for conversions between coordinate systems that involve a deformation model, or for which the reference frames have a time dependent transformation. The date can be entered as year, month, and day, or as a decimal year (for example 20120513 or 2012.43). |
|
-n or -n### |
If the -n option is present then the input coordinates are assumed to be preceded by a point identifier. The option can specify the maximum number of characters in the identifier (the default is 10 characters). |
|
-p # or -p #:# |
Defines the number of decimal places in the output coordinates. This can specify bo |
|
-s c |
Defines a field separator character c to be used for the input and output files. The default separator is whitespace (blank or tab characters). Use "tab" to use the tab character as a delimiter. |
|
-e |
Specifies that badly formatted input data are just copied to the output file without modification. Otherwise they will be copied with an error message. |
|
-v |
Verbose output - columns of coordinates are headed and input coordinates are echoed in the output. |
|
-a |
Ask for all parameters interactively rather than using only the information in the command line. All the options described below are available interactively using the -a option. If no switches other than the c and g switches are specified then this is the default. |
|
-k |
Keyboard entry of coordinates - prompts for coordinates to be converted at the keyboard rather than reading from a file. Converted coordinates are always displayed on the standard output with this option. The coordinates may also be directed to a file by specifying an output file name in the command line. |
|
-l |
Lists the valid coordinate system codes to the standard output stream. No coordinate conversion is done. This can also be followed by the code of a coordinate system to display informaton about that system, for example
|
|
-c filename |
Specifies the name of the coordinate system definition file (default is coordsys.def). The format of the file is described below. |
|
-g filename |
Specifies the name of the geoid model file (default is geoid.bin). The format of this file is defined below. |
|
-h |
Print a help page listing these options. |
|
-z |
List the program version and copyright information. No coordinate conversion is done. |
The input and output coordinate systems are specified by a code which consists of up to three items separated by commas or colons.
The first item is the code for the coordinate system. This must match an entry in the coordinate system definition file, which can be listed using "concord -l". For coordinate systems that include a deformation model, the code can include a date, for example NZGD2000@20120512, to specify that the coordinates are in terms of the deformation applying at that date, rather than in terms of the reference coordinates for the deformation model.
The code can also define the reference surface for heights by appending the vertical datum code to the coordinate system definition after a "/" character. For example NZGD2000/NZVD2016 specifies New Zealand Geodetic Datum 2000 coordinates with heights in terms of New Zealand Vertical Datum 2016. Use "concord -v" to list the available vertical datums.
The second item defines the order of the coordinates in the input or output file. This is a two or three character string in which each character defines one of the coordinates in the file. The first two must be characters must be EN (easting/longitude followed by northing/latitude) or NE (northing/latitude followed by easting/longitude). The third character specifies the height and can be H for ellipsoidal height or O for orthometric height. If a vertical datum has been specified then orthometric heights are assumed. Otherwise if orthometric heights are specified then a geoid must be defined with the -g option. If no heights are specified then the height is equivalent to an ellipsoidal height of 0.
For latitude/longitude coordinates the definition can include a third character which specifies how the angles are entered. Use H for hexaguesimal format (degrees, minutes, seconds followed by a hemisphere), M for degrees and decimal minutes, or D for decimal degrees.
For example the input coordinate system could be defined by the options -i NZGD49:ENO:H.This specifies that the input is in the NZGD49 coordinate system (New Zealand Geodetic Datum 1949). This is a latitude and longitude coordinate system. The coordinates are ordered as longitude, latitude, ellipsoidal height. An example of the input in this case could be
172 43 58.22 E 42 25 02.179 S 298.53
Files of input coordinates should contain one pair of coordinates per line. Blank lines and lines starting with an exclamation mark are ignored, and pass unchanged into the output file. Each data line should contain the following fields separated by space or tab characters (or a delimiter character specified with the -s option).
id coordinate1 coordinate2 coordinate3 additional_data
The id must be present if the -n option is specified, and must be omitted otherwise. The -n option can also define the maximum number of characters that are read from the id. It can be longer than this specified length, but any extra characters will be discarded and will not be copied to the output file. Following the id are the two or three coordinates and then optional additional data (which is copied to the output file without modification). The order and format of the coordinates is defined by the -i switch as described above.
Hexaguesimal latitudes and longitudes each comprise four fields, these being the degrees, minutes, and seconds of the angle and the hemisphere indicator (N, S, E, or W). The hemisphere can precede or follow the angle, and if it follows the angle, need not be separated by a space from the angle. If a separator is specified by the -S switch it must be used between the components of angles as well as between the different coordinates.
Similarly, degrees and minutes format angles comprise three fields.