Database Reference
In-Depth Information
CREATE TABLE chp07.lidar
(
x numeric,
y numeric,
z numeric,
intensity integer,
tnumber integer,
number integer,
class integer,
id integer,
vnum integer
)
WITH (OIDS=FALSE);
ALTER TABLE chp07.lidar OWNER TO me;
Now,wecandownloadourdata.Werecommendeithergettingitdownloadedfrom
http://gis5.oit.ohio.gov/geodatadownload/ or downloading the example dataset we
have for your use available at http://www.packtpub.com/support .
How to do it...
WeneedtoconvertourLASfiletoaformatthatcanbereadbyPostgreSQL.Tothis
end, we will use las2txt, either from LAStools or libLAS, to convert our LAS file to
text.
las2txt --parse xyzinrcpM -sep komma input
output.csv
IfwehavealargedirectoryofLASfiles,wecanautomatetheirconversiontotext.In
BASH on Linux, Unix, and Mac OS X systems, we can do that with the following:
#!/bin/bash
x=0
total=`ls *.las | wc | awk '{print $1}'`
for f in $( ls *.las); do
x=`expr $x + 1`
Search WWH ::




Custom Search