tent in the X/Y plane, but with varying numbers
of points.
Regardless of the chosen tiling method, the user has
to be aware that both, applying filters.chipper() and
filters.splitter(), is not a 3D tiling but only a 2D tiling
of a 3D point cloud. The individual extend along the
Z axis is not considered for a point cloud. As a result
of a 2D tiling, points that may be far apart because of
different Z values in 3D space may still be assigned to
the same patch array. This leads to very unbalanced
patches especially for point clouds with a very pro-
nounced 3D character (cf. fig. 1).
An improved tiling method can be applied in or-
der to achieve a 3D tiling. That approach takes ad-
vantage of an additional PDAL function named fil-
ters.range(). The Range function enables the filter-
ing of a point cloud by any attribute/dimension. The
maximum Z extension for each patch can be lim-
ited when applying filters.range() on the Z dimen-
sion. This procedure corresponds to a contouring
e.g. with 1m interval. The Range function can be
used to create a ’Z’ extended three-dimensional point
cloud tiling when combining with filters.chipper() or
filters.splitter() (cf. fig. 2).
3.2 Integration of PostGIS
All functions of the Pointcloud extension refer to the
two central Pointcloud objects PcPoint and PcPatch.
Overall, PcPoints play only a minor roll. Although
it is possible to create Pointcloud tables of PcPoints
with a valid schema, these points are primarily needed
only for special queries e.g. as an intermediate step in
order to convert a small result set of point cloud points
into PostGIS points of the type POINT Z. Full-scale
3D point clouds are exclusively managed in PcPatch
tables, and Pointcloud provides a number of special
functions for this purpose.
There are functions for creating and dis-
solving, sorting and compressing/uncompressing
patches (e.g. PC MakePatch(), PC Union(),
PC Sort() and PC Compress()) and functions
for returning content information of patches
(e.g. PC Summary(), PC NumPoints() or
PC PatchMax() and PC PatchMin()). Furthermore
the Pointcloud functions PC FilterGreaterThan(),
PC FilterLessThan(), PC FilterBetween() and
PC FilterEquals() enable a filtering of points based
on attribute values such as intensity, classification
code, Z value or time-stamp.
Interactions between Pointcloud and PostGIS ob-
jects become possible only with enabling the addi-
tional extension Pointcloud PostGIS for the database.
Patches can be checked to see whether they over-
lap the geometry of a PostGIS object using the
function PC Intersects() and new patches can be
generated which represent the result set of an in-
tersection between a PcPatch and e.g. a poly-
gon using PC Intersection(). Both PC Intersects()
and PC Intersection() only accept 2D objects and
therefore do not enable spatial queries in 3D. The
PC EnvelopeGeometry() function returns the two-
dimensional boundary of a patch as a PostGIS poly-
gon and PC BoundingDiagonalGeomery() enables
the creation of a 3D index by returning the 3D bound-
ing box diagonals of a patch as LINESTRING Z.
3.3 Multistage 3D Query
The Pointcloud PostGIS extension offers the func-
tions PC Intersects() and PC Intersection() for inter-
section queries and operations involving Pointcloud
and PostGIS features. Both functions do not accept
three-dimensional query objects of the type POLY-
HEDRALSURFACE Z but only two-dimensional
PostGIS features e.g. polygons. Thus, point cloud
points can initially only be queried projected onto
the X/Y-plane. But there is a practical multistage
workaround for spatially querying a 3D point cloud
with a 2.5D volumetric object in 3D space:
1. The Pointcloud function PC BoundingDiagonal-
Geometry() returns the diagonal of the 3D
bounding boxes of all patches as 3D Lines
(LINESTRING Z).
2. In order to enable high-performance queries in
3D, a 3D index is set up for the diagonals resp.
their 3D bounding boxes.
3. By using the index operator &&&, the 3D bound-
ing boxes of all patch diagonals are selected,
which overlap the 3D bounding box of any 3D ob-
ject of the type POLYHEDRALSURFACE Z.
4. The 3D bounding boxes of the patch diagonals
are converted to solids using the PostGIS func-
tion Box3D() in order to enable an exact test for
intersection using the ST 3DIntersects() operation
(SFCGAL backend only) (cf. fig. 4).
5. The selected solids are returned to the original Pc-
Patch objects with an inner join via a key attribute
(ID).
6. The preselected point cloud patches are tailored
to the limitations of the query object in X and
Y using the Pointcloud function PC Intersection()
(cf. fig. 5).
7. In dependence of the tiling method, the patches
still contain 3D points that are above or below the
query object. For queries with 2.5D objects, the
GISTAM 2019 - 5th International Conference on Geographical Information Systems Theory, Applications and Management
156