Skip to content

Commit

Permalink
Merge branch 'master' of github.com:PDAL/PDAL
Browse files Browse the repository at this point in the history
  • Loading branch information
hobu committed Jun 25, 2013
2 parents 682c2e1 + 85ec4cf commit 3f5c97f
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 15 deletions.
8 changes: 4 additions & 4 deletions doc/pipeline/drivers.las.reader.txt
@@ -1,7 +1,7 @@
.. _drivers.las.reader.txt:
.. _drivers.las.reader:

drivers.las.reader.txt
======================
drivers.las.reader
==================

The **LAS Reader** supports reading from `LAS format`_ files, the standard interchange format for LIDAR data.

Expand Down Expand Up @@ -29,4 +29,4 @@ filename


.. _LAS format: http://asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html


8 changes: 4 additions & 4 deletions doc/pipeline/drivers.las.writer.txt
@@ -1,7 +1,7 @@
.. _drivers.las.writer.txt:
.. _drivers.las.writer:

drivers.las.writer.txt
======================
drivers.las.writer
==================

The **LAS Writer** supports writing to `LAS format`_ files, the standard interchange file format for LIDAR data.

Expand Down Expand Up @@ -61,4 +61,4 @@ datarecordlength


.. _LAS format: http://asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html


2 changes: 1 addition & 1 deletion doc/pipeline/filters.crop.txt
@@ -1,7 +1,7 @@
.. _filters.crop:

filters.crop
==================
============

The cropping filter takes a stream of points and removes points that fall outside the cropping bounds, or an optional cropping polygon. The cropping filter requires a bounds or a polygon to crop with.

Expand Down
2 changes: 1 addition & 1 deletion doc/pipeline/filters.inplacereprojection.txt
Expand Up @@ -63,7 +63,7 @@ scale_x, scale_y, scale_z
Output scales of the X, Y and Z dimensions respectively. When changing from projected to geographic, or vice versa, remember to set an output scale appropriate to the final coordinate magnitude. [Default: Scale of the input dimension]

ignore_old_dimensions
TBD [Default: **true**]
Marking original dimensions as ignored will cause them to not be written out by the writer at the end of the chain. [Default: **true**]

do_offset_z
TDB [Default: **false**]
18 changes: 13 additions & 5 deletions src/filters/InPlaceReprojection.cpp
Expand Up @@ -248,21 +248,29 @@ Schema InPlaceReprojection::alterSchema(Schema& schema)
log()->get(logDEBUG3) << "Fetched x_name: " << dimX;
log()->get(logDEBUG3) << "Fetched y_name: " << dimY;
log()->get(logDEBUG3) << "Fetched z_name: " << dimZ;

double offset_x = getOptions().getValueOrDefault<double>("offset_x", dimX.getNumericOffset());
double offset_y = getOptions().getValueOrDefault<double>("offset_y", dimY.getNumericOffset());
double offset_z = getOptions().getValueOrDefault<double>("offset_z", dimZ.getNumericOffset());

/* Start with the incoming dimension offsets */
double offset_x = dimX.getNumericOffset();
double offset_y = dimY.getNumericOffset();
double offset_z = dimZ.getNumericOffset();

/* Reproject incoming offsets to new coordinate system */
log()->floatPrecision(8);

log()->get(logDEBUG2) << "original offset x,y: " << offset_x <<"," << offset_y << std::endl;
reprojectOffsets(offset_x, offset_y, offset_z);
log()->get(logDEBUG2) << "reprojected offset x,y: " << offset_x <<"," << offset_y << std::endl;

/* If user-specified offsets exist, use those instead of the reprojected offsets */
offset_x = getOptions().getValueOrDefault<double>("offset_x", offset_x);
offset_y = getOptions().getValueOrDefault<double>("offset_y", offset_y);
offset_z = getOptions().getValueOrDefault<double>("offset_z", offset_z);

/* Read any user-specified scales */
double scale_x = getOptions().getValueOrDefault<double>("scale_x", dimX.getNumericScale());
double scale_y = getOptions().getValueOrDefault<double>("scale_y", dimY.getNumericScale());
double scale_z = getOptions().getValueOrDefault<double>("scale_z", dimZ.getNumericScale());

/* Apply scaling/offset to output schema */
setDimension(x_name, m_old_x_id, m_new_x_id, schema, scale_x, offset_x);
setDimension(y_name, m_old_y_id, m_new_y_id, schema, scale_y, offset_y);
setDimension(z_name, m_old_z_id, m_new_z_id, schema, scale_z, offset_z);
Expand Down

0 comments on commit 3f5c97f

Please sign in to comment.