libLAS API Reference  1.8.1
Macros | Typedefs | Enumerations | Functions
liblas.h File Reference
#include "las_version.h"
#include "las_config.h"
#include <liblas/export.hpp>
Include dependency graph for liblas.h:

Go to the source code of this file.

Macros

#define LIBLAS_C_API   1
 
#define LAS_MODE_READ   0
 
#define LAS_MODE_WRITE   1
 
#define LAS_MODE_APPEND   2
 

Typedefs

typedef struct LASWriterHS * LASWriterH
 
typedef struct LASReaderHS * LASReaderH
 
typedef struct LASPointHS * LASPointH
 
typedef struct LASHeaderHS * LASHeaderH
 
typedef struct LASGuidHS * LASGuidH
 
typedef struct LASVLRHS * LASVLRH
 
typedef struct LASColorHS * LASColorH
 
typedef struct LASSRSHS * LASSRSH
 
typedef struct LASSchemaHS * LASSchemaH
 

Enumerations

enum  LASError {
  LE_None = 0, LE_Debug = 1, LE_Warning = 2, LE_Failure = 3,
  LE_Fatal = 4
}
 

Functions

LAS_DLL char * LAS_GetVersion (void)
 Returns the version string for this library. More...
 
LAS_DLL char * LAS_GetFullVersion (void)
 
LAS_DLL int LAS_IsLibGeoTIFFEnabled (void)
 
LAS_DLL int LAS_IsGDALEnabled (void)
 
LAS_DLL int LAS_IsLibSpatialIndexEnabled (void)
 
LAS_DLL void LASError_Reset (void)
 Resets the error stack for the libLAS C API. More...
 
LAS_DLL void LASError_Pop (void)
 Pops the top error off of the error stack for the libLAS C API. More...
 
LAS_DLL LASError LASError_GetLastErrorNum (void)
 Returns the error number of the last error on the error stack. More...
 
LAS_DLL char * LASError_GetLastErrorMsg (void)
 Returns the name of the method the last error message happened in. More...
 
LAS_DLL char * LASError_GetLastErrorMethod (void)
 Returns the name of the method the last error message happened in. More...
 
LAS_DLL int LASError_GetErrorCount (void)
 Returns the number of error messages on the error stack. More...
 
LAS_DLL void LASError_Print (const char *message)
 Prints the last error message in the error stack to stderr. More...
 
LAS_DLL LASReaderH LASReader_Create (const char *filename)
 Creates a LASReaderH object that can be used to read LASHeaderH and LASPointH objects with. More...
 
LAS_DLL LASReaderH LASReader_CreateWithHeader (const char *filename, LASHeaderH hHeader)
 Creates a LASReaderH object that can be used to read LASHeaderH and LASPointH objects with. More...
 
LAS_DLL LASPointH LASReader_GetNextPoint (const LASReaderH hReader)
 Reads the next available point on the LASReaderH instance. More...
 
LAS_DLL LASPointH LASReader_GetPointAt (const LASReaderH hReader, unsigned int position)
 Reads a LASPointH from the given position in the LAS file represented by the LASReaderH instance. More...
 
LAS_DLL void LASReader_Destroy (LASReaderH hReader)
 Closes the file for reading operations represented by the LASReaderH instance. More...
 
LAS_DLL LASHeaderH LASReader_GetHeader (const LASReaderH hReader)
 Returns a LASHeaderH representing the header for the file. More...
 
LAS_DLL void LASReader_SetHeader (LASReaderH hReader, const LASHeaderH hHeader)
 
LAS_DLL LASError LASReader_SetSRS (LASReaderH hReader, const LASSRSH hSRS)
 
LAS_DLL LASError LASReader_SetInputSRS (LASReaderH hReader, const LASSRSH hSRS)
 
LAS_DLL LASError LASReader_SetOutputSRS (LASReaderH hReader, const LASSRSH hSRS)
 
LAS_DLL LASError LASReader_Seek (LASReaderH hReader, unsigned int position)
 Seeks to the specified point for the next LASReader_GetNextPoint operation to start from. More...
 
LAS_DLL char * LASReader_GetSummaryXML (const LASReaderH hReader)
 
LAS_DLL double LASPoint_GetX (const LASPointH hPoint)
 Returns the X value for the point. More...
 
LAS_DLL LASError LASPoint_SetX (LASPointH hPoint, double value)
 Sets the X value for the point. More...
 
LAS_DLL long LASPoint_GetRawX (const LASPointH hPoint)
 Returns the raw X value for the point. More...
 
LAS_DLL LASError LASPoint_SetRawX (LASPointH hPoint, long value)
 Sets the raw X value for the point. More...
 
LAS_DLL double LASPoint_GetY (const LASPointH hPoint)
 Gets the Y value for the point. More...
 
LAS_DLL LASError LASPoint_SetY (LASPointH hPoint, double value)
 Sets the Y value for the point. More...
 
LAS_DLL long LASPoint_GetRawY (const LASPointH hPoint)
 Gets the raw Y value for the point. More...
 
LAS_DLL LASError LASPoint_SetRawY (LASPointH hPoint, long value)
 Sets the raw Y value for the point. More...
 
LAS_DLL double LASPoint_GetZ (const LASPointH hPoint)
 Gets the Z value for the point. More...
 
LAS_DLL LASError LASPoint_SetZ (LASPointH hPoint, double value)
 Sets the Z value for the point. More...
 
LAS_DLL long LASPoint_GetRawZ (const LASPointH hPoint)
 Gets the raw Z value for the point. More...
 
LAS_DLL LASError LASPoint_SetRawZ (LASPointH hPoint, long value)
 Sets the raw Z value for the point. More...
 
LAS_DLL unsigned short LASPoint_GetIntensity (const LASPointH hPoint)
 Returns the intensity value for the point. More...
 
LAS_DLL LASError LASPoint_SetIntensity (LASPointH hPoint, unsigned short value)
 Sets the intensity value for the point. More...
 
LAS_DLL unsigned short LASPoint_GetReturnNumber (const LASPointH hPoint)
 Returns the return number for the point. More...
 
LAS_DLL LASError LASPoint_SetReturnNumber (LASPointH hPoint, unsigned short value)
 Sets the return number for the point. More...
 
LAS_DLL unsigned short LASPoint_GetNumberOfReturns (const LASPointH hPoint)
 Returns the total number of returns for a given pulse. More...
 
LAS_DLL LASError LASPoint_SetNumberOfReturns (LASPointH hPoint, unsigned short value)
 Sets the number of returns for the point. More...
 
LAS_DLL unsigned short LASPoint_GetScanDirection (const LASPointH hPoint)
 Returns the scan direction for a given pulse. More...
 
LAS_DLL LASError LASPoint_SetScanDirection (LASPointH hPoint, unsigned short value)
 Sets the scan direction for a given pulse. More...
 
LAS_DLL unsigned short LASPoint_GetFlightLineEdge (const LASPointH hPoint)
 Returns whether or not a given pulse is an edge point. More...
 
LAS_DLL LASError LASPoint_SetFlightLineEdge (LASPointH hPoint, unsigned short value)
 Sets the edge marker for a given pulse. More...
 
LAS_DLL unsigned char LASPoint_GetScanFlags (const LASPointH hPoint)
 Returns all of the scan flags for the point – Return number, number of returns, flightline edge, scan direction, and scan angle rank. More...
 
LAS_DLL LASError LASPoint_SetScanFlags (LASPointH hPoint, unsigned char value)
 Sets all of the scan flags for the point. More...
 
LAS_DLL unsigned char LASPoint_GetClassification (const LASPointH hPoint)
 Returns the classification for the point. More...
 
LAS_DLL LASError LASPoint_SetClassification (LASPointH hPoint, unsigned char value)
 Sets the classification for the point. More...
 
LAS_DLL double LASPoint_GetTime (const LASPointH hPoint)
 Returns the time for the point. More...
 
LAS_DLL LASError LASPoint_SetTime (LASPointH hPoint, double value)
 Sets the time for the point. More...
 
LAS_DLL char LASPoint_GetScanAngleRank (const LASPointH hPoint)
 Returns the scan angle for the point. More...
 
LAS_DLL LASError LASPoint_SetScanAngleRank (LASPointH hPoint, char value)
 Sets the scan angle for the point. More...
 
LAS_DLL LASError LASPoint_SetPointSourceId (LASPointH hPoint, unsigned short value)
 Sets the point source id for the point. More...
 
LAS_DLL unsigned short LASPoint_GetPointSourceId (LASPointH hPoint)
 Returns the point source id for the point. More...
 
LAS_DLL unsigned char LASPoint_GetUserData (const LASPointH hPoint)
 Returns the arbitrary user data for the point. More...
 
LAS_DLL LASError LASPoint_SetUserData (LASPointH hPoint, unsigned char value)
 Sets the arbitrary user data for the point. More...
 
LAS_DLL int LASPoint_Validate (LASPointH hPoint)
 Returns a bitfield representing the validity of various members enum DataMemberFlag { eReturnNumber = 1, eNumberOfReturns = 2, eScanDirection = 4, eFlightLineEdge = 8, eClassification = 16, eScanAngleRank = 32, eTime = 64 };. More...
 
