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):
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.
No comments:
Post a Comment