Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into gdalwriter
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Aug 28, 2017
2 parents 5ffbe16 + 3d1cf9b commit fba770e
Show file tree
Hide file tree
Showing 23 changed files with 111 additions and 15 deletions.
21 changes: 21 additions & 0 deletions doc/faq.rst
Expand Up @@ -11,6 +11,27 @@ FAQ
The proper spelling of the project name is PDAL, in uppercase. It is
pronounced to rhyme with "GDAL".

* Why do I get the error "Couldn't create ... stage of type ..."?

In almost all cases this error occurs because you're trying to run a stage
that is built as a plugin and the plugin (a shared library file or DLL)
can't be found by pdal. You can verify whether the plugin can
be found by running "pdal --drivers"

If you've built pdal yourself, make sure you've requested to build the
plugin in question (set BUILD_PLUGIN_PCL=ON, for example, in CMakeCache.txt).

If you've successfully built the plugin, a
shared object called
libpdal_plugin_<plugin type>_<plugin name>.<shared library extension> should
have been created that's installed in a location where pdal can find it.
pdal will search
the following paths for plugins: ".", "./lib", "../lib", "./bin", "../bin".

You can also override the default search path by setting the environment
variable PDAL_DRIVER_PATH to a list of directories that pdal should search
for plugins.

* What is PDAL's relationship to PCL?

PDAL is PCL's data translation cousin. PDAL is focused on providing a
Expand Down
2 changes: 2 additions & 0 deletions doc/stages/readers.bpf.rst
Expand Up @@ -42,3 +42,5 @@ Options
filename
BPF file to read [Required]