LAS_DLL int LASPoint_IsValid (LASPointH hPoint)
 Returns a boolean whether or not the point is valid. More...
 
LAS_DLL LASPointH LASPoint_Create (void)
 Creates a new empty LASPointH instance. More...
 
LAS_DLL LASPointH LASPoint_Copy (const LASPointH hPoint)
 Creates a copy of a LASPointH instance. More...
 
LAS_DLL void LASPoint_Destroy (LASPointH hPoint)
 Destroys/deletes a LASPointH instance. More...
 
LAS_DLL LASHeaderH LASPoint_GetHeader (const LASPointH hPoint)
 Returns a LASHeaderH representing the header for the point. More...
 
LAS_DLL void LASPoint_SetHeader (LASPointH hPoint, const LASHeaderH hHeader)
 
LAS_DLL LASError LASPoint_GetData (const LASPointH hPoint, unsigned char *data)
 Gets the data stream for the VLR as an array of bytes. More...
 
LAS_DLL LASError LASPoint_SetData (LASPointH hPoint, unsigned char *data)
 Sets the data stream for the Point as an array of bytes. More...
 
LAS_DLL char * LASPoint_GetXML (const LASPointH hPoint)
 Returns an XMLized representation of the point. More...
 
LAS_DLL LASHeaderH LASHeader_Copy (const LASHeaderH hHeader)
 Copies a LASHeaderH instance. More...
 
LAS_DLL LASHeaderH LASHeader_Create (void)
 Creates an empty LASHeaderH with default values. More...
 
LAS_DLL void LASHeader_Destroy (LASHeaderH hHeader)
 Destroys/deletes a LASHeader instance. More...
 
LAS_DLL char * LASHeader_GetFileSignature (const LASHeaderH hHeader)
 Returns the file signature the the file. More...
 
LAS_DLL unsigned short LASHeader_GetFileSourceId (const LASHeaderH hHeader)
 Returns the file source id for the file. More...
 
LAS_DLL LASError LASHeader_SetFileSourceId (LASHeaderH hHeader, unsigned short value)
 Sets the FileSource ID value for the header. More...
 
LAS_DLL char * LASHeader_GetProjectId (const LASHeaderH hHeader)
 Returns the project id for the header as a GUID string. More...
 
LAS_DLL LASError LASHeader_SetProjectId (LASHeaderH hHeader, const char *value)
 Sets the project id/GUID for the header. More...
 
LAS_DLL LASError LASHeader_SetGUID (LASHeaderH hHeader, LASGuidH hId)
 Sets the project id/GUID for the header. More...
 
LAS_DLL unsigned char LASHeader_GetVersionMajor (const LASHeaderH hHeader)
 Returns the major version number for the header. More...
 
LAS_DLL LASError LASHeader_SetVersionMajor (LASHeaderH hHeader, unsigned char value)
 Sets the major version number for the header. More...
 
LAS_DLL unsigned char LASHeader_GetVersionMinor (const LASHeaderH hHeader)
 Returns the min version number for the header. More...
 
LAS_DLL LASError LASHeader_SetVersionMinor (LASHeaderH hHeader, unsigned char value)
 Sets the minor version number for the header. More...
 
LAS_DLL char * LASHeader_GetSystemId (const LASHeaderH hHeader)
 Returns the System ID for the header. More...
 
LAS_DLL LASError LASHeader_SetSystemId (LASHeaderH hHeader, const char *value)
 Sets the System ID for the header. More...
 
LAS_DLL char * LASHeader_GetSoftwareId (const LASHeaderH hHeader)
 Returns the Software ID for the header. More...
 
LAS_DLL LASError LASHeader_SetSoftwareId (LASHeaderH hHeader, const char *value)
 Sets the Software ID for the header. More...
 
LAS_DLL unsigned short LASHeader_GetReserved (const LASHeaderH hHeader)
 Returns the reserved value for the header. More...
 
LAS_DLL LASError LASHeader_SetReserved (LASHeaderH hHeader, unsigned short value)
 Sets the Reserved value for the header. More...
 
LAS_DLL unsigned short LASHeader_GetCreationDOY (const LASHeaderH hHeader)
 Returns the file creation day of the year. More...
 
LAS_DLL LASError LASHeader_SetCreationDOY (LASHeaderH hHeader, unsigned short value)
 Sets the file creation day of the year. More...
 
LAS_DLL unsigned short LASHeader_GetCreationYear (const LASHeaderH hHeader)
 Returns the file creation year. More...
 
LAS_DLL LASError LASHeader_SetCreationYear (LASHeaderH hHeader, unsigned short value)
 Sets the file creation year. More...
 
LAS_DLL unsigned short LASHeader_GetHeaderSize (const LASHeaderH hHeader)
 Returns the size of the header for the file in bytes. More...
 
LAS_DLL unsigned int LASHeader_GetDataOffset (const LASHeaderH hHeader)
 Returns the byte offset to the start of actual point data for the file. More...
 
LAS_DLL LASError LASHeader_SetDataOffset (const LASHeaderH hHeader, unsigned int value)
 Sets the location in number of bytes to start writing point data. More...
 
LAS_DLL unsigned int LASHeader_GetHeaderPadding (const LASHeaderH hHeader)
 Returns the number of bytes between the end of the VLRs on the header to the data offset. More...
 
LAS_DLL LASError LASHeader_SetHeaderPadding (const LASHeaderH hHeader, unsigned int value)
 Sets the number of bytes between the end of the VLRs on the header to the data offset. More...
 
LAS_DLL unsigned int LASHeader_GetRecordsCount (const LASHeaderH hHeader)
 Returns the number of variable length records in the header. More...
 
LAS_DLL unsigned short LASHeader_GetDataRecordLength (const LASHeaderH hHeader)
 Returns the record length for the points based on their data format id in bytes. More...
 
LAS_DLL LASError LASHeader_SetDataRecordLength (const LASHeaderH hHeader, unsigned short value)
 Explicitly set the record length for the file. More...
 
LAS_DLL unsigned char LASHeader_GetDataFormatId (const LASHeaderH hHeader)
 Returns the data format id. More...
 
LAS_DLL LASError LASHeader_SetDataFormatId (const LASHeaderH hHeader, unsigned char value)
 Sets the data format id for the file. More...
 
LAS_DLL unsigned int LASHeader_GetPointRecordsCount (const LASHeaderH hHeader)
 Returns the number of point records in the file. More...
 
LAS_DLL LASError LASHeader_SetPointRecordsCount (const LASHeaderH hHeader, unsigned int value)
 Sets the number of point records for the file. More...
 
LAS_DLL unsigned int LASHeader_GetPointRecordsByReturnCount (const LASHeaderH hHeader, int index)
 Returns the number of point records by return. More...
 
LAS_DLL LASError LASHeader_SetPointRecordsByReturnCount (const LASHeaderH hHeader, int index, unsigned int value)
 Sets the number of point records for a given return. More...
 
LAS_DLL double LASHeader_GetScaleX (const LASHeaderH hHeader)
 Return the X scale factor. More...
 
LAS_DLL double LASHeader_GetScaleY (const LASHeaderH hHeader)
 Return the Y scale factor. More...
 
LAS_DLL double LASHeader_GetScaleZ (const LASHeaderH hHeader)
 Return the Z scale factor. More...
 
LAS_DLL LASError LASHeader_SetScale (LASHeaderH hHeader, double x, double y, double z)
 Sets the scale factors. More...
 
LAS_DLL double LASHeader_GetOffsetX (const LASHeaderH hHeader)
 Return the X offset. More...
 
LAS_DLL double LASHeader_GetOffsetY (const LASHeaderH hHeader)
 Return the Y offset. More...
 
LAS_DLL double LASHeader_GetOffsetZ (const LASHeaderH hHeader)
 Return the Z offset. More...
 
LAS_DLL LASError LASHeader_SetOffset (LASHeaderH hHeader, double x, double y, double z)
 Sets the offset values. More...
 
LAS_DLL double LASHeader_GetMinX (const LASHeaderH hHeader)
 Return the minimum x value. More...
 
LAS_DLL double LASHeader_GetMinY (const LASHeaderH hHeader)
 Return the minimum y value. More...
 
LAS_DLL double LASHeader_GetMinZ (const LASHeaderH hHeader)
 Return the minimum z value. More...
 
LAS_DLL LASError LASHeader_SetMin (LASHeaderH hHeader, double x, double y, double z)
 Sets the minimum values. More...
 
LAS_DLL double LASHeader_GetMaxX (const LASHeaderH hHeader)
 Return the maximum x value. More...
 
LAS_DLL double LASHeader_GetMaxY (const LASHeaderH hHeader)
 Return the maximum y value. More...
 
LAS_DLL double LASHeader_GetMaxZ (const LASHeaderH hHeader)
 Return the maximum z value. More...
 
LAS_DLL LASError LASHeader_SetMax (LASHeaderH hHeader, double x, double y, double z)
 Sets the maximum values. More...
 
LAS_DLL LASVLRH LASHeader_GetVLR (const LASHeaderH hHeader, unsigned int i)
 Returns the VLR record for the given index. More...
 
