Permalink
Browse files

fix up filters.inplacereprojection to do its operations on the PointB…

…uffer, not the Stage
  • Loading branch information...
1 parent 74a29ac commit e48b86de570d49f56d33b15290ca58e20d089c6e @hobu hobu committed May 1, 2012
@@ -86,10 +86,6 @@ class PDAL_DLL InPlaceReprojection : public Filter
void processBuffer(PointBuffer& data) const;
-private:
- void updateBounds();
- void checkImpedance();
- void transform(double& x, double& y, double& z) const;
double getScaledValue(PointBuffer& data,
Dimension const& d,
std::size_t pointIndex) const;
@@ -98,6 +94,11 @@ class PDAL_DLL InPlaceReprojection : public Filter
Dimension const& d,
std::size_t pointIndex) const;
+ void transform(double& x, double& y, double& z) const;
+
+private:
+
+
SpatialReference m_inSRS;
SpatialReference m_outSRS;
bool m_inferInputSRS;
@@ -108,16 +109,6 @@ class PDAL_DLL InPlaceReprojection : public Filter
ReferencePtr m_out_ref_ptr;
TransformPtr m_transform_ptr;
- Dimension m_x;
- Dimension m_y;
- Dimension m_z;
-
- double m_x_scale;
- double m_y_scale;
- double m_z_scale;
- double m_x_offset;
- double m_y_offset;
- double m_z_offset;
boost::shared_ptr<pdal::gdal::Debug> m_gdal_debug;
InPlaceReprojection& operator=(const InPlaceReprojection&); // not implemented
@@ -140,6 +131,21 @@ class PDAL_DLL InPlaceReprojection : public pdal::FilterSequentialIterator
boost::uint32_t readBufferImpl(PointBuffer&);
bool atEndImpl() const;
+ void alterSchema(pdal::PointBuffer&);
+
+ std::map<dimension::id, dimension::id> m_dimension_map;
+
+ dimension::id m_new_x_id;
+ dimension::id m_new_y_id;
+ dimension::id m_new_z_id;
+
+ dimension::id m_old_x_id;
+ dimension::id m_old_y_id;
+ dimension::id m_old_z_id;
+
+ void updateBounds(PointBuffer&);
+
+
const pdal::filters::InPlaceReprojection& m_reprojectionFilter;
};
Oops, something went wrong.

0 comments on commit e48b86d

Please sign in to comment.