Printing the first point¶
Exercise¶
This exercise uses PDAL to print information from the first point. Issue the following command in your OSGeo4W Shell.
1 | pdal info c:/Users/hobu/PDAL/exercises/info/interesting.las -p 0
|
Here’s a summary of what’s going on with that command invocation
pdal
: Thepdal
application :)info
: We want to run info on the data. All commands are run by thepdal
application.c:/Users/hobu/PDAL/exercises/info/interesting.las
: The file we are running the command on. PDAL will be able to identify this file is an ASPRS LAS file from the extension,.las
, but not every file type is easily identified. You can use a pipeline to override which reader PDAL will use to open the file.-p 0
:-p
corresponds to “print a point”, and0
means to print the first one (computer people count from 0).

Notes¶
- PDAL uses JSON as the exchange format when printing information from info. JSON is a structured, human-readable format that is much simpler than its XML cousin.
- You can use the writers.text writer to output point attributes to CSV format for other processing.
- Output help information on the command line by issuing the
--help
option - A common query with
pdal info
is--all
, which will print all header, metadata, and statistics about a file.