count
Maximum number of points to read [Optional]
5 changes: 3 additions & 2 deletions doc/stages/readers.gdal.rst
Expand Up @@ -63,7 +63,7 @@ RGB values of an `ASPRS LAS`_ file using :ref:`writers.las`.
"filename":"./pdal/test/data/autzen/autzen.jpg"
},
{
"type":"filters.ferry"
"type":"filters.ferry",
"dimensions":"band-1=Red, band-2=Green, band-3=Blue",
},
{
Expand All @@ -83,4 +83,5 @@ filename

.. _`GDALOpen`: http://www.gdal.org/gdal_8h.html#a6836f0f810396c5e45622c8ef94624d4


count
Maximum number of points to read [Optional]
2 changes: 2 additions & 0 deletions doc/stages/readers.greyhound.rst
Expand Up @@ -94,3 +94,5 @@ _`threads`
.. _comparison: https://docs.mongodb.com/manual/reference/operator/query-comparison/
.. _logical: https://docs.mongodb.com/manual/reference/operator/query-logical/

_`count`
Maximum number of points to read [Optional]
3 changes: 3 additions & 0 deletions doc/stages/readers.ilvis2.rst
Expand Up @@ -46,3 +46,6 @@ mapping

metadata
XML metadata file to coincidentally read [Optional]

count
Maximum number of points to read [Optional]
5 changes: 4 additions & 1 deletion doc/stages/readers.las.rst
Expand Up @@ -93,7 +93,7 @@ _`extra_dims`

_`compression`
May be set to "lazperf" or "laszip" to choose either the LazPerf decompressor
or the LasZip decompressor for LAZ files. PDAL must have been build with
or the LASzip decompressor for LAZ files. PDAL must have been built with
support for the decompressor being requested. The LazPerf decompressor
doesn't support version 1 LAZ files or version 1.4 of LAS.
[Default: "laszip"]
Expand All @@ -102,3 +102,6 @@ _`spatialreference`
Sets the spatial reference for the file data. Overrides any spatial
reference information in the file itself. Most text-based formats of
SRS information are accepted, including WKT and proj.4.

_`count`
Maximum number of points read [Optional]
3 changes: 3 additions & 0 deletions doc/stages/readers.mbio.rst
Expand Up @@ -55,3 +55,6 @@ format
.. _MB-System: http://www.ldeo.columbia.edu/res/pi/MB-System/

.. _all formats: https://www.ldeo.columbia.edu/res/pi/MB-System/html/mbio.html#lbAI

count
Maximum number of points to read [Optional]
2 changes: 1 addition & 1 deletion doc/stages/readers.mrsid.rst
@@ -1,4 +1,4 @@
.. _readers.mrsid:
.. _readers.mrsid:

readers.mrsid
=============
Expand Down
14 changes: 14 additions & 0 deletions doc/stages/readers.nitf.rst
Expand Up @@ -60,7 +60,21 @@ Options
filename
Filename to read from [Required]

count
Maximum number of points to read [Optional]

spatialreference
Spatial reference to apply to data

extra_dims
Dimensions to assign to extra byte data

compression
May be set to "lazperf" or "laszip" to choose either the LazPerf decompressor
or the LASzip decompressor for LAZ files. PDAL must have been built with
support for the decompressor being requested. The LazPerf decompressor
doesn't support version 1 LAZ files or version 1.4 of LAS.
[Default: "laszip"]

.. _NITF: http://en.wikipedia.org/wiki/National_Imagery_Transmission_Format

Expand Down
3 changes: 3 additions & 0 deletions doc/stages/readers.optech.rst
Expand Up @@ -35,3 +35,6 @@ Options

filename
csd file to read [Required]

count
Maximum number of points read [Optional]
3 changes: 2 additions & 1 deletion doc/stages/readers.pcd.rst
Expand Up @@ -39,7 +39,8 @@ Options
filename
PCD file to read [Required]


count
Maximum number of points to read [Optional]

.. _Point Cloud Data (PCD): http://pointclouds.org/documentation/tutorials/pcd_file_format.php
.. _Point Cloud Library (PCL): http://pointclouds.org
Expand Down
10 changes: 6 additions & 4 deletions doc/stages/readers.pgpointcloud.rst
Expand Up @@ -52,9 +52,11 @@ column
Table column to read patches from. [Default: **pa**]

spatialreference
_`spatialreference`
Sets the spatial reference for the point data. Overrides any spatial
reference information read from the database. Most text-based formats of
SRS information are accepted, including WKT and proj.4.
Sets the spatial reference for the point data. Overrides any spatial
reference information read from the database. Most text-based formats of
SRS information are accepted, including WKT and proj.4.

count
Maximum number of points to read [Optional]

.. _PostgreSQL Pointcloud: https://github.com/pramsey/pointcloud
3 changes: 2 additions & 1 deletion doc/stages/readers.ply.rst
Expand Up @@ -41,7 +41,8 @@ Options
filename
ply file to read [Required]


count
Maximum number of points to read [Optional]

.. _polygon file format: http://paulbourke.net/dataformats/ply/
.. _rply library: http://w3.impa.br/~diego/software/rply/
2 changes: 2 additions & 0 deletions doc/stages/readers.pts.rst
Expand Up @@ -35,3 +35,5 @@ Options
filename
text file to read [Required]

count
Maximum number of points to read [Optional]
2 changes: 2 additions & 0 deletions doc/stages/readers.qfit.rst
Expand Up @@ -45,6 +45,8 @@ scale_z
little_endian
Are data in little endian format? This should be automatically detected by the driver.

count
Maximum number of points to read [Optional]

.. _QFIT format: http://nsidc.org/data/docs/daac/icebridge/ilatm1b/docs/ReadMe.qfit.txt

Expand Down
3 changes: 3 additions & 0 deletions doc/stages/readers.sbet.rst
Expand Up @@ -28,3 +28,6 @@ Options

filename
File to read from [Required]

count
Maximum number of points to read [Optional]
2 changes: 2 additions & 0 deletions doc/stages/readers.sqlite.rst
Expand Up @@ -42,5 +42,7 @@ query
spatialreference
The spatial reference to use for the points. Over-rides the value read from the database.

count
Maximum number of points to read [Optional]

.. _SQLite: https://sqlite.org/
3 changes: 3 additions & 0 deletions doc/stages/readers.text.rst
Expand Up @@ -70,4 +70,7 @@ filename
separator
Separator character to override that found in header line.

count
Maximum number of points to read [Optional]

.. _formatted: http://en.cppreference.com/w/cpp/string/basic_string/stof
3 changes: 3 additions & 0 deletions doc/stages/readers.tindex.rst
Expand Up @@ -105,6 +105,9 @@ dialect
`OGR SQL`_ dialect to use when querying tile index layer
[Default: OGRSQL]

count
Maximum number of points to read [Optional]

.. _`OGR SQL`: http://www.gdal.org/ogr_sql.html


Expand Down
2 changes: 1 addition & 1 deletion doc/stages/writers.las.rst
Expand Up @@ -152,7 +152,7 @@ system_id

a_srs
The spatial reference system of the file to be written. Can be an EPSG string
(e.g. "EPSG:268910") or a WKT string. [Default: Not set]
(e.g. "EPSG:26910") or a WKT string. [Default: Not set]

global_encoding
Various indicators to describe the data. See the LAS documentation. Note
Expand Down
23 changes: 21 additions & 2 deletions io/LasWriter.cpp
Expand Up @@ -397,11 +397,30 @@ void LasWriter::setPDALVLRs(MetadataNode& forward)
std::ostringstream ostr;
Utils::toJSON(forward, ostr);
std::string json = ostr.str();
store(ostr.str(), 12, "PDAL metadata");

if (json.size() > LasVLR::MAX_DATA_SIZE &&
m_minorVersion.val() < 4)
{
log()->get(LogLevel::Debug) << "pdal metadata VLR too large "
"to write in VLR for files < LAS 1.4";
} else
{
store(json, 12, "PDAL metadata");
}


ostr.str("");
PipelineWriter::writePipeline(this, ostr);
store(ostr.str(), 13, "PDAL pipeline");
json = ostr.str();
if (json.size() > LasVLR::MAX_DATA_SIZE &&
m_minorVersion.val() < 4)
{
log()->get(LogLevel::Debug) << "pdal pipeline VLR too large "
"to write in VLR for files < LAS 1.4";
} else
{
store(ostr.str(), 13, "PDAL pipeline");
}
}


Expand Down
2 changes: 1 addition & 1 deletion plugins/cpd/filters/CpdFilter.cpp
Expand Up @@ -45,7 +45,7 @@ namespace
{
void movePoints(PointViewPtr moving, const cpd::Matrix& result)
{
assert(moving->size() == result.rows());
assert(moving->size() == (point_count_t)result.rows());
for (PointId i = 0; i < moving->size(); ++i)
{
moving->setField(Dimension::Id::X, i, result(i, 0));
Expand Down
8 changes: 7 additions & 1 deletion test/unit/apps/pcpipelineTestJSON.cpp
Expand Up @@ -195,11 +195,17 @@ INSTANTIATE_TEST_CASE_P(plugins, jsonWithNITF,
testing::Values(
"pipeline/bpf2nitf.json",
"pipeline/las2nitf.json",
"pipeline/las2nitf-2.json",
"pipeline/las2nitf-crop-with-options.json",
"pipeline/nitf2las.json"
));

#if defined PDAL_HAVE_LASZIP || defined PDAL_HAVE_LAZPERF
INSTANTIATE_TEST_CASE_P(plugins, jsonWithNITF,
testing::Values(
"pipeline/las2nitf-2.json"
));
#endif

class jsonWithP2G : public testing::TestWithParam<const char*> {};

TEST_P(jsonWithP2G, pipeline)
Expand Down

0 comments on commit fba770e

Please sign in to comment.