LSDTopoTools
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Protected Attributes | List of all members
LSDCloud Class Reference

This code houses the LSDCloud object, and associated functions, designed to analyse 3D pointcloud data, such as airborne LiDAR, and interface with the raster based LSDTopotools. Currently reads .las files, but this could be expanded in the future to include other input types. More...

#include <LSDCloudBase.hpp>

Public Member Functions

LSDCloudoperator= (const LSDCloud &cloud_object)
 
 LSDCloud (string las_file, int filter, const double octree_resolution)
 create an LSDCloud from a las file. More...
 
 LSDCloud (string las_file, LSDRaster &Raster, int filter)
 
 LSDCloud (LSDRaster &raster)
 create an LSDCloud from a raster.
 
 LSDCloud (PointData &point_data, LSDRaster &raster)
 create an LSDCloud from a PointData object (see LSDShapeTools module)
 
 LSDCloud (int n_pts, float x_min, float x_max, float y_min, float y_max, float x_offset, float y_offset, pcl::PointCloud< pcl::PointXYZI >::Ptr cloud, const double resolution)
 
int get_NPts () const
 
float get_XMin () const
 
float get_YMin () const
 
float get_XMax () const
 
float get_YMax () const
 
float get_XOffset () const
 
float get_YOffset () const
 
pcl::PointCloud
< pcl::PointXYZI >::Ptr 
get_theCloud () const
 
float get_OctreeResolution () const
 
float get_point_x (int index)
 
float get_point_y (int index)
 
void read_las_header (string in_file, bool SetOffsetsFromTile)
 Read in header information, updating georeferencing as specified. More...
 
void read_las_data (string in_file)
 Reads the data from a .las file into the LSDCloud object. More...
 
void read_las_data_ground (string in_file)
 Reads the ground points from a .las file into the LSDCloud. More...
 
void read_las_data_vegetation (string in_file)
 Reads the vegetation points from a .las file into the LSDCloud. More...
 
void raster_to_cloud (LSDRaster &raster)
 Read in data from an LSDRaster into a LSDCloud object. More...
 
void PointData_to_cloud (PointData &point_data, LSDRaster &raster)
 Read in data from a PointData (LSDShapeTools) into a LSDCloud. More...
 
void RadiusSearch2D (float searchPoint_x, float searchPoint_y, float searchRadius, vector< float > &pointValues, vector< int > &pointIndex, vector< float > &pointSquaredDistance)
 Conducts a focal search (in xy plane), to find all points within defined search radius. More...
 
void NearestNeighbourSearch2D (float searchPoint_x, float searchPoint_y, int K, vector< float > &pointValues, vector< int > &pointIndex, vector< float > &pointSquaredDistance)
 Conducts a focal search (in the xy plane), to find the nearest K points. More...
 

Protected Attributes

pcl::PointCloud
< pcl::PointXYZI >::Ptr 
theCloud
 
double OctreeResolution
 
pcl::octree::OctreePointCloudSearch
< pcl::PointXYZI > * 
cloudOctree
 
float XMin
 
float YMin
 
float XMax
 
float YMax
 
float XOffset
 
float YOffset
 
int NPts
 

Detailed Description

This code houses the LSDCloud object, and associated functions, designed to analyse 3D pointcloud data, such as airborne LiDAR, and interface with the raster based LSDTopotools. Currently reads .las files, but this could be expanded in the future to include other input types.

Author
DTM
Date
17/02/14

Constructor & Destructor Documentation

LSDCloud::LSDCloud ( string  las_file,
int  filter,
const double  octree_resolution 
)
inline

create an LSDCloud from a las file.

Three options for filtering: 0 -> no filter 1 -> vegetation only 2 -> ground

Member Function Documentation

void LSDCloud::NearestNeighbourSearch2D ( float  searchPoint_x,
float  searchPoint_y,
int  K,
vector< float > &  pointValues,
vector< int > &  pointIndex,
vector< float > &  pointSquaredDistance 
)

Conducts a focal search (in the xy plane), to find the nearest K points.

Points are arranged according to proximity to the query point

Parameters
float-> the x coordinate of the query point
float-> the y coordinate of the query point
int-> the number of points to find
vector<float>-> the values associated with the returned points
vector<int>-> the indexes associated with the returned points
vector<float>-> the squared distance of the returned points from the query point
Author
DTM
Date
18/02/2014
void LSDCloud::PointData_to_cloud ( PointData point_data,
LSDRaster raster 
)

Read in data from a PointData (LSDShapeTools) into a LSDCloud.

The point cloud is also structured in an octree for rapid spatial querying. Uses the PCL library (www.poinclouds.org).

Parameters
PointData-> x,y coordinate strucure to load into cloud
LSDRaster-> raster used as spatial reference frame
Author
DTM
Date
11/04/2014
void LSDCloud::RadiusSearch2D ( float  searchPoint_x,
float  searchPoint_y,
float  searchRadius,
vector< float > &  pointValues,
vector< int > &  pointIndex,
vector< float > &  pointSquaredDistance 
)

Conducts a focal search (in xy plane), to find all points within defined search radius.


SEARCH TOOLS

Points are arranged according to proximity to the query point

Parameters
float-> the x coordinate of the query point
float-> the y coordinate of the query point
float-> the search radius
vector<float>-> the values associated with the returned points
vector<int>-> the indexes associated with the returned points
vector<float>-> the squared distance of the returned points from the query point
Author
DTM
Date
18/02/2014
void LSDCloud::raster_to_cloud ( LSDRaster raster)

Read in data from an LSDRaster into a LSDCloud object.

The point cloud is also structured in an octree for rapid spatial querying. Uses the PCL library (www.poinclouds.org).

Parameters
LSDRaster-> raster to convert to a LSDCloud
Author
DTM
Date
18/02/2014
void LSDCloud::read_las_data ( string  in_file)

Reads the data from a .las file into the LSDCloud object.

The point cloud is also structured in an octree for rapid spatial querying. Uses the PCL library (www.poinclouds.org).

Parameters
string-> the name of the input file
Author
DTM
Date
18/02/2014
void LSDCloud::read_las_data_ground ( string  in_file)

Reads the ground points from a .las file into the LSDCloud.

The point cloud is also structured in an octree for rapid spatial querying. Uses the PCL library (www.poinclouds.org).

Parameters
string-> the name of the input file
Author
DTM
Date
18/02/2014
void LSDCloud::read_las_data_vegetation ( string  in_file)

Reads the vegetation points from a .las file into the LSDCloud.

The point cloud is also structured in an octree for rapid spatial querying. Uses the PCL library (www.poinclouds.org).

Parameters
string-> the name of the input file
Author
DTM
Date
18/02/2014
void LSDCloud::read_las_header ( string  in_file,
bool  SetOffsetsFromTile 
)

Read in header information, updating georeferencing as specified.

If origin shift specified (e.g. using lower left corner of a LSDRaster), set SetOffsetsFromTile to FALSE. If origin shift is unspecified, use lower left corner of las tile and set SetOffsetsFromTile to TRUE. This uses the i/o routines from liblas (www.liblas.org)

Parameters
string-> the name of the input file
float-> Xminimum
float-> YMinimum
Author
DTM
Date
18/02/2014

The documentation for this class was generated from the following files: