las2pg(1) | las2pg(1) |
las2pg - LAS translation to PostgreSQL binary format
las2pg
[OPTIONS]
las2pg performs LAS translation to PostgreSQL binary format with optional configuration.
t - gpstime as double
x - x coordinate as double
y - y coordinate as double
z - z coordinate as double
a - scan angle as integer
i - intensity as integer
n - number of returns for given pulse as integer
r - number of this return as integer
c - classification number as integer
u - user data as integer
p - point source ID as integer
e - edge of flight line as integer
d - direction of scan flag as integer
R - red channel of RGB color as integer
G - green channel of RGB color as integer
B - blue channel of RGB color as integer
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 PostgreSQL binary dump format, outputs output_name:
las2pg -i input_file.las -o output_name
Use flag --stdout to write to standard output (recommended use together with a pipe, see below).
The intended use of this tool is by using the --stdout flag and a pipe to avoid storing intermediate files. Example:
las2pg 1.2-with-color.laz --parse xyzRGBi --stdout | psql -c "copy flat from stdin with binary"
This obviously require a table called flat to be created in a PostgreSQL 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:
psql -c "create table flat (x double precision, y double precision, z double precision, r integer, g integer, b integer, i integer)"
16 February 2019 |