Version 3 (modified by dap, 10 years ago) (diff)

Added in instructions for how to split Fenix flightlines

Splitting Flightlines

Some PIs will request that processed flight lines are split in to smaller lines, especially if the files generated are of a large size.

Fenix Splitting

It is recommended that you do this after you have found the correct SCT offset values and are ready to generate the final files, as the splitting is done by aplcal when you submit the jobs to the grid. The splitting of the flight lines can be done by following this process:

  1. Find out the number of smaller segments the PI wants the flight lines split in to. This could be in the ticket or in emails. Ask someone if unsure.
  2. If it is not already there, append cal_args_extra = -lines to each flight line section of the config file. This tells aplcal which raw lines to process for this particular flight line section, using the -lines argument of aplcal.
    1. Note: If there is a global cal_args_exrtra = record in the config file (i.e. in the [DEFAULT] section, at the top of the file), this will be overridden by ones local to flight lines. Therefore, you will need to copy the arguments from the global section in to each flight line section to overcome this.
  3. Copy and paste each flight line section in the hyperspectral processing file <number of segments required> -1 times below the original flight line section so that the number of sections for each line is equal to the number of segments required by the PI.
  4. Divide the number of lines in each raw header file (the lines record in the raw header files (found in .../<root project directory>/hyperspectral/fenix) by the number of segments required and round it up/down to something sensible.
  5. After the cal_args_extra = -lines, put in the numbers of the raw flight lines to process.
    1. For the first one, this will be 1 (the first flight line) and the number you obtained in the previous step.
    2. If no overlap is required, the next section should be double the result, and so on. If an overlap is required, the first number used in the latter of the two should be <overlap in metres> less than the second number used in the section before it.
  6. Change the header of each flight line section so that the numbers in the section headers are sequential, and change the line_id and line_number fields to match this.
  7. Change the raw_filebase in each flight line section so that they point to the raw files. Do this by changing what's already there to raw_filebase = %(fenix_filebase)s-<original line number>. You can find this out by doing <new flight line number> / <number of sections required by PI>, and rounding it up.

Below is part of an example config file that was used for splitting hyperspectral data. In this example, each flight line was split in to three segments and used an overlap of 500m.

[fenix_-1]
process_line = false
line_id = -1
line_number = 01
altitude = 2037
airspeed = 137
track = 102.0
raw_filebase = %(fenix_filebase)s-1
output_filebase = f%(julian_day)s%(sortie)s%(line_number)s
sct = 0.98
cal_args_extra = -lines 1 8000

[fenix_-2]
process_line = false
line_id = -2
line_number = 02
altitude = 2037
airspeed = 137
track = 102.0
raw_filebase = %(fenix_filebase)s-1
output_filebase = f%(julian_day)s%(sortie)s%(line_number)s
sct = 0.98
cal_args_extra = -lines 7500 16000

[fenix_-3]
process_line = false
line_id = -3
line_number = 03
altitude = 2037
airspeed = 137
track = 102.0
raw_filebase = %(fenix_filebase)s-1
output_filebase = f%(julian_day)s%(sortie)s%(line_number)s
sct = 0.98
cal_args_extra = -lines 15500 24557

[fenix_-4]
process_line = true
line_id = -4
line_number = 04
altitude = 1922
airspeed = 141
track = 282.0
raw_filebase = %(fenix_filebase)s-2
output_filebase = f%(julian_day)s%(sortie)s%(line_number)s
sct = 0.96
nav2_args_extra = -force
cal_args_extra = -lines 1 8000

[fenix_-5]
process_line = false
line_id = -5
line_number = 05
altitude = 1922
airspeed = 141
track = 282.0
raw_filebase = %(fenix_filebase)s-2
output_filebase = f%(julian_day)s%(sortie)s%(line_number)s
sct = 0.96
nav2_args_extra = -force
cal_args_extra = -lines 7500 16000

Splitting LiDAR point clouds

Discrete LiDAR

In the case of purely discrete point clouds we can use lasmerge to produce equal divided files.

A script exists to do this automatically:

split_las.py (-d INPUTDIR | -f INPUTFILE) [-o OVERLAP] outputdir fraction

This can be run on either a single file or a directory of las files.

Use -o to specify the number of seconds of overlap, this can be used with the airplanes ground speed to calculate overlap. For instance 7 seconds 140 knots will result in an overlap of 504 metres (7 seconds * 72 m/s). Give the script a fraction for the number of lines to divide the line into, I usually just give it 3.

Full Waveform

Full wave form data cannot use the script above. Unfortunately you will need to produce this using alspp and its fence feature.

It is worthwhile using the script above to divide a discrete line then using the x/y coordinates from each section for your division. This will give you a consistent split across the waveform data. If you have variable pitch/roll you will likely have to process each line seperately.

To give a fence in alspp go to filters > points on the ground. In the dialogue that displays click "selected projection (x,y,z)" then enter the min/max of your x/y coordinates for a square.

Alspp will not run on waveform data simultaneously with another alspp instance.

Seemingly at random some lines will not process with the fence options that every other line in the dataset will run under. This will result in an output of 22.6 k las files, you will need to change the fence size or in some cases create an entirely new alspp reg file to overcome this bug.