LAS_DLL LASError LASHeader_DeleteVLR (LASHeaderH hHeader, unsigned int index)
 Deletes a VLR record from the header for the given index. More...
 
LAS_DLL LASError LASHeader_AddVLR (LASHeaderH hHeader, const LASVLRH hVLR)
 Adds a VLR record to the header. More...
 
LAS_DLL char * LASHeader_GetXML (const LASHeaderH hHeader)
 Returns an XMLized representation of the header. More...
 
LAS_DLL LASWriterH LASWriter_Create (const char *filename, const LASHeaderH hHeader, int mode)
 Creates a new LASWriterH for write operations on LAS files. More...
 
LAS_DLL LASError LASWriter_WritePoint (const LASWriterH hWriter, const LASPointH hPoint)
 Writes a point to the file. More...
 
LAS_DLL LASError LASWriter_WriteHeader (const LASWriterH hWriter, const LASHeaderH hHeader)
 Overwrites the header for the file represented by the LASWriterH. More...
 
LAS_DLL LASError LASWriter_WriteOwnedHeader (const LASWriterH hWriter)
 Overwrites the header for the file represented by the LASWriterH that was set using LASWriter_SetHeader or flushes the existing header that is on the the writer to the file and resets the file for writing. More...
 
LAS_DLL void LASWriter_Destroy (LASWriterH hWriter)
 Destroys the LASWriterH instance, effectively closing the file and performing housekeeping operations. More...
 
LAS_DLL LASHeaderH LASWriter_GetHeader (const LASWriterH hWriter)
 Returns a LASHeaderH representing the header for the file. More...
 
LAS_DLL void LASWriter_SetHeader (LASWriterH hWriter, const LASHeaderH hHeader)
 
LAS_DLL LASError LASWriter_SetSRS (LASWriterH hWriter, const LASSRSH hSRS)
 
LAS_DLL LASError LASWriter_SetInputSRS (LASWriterH hWriter, const LASSRSH hSRS)
 
LAS_DLL LASError LASWriter_SetOutputSRS (LASWriterH hWriter, const LASSRSH hSRS)
 
LAS_DLL LASGuidH LASHeader_GetGUID (const LASHeaderH hHeader)
 Returns the GUID value for the header as an opaque LASGuidH pointer. More...
 
LAS_DLL LASGuidH LASGuid_Create ()
 Returns a new random GUID. More...
 
LAS_DLL LASGuidH LASGuid_CreateFromString (const char *string)
 Creates a new GUID opaque pointer using the given string. More...
 
LAS_DLL void LASGuid_Destroy (LASGuidH hId)
 Destroys a GUID opaque pointer and removes it from the heap. More...
 
LAS_DLL int LASGuid_Equals (LASGuidH hId1, LASGuidH hId2)
 Determines if two GUIDs are equal. More...
 
LAS_DLL char * LASGuid_AsString (LASGuidH hId)
 Returns a string representation of the GUID opqaue pointer. More...
 
LAS_DLL LASVLRH LASVLR_Create (void)
 Creates a new VLR record. More...
 
LAS_DLL void LASVLR_Destroy (LASVLRH hVLR)
 Destroys a VLR record and removes it from the heap. More...
 
LAS_DLL char * LASVLR_GetUserId (const LASVLRH hVLR)
 Returns the User Id for the VLR. More...
 
LAS_DLL LASError LASVLR_SetUserId (LASVLRH hVLR, const char *value)
 Sets the User Id for the VLR. More...
 
LAS_DLL char * LASVLR_GetDescription (const LASVLRH hVLR)
 Gets the description for the VLR. More...
 
LAS_DLL LASError LASVLR_SetDescription (LASVLRH hVLR, const char *value)
 Sets the description for the VLR. More...
 
LAS_DLL unsigned short LASVLR_GetRecordLength (const LASVLRH hVLR)
 Returns the record length of the data stored in the VLR. More...
 
LAS_DLL LASError LASVLR_SetRecordLength (LASVLRH hVLR, unsigned short value)
 Sets the record length of the data stored in the VLR. More...
 
LAS_DLL unsigned short LASVLR_GetRecordId (const LASVLRH hVLR)
 Gets the record id for the VLR. More...
 
LAS_DLL LASError LASVLR_SetRecordId (LASVLRH hVLR, unsigned short value)
 Sets the record id for the VLR. More...
 
LAS_DLL unsigned short LASVLR_GetReserved (const LASVLRH hVLR)
 Gets the reserved value of the VLR. More...
 
LAS_DLL LASError LASVLR_SetReserved (LASVLRH hVLR, unsigned short value)
 Sets the reserved value of the VLR. More...
 
LAS_DLL LASError LASVLR_GetData (const LASVLRH hVLR, unsigned char *data)
 Gets the data stream for the VLR as an array of bytes. More...
 
LAS_DLL LASError LASVLR_SetData (const LASVLRH hVLR, unsigned char *data, unsigned short length)
 Sets the data stream for the VLR as an array of bytes. More...
 
LAS_DLL LASColorH LASColor_Create (void)
 Creates a new Color. More...
 
LAS_DLL void LASColor_Destroy (LASColorH hColor)
 Destroys a Color and removes it from the heap. More...
 
LAS_DLL unsigned short LASColor_GetRed (const LASColorH hColor)
 Returns the red value for the color. More...
 
LAS_DLL LASError LASColor_SetRed (LASColorH hColor, unsigned short value)
 Sets the red value for the color. More...
 
LAS_DLL unsigned short LASColor_GetGreen (const LASColorH hColor)
 Returns the green value for the color. More...
 
LAS_DLL LASError LASColor_SetGreen (LASColorH hColor, unsigned short value)
 Sets the green value for the color. More...
 
LAS_DLL unsigned short LASColor_GetBlue (const LASColorH hColor)
 Returns the blue value for the color. More...
 
LAS_DLL LASError LASColor_SetBlue (LASColorH hColor, unsigned short value)
 Sets the blue value for the color. More...
 
LAS_DLL LASColorH LASPoint_GetColor (const LASPointH hPoint)
 Returns the color for the LASPointH. More...
 
LAS_DLL LASError LASPoint_SetColor (LASPointH hPoint, const LASColorH hColor)
 Sets the color for the point. More...
 
LAS_DLL LASSRSH LASSRS_Create (void)
 Creates a new SRS. More...
 
LAS_DLL const void * LASSRS_GetGTIF (LASSRSH hSRS)
 
LAS_DLL LASError LASSRS_SetGTIF (LASSRSH hSRS, const void *pgtiff, const void *ptiff)
 
LAS_DLL char * LASSRS_GetWKT (LASSRSH hSRS)
 
LAS_DLL char * LASSRS_GetWKT_CompoundOK (LASSRSH hSRS)
 
LAS_DLL LASError LASSRS_SetWKT (LASSRSH hSRS, const char *value)
 
LAS_DLL LASError LASSRS_SetFromUserInput (LASSRSH hSRS, const char *value)
 
LAS_DLL char * LASSRS_GetProj4 (LASSRSH hSRS)
 
LAS_DLL LASError LASSRS_SetProj4 (LASSRSH hSRS, const char *value)
 
LAS_DLL LASError LASSRS_SetVerticalCS (LASSRSH hSRS, int verticalCSType, const char *citation, int verticalDatum, int verticalUnits)
 
LAS_DLL LASSRSH LASHeader_GetSRS (const LASHeaderH hHeader)
 
LAS_DLL LASError LASHeader_SetSRS (LASHeaderH hHeader, const LASSRSH hSRS)
 
LAS_DLL void LASSRS_Destroy (LASSRSH hSRS)
 
LAS_DLL LASVLRH LASSRS_GetVLR (const LASSRSH hSRS, unsigned int i)
 
LAS_DLL unsigned int LASSRS_GetVLRCount (const LASSRSH hSRS)
 
LAS_DLL void LASString_Free (char *string)
 Method to ensure that you are freeing char*'s from the correct heap. More...
 
LAS_DLL unsigned int LASSchema_GetByteSize (LASSchemaH hFormat)
 
LAS_DLL unsigned int LASSchema_GetBaseByteSize (LASSchemaH hFormat)
 
LAS_DLL LASSchemaH LASHeader_GetSchema (LASHeaderH hHeader)
 
LAS_DLL LASError LASHeader_SetSchema (LASHeaderH hHeader, LASSchemaH hFormat)
 
LAS_DLL void LASSchema_Destroy (LASSchemaH hFormat)
 
LAS_DLL int LASHeader_Compressed (const LASHeaderH hHeader)
 Returns the compression status of the header. More...
 
LAS_DLL LASError LASHeader_SetCompressed (LASHeaderH hHeader, int b)
 Sets the compression status of the header. More...
 

Macro Definition Documentation

#define LAS_MODE_APPEND   2
#define LAS_MODE_READ   0
#define LAS_MODE_WRITE   1
#define LIBLAS_C_API   1

Typedef Documentation

