'\" -*- coding: us-ascii -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH las2pg 1 "16 February 2019" "" "" .SH NAME las2pg \- LAS translation to PostgreSQL binary format .SH SYNOPSIS 'nh .fi .ad l \fBlas2pg\fR \kx .if (\nx>(\n(.l/2)) .nr x (\n(.l/5) 'in \n(.iu+\nxu [\fB\fIOPTIONS\fB\fR] 'in \n(.iu-\nxu .ad b 'hy .SH DESCRIPTION \fBlas2pg\fR performs LAS translation to PostgreSQL binary format with optional configuration. .SH OPTIONS .TP \*(T<\fB\-h\fR\*(T>, \*(T<\fB\-help\fR\*(T>, \*(T<\fB\-\-help\fR\*(T> produce help message .TP \*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-verbose\fR\*(T> Verbose message output .TP \*(T<\fB\-\-num_read_threads\fR\*(T> \fInumber\fR Set number of threads .TP \*(T<\fB\-s\fR\*(T>, \*(T<\fB\-\-skip_invalid\fR\*(T> Skip writing invalid point(s) .TP \*(T<\fB\-parse\fR\*(T> \fIstring\fR, \*(T<\fB\-\-parse\fR\*(T> \fIstring\fR Specify what exactly to write for each row (default is xyz). For example, 'txyzia' means that the first field of each row will be the gpstime, the next three fields will be the x, y, and z coordinates, the next field will be the intensity and the next field will be the scan angle. The supported entries are: t - gpstime as double .br x - x coordinate as double .br y - y coordinate as double .br z - z coordinate as double .br a - scan angle as integer .br i - intensity as integer .br n - number of returns for given pulse as integer .br r - number of this return as integer .br c - classification number as integer .br u - user data as integer .br p - point source ID as integer .br e - edge of flight line as integer .br d - direction of scan flag as integer .br R - red channel of RGB color as integer .br G - green channel of RGB color as integer .br B - blue channel of RGB color as integer .br M - vertex index number as integer .br k - Morton 2D code using X and Y (unscaled and no offset) as bigint .TP \*(T<\fB\-moffset\fR\*(T> \fIx\fR,\fIy\fR, \*(T<\fB\-\-moffset\fR\*(T> \fIx\fR,\fIy\fR Specify a global offset in X and Y to be used when computing the Morton 2D code. Values must be unscaled .TP \*(T<\fB\-check\fR\*(T> \fIx\fR,\fIy\fR, \*(T<\fB\-\-check\fR\*(T> \fIx\fR,\fIy\fR Check suitability to compute Morton 2D codes. It checks specified scale matches the one in input file. If \*(T<\fB\-\-moffset\fR\*(T> is provided it also checks that obtained Morton 2D codes will be consistent, i.e. global X,Y within [0,2^31] .TP \*(T<\fB\-\-stdout\fR\*(T> Use STDOUT .TP \*(T<\fB\-i\fR\*(T> \fIarg\fR, \*(T<\fB\-in\fR\*(T> \fIarg\fR, \*(T<\fB\-input\fR\*(T> \fIarg\fR, \*(T<\fB\-\-input\fR\*(T> \fIarg\fR file with the list las/laz files .TP \*(T<\fB\-o\fR\*(T> \fIarg\fR, \*(T<\fB\-out\fR\*(T> \fIarg\fR, \*(T<\fB\-\-out\fR\*(T> \fIarg\fR, \*(T<\fB\-\-output\fR\*(T> \fIarg\fR output prefix .SH EXAMPLE Convert a las/laz file into PostgreSQL binary dump format, outputs \fIoutput_name\fR: .nf \*(T< las2pg \-i \fIinput_file\fR.las \-o \fIoutput_name\fR \*(T> .fi Use flag \*(T<\fB\-\-stdout\fR\*(T> to write to standard output (recommended use together with a pipe, see below). .PP The intended use of this tool is by using the \*(T<\fB\-\-stdout\fR\*(T> flag and a pipe to avoid storing intermediate files. Example: .nf \*(T< las2pg 1.2\-with\-color.laz \-\-parse xyzRGBi \-\-stdout | psql \-c "copy flat from stdin with binary" \*(T> .fi 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 \*(T<\fB\-\-parse\fR\*(T> option, and the column types must be the ones specified above. Example: .nf \*(T< psql \-c "create table flat (x double precision, y double precision, z double precision, r integer, g integer, b integer, i integer)" \*(T> .fi