1.. _density:
2
3Visualizing acquisition density
4================================================================================
5
6.. include:: ../../../includes/substitutions.rst
7
8.. index:: Density, OGR, hexagon tessellation
9
10This exercise uses PDAL to generate a density surface. You can use this
11surface to summarize acquisition quality.
12
13
14Exercise
15--------------------------------------------------------------------------------
16
17PDAL provides an :ref:`application <density_command>` to compute a vector
18field of hexagons computed with :ref:`filters.hexbin`. It is a kind of
19simple interpolation, which we will use for visualization in |QGIS|.
20
21
22Command
23................................................................................
24
25Invoke the following command, substituting accordingly, in your ` Shell`:
26
27.. literalinclude:: ./density-command.txt
28    :linenos:
29
30.. literalinclude:: ./density-command-win.txt
31    :linenos:
32
33
34.. image:: ../../../images/density-command-run.png
35    :target: ../../../../_images/density-command-run.png
36
37Visualization
38................................................................................
39
40The command uses GDAL to output a `SQLite`_ file containing hexagon polygons.
41We will now use |QGIS| to visualize them.
42
43.. _`SQLite`: http://sqlite.org
44
45
461. Add a vector layer
47
48    .. image:: ../../../images/density-add-layer.png
49        :target: ../../../../_images/density-add-layer.png
50
512. Navigate to the output directory
52
53    .. image:: ../../../images/density-select-layer.png
54        :target: ../../../../_images/density-select-layer.png
55
563. Add the ``density.sqlite`` file to the view
57
58    .. image:: ../../../images/density-file-open.png
59        :target: ../../../../_images/density-file-open.png
60
614. Right click on the ``density.sqlite`` layer in the `Layers` panel
62   and then choose ``Properties``.
63
645. Pick the ``Graduated`` drop down
65
66    .. image:: ../../../images/density-graduated-symbols-pick.png
67        :target: ../../../../_images/density-graduated-symbols-pick.png
68
696. Choose the ``Count`` column to visualize
70
71    .. image:: ../../../images/density-count-attribute.png
72        :target: ../../../../_images/density-count-attribute.png
73
747. Choose the ``Classify`` button to add intervals
75
76    .. image:: ../../../images/density-graduated-symbols.png
77        :target: ../../../../_images/density-Graduated-symbols.png
78
798. Adjust the visualization as desired
80
81    .. image:: ../../../images/density-final-render.png
82        :target: ../../../../_images/density-final-render.png
83
84Notes
85--------------------------------------------------------------------------------
86
87
881. You can control how the density hexagon surface is created by
89   using the options in :ref:`filters.hexbin`.
90
91   The following settings will use a hexagon edge size of 24
92   units.
93
94   ::
95
96       --filters.hexbin.edge_size=24
97
982. You can generate a contiguous boundary using |PDAL|'s :ref:`tindex_command`.
99
100.. _`Uncompahgre Basin`: https://en.wikipedia.org/wiki/Uncompahgre_River
101