typedef struct LASColorHS* LASColorH
typedef struct LASGuidHS* LASGuidH
typedef struct LASHeaderHS* LASHeaderH
typedef struct LASPointHS* LASPointH
typedef struct LASReaderHS* LASReaderH
typedef struct LASSchemaHS* LASSchemaH
typedef struct LASSRSHS* LASSRSH
typedef struct LASVLRHS* LASVLRH
typedef struct LASWriterHS* LASWriterH

Enumeration Type Documentation

enum LASError
Todo:
to be documented
Enumerator
LE_None 
LE_Debug 
LE_Warning 
LE_Failure 
LE_Fatal 

Function Documentation

LAS_DLL char* LAS_GetFullVersion ( void  )
LAS_DLL char* LAS_GetVersion ( void  )

Returns the version string for this library.

Returns
the version string for this library.
LAS_DLL int LAS_IsGDALEnabled ( void  )
LAS_DLL int LAS_IsLibGeoTIFFEnabled ( void  )
LAS_DLL int LAS_IsLibSpatialIndexEnabled ( void  )
LAS_DLL LASColorH LASColor_Create ( void  )

Creates a new Color.

Returns
a new Color
LAS_DLL void LASColor_Destroy ( LASColorH  hColor)

Destroys a Color and removes it from the heap.

LAS_DLL unsigned short LASColor_GetBlue ( const LASColorH  hColor)

Returns the blue value for the color.

Returns
the blue value for the color.
LAS_DLL unsigned short LASColor_GetGreen ( const LASColorH  hColor)

Returns the green value for the color.

Returns
the green value for the color.
LAS_DLL unsigned short LASColor_GetRed ( const LASColorH  hColor)

Returns the red value for the color.

Returns
the red value for the color.
LAS_DLL LASError LASColor_SetBlue ( LASColorH  hColor,
unsigned short  value 
)

Sets the blue value for the color.

Parameters
hColorthe opaque pointer to the LASColorH instance
valuethe value to set the blue value to
Returns
an error number if an error occured.
LAS_DLL LASError LASColor_SetGreen ( LASColorH  hColor,
unsigned short  value 
)

Sets the green value for the color.

Parameters
hColorthe opaque pointer to the LASColorH instance
valuethe value to set the green value to
Returns
an error number if an error occured.
LAS_DLL LASError LASColor_SetRed ( LASColorH  hColor,
unsigned short  value 
)

Sets the red value for the color.

Parameters
hColorthe opaque pointer to the LASColorH instance
valuethe value to set the red value to
Returns
an error number if an error occured.
LAS_DLL int LASError_GetErrorCount ( void  )

Returns the number of error messages on the error stack.

Returns
the number of error messages on the error stack.
LAS_DLL char* LASError_GetLastErrorMethod ( void  )

Returns the name of the method the last error message happened in.

Returns
the name of the method the last error message happened in.
LAS_DLL char* LASError_GetLastErrorMsg ( void  )

Returns the name of the method the last error message happened in.

Returns
the name of the method the last error message happened in.
LAS_DLL LASError LASError_GetLastErrorNum ( void  )

Returns the error number of the last error on the error stack.

Returns
the error number of the last error on the error stack.
LAS_DLL void LASError_Pop ( void  )

Pops the top error off of the error stack for the libLAS C API.

LAS_DLL void LASError_Print ( const char *  message)

Prints the last error message in the error stack to stderr.

If there is no error on the error stack, only the message is printed. The function does not alter the error stack in any way.

Parameters
messageMessage to include in the stderr output
LAS_DLL void LASError_Reset ( void  )

Resets the error stack for the libLAS C API.

LAS_DLL char* LASGuid_AsString ( LASGuidH  hId)

Returns a string representation of the GUID opqaue pointer.

The caller owns the string.

Parameters
hIdthe LASGuidH pointer
Returns
a string representation of the GUID opaque pointer.
LAS_DLL LASGuidH LASGuid_Create ( )

Returns a new random GUID.

Returns
a new random GUID
LAS_DLL LASGuidH LASGuid_CreateFromString ( const char *  string)

Creates a new GUID opaque pointer using the given string.

Parameters
stringA GUID string in the form "00000000-0000-0000-0000-000000000000" An example GUID might be something like '8388F1B8-AA1B-4108-BCA3-6BC68E7B062E'
Returns
the GUID value as an opaque LASGuidH pointer.
LAS_DLL void LASGuid_Destroy ( LASGuidH  hId)

Destroys a GUID opaque pointer and removes it from the heap.

Parameters
hIdthe GUID value to destroy as an opaque LASGuidH pointer.
LAS_DLL int LASGuid_Equals ( LASGuidH  hId1,
LASGuidH  hId2 
)

Determines if two GUIDs are equal.

Parameters
hId1the first GUID
hId2the second GUID
Returns
0 if false, 1 if true. Use the LASError_GetLastError* methods to determine if an error occured during the operation of this function.
LAS_DLL LASError LASHeader_AddVLR ( LASHeaderH  hHeader,
const LASVLRH  hVLR 
)

Adds a VLR record to the header.

Parameters
hHeaderthe LASHeaderH instance
hVLRthe VLR to add to the header
Returns
LASErrorEnum
LAS_DLL int LASHeader_Compressed ( const LASHeaderH  hHeader)

Returns the compression status of the header.

Parameters
hHeaderLASHeaderH instance
Returns
1 if the file is compressed, 0 otherwise
LAS_DLL LASHeaderH LASHeader_Copy ( const LASHeaderH  hHeader)

Copies a LASHeaderH instance.

Parameters
hHeaderthe LASHeaderH to copy
Returns
a LASHeaderH instance or NULL on error
LAS_DLL LASHeaderH LASHeader_Create ( void  )

Creates an empty LASHeaderH with default values.

LAS_DLL LASError LASHeader_DeleteVLR ( LASHeaderH  hHeader,
unsigned int  index 
)

Deletes a VLR record from the header for the given index.

Parameters
hHeaderthe LASHeaderH instance
indexthe index starting from 0 of the VLR to delete
Returns
LASErrorEnum
LAS_DLL void LASHeader_Destroy ( LASHeaderH  hHeader)

Destroys/deletes a LASHeader instance.

LAS_DLL unsigned short LASHeader_GetCreationDOY ( const LASHeaderH  hHeader)

Returns the file creation day of the year.

The values start from 1, being January 1st, and end at 365 or 366 being December 31st, depending on leap year.

Returns
the day of the year as an integer starting from 1 for the file creation.
LAS_DLL unsigned short LASHeader_GetCreationYear ( const LASHeaderH  hHeader)

Returns the file creation year.

This is a four digit number representing the year for the file, ie 2003, 2008, etc.

Returns
the creation year for the file or 0 if none is set
LAS_DLL unsigned char LASHeader_GetDataFormatId ( const LASHeaderH  hHeader)

Returns the data format id.

If this value is 1, the point data have time values associated with them. If it is 0, the point data do not have time values.

Parameters
hHeaderLASHeaderH instance
Returns
the data format id for the file.
LAS_DLL unsigned int LASHeader_GetDataOffset ( const LASHeaderH  hHeader)

Returns the byte offset to the start of actual point data for the file.

Parameters
hHeaderLASHeaderH instance
Returns
the type offset to the start of actual point data for the file
LAS_DLL unsigned short LASHeader_GetDataRecordLength ( const LASHeaderH  hHeader)

Returns the record length for the points based on their data format id in bytes.

Parameters
hHeaderLASHeaderH instance
Returns
the record length for the points based on their data format id in bytes
LAS_DLL char* LASHeader_GetFileSignature ( const LASHeaderH  hHeader)

Returns the file signature the the file.

This should always be 'LASF'

Parameters
hHeaderLASHeaderH instance
Returns
the file signature the the file. This should always be 'LASF'
LAS_DLL unsigned short LASHeader_GetFileSourceId ( const LASHeaderH  hHeader)

Returns the file source id for the file.

It is a number from 1-65535

Parameters
hHeaderLASHeaderH instance
Returns
the file source id for the file.
LAS_DLL LASGuidH LASHeader_GetGUID ( const LASHeaderH  hHeader)

Returns the GUID value for the header as an opaque LASGuidH pointer.

Parameters
hHeaderthe opaque pointer to the LASHeaderH
Returns
the GUID value for the header as an opaque LASGuidH pointer.
LAS_DLL unsigned int LASHeader_GetHeaderPadding ( const LASHeaderH  hHeader)

Returns the number of bytes between the end of the VLRs on the header to the data offset.

Parameters
hHeaderLASHeaderH instance
Returns
the number of bytes between the end of the VLRs on the header to the data offset
LAS_DLL unsigned short LASHeader_GetHeaderSize ( const LASHeaderH  hHeader)

Returns the size of the header for the file in bytes.

Returns
the size of the header for the file in bytes.
LAS_DLL double LASHeader_GetMaxX ( const LASHeaderH  hHeader)

Return the maximum x value.

Parameters
hHeaderLASHeaderH instance
Returns
the maximum x value
LAS_DLL double LASHeader_GetMaxY ( const LASHeaderH  hHeader)

Return the maximum y value.

Parameters
hHeaderLASHeaderH instance
Returns
the maximum y value
LAS_DLL double LASHeader_GetMaxZ ( const LASHeaderH  hHeader)

Return the maximum z value.

