Read and write points (with or without additional properties) in LAS format. 
|  | 
| template<typename PointMap > | 
| std::tuple< PointMap, typename Kernel_traits< typename PointMap::value_type >::Kernel::Construct_point_3, LAS_property::X, LAS_property::Y, LAS_property::Z > | CGAL::make_las_point_reader (PointMap point_map) | 
|  | 
| template<typename OutputIteratorValueType , typename OutputIterator , typename ... PropertyHandler> | 
| bool | CGAL::read_las_points_with_properties (std::istream &stream, OutputIterator output, PropertyHandler &&... properties) | 
|  | 
| template<typename OutputIteratorValueType , typename OutputIterator , typename NamedParameters > | 
| bool | CGAL::read_las_points (std::istream &stream, OutputIterator output, const NamedParameters &np) | 
|  | 
| template<typename PointMap > | 
| std::tuple< PointMap, LAS_property::X, LAS_property::Y, LAS_property::Z > | CGAL::make_las_point_writer (PointMap point_map) | 
|  | 
| template<typename PointRange , typename PointMap , typename ... PropertyHandler> | 
| bool | CGAL::write_las_points_with_properties (std::ostream &stream, const PointRange &points, std::tuple< PointMap, LAS_property::X, LAS_property::Y, LAS_property::Z > point_property, PropertyHandler &&... properties) | 
|  | 
| template<typename PointRange , typename NamedParameters > | 
| bool | CGAL::write_las_points (std::ostream &stream, const PointRange &points, const NamedParameters &np) | 
|  | 
◆ make_las_point_reader()
template<typename PointMap > 
      
        
          | std::tuple<PointMap, typename Kernel_traits<typename PointMap::value_type>::Kernel::Construct_point_3, LAS_property::X, LAS_property::Y, LAS_property::Z > CGAL::make_las_point_reader | ( | PointMap | point_map | ) |  | 
      
 
 
◆ make_las_point_writer()
template<typename PointMap > 
      
        
          | std::tuple<PointMap, LAS_property::X, LAS_property::Y, LAS_property::Z > CGAL::make_las_point_writer | ( | PointMap | point_map | ) |  | 
      
 
#include <CGAL/IO/write_las_points.h>
Generates a LAS property handler to write 3D points.
- See also
- write_las_points_with_properties()
- Template Parameters
- 
  
    | PointMap | the property map used to store points. |  
 
 
 
◆ read_las_points()
template<typename OutputIteratorValueType , typename OutputIterator , typename NamedParameters > 
      
        
          | bool CGAL::read_las_points | ( | std::istream & | stream, | 
        
          |  |  | OutputIterator | output, | 
        
          |  |  | const NamedParameters & | np | 
        
          |  | ) |  |  | 
      
 
#include <CGAL/IO/read_las_points.h>
Reads points (position only) from a .las or .laz stream. Potential additional properties are ignored.
- Template Parameters
- 
  
    | OutputIteratorValueType | type of objects that can be put in OutputIterator. It is default tovalue_type_traits<OutputIterator>::typeand can be omitted when the default is fine. |  | OutputIterator | iterator over output points. |  
 
- Parameters
- 
  
    | stream | input stream. |  | output | output iterator over points. |  | np | optional sequence of Named Parameters among the ones listed below. |  
 
- Named Parameters
- 
- Returns
- true on success.
- Warning
- This function requires a C++11 compiler. 
 
 
◆ read_las_points_with_properties()
template<typename OutputIteratorValueType , typename OutputIterator , typename ... PropertyHandler> 
      
        
          | bool CGAL::read_las_points_with_properties | ( | std::istream & | stream, | 
        
          |  |  | OutputIterator | output, | 
        
          |  |  | PropertyHandler &&... | properties | 
        
          |  | ) |  |  | 
      
 
