Skip to content

Commit

Permalink
Merge branch 'master' into ept-zstandard-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
connormanning committed Oct 14, 2019
2 parents efcc6f4 + 2033fdd commit 32fccfa
Show file tree
Hide file tree
Showing 40 changed files with 593 additions and 94 deletions.
2 changes: 1 addition & 1 deletion doc/pipeline.rst
Expand Up @@ -129,7 +129,7 @@ files from a single pipeline. The crop filter creates two output point views
"input.las",
{
"type" : "filters.crop",
"bounds" : [ "([0, 75], [0, 75])", "([50, 125], [50, 125])" ],
"bounds" : [ "([0, 75], [0, 75])", "([50, 125], [50, 125])" ]
},
"output#.las"
]
Expand Down
7 changes: 3 additions & 4 deletions doc/python.rst
Expand Up @@ -73,15 +73,14 @@ results as `Numpy`_ arrays:
json = """
{
[
[
"1.2-with-color.las",
{
"type": "filters.sort",
"dimension": "X"
}
]
}"""
]
"""
import pdal
pipeline = pdal.Pipeline(json)
Expand Down
2 changes: 2 additions & 0 deletions doc/references.rst
Expand Up @@ -34,6 +34,8 @@ Reference

.. [Alexa2003] Alexa, Marc, et al. "Computing and rendering point set surfaces." Visualization and Computer Graphics, IEEE Transactions on 9.1 (2003): 3-15.
.. [Bartels2010] Bartels, Marc, and Hong Wei. "Threshold-free object and ground point separation in LIDAR data." Pattern recognition letters 31.10 (2010): 1089-1099.
.. [Breunig2000] Breunig, M.M., Kriegel, H.-P., Ng, R.T., Sander, J., 2000. LOF: Identifying Density-Based Local Outliers. Proc. 2000 Acm Sigmod Int. Conf. Manag. Data 1–12.
.. [Chen2012] Chen, Ziyue et al. “Upward-Fusion Urban DTM Generating Method Using Airborne Lidar Data.” ISPRS Journal of Photogrammetry and Remote Sensing 72 (2012): 121–130.
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/filters.chipper.rst
Expand Up @@ -46,7 +46,7 @@ Example
"example.las",
{
"type":"filters.chipper",
"capacity":"400",
"capacity":"400"
},
{
"type":"writers.pgpointcloud",
Expand Down
6 changes: 6 additions & 0 deletions doc/stages/filters.hexbin.rst
Expand Up @@ -117,3 +117,9 @@ threshold
precision
Minimum number of significant digits to use in writing out the
well-known text of the boundary polygon. [Default: 8]

preserve_topology
Use GEOS SimplifyPreserveTopology instead of Simplify for polygon simplification with `smooth` option. [Default: true]

smooth
Use GEOS simplify operations to smooth boundary to a tolerance [Default: true]
4 changes: 2 additions & 2 deletions doc/stages/filters.merge.rst
Expand Up @@ -50,7 +50,7 @@ contains the points in "utm3.las".
.. code-block:: json
[
"utm1.las"
"utm1.las",
"utm2.las",
"utm3.las",
"out#.las"
Expand All @@ -65,7 +65,7 @@ and "utm2.las", while "out2.las" contains the points from "utm3.las".
.. code-block:: json
[
"utm1.las"
"utm1.las",
"utm2.las",
{
"type" : "filters.merge"
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/filters.miniball.rst
Expand Up @@ -41,7 +41,7 @@ outlier.
{
"type":"filters.miniball",
"knn":8
}
},
"output.laz"
]
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/filters.planefit.rst
Expand Up @@ -43,7 +43,7 @@ outlier.
{
"type":"filters.planefit",
"knn":8
}
},
"output.laz"
]
Expand Down
4 changes: 4 additions & 0 deletions doc/stages/filters.rst
Expand Up @@ -55,6 +55,7 @@ invalidate an existing KD-tree.
filters.pmf
filters.radialdensity
filters.reciprocity
filters.skewnessbalancing
filters.smrf

:ref:`filters.approximatecoplanar`
Expand Down Expand Up @@ -132,6 +133,9 @@ invalidate an existing KD-tree.
Compute the percentage of points that are considered uni-directional
neighbors of a point.

:ref:`filters.skewnessbalancing`
Label ground/non-ground returns using [Bartels2010]_.

:ref:`filters.smrf`
Label ground/non-ground returns using [Pingel2013]_.

Expand Down
2 changes: 1 addition & 1 deletion doc/stages/filters.shell.rst
Expand Up @@ -55,7 +55,7 @@ command to construct overview bands for the data using average interpolation.
{
"type":"filters.shell",
"command" : "gdaladdo -r average output-2m.tif 2 4 8 16"
}
},
{
"type":"filters.shell",
"command" : "gdaladdo -r average output-5m.tif 2 4 8 16"
Expand Down
46 changes: 46 additions & 0 deletions doc/stages/filters.skewnessbalancing.rst
@@ -0,0 +1,46 @@
.. _filters.skewnessbalancing:

filters.skewnessbalancing
===============================================================================

**Skewness Balancing** classifies ground points based on the approach outlined
in [Bartels2010]_.

.. embed::

.. note::

For Skewness Balancing to work well, the scene being processed needs to be
quite flat, otherwise many above ground features will begin to be included
in the ground surface.

Example
-------

The sample pipeline below uses the Skewness Balancing filter to segment ground
and non-ground returns, using default options, and writing only the ground
returns to the output file.

.. code-block:: json
[
"input.las",
{
"type":"filters.skewnessbalancing"
},
{
"type":"filters.range",
"limits":"Classification[2:2]"
},
"output.laz"
]
Options
-------------------------------------------------------------------------------

.. note::

The Skewness Balancing method is touted as being threshold-free. We may
still in the future add convenience parameters that are common to other
ground segmentation filters, such as ``returns`` or ``ignore`` to limit the
points under consideration for filtering.
6 changes: 4 additions & 2 deletions doc/stages/filters.stats.rst
Expand Up @@ -33,14 +33,16 @@ Example
Options
-------

_`dimensions`
.. _stats-dimensions:

dimensions
A comma-separated list of dimensions whose statistics should be
processed. If not provided, statistics for all dimensions are calculated.

_`enumerate`
A comma-separated list of dimensions whose values should be enumerated.
Note that this list does not add to the list of dimensions that may be
provided in the dimensions_ option.
provided in the :ref:`dimensions <stats-dimensions>` option.

count
Identical to the enumerate_ option, but provides a count of the number
Expand Down
3 changes: 1 addition & 2 deletions doc/stages/readers.gdal.rst
Expand Up @@ -48,8 +48,7 @@ RGB values of an `ASPRS LAS`_ file using :ref:`writers.las`.
{
"type":"readers.gdal",
"filename":"./pdal/test/data/autzen/autzen.jpg",
"header", "Red, Green, Blue"
"header": "Red, Green, Blue"
},
{
"type":"writers.text",
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/readers.las.rst
Expand Up @@ -63,7 +63,7 @@ Example
},
{
"type":"writers.text",
"filename":"outputfile.txt",
"filename":"outputfile.txt"
}
]
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/readers.pgpointcloud.rst
Expand Up @@ -25,7 +25,7 @@ Example
"table":"lidar",
"column":"pa",
"spatialreference":"EPSG:26910",
"where":"PC_Intersects(pa, ST_MakeEnvelope(560037.36, 5114846.45, 562667.31, 5118943.24, 26910))",
"where":"PC_Intersects(pa, ST_MakeEnvelope(560037.36, 5114846.45, 562667.31, 5118943.24, 26910))"
},
{
"type":"writers.text",
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/writers.bpf.rst
Expand Up @@ -19,7 +19,7 @@ Example
[
{
"type":"readers.bpf"
"type":"readers.bpf",
"filename":"inputfile.las"
},
{
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/writers.e57.rst
Expand Up @@ -40,7 +40,7 @@ Example
{
"type":"writers.e57",
"filename":"outputfile.e57",
"doublePrecision":false
"doublePrecision":false
}
]
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/writers.fbx.rst
Expand Up @@ -36,7 +36,7 @@ Example
[
{
"type":"readers.las"
"type":"readers.las",
"filename":"inputfile.las"
},
{
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/writers.null.rst
Expand Up @@ -24,7 +24,7 @@ Example
"type":"filters.hexbin"
},
{
"type":"writers.null",
"type":"writers.null"
}
]
Expand Down
2 changes: 1 addition & 1 deletion doc/stages/writers.tiledb.rst
@@ -1,6 +1,6 @@
.. _writers.tiledb:

readers.tiledb
writers.tiledb
==============

Implements `TileDB`_ 1.4.1+ reads from an array.
Expand Down
2 changes: 1 addition & 1 deletion doc/tutorial/reading.rst
Expand Up @@ -74,7 +74,7 @@ at all in the destination format. For example, some formats don't support
spatial references for point data, some have no metadata support and others
have limited :ref:`dimension <dimensions>` support. Even when data types are
supported in both source and destination formats, there may be limitations
with regard to data type, precision or , scaling. PDAL attempts to convert
with regard to data type, precision or, scaling. PDAL attempts to convert
data as accurately as possible, but you should make sure that you're
aware of the capabilities of the data formats you're using.

Expand Down
4 changes: 2 additions & 2 deletions doc/type-table.csv
Expand Up @@ -4,7 +4,7 @@
"Signed Integer", "64", "``int64``, ``int64_t``, ``long``"
"Unsigned Integer", "8", "``uint8``, ``uint8_t``, ``uchar``"
"Unsigned Integer", "16", "``uint16``, ``uint16_t``, ``ushort``"
"Unsigned Integer", "16", "``uint32``, ``uint32_t``, ``uint``"
"Unsigned Integer", "16", "``uint64``, ``uint64_t``, ``ulong``"
"Unsigned Integer", "32", "``uint32``, ``uint32_t``, ``uint``"
"Unsigned Integer", "64", "``uint64``, ``uint64_t``, ``ulong``"
"Floating Point", "32", "``float``, ``float32``"
"Floating Point", "64", "``double``, ``float64``"
3 changes: 2 additions & 1 deletion filters/HexBinFilter.cpp
Expand Up @@ -83,6 +83,7 @@ void HexBin::addArgs(ProgramArgs& args)
m_cullArg = &args.add("hole_cull_area_tolerance", "Tolerance area to "
"apply to holes before cull", m_cullArea);
args.add("smooth", "Smooth boundary output", m_doSmooth, true);
args.add("preserve_topology", "Preserve topology when smoothing", m_preserve_topology, true);
}


Expand Down Expand Up @@ -236,7 +237,7 @@ void HexBin::done(PointTableRef table)
}

if (m_doSmooth)
p.simplify(tolerance, cull);
p.simplify(tolerance, cull, m_preserve_topology);

std::string boundary_text = p.wkt(m_precision);

Expand Down
1 change: 1 addition & 0 deletions filters/HexBinFilter.hpp
Expand Up @@ -71,6 +71,7 @@ class PDAL_DLL HexBin : public Filter, public Streamable
bool m_outputTesselation;
bool m_doSmooth;
point_count_t m_count;
bool m_preserve_topology;

virtual void addArgs(ProgramArgs& args);
virtual void ready(PointTableRef table);
Expand Down

0 comments on commit 32fccfa

Please sign in to comment.