Parameters
hHeaderLASHeaderH instance
Returns
the maximum z value
LAS_DLL double LASHeader_GetMinX ( const LASHeaderH  hHeader)

Return the minimum x value.

Parameters
hHeaderLASHeaderH instance
Returns
the minimum x value
LAS_DLL double LASHeader_GetMinY ( const LASHeaderH  hHeader)

Return the minimum y value.

Parameters
hHeaderLASHeaderH instance
Returns
the minimum y value
LAS_DLL double LASHeader_GetMinZ ( const LASHeaderH  hHeader)

Return the minimum z value.

Parameters
hHeaderLASHeaderH instance
Returns
the minimum z value
LAS_DLL double LASHeader_GetOffsetX ( const LASHeaderH  hHeader)

Return the X offset.

Parameters
hHeaderLASHeaderH instance
Returns
the X offset
LAS_DLL double LASHeader_GetOffsetY ( const LASHeaderH  hHeader)

Return the Y offset.

Parameters
hHeaderLASHeaderH instance
Returns
the Y offset
LAS_DLL double LASHeader_GetOffsetZ ( const LASHeaderH  hHeader)

Return the Z offset.

Parameters
hHeaderLASHeaderH instance
Returns
the Z offset
LAS_DLL unsigned int LASHeader_GetPointRecordsByReturnCount ( const LASHeaderH  hHeader,
int  index 
)

Returns the number of point records by return.

Parameters
hHeaderLASHeaderH instance
indexthe return number to fetch the count for
Returns
the number of point records for a given return
LAS_DLL unsigned int LASHeader_GetPointRecordsCount ( const LASHeaderH  hHeader)

Returns the number of point records in the file.

This value may not reflect the actual number of point records in the file.

Parameters
hHeaderLASHeaderH instance
Returns
the number of point records in the file
LAS_DLL char* LASHeader_GetProjectId ( const LASHeaderH  hHeader)

Returns the project id for the header as a GUID string.

Returns
the project id for the header as a GUID string
LAS_DLL unsigned int LASHeader_GetRecordsCount ( const LASHeaderH  hHeader)

Returns the number of variable length records in the header.

Parameters
hHeaderLASHeaderH instance
Returns
the number of variable length records in the header
LAS_DLL unsigned short LASHeader_GetReserved ( const LASHeaderH  hHeader)

Returns the reserved value for the header.

This should aways be 0.

Returns
the reserved value for the header.
LAS_DLL double LASHeader_GetScaleX ( const LASHeaderH  hHeader)

Return the X scale factor.

Parameters
hHeaderLASHeaderH instance
Returns
the X scale factor
LAS_DLL double LASHeader_GetScaleY ( const LASHeaderH  hHeader)

Return the Y scale factor.

Parameters
hHeaderLASHeaderH instance
Returns
the Y scale factor
LAS_DLL double LASHeader_GetScaleZ ( const LASHeaderH  hHeader)

Return the Z scale factor.

Parameters
hHeaderLASHeaderH instance
Returns
the Z scale factor
LAS_DLL LASSchemaH LASHeader_GetSchema ( LASHeaderH  hHeader)
LAS_DLL char* LASHeader_GetSoftwareId ( const LASHeaderH  hHeader)

Returns the Software ID for the header.

The caller assumes ownership of the returned string

Returns
the software id for the header as a character array
LAS_DLL LASSRSH LASHeader_GetSRS ( const LASHeaderH  hHeader)
LAS_DLL char* LASHeader_GetSystemId ( const LASHeaderH  hHeader)

Returns the System ID for the header.

The caller assumes ownership of the returned string

Returns
the system id for the header as a character array
LAS_DLL unsigned char LASHeader_GetVersionMajor ( const LASHeaderH  hHeader)

Returns the major version number for the header.

This value is expected to always be 1.

Parameters
hHeaderLASHeaderH instance
Returns
major version number for the header.
LAS_DLL unsigned char LASHeader_GetVersionMinor ( const LASHeaderH  hHeader)

Returns the min version number for the header.

This value is expected to be 1 or 0 representing LAS 1.1 or LAS 1.0

Parameters
hHeaderLASHeaderH instance
Returns
minor version number for the header.
LAS_DLL LASVLRH LASHeader_GetVLR ( const LASHeaderH  hHeader,
unsigned int  i 
)

Returns the VLR record for the given index.

Use LASHeader_GetRecordsCount to determine the number of VLR records available on the header.

Parameters
hHeaderthe LASHeaderH instance
ithe index starting from 0 of the VLR to fetch
Returns
LASVLRH instance that models the Variable Length Record
LAS_DLL char* LASHeader_GetXML ( const LASHeaderH  hHeader)

Returns an XMLized representation of the header.

Parameters
hHeaderthe LASHeader instance
LAS_DLL LASError LASHeader_SetCompressed ( LASHeaderH  hHeader,
int  b 
)

Sets the compression status of the header.

Parameters
hHeaderLASHeaderH instance
b1if the file is compressed, 0 otherwise
Returns
LASerror enum
LAS_DLL LASError LASHeader_SetCreationDOY ( LASHeaderH  hHeader,
unsigned short  value 
)

Sets the file creation day of the year.

The values start from 1, being January 1st. No date validation is done

Parameters
hHeaderLASHeaderH instance
valuethe value to set as the creation day
Returns
LASError enum
LAS_DLL LASError LASHeader_SetCreationYear ( LASHeaderH  hHeader,
unsigned short  value 
)

Sets the file creation year.

This should be a four digit number representing the year for the file, ie 2003, 2008, etc. No validation on the value is done

Parameters
hHeaderLASHeaderH instance
valuethe value to set for the creation year
Returns
LASError enum
LAS_DLL LASError LASHeader_SetDataFormatId ( const LASHeaderH  hHeader,
unsigned char  value 
)

Sets the data format id for the file.

The value should be 1 or 0, with 1 being points that contain time values and 0 being points that do not.

Parameters
hHeaderLASHeaderH instance
valuethe value for the data format id, 1 or 0 are valid values.
Returns
LASError enum
LAS_DLL LASError LASHeader_SetDataOffset ( const LASHeaderH  hHeader,
unsigned int  value 
)

Sets the location in number of bytes to start writing point data.

Any space between the end of the LASVLRHs and this value will be written with 0's.

Parameters
hHeaderLASHeaderH instance
valuethe long integer to set for byte location determining the end of the header
Returns
LASError enum
LAS_DLL LASError LASHeader_SetDataRecordLength ( const LASHeaderH  hHeader,
unsigned short  value 
)

Explicitly set the record length for the file.

If you set the DataFormatId, default values will be set for you.

Parameters
hHeaderLASHeaderH instance
valuethe value for the data record length (in bytes).
Returns
LASError enum
LAS_DLL LASError LASHeader_SetFileSourceId ( LASHeaderH  hHeader,
unsigned short  value 
)

Sets the FileSource ID value for the header.

By default, this value is "0" if it is not explicitly set. See the LAS specification for details on what this value should logically be set to.

Parameters
hHeaderLASHeaderH instance
valuethe value to set as the FileSource ID value for the header
Returns
LASError enum
LAS_DLL LASError LASHeader_SetGUID ( LASHeaderH  hHeader,
LASGuidH  hId 
)

Sets the project id/GUID for the header.

Parameters
hHeaderLASHeaderH instance
hIdLASGuidH instance to set the GUID for the header to
Returns
LASError enum
LAS_DLL LASError LASHeader_SetHeaderPadding ( const LASHeaderH  hHeader,
unsigned int  value 
)

Sets the number of bytes between the end of the VLRs on the header to the data offset.

Parameters
hHeaderLASHeaderH instance
valuethe long integer to set for the number of bytes between the end of the VLRs and the data offset
Returns
LASError enum
LAS_DLL LASError LASHeader_SetMax ( LASHeaderH  hHeader,
double  x,
double  y,
double  z 
)

Sets the maximum values.

Parameters
hHeaderLASHeaderH instance
xthe x maximum
ythe y maximum
zthe z maximum
Returns
LASError enum
LAS_DLL LASError LASHeader_SetMin ( LASHeaderH  hHeader,
double  x,
double  y,
double  z 
)

Sets the minimum values.

Parameters
hHeaderLASHeaderH instance
xthe x minimum
ythe y minimum
zthe z minimum
Returns
LASError enum
LAS_DLL LASError LASHeader_SetOffset ( LASHeaderH  hHeader,
double  x,
double  y,
double  z 
)

Sets the offset values.

Parameters
hHeaderLASHeaderH instance
xthe x offset
ythe y offset
zthe z offset
Returns
LASError enum
LAS_DLL LASError LASHeader_SetPointRecordsByReturnCount ( const LASHeaderH  hHeader,
int  index,
unsigned int  value 
)

Sets the number of point records for a given return.

Parameters
hHeaderLASHeaderH instance
indexthe return number to set the count for
valuethe number of point records for the return
Returns
LASError enum
LAS_DLL LASError LASHeader_SetPointRecordsCount ( const LASHeaderH  hHeader,
unsigned int  value 
)

Sets the number of point records for the file.