#include <CGAL/IO/read_las_points.h>
Reads user-selected points properties from a .las or .laz stream. Potential additional properties are ignored.
Properties are handled through a variadic list of property handlers. A PropertyHandler can either be:
- A std::pair<PropertyMap, LAS_property::Tag >if the user wants to read a LAS property as a scalar valueLAS_property::Tag::type(for example, storing anintLAS property into anintvariable).
- A std::tuple<PropertyMap, Constructor, LAS_property::Tag...>if the user wants to use one or several LAS properties to construct a complex object (for example, storing 4unsigned shortLAS properties into a Color object that can for example be astd::array<unsigned short, 4>). In that case, the second element of the tuple should be a functor that constructs the value type ofPropertyMapfrom N objects of of typeLAS_property::Tag::type.
The LAS standard defines a fixed set of properties accessible through the following tag classes:
- LAS_property::Xwith type- double
- LAS_property::Ywith type- double
- LAS_property::Zwith type- double
- LAS_property::Intensitywith type- unsigned short
- LAS_property::Return_numberwith type- unsigned char
- LAS_property::Number_of_returnswith type- unsigned char
- LAS_property::Scan_direction_flagwith type- unsigned char
- LAS_property::Edge_of_flight_linewith type- unsigned char
- LAS_property::Classificationwith type- unsigned char
- LAS_property::Synthetic_flagwith type- unsigned char
- LAS_property::Keypoint_flagwith type- unsigned char
- LAS_property::Withheld_flagwith type- unsigned char
- LAS_property::Scan_anglewith type- double
- LAS_property::User_datawith type- unsigned char
- LAS_property::Point_source_IDwith type- unsigned short
- LAS_property::Deleted_flagwith type- unsigned int
- LAS_property::GPS_timewith type- double
- LAS_property::Rwith type- unsigned short
- LAS_property::Gwith type- unsigned short
- LAS_property::Bwith type- unsigned short
- LAS_property::Iwith type- unsigned short
- Warning
- This function requires a C++11 compiler.
- See also
- make_las_point_reader()
- Template Parameters
- 
  
    | OutputIteratorValueType | type of objects that can be put in OutputIterator. It is default tovalue_type_traits<OutputIterator>::typeand can be omitted when the default is fine. |  | OutputIterator | iterator over output points. |  | PropertyHandler | handlers to recover properties. |  
 
- Returns
- trueon success.
- Examples
- Point_set_processing_3/read_las_example.cpp.
 
 
◆ write_las_points()
template<typename PointRange , typename NamedParameters > 
      
        
          | bool CGAL::write_las_points | ( | std::ostream & | stream, | 
        
          |  |  | const PointRange & | points, | 
        
          |  |  | const NamedParameters & | np | 
        
          |  | ) |  |  | 
      
 
#include <CGAL/IO/write_las_points.h>
Saves the range of points (positions only) to a .las stream.
- Template Parameters
- 
  
    | PointRange | is a model of ConstRange. The value type of its iterator is the key type of the named parameterpoint_map. |  
 
- Parameters
- 
  
    | stream | output stream. |  | points | input point range. |  | np | optional sequence of Named Parameters among the ones listed below. |  
 
- Named Parameters
- 
- Returns
- true on success. 
- Warning
- This function requires a C++11 compiler. 
 
 
◆ write_las_points_with_properties()
template<typename PointRange , typename PointMap , typename ... PropertyHandler> 
      
        
          | bool CGAL::write_las_points_with_properties | ( | std::ostream & | stream, | 
        
          |  |  | const PointRange & | points, | 
        
          |  |  | std::tuple< PointMap, LAS_property::X, LAS_property::Y, LAS_property::Z > | point_property, | 
        
          |  |  | PropertyHandler &&... | properties | 
        
          |  | ) |  |  | 
      
 
#include <CGAL/IO/write_las_points.h>
Saves the range of points with properties to a .las stream.
Properties are handled through a variadic list of property handlers. A PropertyHandle is a std::pair<PropertyMap, LAS_property::Tag > used to write a scalar value LAS_property::Tag::type as a LAS property (for example, writing an int vairable as an int LAS property). An exception is used for points that are written using a std::tuple object.
See documentation of read_las_points_with_properties() for the list of available LAS_property::Tag classes.
- See also
- make_las_point_writer()
- Warning
- This function requires a C++11 compiler.
- Template Parameters
- 
  
    | PointRange | is a model of ConstRange. The value type of its iterator is the key type of the named parameterpoint_map. |  | PointMap | is a model of ReadablePropertyMapwith a value_type =CGAL::Point_3. |  | PropertyHandler | handlers to recover properties. |  
 
- Returns
- trueon success.
- Parameters
- 
  
    | stream | output stream. |  | points | input point range. |  | point_property | property handler for points |  | properties | parameter pack of property handlers |