7 December 2010

AutoChart Custom Formats - Part 2

In Last Week's Post I covered the basics of AutoChart Custom Formats, so today I'll continue with the subject and discuss specific examples of the various data types and how the Custom Format ini file should be set up to read in external ASCII data sources.
As explained in the previous post, the Custom Format ini file is a Text file that defines which column of the data file holds particular fields. The Header of the ini file defines what delimiter is used within the data file and also if there are any header lines at the beginning of the data that should be skipped. Any numerical fields can also have a unit multiplier or a multiplier value applied when the data is imported.
Custom formats are available for Events, Profile, Route, SoundingsSBP and Track data types.
AutoChart expects certain record data columns to be named in a specific manner in order to correctly ascertain the type of data they contain:

ALL CUSTOM FORMATS
  • Easting
  • Northing
  • Latitude
  • Longitude
  • Kp
NOTE: X/Y Positional Data should be EITHER Easting/Northing OR Latitude/Longitude. If both formats are specified in the Custom ini file then the data will be plotted based on the Easting/Northing values. Profile type data can be imported by KP value or by XY positional data that is recalculated against the specified Route entity.

EVENTS FORMATS
  • Primary
  • Secondary
  • Comment
  • Anomaly
NOTE: The use of numerical formatting in Event Text is limited to specific Field Names that are defined within AutoChart as numerical field values. These Fields are:
  • Kp
  • Length
  • Width
  • Height
All other fields are dealt with as strings and the Event Text will be formatted as it appears within the data file.

ROUTE FORMATS
  • Description
TRACK FORMATS
  • Fix
  • Name
SOUNDINGS FORMATS
  • Depth
PROFILE FORMATS
Any profile names can be used and these will appear in the list of available data in the Create Profile Command. However, to use the 'Hatch Pipe' functionality, AutoChart expects the following Column Names to be used and to exist in the data file:
  • Top of Pipe
  • Bottom of Pipe
Additionally, with the Profile Formats an optional line can be added to the ini file header to prevent the profile polyline being drawn between consecutive points when the distance between them exceeds a specified value. the Header line that should be added is
#BreakOnDistance,x
where x is the required break interval in drawing units (i.e. metres/feet). See the Profile ini example below.

SUB-BOTTOM FORMATS
  • Depth
  • TagName
  • Node
  • Description (optional)
Note that only 'Tag Name/Node' type data (such as a derivative of the Coda Octopus type format) can be used with a SBP Custom Format ini File.

Node values for a horizon should be 'S' (for start of horizon), 'I' (for intermediate points on the horizon) and 'E' (for End of Horizon). Point values can be denoted by use of an 'S' or 'E' node value, or by any other value (e.g. 'P') outside of a normal horizon definition. Depth values should be relative to the Seabed.

If a 'Description' field is used in the ini file then the values contained by this field will be added to the points and horizon vertices.

Ini Files Examples:

1 December 2010

Custom Format Imports in AutoChart

AutoChart contains a variety of built in formats for importing different data types, but often you may be faced with a data file that doesn't match anything available (particularly with Events data files). You're then faced with either reformatting the data to a recognised format or you can turn to Custom Formats and design your own import type.
Custom formats can be used to import most ASCII file types and optionally can be set up to deal with different delimiters, headers and units.

In the next couple of Blog posts, I'll cover the use of Custom Format Files in AutoChart, starting with the general principles and moving on to the specific file types in the next post.

A Custom Format file is essentially a user defined file containing information on what data type is held in which column in a data file.  Custom Format files should have a '.ini' file extension and be located in the appropriate sub-folder (for the import type) within the AutoChart Formats Directory (by default this directory is \AutoChart\Formats although the path can be set within Directory Preferences.
Custom Formats can be used for the following Import types (and the sub-folders must be named as shown below):
  • Events
  • Profile
  • Route
  • Soundings
  • SubBottom
  • Track
Any Custom Format ini files that exist within these sub-folders will then appear within the File Type Drop Down List in the appropriate Command Dialog. Note that Events Custom Format ini files can also be used in the Import Block command.

The delimiter used within a file can be set within the Custom ini file header #Delimeter variable as shown in the examples below. If no delimiter option is specified then AutoChart assumes that the file is comma delimited. Additionally, header lines in the data file can be ignored by specifying the number of lines at the beginning of the file to be skipped in the #HeaderLines variable:
#AutoChartName,ColumnPosition
#To use tab delimiter you can use a tab character or for the avoidance of doubt when perusing this file "\t"
#Delimeter,","
#HeaderLines,3
The above example would therefore import the data as comma delimited and would skip the first three lines of the input file before starting to read the data from the fourth line. If the #HeaderLines option is omitted from the ini file then the import function will start reading from the first line in the data file.

Within the rest of the Custom Format ini file, the Field name and its column position in the data file are defined in the format: Field Name, Column Position
i.e.
Easting,4
Northing,5
etc.
The units of each field or a unit multiplier can optionally also be specified after the column position. When the data is imported, if the field unit is specified then AutoChart compares the specified unit with that of the Coordinate System and automatically converts the input unit to the correct unit for the coordinate system. If a multiplier value is specified then AutoChart will always multiply the data from that field by the multiplier.
i.e.
Easting,9,Meter
Kp,1,0.001

If no units or multiplier is specified then the values in the file will be imported directly. Similarly, if the field values are set to the same units as those used by the coordinate system, no unit multiplication will be performed. Note though that as AutoChart expects Kp values to be in Km, setting the unit of the Kp field to 'Meter' will mean that the Kp values in the data file will be divided by 1000 (conversion from meters to Km) when a meter coordinate system is used.

e.g. If the Easting and Northing fields are set to have Unit value of USFoot and the data is imported into a dwg that has a coordinate system with units of US Survey Feet, then the E/N values will be imported as they appear in the file. However, if the data is imported into a Meter coordinate system, the E/N values will be multiplied by (12/39.37).
  • IntFoot
  • Meter
  • USKiloFoot
  • IntKiloFoot
  • USMile
  • IntMile
  • Kilometer
In the next Blog post, I'll continue discussing Custom Formats and cover each of the Import types and the options available with them.