Parameters
hHeaderLASHeaderH instance
valuethe long integer to set for the number of point records in the file
Returns
LASError enum
LAS_DLL LASError LASHeader_SetProjectId ( LASHeaderH  hHeader,
const char *  value 
)

Sets the project id/GUID for the header.

Parameters
hHeaderLASHeaderH instance
valuecharacter value GUID to set the header value to
Returns
LASError enum
LAS_DLL LASError LASHeader_SetReserved ( LASHeaderH  hHeader,
unsigned short  value 
)

Sets the Reserved value for the header.

By default, this value is "0" if it is not explicitly set. See the LAS specification for details on what this value should logically be set to.

Parameters
hHeaderLASHeaderH instance
valuethe value to set as the reserved value for the header
Returns
LASError enum
LAS_DLL LASError LASHeader_SetScale ( LASHeaderH  hHeader,
double  x,
double  y,
double  z 
)

Sets the scale factors.

Parameters
hHeaderLASHeaderH instance
xthe x scale factor
ythe y scale factor
zthe z scale factor
Returns
LASError enum
LAS_DLL LASError LASHeader_SetSchema ( LASHeaderH  hHeader,
LASSchemaH  hFormat 
)
LAS_DLL LASError LASHeader_SetSoftwareId ( LASHeaderH  hHeader,
const char *  value 
)

Sets the Software ID for the header.

By default, this value is "libLAS 1.0" if it is not explicitly set. See the LAS specification for details on what this value should logically be set to.

Parameters
hHeaderLASHeaderH instance
valuethe value to set as the Software ID for the header
Returns
LASError enum
LAS_DLL LASError LASHeader_SetSRS ( LASHeaderH  hHeader,
const LASSRSH  hSRS 
)
LAS_DLL LASError LASHeader_SetSystemId ( LASHeaderH  hHeader,
const char *  value 
)

Sets the System ID for the header.

By default, this value is "libLAS" if it is not explicitly set. See the LAS specification for details on what this value should logically be set to.

Parameters
hHeaderLASHeaderH instance
valuethe value to set as the System ID for the header
Returns
LASError enum
LAS_DLL LASError LASHeader_SetVersionMajor ( LASHeaderH  hHeader,
unsigned char  value 
)

Sets the major version number for the header.

All values other than 1 are invalid.

Parameters
hHeaderLASHeaderH instance
valueinteger value to set the major version to (only the value 1 is valid)
Returns
LASError enum
LAS_DLL LASError LASHeader_SetVersionMinor ( LASHeaderH  hHeader,
unsigned char  value 
)

Sets the minor version number for the header.

All values other than 1 or 0 are invalid.

Parameters
hHeaderLASHeaderH instance
valueinteger value to set the minor version to (only the values 1 or 0 are valid)
Returns
LASError enum
Todo:
TODO: Maybe this should return fatal error if version out of range – hobu
LAS_DLL LASPointH LASPoint_Copy ( const LASPointH  hPoint)

Creates a copy of a LASPointH instance.

Parameters
hPointthe LASPointH instance to copy
Returns
new LASPointH instance. If the value is NULL use the LASError_GetLastError* methods to determine the problem
LAS_DLL LASPointH LASPoint_Create ( void  )

Creates a new empty LASPointH instance.

Returns
LASPointH instance. If the value is NULL use the LASError_GetLastError* methods to determine the problem
LAS_DLL void LASPoint_Destroy ( LASPointH  hPoint)

Destroys/deletes a LASPointH instance.

LAS_DLL unsigned char LASPoint_GetClassification ( const LASPointH  hPoint)

Returns the classification for the point.

Parameters
hPointLASPointH instance
Returns
the classification for the point
LAS_DLL LASColorH LASPoint_GetColor ( const LASPointH  hPoint)

Returns the color for the LASPointH.

Returns
the color for the LASPointH.
LAS_DLL LASError LASPoint_GetData ( const LASPointH  hPoint,
unsigned char *  data 
)

Gets the data stream for the VLR as an array of bytes.

The length of this array should be the same as LASVLR_GetRecordLength. You must allocate it on the heap and you are responsible for its destruction.

Parameters
hPointthe LASPointH instance
dataa pointer to your array where you want the data copied
Returns
LASErrorEnum
LAS_DLL unsigned short LASPoint_GetFlightLineEdge ( const LASPointH  hPoint)

Returns whether or not a given pulse is an edge point.

Parameters
hPointLASPointH instance
Returns
whether or not a given pulse is an edge point.
LAS_DLL LASHeaderH LASPoint_GetHeader ( const LASPointH  hPoint)

Returns a LASHeaderH representing the header for the point.

Parameters
hPointthe LASPointH instance
Returns
a LASHeaderH representing the header for the point
LAS_DLL unsigned short LASPoint_GetIntensity ( const LASPointH  hPoint)

Returns the intensity value for the point.

This value is the pulse return magnitude, it is optional, and it is LiDAR system specific.

Returns
the intensity value for the point.
LAS_DLL unsigned short LASPoint_GetNumberOfReturns ( const LASPointH  hPoint)

Returns the total number of returns for a given pulse.

Parameters
hPointLASPointH instance
Returns
total number of returns for this pulse.
LAS_DLL unsigned short LASPoint_GetPointSourceId ( LASPointH  hPoint)

Returns the point source id for the point.

Parameters
hPointLASPointH instance
Returns
the scan angle for the point
LAS_DLL long LASPoint_GetRawX ( const LASPointH  hPoint)

Returns the raw X value for the point.

This value is not scaled or offset by any header values and stands on its own. If you need points to have a scale and/or offset applied, this must be done in conjunction with the header values after the value is read.

Parameters
hPointthe opaque pointer to the LASPointH instance
Returns
the raw(unscaled) X value for the LASPointH
LAS_DLL long LASPoint_GetRawY ( const LASPointH  hPoint)

Gets the raw Y value for the point.

This value will be scaled and offset by any header values to get interpreted values (double GetY())

Parameters
hPointthe opaque pointer to the LASPointH instance
Returns
the raw(unscaled) Y value for the LASPointH
LAS_DLL long LASPoint_GetRawZ ( const LASPointH  hPoint)

Gets the raw Z value for the point.

This value will be scaled and offset by any header values to get interpreted values (double GetZ())

Parameters
hPointthe opaque pointer to the LASPointH instance
Returns
the raw(unscaled) Z value for the LASPointH
LAS_DLL unsigned short LASPoint_GetReturnNumber ( const LASPointH  hPoint)

Returns the return number for the point.

The return number is "the pulse return number for a given output pulse." The first return number starts with the value 1.

Parameters
hPointLASPointH instance
Returns
a return number, valid from 1-6, for the point. Use the LASError methods to determine if an error occurred during this operation if 0 is returned.
LAS_DLL char LASPoint_GetScanAngleRank ( const LASPointH  hPoint)

Returns the scan angle for the point.

Parameters
hPointLASPointH instance
Returns
the scan angle for the point
LAS_DLL unsigned short LASPoint_GetScanDirection ( const LASPointH  hPoint)

Returns the scan direction for a given pulse.

Parameters
hPointLASPointH instance
Returns
the scan direction for a given pulse.
LAS_DLL unsigned char LASPoint_GetScanFlags ( const LASPointH  hPoint)

Returns all of the scan flags for the point – Return number, number of returns, flightline edge, scan direction, and scan angle rank.

Parameters
hPointLASPointH instance
Returns
all of the scan flags for the point
LAS_DLL double LASPoint_GetTime ( const LASPointH  hPoint)

Returns the time for the point.

Parameters
hPointLASPointH instance
Returns
the time for the point
LAS_DLL unsigned char LASPoint_GetUserData ( const LASPointH  hPoint)

Returns the arbitrary user data for the point.

Parameters
hPointLASPointH instance
Returns
the arbitrary user data for the point
LAS_DLL double LASPoint_GetX ( const LASPointH  hPoint)

Returns the X value for the point.

This value is scaled by any header information that is present for the point. Use GetRawX if you want unscaled data. header values after the value is read.

Parameters
hPointthe opaque pointer to the LASPointH instance
Returns
the X value for the LASPointH
LAS_DLL char* LASPoint_GetXML ( const LASPointH  hPoint)

Returns an XMLized representation of the point.

Parameters
hPointthe LASPointH instance
LAS_DLL double LASPoint_GetY ( const LASPointH  hPoint)

Gets the Y value for the point.

This value is scaled by any header information that is present for the point. Use SetRawY if you want unscaled data.

Parameters
hPointthe opaque pointer to the LASPointH instance
Returns
the Y value for the LASPointH
LAS_DLL double LASPoint_GetZ ( const LASPointH  hPoint)

Gets the Z value for the point.

This value is scaled by any header information that is present for the point. Use SetRawZ if you want unscaled data.

Parameters
hPointthe opaque pointer to the LASPointH instance
Returns
the Z value for the LASPointH
LAS_DLL int LASPoint_IsValid ( LASPointH  hPoint)

Returns a boolean whether or not the point is valid.

Parameters
hPointLASPointH instance
Returns
a boolean (1 or 0) whether or not the point is valid.
LAS_DLL LASError LASPoint_SetClassification ( LASPointH  hPoint,
unsigned char  value 
)

