las2col(1) | las2col(1) |
las2col - LAS translation to MonetDB binary format
las2col
[OPTIONS]
las2col performs LAS translation to MonetDB binary format with optional configuration.
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
Convert a las/laz file into columnar format (binary) of MonetDB, outputs for each entry a file output_prefix_col_entry_name.dat:
las2col -i input_file -o output_prefix
Convert a list of las/laz files (still outputs for each entry a file output_prefix_col_entry_name.dat):
las2col -i las_file_1 -i las_file_2 -o output_prefix
Alternatively:
las2col -f file_with_the_list_las/laz_files -o output_prefix
Convert a list of las/laz files using num_read_threads threads (default is 1):
las2col -f file_with_the_list_las/laz_files -o output_prefix --num_read_threads number_of_threads
After generating the columnar files, import them in MonetDB. Example:
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')"
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 --parse option, and the column types must be the ones specified above. Example:
mclient db_name -s "create table flat (x double, y double, z double)"
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:
mclient db_name -s "create table flat (x decimal(8,2), y decimal(8,2), z decimal(8,2))"
16 February 2019 |