Printing the first point¶
Exercise¶
This exercise uses PDAL to print information from the first point. Issue the following command in your Docker Quickstart Terminal.
1 2 | docker run -v /c/Users/Howard/PDAL:/data -t pdal/pdal \
pdal info /data/exercises/info/interesting.las -p 0
|
Here’s a summary of what’s going on with that command invocation
docker
: We are running PDAL within the context of docker, so all of our commands will start with thedocker
command.run
: Tells docker we’re going to run an image-v /c/Users/Howard/PDAL:/data
: Maps our workshop directory to a directory called/data
inside the container.See also
The Docker Volume document describes mounting volumes in more detail.
pdal/pdal
: This is the Docker image we are going to run. We fetched it in the Install Docker portion of the workshop.pdal
: We’re finally going to run thepdal
application :)info
: We want to run info on the data. All commands are run by thepdal
application./data/exercises/info/interesting.las
: Thepdal
command is now running in the context of our container, which we mounted a/data
directory in with the volume mount operation in Step #3. Ourinteresting.las
file resides there.-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. - In the command, we add the
\
character for line continuation. All items on thedocker run
command must be on the same line. You will see this convention throughout the workshop to make the command easier to read, but remember that everything needs to be on one line.