Sets the classification for the point.

No validation is done.

Parameters
hPointLASPointH instance
valuethe value to set for the classification
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetColor ( LASPointH  hPoint,
const LASColorH  hColor 
)

Sets the color for the point.

Parameters
hPointthe opaque pointer to the LASPointH instance
hColorthe opaque pointer to the LASColorH instance
Returns
an error number if an error occured.
LAS_DLL LASError LASPoint_SetData ( LASPointH  hPoint,
unsigned char *  data 
)

Sets the data stream for the Point as an array of bytes.

The length of this array should be the same as LASPoint_GetHeader(LASHeader_GetDataRecordLength()). The data are copied into the Point .

Parameters
hPointthe LASPointH instance
dataa pointer to your array. It must be LASPoint_GetHeader(LASHeader_GetDataRecordLength()) in size
Returns
LASErrorEnum
LAS_DLL LASError LASPoint_SetFlightLineEdge ( LASPointH  hPoint,
unsigned short  value 
)

Sets the edge marker for a given pulse.

Valid values are 0 or 1, with 1 being an edge point and 0 being interior.

Parameters
hPointLASPointH instance
valuethe value to set for flightline edge
Returns
LASError value determine success or failure.
LAS_DLL void LASPoint_SetHeader ( LASPointH  hPoint,
const LASHeaderH  hHeader 
)
LAS_DLL LASError LASPoint_SetIntensity ( LASPointH  hPoint,
unsigned short  value 
)

Sets the intensity value for the point.

Parameters
hPointthe opaque pointer to the LASPointH instance
valuethe value to set the intensity to
Returns
an error number if an error occured.
LAS_DLL LASError LASPoint_SetNumberOfReturns ( LASPointH  hPoint,
unsigned short  value 
)

Sets the number of returns for the point.

Valid values are from 1-5.

Parameters
hPointLASPointH instance
valuethe value to set for the number of returns
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetPointSourceId ( LASPointH  hPoint,
unsigned short  value 
)

Sets the point source id for the point.

No validation is done.

Parameters
hPointLASPointH instance
valuethe value to set for the point source id
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetRawX ( LASPointH  hPoint,
long  value 
)

Sets the raw X value for the point.

This value will be scaled and offset by any header values to get interpreted values (double GetX())

Parameters
hPointthe opaque pointer to the LASPointH instance
valuethe double value to set for the raw X value of the point
Returns
an error number if an error occured during the setting of the point.
LAS_DLL LASError LASPoint_SetRawY ( LASPointH  hPoint,
long  value 
)

Sets the raw Y value for the point.

This value will be scaled and offset by any header values to get interpreted values (double GetY())

Parameters
hPointthe opaque pointer to the LASPointH instance
valuethe double value to set for the raw Y value of the point
Returns
an error number if an error occured during the setting of the point.
LAS_DLL LASError LASPoint_SetRawZ ( LASPointH  hPoint,
long  value 
)

Sets the raw Z value for the point.

This value will be scaled and offset by any header values to get interpreted values (double GetZ())

Parameters
hPointthe opaque pointer to the LASPointH instance
valuethe double value to set for the raw Z value of the point
Returns
an error number if an error occured during the setting of the point.
LAS_DLL LASError LASPoint_SetReturnNumber ( LASPointH  hPoint,
unsigned short  value 
)

Sets the return number for the point.

Valid values are from 1-6.

Parameters
hPointLASPointH instance
valuethe value to set for the return number
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetScanAngleRank ( LASPointH  hPoint,
char  value 
)

Sets the scan angle for the point.

No validation is done.

Parameters
hPointLASPointH instance
valuethe value to set for the scan angle
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetScanDirection ( LASPointH  hPoint,
unsigned short  value 
)

Sets the scan direction for a given pulse.

Valid values are 0 or 1, with 1 being a positive scan direction and 0 being a negative scan direction.

Parameters
hPointLASPointH instance
valuethe value to set for scan direction
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetScanFlags ( LASPointH  hPoint,
unsigned char  value 
)

Sets all of the scan flags for the point.

No validation is done.

Parameters
hPointLASPointH instance
valuethe value to set for the flags
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetTime ( LASPointH  hPoint,
double  value 
)

Sets the time for the point.

No validation is done.

Parameters
hPointLASPointH instance
valuethe value to set for the time
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetUserData ( LASPointH  hPoint,
unsigned char  value 
)

Sets the arbitrary user data for the point.

No validation is done.

Parameters
hPointLASPointH instance
valuethe value to set for the arbitrary user data
Returns
LASError value determine success or failure.
LAS_DLL LASError LASPoint_SetX ( LASPointH  hPoint,
double  value 
)

Sets the X value for the point.

This value is scaled by any header information that is present for the point. Use SetRawX if you want unscaled data.

Parameters
hPointthe opaque pointer to the LASPointH instance
valuethe double value to set for the X value of the point
Returns
an error number if an error occured during the setting of the point.
LAS_DLL LASError LASPoint_SetY ( LASPointH  hPoint,
double  value 
)

Sets the Y value for the point.

This value must be scaled or offset by any header values before being set.

Parameters
hPointthe opaque pointer to the LASPointH instance
valuethe double value to set for the Y value of the point
Returns
an error number if an error occured during the setting of the point.
LAS_DLL LASError LASPoint_SetZ ( LASPointH  hPoint,
double  value 
)

Sets the Z value for the point.

This value must be scaled or offset by any header values before being set.

Parameters
hPointthe opaque pointer to the LASPointH instance
valuethe double value to set for the Z value of the point
Returns
an error number if an error occured during the setting of the point.
LAS_DLL int LASPoint_Validate ( LASPointH  hPoint)

Returns a bitfield representing the validity of various members enum DataMemberFlag { eReturnNumber = 1, eNumberOfReturns = 2, eScanDirection = 4, eFlightLineEdge = 8, eClassification = 16, eScanAngleRank = 32, eTime = 64 };.

Parameters
hPointLASPointH instance
Returns
bitfield representing the validity of various members.
LAS_DLL LASReaderH LASReader_Create ( const char *  filename)

Creates a LASReaderH object that can be used to read LASHeaderH and LASPointH objects with.

The LASReaderH must not be created with a filename that is opened for read or write by any other API functions.

Returns
opaque pointer to a LASReaderH instance.
Parameters
filenameFilename to open for read
LAS_DLL LASReaderH LASReader_CreateWithHeader ( const char *  filename,
LASHeaderH  hHeader 
)

Creates a LASReaderH object that can be used to read LASHeaderH and LASPointH objects with.

The LASReaderH must not be created with a filename that is opened for read or write by any other API functions. This function allows you to optionally override the file's header information with your own.

Returns
opaque pointer to a LASReaderH instance.
Parameters
filenameFilename to open for read
hHeadera LASHeaderH instance to override the file's header with.
LAS_DLL void LASReader_Destroy ( LASReaderH  hReader)

Closes the file for reading operations represented by the LASReaderH instance.

Parameters
hReaderthe opqaue handle to the LASReaderH
LAS_DLL LASHeaderH LASReader_GetHeader ( const LASReaderH  hReader)

Returns a LASHeaderH representing the header for the file.

Parameters
hReaderthe LASReaderH instance
Returns
a LASHeaderH representing the header for the file. NULL is returned in the event of an error. Use the LASError_GetLastError* methods to check in the event of a NULL return.
LAS_DLL LASPointH LASReader_GetNextPoint ( const LASReaderH  hReader)

Reads the next available point on the LASReaderH instance.

If no point is available to read, NULL is returned. If an error happens during the reading of the next available point, an error will be added to the error stack and can be returned with the LASError_GetLastError* methods.

Parameters
hReaderthe opaque handle to the LASReaderH
Returns
an opaque handle to a LASPointH object, or NULL if no point is available to read or an error occured. Use the LASError_GetLastError* methods to confirm the existence of an error if NULL is returned.
LAS_DLL LASPointH LASReader_GetPointAt ( const LASReaderH  hReader,
unsigned int  position 
)

Reads a LASPointH from the given position in the LAS file represented by the LASReaderH instance.

If no point is available at that location, NULL is returned. If an error happens during the reading of the point, an error will be added to the error stack and can be returned with the LASError_GetLastError* methods.

Parameters
hReaderthe opaque handle to the LASReaderH
positionthe integer position of the point in the file to read.
Returns
an opaque handle to a LASPointH object, or NULL if no point is available at the given location or an error occured. Use the LASError_GetLastError* methods to confirm the existence of an error if NULL is returned.
LAS_DLL char* LASReader_GetSummaryXML ( const LASReaderH  hReader)
LAS_DLL LASError LASReader_Seek ( LASReaderH  hReader,
unsigned int  position 
)

Seeks to the specified point for the next LASReader_GetNextPoint operation to start from.

If an error is returned, the seek failed for some reason.

