Class LasWriterBuffered
- java.lang.Object
-
- org.hortonmachine.gears.io.las.core.Las
-
- org.hortonmachine.gears.io.las.core.ALasWriter
-
- org.hortonmachine.gears.io.las.core.v_1_0.LasWriterBuffered
-
- All Implemented Interfaces:
AutoCloseable
public class LasWriterBuffered extends ALasWriter
A las writer.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description LasWriterBuffered(File outFile, org.opengis.referencing.crs.CoordinateReferenceSystem crs)A las file writer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPoint(LasRecord record)Writes a point to file.voidclose()Close the writer and release resources.voidopen()Opens the file and write the header info.voidsetBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)Possibility to set the min and max bounds.voidsetBounds(ILasHeader header)Possibility to set the min and max bounds.voidsetGpsTimeType(int timeType)Defines whether GPS Week Time (0) or Adjusted Standard GPS time (1) is used on the GPSTime field of LAS records.voidsetOffset(double xOffset, double yOffset, double zOffset)Possibility to define the offset for the data.voidsetPointFormat(int pointFormat)voidsetScales(double xScale, double yScale, double zScale)Possibility to define the scale for the data.voidsetWriteGroundElevation(boolean doWriteGroundElevation)
-
-
-
Constructor Detail
-
LasWriterBuffered
public LasWriterBuffered(File outFile, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
A las file writer.- Parameters:
outFile- the output file.crs- thecrs. Ifnull, no prj file is written.
-
-
Method Detail
-
setScales
public void setScales(double xScale, double yScale, double zScale)Description copied from class:ALasWriterPossibility to define the scale for the data.If not set it defaults to 0.01,0.01,0.001.
- Specified by:
setScalesin classALasWriter- Parameters:
xScale- the x scaling value.yScale- the y scaling value.zScale- the z scaling value.
-
setOffset
public void setOffset(double xOffset, double yOffset, double zOffset)Description copied from class:ALasWriterPossibility to define the offset for the data.If not set it defaults to 0.0,0.0,0.0.
- Specified by:
setOffsetin classALasWriter- Parameters:
xOffset- the x scaling value.yOffset- the y scaling value.zOffset- the z scaling value.
-
setPointFormat
public void setPointFormat(int pointFormat)
- Specified by:
setPointFormatin classALasWriter
-
setBounds
public void setBounds(double xMin, double xMax, double yMin, double yMax, double zMin, double zMax)Description copied from class:ALasWriterPossibility to set the min and max bounds.If not set they all default to 0.
- Specified by:
setBoundsin classALasWriter
-
setBounds
public void setBounds(ILasHeader header)
Description copied from class:ALasWriterPossibility to set the min and max bounds.- Specified by:
setBoundsin classALasWriter- Parameters:
header- the las header (as read by the reader).
-
open
public void open() throws ExceptionDescription copied from class:ALasWriterOpens the file and write the header info.- Specified by:
openin classALasWriter- Throws:
Exception
-
addPoint
public void addPoint(LasRecord record) throws IOException
Description copied from class:ALasWriterWrites a point to file.- Specified by:
addPointin classALasWriter- Parameters:
record- the point record.- Throws:
IOException
-
close
public void close() throws ExceptionDescription copied from class:ALasWriterClose the writer and release resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein classALasWriter- Throws:
Exception
-
setWriteGroundElevation
public void setWriteGroundElevation(boolean doWriteGroundElevation)
- Specified by:
setWriteGroundElevationin classALasWriter
-
setGpsTimeType
public void setGpsTimeType(int timeType)
Description copied from class:ALasWriterDefines whether GPS Week Time (0) or Adjusted Standard GPS time (1) is used on the GPSTime field of LAS records.- Specified by:
setGpsTimeTypein classALasWriter- Parameters:
timeType- 0 to set GPS Week Time or 1 to set Adjusted Standard GPS time.
-
-