You are here: The SDK Classes > The PointWriter Class

## The PointWriter Class

The PointWriter class is the base class for writing LiDAR data to files. Following is a description of each of the methods.

###### Methods for Setting Up and Writing the Output File

###### Metadata

By default the writers to not copy in the metadata from the point source. It is the responsibility of the application to retrieve the metadata from the source, modify it as necessary and then pass it to the writer using PointWriter::setMetadata(). You can also retrieve the metadata for viewing by calling PointWriter::getMetadata(),

###### Quantization

LAS and MG4 files require quantization. By default the writer uses the same quantization as the input point source (see "Quantization"). However, you can override that behavior by setting quantization explicitly using PointWriter::setQuantization(). (For more information about quantization, see "Floating Point Quantization").

To access the quantization of the output file, you can use PointWriter::getScale() and PointWriter::getOffset().

NOTE: These functions will return NULL if the input data is not quantized.

###### Writing the File

To write the output file, call PointWriter::write(). This function writes to a file the point cloud for a given bounds, fraction and set of channels (see "Specifying a Region of Interest").