Parameters
hReaderthe LASReaderH instance
Returns
a LASError defaulting to LE_None upon success.
LAS_DLL void LASReader_SetHeader ( LASReaderH  hReader,
const LASHeaderH  hHeader 
)
LAS_DLL LASError LASReader_SetInputSRS ( LASReaderH  hReader,
const LASSRSH  hSRS 
)
LAS_DLL LASError LASReader_SetOutputSRS ( LASReaderH  hReader,
const LASSRSH  hSRS 
)
LAS_DLL LASError LASReader_SetSRS ( LASReaderH  hReader,
const LASSRSH  hSRS 
)
LAS_DLL void LASSchema_Destroy ( LASSchemaH  hFormat)
LAS_DLL unsigned int LASSchema_GetBaseByteSize ( LASSchemaH  hFormat)
LAS_DLL unsigned int LASSchema_GetByteSize ( LASSchemaH  hFormat)
LAS_DLL LASSRSH LASSRS_Create ( void  )

Creates a new SRS.

Returns
a new SRS
LAS_DLL void LASSRS_Destroy ( LASSRSH  hSRS)
LAS_DLL const void* LASSRS_GetGTIF ( LASSRSH  hSRS)
LAS_DLL char* LASSRS_GetProj4 ( LASSRSH  hSRS)
LAS_DLL LASVLRH LASSRS_GetVLR ( const LASSRSH  hSRS,
unsigned int  i 
)
LAS_DLL unsigned int LASSRS_GetVLRCount ( const LASSRSH  hSRS)
LAS_DLL char* LASSRS_GetWKT ( LASSRSH  hSRS)
LAS_DLL char* LASSRS_GetWKT_CompoundOK ( LASSRSH  hSRS)
LAS_DLL LASError LASSRS_SetFromUserInput ( LASSRSH  hSRS,
const char *  value 
)
LAS_DLL LASError LASSRS_SetGTIF ( LASSRSH  hSRS,
const void *  pgtiff,
const void *  ptiff 
)
LAS_DLL LASError LASSRS_SetProj4 ( LASSRSH  hSRS,
const char *  value 
)
LAS_DLL LASError LASSRS_SetVerticalCS ( LASSRSH  hSRS,
int  verticalCSType,
const char *  citation,
int  verticalDatum,
int  verticalUnits 
)
LAS_DLL LASError LASSRS_SetWKT ( LASSRSH  hSRS,
const char *  value 
)
LAS_DLL void LASString_Free ( char *  string)

Method to ensure that you are freeing char*'s from the correct heap.

Parameters
stringthe string to free
LAS_DLL LASVLRH LASVLR_Create ( void  )

Creates a new VLR record.

Returns
a new VLR record
LAS_DLL void LASVLR_Destroy ( LASVLRH  hVLR)

Destroys a VLR record and removes it from the heap.

LAS_DLL LASError LASVLR_GetData ( const LASVLRH  hVLR,
unsigned char *  data 
)

Gets the data stream for the VLR as an array of bytes.

The length of this array should be the same as LASVLR_GetRecordLength. You must allocate it on the heap and you are responsible for its destruction.

Parameters
hVLRthe LASVLRH instance
dataa pointer to your array where you want the data copied
Returns
LASErrorEnum
LAS_DLL char* LASVLR_GetDescription ( const LASVLRH  hVLR)

Gets the description for the VLR.

Parameters
hVLRthe LASVLRH instance
Returns
the description for the VLR
LAS_DLL unsigned short LASVLR_GetRecordId ( const LASVLRH  hVLR)

Gets the record id for the VLR.

Parameters
hVLRthe LASVLRH instance
Returns
the record id for the VLR
LAS_DLL unsigned short LASVLR_GetRecordLength ( const LASVLRH  hVLR)

Returns the record length of the data stored in the VLR.

Parameters
hVLRthe LASVLRH instance
Returns
the record length of the data stored in the VLR
LAS_DLL unsigned short LASVLR_GetReserved ( const LASVLRH  hVLR)

Gets the reserved value of the VLR.

This should be 0 and should aways be 0.

Parameters
hVLRthe LASVLRH instance
Returns
the reserved value of the VLR.
LAS_DLL char* LASVLR_GetUserId ( const LASVLRH  hVLR)

Returns the User Id for the VLR.

Parameters
hVLRthe LASVLRH instance
Returns
the User Id for the VLR
LAS_DLL LASError LASVLR_SetData ( const LASVLRH  hVLR,
unsigned char *  data,
unsigned short  length 
)

Sets the data stream for the VLR as an array of bytes.

The length of this array should be the same as LASVLR_GetRecordLength. The data are copied into the VLR structure.

Parameters
hVLRthe LASVLRH instance
dataa pointer to your array. It must be LASVLR_GetRecordLength in size
lengthlength of the data to set on the VLR
Returns
LASErrorEnum
LAS_DLL LASError LASVLR_SetDescription ( LASVLRH  hVLR,
const char *  value 
)

Sets the description for the VLR.

Parameters
hVLRthe LASVLRH instance
valuethe value to set for the description. It will be clipped to fit within 32 characters
Returns
LASErrorEnum
LAS_DLL LASError LASVLR_SetRecordId ( LASVLRH  hVLR,
unsigned short  value 
)

Sets the record id for the VLR.

Parameters
hVLRthe LASVLRH instance
valuethe record id to set
Returns
LASErrorEnum
LAS_DLL LASError LASVLR_SetRecordLength ( LASVLRH  hVLR,
unsigned short  value 
)

Sets the record length of the data stored in the VLR.

Parameters
hVLRthe LASVLRH instance
valuethe length to set for the VLR data length
Returns
LASErrorEnum
LAS_DLL LASError LASVLR_SetReserved ( LASVLRH  hVLR,
unsigned short  value 
)

Sets the reserved value of the VLR.

This should be 0 and you should not have to ever monkey with this value according to the spec.

Parameters
hVLRthe LASVLRH instance
valuethe value to set for the reserved value
Returns
LASErrorEnum
LAS_DLL LASError LASVLR_SetUserId ( LASVLRH  hVLR,
const char *  value 
)

Sets the User Id for the VLR.

Parameters
hVLRthe LASVLRH instance
valuethe value to set for the User Id. It will be clipped to fit within 16 characters
Returns
LASErrorEnum
LAS_DLL LASWriterH LASWriter_Create ( const char *  filename,
const LASHeaderH  hHeader,
int  mode 
)

Creates a new LASWriterH for write operations on LAS files.

The file may be opened in either LAS_MODE_APPEND or LAS_MODE_WRITE, but the file cannot be open by another other operations (another LASReaderH or LASWriterH).

Parameters
filenameThe filename to open to write
hHeaderan opaque pointer to a LASHeaderH that will be written to the file as part of the opening for write operation.
modea mode value to denote whether to open for write or append operations. Valid values are LAS_MODE_APPEND and LAS_MODE_WRITE.
LAS_DLL void LASWriter_Destroy ( LASWriterH  hWriter)

Destroys the LASWriterH instance, effectively closing the file and performing housekeeping operations.

Parameters
hWriterLASWriterH instance to close
LAS_DLL LASHeaderH LASWriter_GetHeader ( const LASWriterH  hWriter)

Returns a LASHeaderH representing the header for the file.

Parameters
hWriterthe LASWriterH instance
Returns
a LASHeaderH representing the header for the file. NULL is returned in the event of an error. Use the LASError_GetLastError* methods to check in the event of a NULL return.
LAS_DLL void LASWriter_SetHeader ( LASWriterH  hWriter,
const LASHeaderH  hHeader 
)
LAS_DLL LASError LASWriter_SetInputSRS ( LASWriterH  hWriter,
const LASSRSH  hSRS 
)
LAS_DLL LASError LASWriter_SetOutputSRS ( LASWriterH  hWriter,
const LASSRSH  hSRS 
)
LAS_DLL LASError LASWriter_SetSRS ( LASWriterH  hWriter,
const LASSRSH  hSRS 
)
LAS_DLL LASError LASWriter_WriteHeader ( const LASWriterH  hWriter,
const LASHeaderH  hHeader 
)

Overwrites the header for the file represented by the LASWriterH.

It does not matter if the file is opened for append or for write. This function is equivalent to calling LASWriter_SetHeader and LASWriter_WriteOwnedHeader simultaneously.

Parameters
hWriteropaque pointer to the LASWriterH instance
hHeaderLASHeaderH instance to write into the file
Returns
LE_None if no error occurred during the operation.
LAS_DLL LASError LASWriter_WriteOwnedHeader ( const LASWriterH  hWriter)

Overwrites the header for the file represented by the LASWriterH that was set using LASWriter_SetHeader or flushes the existing header that is on the the writer to the file and resets the file for writing.

Parameters
hWriteropaque pointer to the LASWriterH instance
Returns
LE_None if no error occurred during the operation.
LAS_DLL LASError LASWriter_WritePoint ( const LASWriterH  hWriter,
const LASPointH  hPoint 
)

Writes a point to the file.

The location of where the point is writen is determined by the mode the file is opened in, and what the last operation was. For example, if the file was opened for append, the next point would be written at the end of the file. Likewise, if the file is opened in write mode, even if the file already existed, the next WritePoint operation will happen at the end of the header and all of the existing points in the file will be overwritten.

Parameters
hWriteropaque pointer to the LASWriterH instance
hPointthe opaque LASPointH pointer to write
Returns
LE_None if no error occurred during the write operation.