diff --git a/doc/pipeline/drivers.las.reader.txt b/doc/pipeline/drivers.las.reader.txt index 81460f5194..3cea5b38b1 100644 --- a/doc/pipeline/drivers.las.reader.txt +++ b/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. @@ -29,4 +29,4 @@ filename .. _LAS format: http://asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html - \ No newline at end of file + diff --git a/doc/pipeline/drivers.las.writer.txt b/doc/pipeline/drivers.las.writer.txt index f264f81ea8..d23c85cc42 100644 --- a/doc/pipeline/drivers.las.writer.txt +++ b/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. @@ -61,4 +61,4 @@ datarecordlength .. _LAS format: http://asprs.org/Committee-General/LASer-LAS-File-Format-Exchange-Activities.html - \ No newline at end of file + diff --git a/doc/pipeline/filters.crop.txt b/doc/pipeline/filters.crop.txt index 70eb9b348f..7100e4591b 100644 --- a/doc/pipeline/filters.crop.txt +++ b/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. diff --git a/doc/pipeline/filters.inplacereprojection.txt b/doc/pipeline/filters.inplacereprojection.txt index d086f13cee..aff721674f 100644 --- a/doc/pipeline/filters.inplacereprojection.txt +++ b/doc/pipeline/filters.inplacereprojection.txt @@ -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**] diff --git a/src/filters/InPlaceReprojection.cpp b/src/filters/InPlaceReprojection.cpp index 3f7c0b1d86..832f39dbb9 100644 --- a/src/filters/InPlaceReprojection.cpp +++ b/src/filters/InPlaceReprojection.cpp @@ -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("offset_x", dimX.getNumericOffset()); - double offset_y = getOptions().getValueOrDefault("offset_y", dimY.getNumericOffset()); - double offset_z = getOptions().getValueOrDefault("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("offset_x", offset_x); + offset_y = getOptions().getValueOrDefault("offset_y", offset_y); + offset_z = getOptions().getValueOrDefault("offset_z", offset_z); + + /* Read any user-specified scales */ double scale_x = getOptions().getValueOrDefault("scale_x", dimX.getNumericScale()); double scale_y = getOptions().getValueOrDefault("scale_y", dimY.getNumericScale()); double scale_z = getOptions().getValueOrDefault("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);