las2col(1)

NAME
las2col - LAS translation to MonetDB binary format

SYNOPSIS
las2col
[OPTIONS]

DESCRIPTION
las2col performs LAS translation to MonetDB binary format with optional configuration.

OPTIONS

\FC-h\F[], \FC-help\F[], \FC--help\F[]
    produce help message

\FC-v\F[], \FC--verbose\F[]
    Verbose message output

\FC--num_read_threads\F[] number
    Set number of threads

\FC-s\F[], \FC--skip_invalid\F[]
    Skip writing invalid point(s)

\FC-parse\F[] string, \FC--parse\F[] string
    Specify which entries of the LAS/LAZ will be extracted (default is xyz). For example, 'txyzia' means that six columnar (binary) MonetDB files will be generated, the first one containing all gpstime values, the next three containing values for x, y, and z coordinates, the next one with intensity values and the last one with scan angle values. The supported entries are:

    t - gpstime as double
    x - x coordinate as double
    y - y coordinate as double
    z - z coordinate as double
    X - x coordinate as decimal(num_digits_unscaled_max_x,num_digits_scale_x)
    Y - y coordinate as decimal(num_digits_unscaled_max_y,num_digits_scale_y)
    Z - z coordinate as decimal(num_digits_unscaled_max_z,num_digits_scale_z)
    a - scan angle as tinyint
    i - intensity as smallint
    n - number of returns for given pulse as smallint
    r - number of this return as smallint
    c - classification number as tinyint
    u - user data as tinyint
    p - point source ID as smallint
    e - edge of flight line as smallint
    d - direction of scan flag as smallint
    R - red channel of RGB color as smallint
    G - green channel of RGB color as smallint
    B - blue channel of RGB color as smallint
    M - vertex index number as integer
    k - Morton 2D code using X and Y (unscaled and no offset) as bigint

\FC-moffset\F[] x,y, \FC--moffset\F[] x,y
    Specify a global offset in X and Y to be used when computing the Morton 2D code. Values must be unscaled

\FC-check\F[] x,y, \FC--check\F[] x,y
    Check suitability to compute Morton 2D codes. It checks specified scale matches the one in input file. If \FC--moffset\F[] is provided it also checks that obtained Morton 2D codes will be consistent, i.e. global X,Y within [0,2^31]

\FC-i\F[] arg, \FC-in\F[] arg, \FC-input\F[] arg, \FC--input\F[] arg
    file with the list las/laz files

\FC-f\F[] arg, \FC-file\F[] arg, \FC--file\F[] arg
    input LAS file

\FC-o\F[] arg, \FC-out\F[] arg, \FC--out\F[] arg, \FC--output\F[] arg
    output prefix

EXAMPLE
Convert a las/laz file into columnar format (binary) of MonetDB, outputs for each entry a file output_prefix_col_entry_name.dat:

\FC
las2col -i input_file -o output_prefix
      \F[]

Convert a list of las/laz files (still outputs for each entry a file output_prefix_col_entry_name.dat):

\FC
las2col -i las_file_1 -i las_file_2 -o output_prefix
      \F[]

Alternatively:

\FC
las2col -f file_with_the_list_las/laz_files -o output_prefix
      \F[]

Convert a list of las/laz files using num_read_threads threads (default is 1):

\FC
las2col -f file_with_the_list_las/laz_files -o output_prefix --num_read_threads number_of_threads
      \F[]

After generating the columnar files, import them in MonetDB. Example:

\FC
mclient db_name -s "COPY BINARY INTO flat FROM ('full_parent_path/out_col_x.dat','full_parent_path/out_col_y.dat','full_parent_path/out_col_z.dat')"
      \F[]

Note that full paths of the columnar files MUST be used. Also note that a table called flat has to be created in a MonetDB DB beforehand. The table must have the columns in the same order as specified by the \FC--parse\F[] option, and the column types must be the ones specified above. Example:

\FC
mclient db_name -s "create table flat (x double, y double, z double)"
      \F[]

Note that for decimal entries (XYZ) the column definition at table-creation time must be decimal(num_digits_unscaled_max,num_digits_scale) For example, if the maximum X value of a file (or a list of files) is 638982.55, then the X definition when creating the table is decimal(8,2). Example:

\FC
mclient db_name -s "create table flat (x decimal(8,2), y decimal(8,2), z decimal(8,2))"
      \F[]