Greensea Import/Export
Greensea Import/Export, Greensea Import/Export

Section 19

Thin and Reformat an exported .csv File

When a .csv file is exported, it contains data recorded at approximately 10 Hz. This can lead to large data files. If the ROV hovers in one place for a while, this will result in a lot of redundant and unnecessary data points. You can thin this data by weeding out these redundant data points based on a minimum distanced moved threshold.

Primary input is a GSS export in CSV format and information about which input columns to use for output and the output order. Input order is flexible - you defined which columns hold your X, Y and Z values. Column numbers start at 0 in the input file.

Output order is Longitude (East or X), Latitude (North or Y) and Z (Depth or Altitude) and any additional column(s) you select to include with the output. If you require a different order, see the tip below.

Z is not used for distance moved calculations.

Program input defaults can be changed by editing gss-3d.cfg

  • Line 1: Input file to read from.
  • Line 2: Output file to write to.
  • Line 3: Coordinates Type - One of: [ 3 | 2 ]
            3 = 3-D; 2 = 2-D
  • Line 4: Invert Z value - One of: [ - | (any other character) ]
  •         If set to \"-\" Z values are multiplied by minus one (-1) to invert the sign.
  • Line 5: Units Type - One of: [ M | F ]
            M = Meters; F = Feet
  • Line 6: Degrees Format - One of: [ DD | DDM | DMS ]
            DD = Decimal Degrees; DDM = Degrees Decimal Minutes; DMS = Degrees Minutes Seconds
  • Line 7: Minimum Distance Threshold.
            Amount the vehicle has to move from a previous point to add a new point.
  • Line 8: Column number of the East or X column of the input file to use in output.
  • Line 9: Column number of the North or Y column of the input file to use in output.
  • Line 10: Column number of the Z column of the input file to use in output (not used for 2D).
  • Additional lines can be added for additional columns desired in the output.

To be completely generic, you can select any input column to be output in column 1, any other input column to be output in column 2 and so on. However, the distance traveled is calculated based on output columns 1 and 2. If you want a different order output, this technique can work:

  1. Run the program choosing the columns you want setting the X (East) to the first column and the Y North) to the second Column and the distance threshold to the value of your choice.
  2. Rerun the program using your output as the input and specify the column order you want and set the distance threshold to 0.
  3. For this second run you can specify any column order, such as Y (North)in the first column and X (East) in the second column.
  4. The output will be thinned correctly and in the column order of your preference.

The program is available in the downloads section.

Document Path: Greensea Import/Export How to Guide > Export GSS to .csv > Thin and Format a .csv File