libLAS API Reference  1.8.1
liblas.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id$
3  *
4  * Project: libLAS - http://liblas.org - A BSD library for LAS format data.
5  * Purpose: Main prototypes for the libLAS C API
6  * Author: Howard Butler, hobu.inc@gmail.com
7  *
8  ******************************************************************************
9  * Copyright (c) 2008, Howard Butler
10  *
11  * All rights reserved.
12  *
13  * Redistribution and use in source and binary forms, with or without
14  * modification, are permitted provided that the following
15  * conditions are met:
16  *
17  * * Redistributions of source code must retain the above copyright
18  * notice, this list of conditions and the following disclaimer.
19  * * Redistributions in binary form must reproduce the above copyright
20  * notice, this list of conditions and the following disclaimer in
21  * the documentation and/or other materials provided
22  * with the distribution.
23  * * Neither the name of the Martin Isenburg or Iowa Department
24  * of Natural Resources nor the names of its contributors may be
25  * used to endorse or promote products derived from this software
26  * without specific prior written permission.
27  *
28  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
29  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
30  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
31  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
32  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
33  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
34  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
35  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
36  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
37  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
38  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
39  * OF SUCH DAMAGE.
40  ****************************************************************************/
41 
42 #ifndef LIBLAS_H_INCLUDED
43 #define LIBLAS_H_INCLUDED
44 
45 #define LIBLAS_C_API 1
46 
47 #include "las_version.h"
48 #include "las_config.h"
49 #include <liblas/export.hpp>
50 
51 typedef struct LASWriterHS *LASWriterH;
52 typedef struct LASReaderHS *LASReaderH;
53 typedef struct LASPointHS *LASPointH;
54 typedef struct LASHeaderHS *LASHeaderH;
55 typedef struct LASGuidHS *LASGuidH;
56 typedef struct LASVLRHS *LASVLRH;
57 typedef struct LASColorHS *LASColorH;
58 typedef struct LASSRSHS *LASSRSH;
59 typedef struct LASSchemaHS *LASSchemaH;
60 
61 
63 
64 
65 #define LAS_MODE_READ 0
66 #define LAS_MODE_WRITE 1
67 #define LAS_MODE_APPEND 2
68 
72 typedef enum
73 {
74  LE_None = 0,
75  LE_Debug = 1,
79 } LASError;
80 
81 
82 
86 LAS_DLL char* LAS_GetVersion(void);
87 LAS_DLL char* LAS_GetFullVersion(void);
88 
90 
91 LAS_DLL int LAS_IsGDALEnabled(void);
92 
94 /****************************************************************************/
95 /* Error handling */
96 /****************************************************************************/
97 
100 LAS_DLL void LASError_Reset(void);
101 
104 LAS_DLL void LASError_Pop(void);
105 
110 
114 LAS_DLL char * LASError_GetLastErrorMsg(void);
115 
120 
125 
131 LAS_DLL void LASError_Print(const char* message);
132 
133 /****************************************************************************/
134 /* Reader operations */
135 /****************************************************************************/
136 
143 LAS_DLL LASReaderH LASReader_Create(const char * filename);
144 
155 LAS_DLL LASReaderH LASReader_CreateWithHeader( const char * filename,
156  LASHeaderH hHeader);
157 
169 
182 LAS_DLL LASPointH LASReader_GetPointAt(const LASReaderH hReader, unsigned int position);
183 
187 LAS_DLL void LASReader_Destroy(LASReaderH hReader);
188 
196 
197 LAS_DLL void LASReader_SetHeader( LASReaderH hReader, const LASHeaderH hHeader);
198 
199 LAS_DLL LASError LASReader_SetSRS(LASReaderH hReader, const LASSRSH hSRS);
202 
209 LAS_DLL LASError LASReader_Seek(LASReaderH hReader, unsigned int position);
210 
211 LAS_DLL char* LASReader_GetSummaryXML(const LASReaderH hReader);
212 
213 /****************************************************************************/
214 /* Point operations */
215 /****************************************************************************/
216 
224 LAS_DLL double LASPoint_GetX(const LASPointH hPoint);
225 
233 LAS_DLL LASError LASPoint_SetX(LASPointH hPoint, double value);
234 
242 LAS_DLL long LASPoint_GetRawX(const LASPointH hPoint);
243 
250 LAS_DLL LASError LASPoint_SetRawX(LASPointH hPoint, long value);
251 
258 LAS_DLL double LASPoint_GetY(const LASPointH hPoint);
259 
266 LAS_DLL LASError LASPoint_SetY(LASPointH hPoint, double value);
267 
273 LAS_DLL long LASPoint_GetRawY(const LASPointH hPoint);
274 
281 LAS_DLL LASError LASPoint_SetRawY(LASPointH hPoint, long value);
282 
289 LAS_DLL double LASPoint_GetZ(const LASPointH hPoint);
290 
297 LAS_DLL LASError LASPoint_SetZ(LASPointH hPoint, double value);
298 
304 LAS_DLL long LASPoint_GetRawZ(const LASPointH hPoint);
305 
312 LAS_DLL LASError LASPoint_SetRawZ(LASPointH hPoint, long value);
313 
314 
319 LAS_DLL unsigned short LASPoint_GetIntensity(const LASPointH hPoint);
320 
326 LAS_DLL LASError LASPoint_SetIntensity(LASPointH hPoint, unsigned short value);
327 
336 LAS_DLL unsigned short LASPoint_GetReturnNumber(const LASPointH hPoint);
337 
343 LAS_DLL LASError LASPoint_SetReturnNumber(LASPointH hPoint, unsigned short value);
344 
349 LAS_DLL unsigned short LASPoint_GetNumberOfReturns(const LASPointH hPoint);
350 
356 LAS_DLL LASError LASPoint_SetNumberOfReturns(LASPointH hPoint, unsigned short value);
357 
362 LAS_DLL unsigned short LASPoint_GetScanDirection(const LASPointH hPoint);
363 
370 LAS_DLL LASError LASPoint_SetScanDirection(LASPointH hPoint, unsigned short value);
371 
376 LAS_DLL unsigned short LASPoint_GetFlightLineEdge(const LASPointH hPoint);
377 
384 LAS_DLL LASError LASPoint_SetFlightLineEdge(LASPointH hPoint, unsigned short value);
385 
391 LAS_DLL unsigned char LASPoint_GetScanFlags(const LASPointH hPoint);
392 
398 LAS_DLL LASError LASPoint_SetScanFlags(LASPointH hPoint, unsigned char value);
399 
404 LAS_DLL unsigned char LASPoint_GetClassification(const LASPointH hPoint);
405 
411 LAS_DLL LASError LASPoint_SetClassification(LASPointH hPoint, unsigned char value);
412 
417 LAS_DLL double LASPoint_GetTime(const LASPointH hPoint);
418 
424 LAS_DLL LASError LASPoint_SetTime(LASPointH hPoint, double value);
425 
430 LAS_DLL char LASPoint_GetScanAngleRank(const LASPointH hPoint);
431 
438 
444 LAS_DLL LASError LASPoint_SetPointSourceId(LASPointH hPoint, unsigned short value);
445 
450 LAS_DLL unsigned short LASPoint_GetPointSourceId(LASPointH hPoint);
451 
456 LAS_DLL unsigned char LASPoint_GetUserData(const LASPointH hPoint);
457 
463 LAS_DLL LASError LASPoint_SetUserData(LASPointH hPoint, unsigned char value);
464 
480 
486 
492 
499 
502 LAS_DLL void LASPoint_Destroy(LASPointH hPoint);
503 
509 
510 LAS_DLL void LASPoint_SetHeader( LASPointH hPoint, const LASHeaderH hHeader);
511 
519 LAS_DLL LASError LASPoint_GetData(const LASPointH hPoint, unsigned char* data);
520 
528 LAS_DLL LASError LASPoint_SetData(LASPointH hPoint, unsigned char* data);
529 
530 
534 LAS_DLL char* LASPoint_GetXML(const LASPointH hPoint);
535 
536 /****************************************************************************/
537 /* Header operations */
538 /****************************************************************************/
539 
545 
549 
552 LAS_DLL void LASHeader_Destroy(LASHeaderH hHeader);
553 
558 LAS_DLL char *LASHeader_GetFileSignature(const LASHeaderH hHeader);
559 
564 LAS_DLL unsigned short LASHeader_GetFileSourceId(const LASHeaderH hHeader);
565 
573 LAS_DLL LASError LASHeader_SetFileSourceId(LASHeaderH hHeader, unsigned short value);
574 
578 LAS_DLL char *LASHeader_GetProjectId(const LASHeaderH hHeader);
579 
585 LAS_DLL LASError LASHeader_SetProjectId(LASHeaderH hHeader, const char* value);
586 
593 
599 LAS_DLL unsigned char LASHeader_GetVersionMajor(const LASHeaderH hHeader);
600 
607 LAS_DLL LASError LASHeader_SetVersionMajor(LASHeaderH hHeader, unsigned char value);
608 
614 LAS_DLL unsigned char LASHeader_GetVersionMinor(const LASHeaderH hHeader);
615 
624 LAS_DLL LASError LASHeader_SetVersionMinor(LASHeaderH hHeader, unsigned char value);
625 
629 LAS_DLL char *LASHeader_GetSystemId(const LASHeaderH hHeader);
630 
638 LAS_DLL LASError LASHeader_SetSystemId(LASHeaderH hHeader, const char* value);
639 
643 LAS_DLL char *LASHeader_GetSoftwareId(const LASHeaderH hHeader);
644 
652 LAS_DLL LASError LASHeader_SetSoftwareId(LASHeaderH hHeader, const char* value);
653 
657 LAS_DLL unsigned short LASHeader_GetReserved(const LASHeaderH hHeader);
658 
666 LAS_DLL LASError LASHeader_SetReserved(LASHeaderH hHeader, unsigned short value);
667 
672 LAS_DLL unsigned short LASHeader_GetCreationDOY(const LASHeaderH hHeader);
673 
680 LAS_DLL LASError LASHeader_SetCreationDOY(LASHeaderH hHeader, unsigned short value);
681 
686 LAS_DLL unsigned short LASHeader_GetCreationYear(const LASHeaderH hHeader);
687 
694 LAS_DLL LASError LASHeader_SetCreationYear(LASHeaderH hHeader, unsigned short value);
695 
699 LAS_DLL unsigned short LASHeader_GetHeaderSize(const LASHeaderH hHeader);
700 
705 LAS_DLL unsigned int LASHeader_GetDataOffset(const LASHeaderH hHeader);
706 
713  LAS_DLL LASError LASHeader_SetDataOffset(const LASHeaderH hHeader, unsigned int value);
714 
719 LAS_DLL unsigned int LASHeader_GetHeaderPadding(const LASHeaderH hHeader);
720 
726  LAS_DLL LASError LASHeader_SetHeaderPadding(const LASHeaderH hHeader, unsigned int value);
727 
728 
733 LAS_DLL unsigned int LASHeader_GetRecordsCount(const LASHeaderH hHeader);
734 
739 LAS_DLL unsigned short LASHeader_GetDataRecordLength(const LASHeaderH hHeader);
740 
747 LAS_DLL LASError LASHeader_SetDataRecordLength(const LASHeaderH hHeader, unsigned short value);
748 
754 LAS_DLL unsigned char LASHeader_GetDataFormatId(const LASHeaderH hHeader);
755 
762 LAS_DLL LASError LASHeader_SetDataFormatId(const LASHeaderH hHeader, unsigned char value);
763 
769 LAS_DLL unsigned int LASHeader_GetPointRecordsCount(const LASHeaderH hHeader);
770 
776 LAS_DLL LASError LASHeader_SetPointRecordsCount(const LASHeaderH hHeader, unsigned int value);
777 
783 LAS_DLL unsigned int LASHeader_GetPointRecordsByReturnCount(const LASHeaderH hHeader, int index);
784 
791 LAS_DLL LASError LASHeader_SetPointRecordsByReturnCount(const LASHeaderH hHeader, int index, unsigned int value);
792 
797 LAS_DLL double LASHeader_GetScaleX(const LASHeaderH hHeader);
798 
803 LAS_DLL double LASHeader_GetScaleY(const LASHeaderH hHeader);
804 
809 LAS_DLL double LASHeader_GetScaleZ(const LASHeaderH hHeader);
810 
818 LAS_DLL LASError LASHeader_SetScale(LASHeaderH hHeader, double x, double y, double z);
819 
824 LAS_DLL double LASHeader_GetOffsetX(const LASHeaderH hHeader);
825 
830 LAS_DLL double LASHeader_GetOffsetY(const LASHeaderH hHeader);
831 
836 LAS_DLL double LASHeader_GetOffsetZ(const LASHeaderH hHeader);
837 
845 LAS_DLL LASError LASHeader_SetOffset(LASHeaderH hHeader, double x, double y, double z);
846 
851 LAS_DLL double LASHeader_GetMinX(const LASHeaderH hHeader);
852 
857 LAS_DLL double LASHeader_GetMinY(const LASHeaderH hHeader);
858 
863 LAS_DLL double LASHeader_GetMinZ(const LASHeaderH hHeader);
864 
872 LAS_DLL LASError LASHeader_SetMin(LASHeaderH hHeader, double x, double y, double z);
873 
878 LAS_DLL double LASHeader_GetMaxX(const LASHeaderH hHeader);
879 
884 LAS_DLL double LASHeader_GetMaxY(const LASHeaderH hHeader);
885 
890 LAS_DLL double LASHeader_GetMaxZ(const LASHeaderH hHeader);
891 
899 LAS_DLL LASError LASHeader_SetMax(LASHeaderH hHeader, double x, double y, double z);
900 
907 LAS_DLL LASVLRH LASHeader_GetVLR(const LASHeaderH hHeader, unsigned int i);
908 
914 LAS_DLL LASError LASHeader_DeleteVLR(LASHeaderH hHeader, unsigned int index);
915 
921 LAS_DLL LASError LASHeader_AddVLR(LASHeaderH hHeader, const LASVLRH hVLR);
922 
926 LAS_DLL char* LASHeader_GetXML(const LASHeaderH hHeader);
927 
928 /****************************************************************************/
929 /* Writer Operations */
930 /****************************************************************************/
931 
941 LAS_DLL LASWriterH LASWriter_Create(const char* filename, const LASHeaderH hHeader, int mode);
942 
953 LAS_DLL LASError LASWriter_WritePoint(const LASWriterH hWriter, const LASPointH hPoint);
954 
964 LAS_DLL LASError LASWriter_WriteHeader(const LASWriterH hWriter, const LASHeaderH hHeader);
965 
974 
979 LAS_DLL void LASWriter_Destroy(LASWriterH hWriter);
980 
988 LAS_DLL void LASWriter_SetHeader( LASWriterH hWriter, const LASHeaderH hHeader) ;
989 
990 LAS_DLL LASError LASWriter_SetSRS(LASWriterH hWriter, const LASSRSH hSRS);
993 
994 /****************************************************************************/
995 /* GUID Operations */
996 /****************************************************************************/
997 
1003 
1008 
1014 LAS_DLL LASGuidH LASGuid_CreateFromString(const char* string);
1015 
1019 LAS_DLL void LASGuid_Destroy(LASGuidH hId);
1020 
1027 LAS_DLL int LASGuid_Equals(LASGuidH hId1, LASGuidH hId2);
1028 
1034 LAS_DLL char* LASGuid_AsString(LASGuidH hId);
1035 
1036 /****************************************************************************/
1037 /* VLR Operations */
1038 /****************************************************************************/
1039 
1044 
1047 LAS_DLL void LASVLR_Destroy(LASVLRH hVLR);
1048 
1053 LAS_DLL char* LASVLR_GetUserId(const LASVLRH hVLR);
1054 
1061 LAS_DLL LASError LASVLR_SetUserId(LASVLRH hVLR, const char* value);
1062 
1067 LAS_DLL char* LASVLR_GetDescription(const LASVLRH hVLR);
1068 
1075 LAS_DLL LASError LASVLR_SetDescription(LASVLRH hVLR, const char* value);
1076 
1081 LAS_DLL unsigned short LASVLR_GetRecordLength(const LASVLRH hVLR);
1082 
1088 LAS_DLL LASError LASVLR_SetRecordLength(LASVLRH hVLR, unsigned short value);
1089 
1094 LAS_DLL unsigned short LASVLR_GetRecordId(const LASVLRH hVLR);
1095 
1101 LAS_DLL LASError LASVLR_SetRecordId(LASVLRH hVLR, unsigned short value);
1102 
1107 LAS_DLL unsigned short LASVLR_GetReserved(const LASVLRH hVLR);
1108 
1115 LAS_DLL LASError LASVLR_SetReserved(LASVLRH hVLR, unsigned short value);
1116 
1124 LAS_DLL LASError LASVLR_GetData(const LASVLRH hVLR, unsigned char* data);
1125 
1134 LAS_DLL LASError LASVLR_SetData(const LASVLRH hVLR, unsigned char* data, unsigned short length);
1135 
1136 
1137 /****************************************************************************/
1138 /* Color Operations */
1139 /****************************************************************************/
1140 
1145 
1148 LAS_DLL void LASColor_Destroy(LASColorH hColor);
1149 
1153 LAS_DLL unsigned short LASColor_GetRed(const LASColorH hColor);
1154 
1160 LAS_DLL LASError LASColor_SetRed(LASColorH hColor, unsigned short value);
1161 
1165 LAS_DLL unsigned short LASColor_GetGreen(const LASColorH hColor);
1166 
1172 LAS_DLL LASError LASColor_SetGreen(LASColorH hColor, unsigned short value);
1173 
1177 LAS_DLL unsigned short LASColor_GetBlue(const LASColorH hColor);
1178 
1184 LAS_DLL LASError LASColor_SetBlue(LASColorH hColor, unsigned short value);
1185 
1186 
1191 
1197 LAS_DLL LASError LASPoint_SetColor(LASPointH hPoint, const LASColorH hColor);
1198 
1199 
1200 /****************************************************************************/
1201 /* SRS Operations */
1202 /****************************************************************************/
1203 
1208 
1209 LAS_DLL const /*GTIF*/ void* LASSRS_GetGTIF(LASSRSH hSRS);
1210 LAS_DLL LASError LASSRS_SetGTIF(LASSRSH hSRS, const /* GTIF */ void* pgtiff, const /* ST_TIFF */ void* ptiff);
1211 LAS_DLL char* LASSRS_GetWKT(LASSRSH hSRS );
1213 LAS_DLL LASError LASSRS_SetWKT(LASSRSH hSRS, const char* value);
1214 LAS_DLL LASError LASSRS_SetFromUserInput(LASSRSH hSRS, const char* value);
1215 LAS_DLL char* LASSRS_GetProj4(LASSRSH hSRS);
1216 LAS_DLL LASError LASSRS_SetProj4(LASSRSH hSRS, const char* value);
1217 LAS_DLL LASError LASSRS_SetVerticalCS(LASSRSH hSRS, int verticalCSType,
1218  const char *citation, int verticalDatum,
1219  int verticalUnits );
1221 LAS_DLL LASError LASHeader_SetSRS(LASHeaderH hHeader, const LASSRSH hSRS);
1222 LAS_DLL void LASSRS_Destroy(LASSRSH hSRS);
1223 LAS_DLL LASVLRH LASSRS_GetVLR(const LASSRSH hSRS, unsigned int i);
1224 LAS_DLL unsigned int LASSRS_GetVLRCount(const LASSRSH hSRS);
1225 
1230 LAS_DLL void LASString_Free(char* string);
1231 
1232 LAS_DLL unsigned int LASSchema_GetByteSize( LASSchemaH hFormat);
1233 LAS_DLL unsigned int LASSchema_GetBaseByteSize( LASSchemaH hFormat);
1234 
1235 
1236 
1239 
1240 LAS_DLL void LASSchema_Destroy(LASSchemaH hFormat);
1241 
1246 LAS_DLL int LASHeader_Compressed(const LASHeaderH hHeader);
1247 
1254 
1255 LAS_C_END
1256 #endif
1257 
LAS_DLL LASError LASHeader_SetVersionMinor(LASHeaderH hHeader, unsigned char value)
Sets the minor version number for the header.
LAS_DLL char * LASSRS_GetWKT(LASSRSH hSRS)
LAS_DLL LASError LASPoint_SetIntensity(LASPointH hPoint, unsigned short value)
Sets the intensity value for the point.
LAS_DLL LASError LASColor_SetBlue(LASColorH hColor, unsigned short value)
Sets the blue value for the color.
LAS_DLL LASError LASVLR_GetData(const LASVLRH hVLR, unsigned char *data)
Gets the data stream for the VLR as an array of bytes.
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.
LAS_DLL LASError LASHeader_SetSystemId(LASHeaderH hHeader, const char *value)
Sets the System ID for the header.
LAS_DLL int LASHeader_Compressed(const LASHeaderH hHeader)
Returns the compression status of the header.
LAS_DLL LASVLRH LASSRS_GetVLR(const LASSRSH hSRS, unsigned int i)
struct LASVLRHS * LASVLRH
Definition: liblas.h:56
LAS_DLL LASError LASHeader_SetFileSourceId(LASHeaderH hHeader, unsigned short value)
Sets the FileSource ID value for the header.
LAS_DLL LASHeaderH LASWriter_GetHeader(const LASWriterH hWriter)
Returns a LASHeaderH representing the header for the file.
LAS_DLL unsigned short LASPoint_GetNumberOfReturns(const LASPointH hPoint)
Returns the total number of returns for a given pulse.
LAS_DLL double LASHeader_GetMaxX(const LASHeaderH hHeader)
Return the maximum x value.
LAS_DLL LASError LASHeader_SetSchema(LASHeaderH hHeader, LASSchemaH hFormat)
struct LASHeaderHS * LASHeaderH
Definition: liblas.h:54
LAS_DLL double LASHeader_GetOffsetX(const LASHeaderH hHeader)
Return the X offset.
LAS_DLL void LASSchema_Destroy(LASSchemaH hFormat)
LAS_DLL LASError LASWriter_WritePoint(const LASWriterH hWriter, const LASPointH hPoint)
Writes a point to the file.
LAS_DLL unsigned short LASVLR_GetReserved(const LASVLRH hVLR)
Gets the reserved value of the VLR.
LAS_DLL LASError LASPoint_SetRawY(LASPointH hPoint, long value)
Sets the raw Y value for the point.
LAS_DLL char * LASHeader_GetProjectId(const LASHeaderH hHeader)
Returns the project id for the header as a GUID string.
LAS_DLL LASReaderH LASReader_Create(const char *filename)
Creates a LASReaderH object that can be used to read LASHeaderH and LASPointH objects with...
LAS_DLL LASError LASPoint_SetY(LASPointH hPoint, double value)
Sets the Y value for the point.
LAS_DLL void LASColor_Destroy(LASColorH hColor)
Destroys a Color and removes it from the heap.
LAS_DLL LASError LASReader_Seek(LASReaderH hReader, unsigned int position)
Seeks to the specified point for the next LASReader_GetNextPoint operation to start from...
#define LAS_DLL
Definition: export.hpp:58
LAS_DLL LASSRSH LASHeader_GetSRS(const LASHeaderH hHeader)
LAS_DLL LASError LASHeader_SetMin(LASHeaderH hHeader, double x, double y, double z)
Sets the minimum values.
LAS_DLL unsigned int LASHeader_GetRecordsCount(const LASHeaderH hHeader)
Returns the number of variable length records in the header.
LAS_DLL LASHeaderH LASPoint_GetHeader(const LASPointH hPoint)
Returns a LASHeaderH representing the header for the point.
LAS_DLL char * LASHeader_GetXML(const LASHeaderH hHeader)
Returns an XMLized representation of the header.
LAS_DLL long LASPoint_GetRawZ(const LASPointH hPoint)
Gets the raw Z value for the point.
LAS_DLL LASError LASHeader_SetOffset(LASHeaderH hHeader, double x, double y, double z)
Sets the offset values.
LAS_DLL LASHeaderH LASHeader_Copy(const LASHeaderH hHeader)
Copies a LASHeaderH instance.
LAS_DLL double LASHeader_GetMaxZ(const LASHeaderH hHeader)
Return the maximum z value.
LAS_DLL unsigned short LASHeader_GetHeaderSize(const LASHeaderH hHeader)
Returns the size of the header for the file in bytes.
Definition: liblas.h:76
LAS_DLL long LASPoint_GetRawY(const LASPointH hPoint)
Gets the raw Y value for the point.
LAS_DLL LASError LASPoint_SetTime(LASPointH hPoint, double value)
Sets the time for the point.
LAS_DLL LASHeaderH LASReader_GetHeader(const LASReaderH hReader)
Returns a LASHeaderH representing the header for the file.
LAS_DLL LASError LASSRS_SetProj4(LASSRSH hSRS, const char *value)
Definition: liblas.h:78
LAS_DLL LASError LASHeader_SetScale(LASHeaderH hHeader, double x, double y, double z)
Sets the scale factors.
LAS_DLL unsigned short LASColor_GetRed(const LASColorH hColor)
Returns the red value for the color.
LAS_DLL double LASPoint_GetTime(const LASPointH hPoint)
Returns the time for the point.
LAS_DLL void LASWriter_Destroy(LASWriterH hWriter)
Destroys the LASWriterH instance, effectively closing the file and performing housekeeping operations...
LAS_DLL int LAS_IsGDALEnabled(void)
LAS_DLL LASError LASVLR_SetReserved(LASVLRH hVLR, unsigned short value)
Sets the reserved value of the VLR.
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...
LAS_DLL unsigned short LASVLR_GetRecordLength(const LASVLRH hVLR)
Returns the record length of the data stored in the VLR.
LAS_DLL unsigned int LASHeader_GetPointRecordsByReturnCount(const LASHeaderH hHeader, int index)
Returns the number of point records by return.
LAS_DLL LASError LASPoint_SetColor(LASPointH hPoint, const LASColorH hColor)
Sets the color for the point.
LAS_DLL void LASError_Print(const char *message)
Prints the last error message in the error stack to stderr.
LAS_DLL unsigned char LASHeader_GetVersionMajor(const LASHeaderH hHeader)
Returns the major version number for the header.
LAS_DLL void LASVLR_Destroy(LASVLRH hVLR)
Destroys a VLR record and removes it from the heap.
LAS_DLL unsigned short LASColor_GetBlue(const LASColorH hColor)
Returns the blue value for the color.
LAS_DLL double LASHeader_GetMinX(const LASHeaderH hHeader)
Return the minimum x value.
LAS_DLL LASPointH LASReader_GetNextPoint(const LASReaderH hReader)
Reads the next available point on the LASReaderH instance.
LAS_DLL LASError LASReader_SetSRS(LASReaderH hReader, const LASSRSH hSRS)
LAS_DLL LASError LASPoint_SetReturnNumber(LASPointH hPoint, unsigned short value)
Sets the return number for the point.
struct LASGuidHS * LASGuidH
Definition: liblas.h:55
LAS_DLL LASError LASSRS_SetVerticalCS(LASSRSH hSRS, int verticalCSType, const char *citation, int verticalDatum, int verticalUnits)
LAS_DLL char * LAS_GetVersion(void)
Returns the version string for this library.
LAS_DLL LASError LASHeader_SetMax(LASHeaderH hHeader, double x, double y, double z)
Sets the maximum values.
LAS_DLL LASColorH LASPoint_GetColor(const LASPointH hPoint)
Returns the color for the LASPointH.
LAS_DLL LASSchemaH LASHeader_GetSchema(LASHeaderH hHeader)
LAS_DLL unsigned short LASPoint_GetFlightLineEdge(const LASPointH hPoint)
Returns whether or not a given pulse is an edge point.
LAS_DLL char * LASError_GetLastErrorMsg(void)
Returns the name of the method the last error message happened in.
LAS_DLL LASError LASHeader_SetProjectId(LASHeaderH hHeader, const char *value)
Sets the project id/GUID for the header.
Definition: liblas.h:77
LASError
Definition: liblas.h:72
LAS_DLL LASError LASWriter_SetSRS(LASWriterH hWriter, const LASSRSH hSRS)
LAS_DLL LASError LASVLR_SetRecordLength(LASVLRH hVLR, unsigned short value)
Sets the record length of the data stored in the VLR.
LAS_DLL void LASReader_SetHeader(LASReaderH hReader, const LASHeaderH hHeader)
LAS_DLL LASError LASHeader_DeleteVLR(LASHeaderH hHeader, unsigned int index)
Deletes a VLR record from the header for the given index.
LAS_DLL void LASString_Free(char *string)
Method to ensure that you are freeing char*&#39;s from the correct heap.
LAS_DLL LASError LASHeader_SetDataRecordLength(const LASHeaderH hHeader, unsigned short value)
Explicitly set the record length for the file.
LAS_DLL LASPointH LASPoint_Copy(const LASPointH hPoint)
Creates a copy of a LASPointH instance.
LAS_DLL char * LASVLR_GetDescription(const LASVLRH hVLR)
Gets the description for the VLR.
LAS_DLL LASVLRH LASHeader_GetVLR(const LASHeaderH hHeader, unsigned int i)
Returns the VLR record for the given index.
LAS_DLL char * LASHeader_GetFileSignature(const LASHeaderH hHeader)
Returns the file signature the the file.
LAS_DLL void LASPoint_Destroy(LASPointH hPoint)
Destroys/deletes a LASPointH instance.
LAS_DLL int LASError_GetErrorCount(void)
Returns the number of error messages on the error stack.
struct LASPointHS * LASPointH
Definition: liblas.h:53
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.
LAS_DLL char * LASGuid_AsString(LASGuidH hId)
Returns a string representation of the GUID opqaue pointer.
LAS_DLL LASError LASWriter_WriteHeader(const LASWriterH hWriter, const LASHeaderH hHeader)
Overwrites the header for the file represented by the LASWriterH.
LAS_DLL void LASError_Reset(void)
Resets the error stack for the libLAS C API.
LAS_DLL char * LASHeader_GetSoftwareId(const LASHeaderH hHeader)
Returns the Software ID for the header.
LAS_DLL const void * LASSRS_GetGTIF(LASSRSH hSRS)
LAS_DLL LASError LASHeader_SetGUID(LASHeaderH hHeader, LASGuidH hId)
Sets the project id/GUID for the header.
struct LASColorHS * LASColorH
Definition: liblas.h:57
struct LASSRSHS * LASSRSH
Definition: liblas.h:58
LAS_DLL unsigned int LASHeader_GetPointRecordsCount(const LASHeaderH hHeader)
Returns the number of point records in the file.
LAS_DLL char * LASVLR_GetUserId(const LASVLRH hVLR)
Returns the User Id for the VLR.
LAS_DLL LASError LASPoint_SetClassification(LASPointH hPoint, unsigned char value)
Sets the classification for the point.
LAS_DLL char * LASSRS_GetWKT_CompoundOK(LASSRSH hSRS)
LAS_DLL LASError LASPoint_SetFlightLineEdge(LASPointH hPoint, unsigned short value)
Sets the edge marker for a given pulse.
LAS_DLL void LASError_Pop(void)
Pops the top error off of the error stack for the libLAS C API.
LAS_DLL LASError LASWriter_WriteOwnedHeader(const LASWriterH hWriter)
Overwrites the header for the file represented by the LASWriterH that was set using LASWriter_SetHead...
LAS_DLL void LASGuid_Destroy(LASGuidH hId)
Destroys a GUID opaque pointer and removes it from the heap.
LAS_DLL void LASSRS_Destroy(LASSRSH hSRS)
LAS_DLL LASGuidH LASHeader_GetGUID(const LASHeaderH hHeader)
Returns the GUID value for the header as an opaque LASGuidH pointer.
LAS_DLL double LASPoint_GetZ(const LASPointH hPoint)
Gets the Z value for the point.
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...
LAS_DLL double LASHeader_GetMinY(const LASHeaderH hHeader)
Return the minimum y value.
LAS_DLL LASError LASHeader_SetPointRecordsByReturnCount(const LASHeaderH hHeader, int index, unsigned int value)
Sets the number of point records for a given return.
LAS_DLL void LASWriter_SetHeader(LASWriterH hWriter, const LASHeaderH hHeader)
LAS_DLL char * LAS_GetFullVersion(void)
LAS_DLL double LASHeader_GetOffsetZ(const LASHeaderH hHeader)
Return the Z offset.
LAS_DLL unsigned int LASSRS_GetVLRCount(const LASSRSH hSRS)
LAS_DLL LASError LASReader_SetOutputSRS(LASReaderH hReader, const LASSRSH hSRS)
LAS_DLL unsigned short LASVLR_GetRecordId(const LASVLRH hVLR)
Gets the record id for the VLR.
LAS_DLL LASError LASError_GetLastErrorNum(void)
Returns the error number of the last error on the error stack.
LAS_DLL unsigned char LASPoint_GetClassification(const LASPointH hPoint)
Returns the classification for the point.
LAS_DLL LASPointH LASPoint_Create(void)
Creates a new empty LASPointH instance.
LAS_DLL LASError LASPoint_SetData(LASPointH hPoint, unsigned char *data)
Sets the data stream for the Point as an array of bytes.
LAS_DLL char * LASSRS_GetProj4(LASSRSH hSRS)
LAS_DLL char * LASPoint_GetXML(const LASPointH hPoint)
Returns an XMLized representation of the point.
LAS_DLL LASError LASHeader_SetDataFormatId(const LASHeaderH hHeader, unsigned char value)
Sets the data format id for the file.
LAS_DLL unsigned short LASColor_GetGreen(const LASColorH hColor)
Returns the green value for the color.
LAS_DLL LASGuidH LASGuid_CreateFromString(const char *string)
Creates a new GUID opaque pointer using the given string.
LAS_DLL double LASPoint_GetY(const LASPointH hPoint)
Gets the Y value for the point.
LAS_DLL LASError LASPoint_SetUserData(LASPointH hPoint, unsigned char value)
Sets the arbitrary user data for the point.
LAS_DLL LASHeaderH LASHeader_Create(void)
Creates an empty LASHeaderH with default values.
LAS_DLL LASVLRH LASVLR_Create(void)
Creates a new VLR record.
LAS_DLL LASError LASHeader_SetPointRecordsCount(const LASHeaderH hHeader, unsigned int value)
Sets the number of point records for the file.
LAS_DLL unsigned short LASPoint_GetIntensity(const LASPointH hPoint)
Returns the intensity value for the point.
LAS_DLL LASError LASWriter_SetOutputSRS(LASWriterH hWriter, const LASSRSH hSRS)
LAS_DLL unsigned short LASHeader_GetReserved(const LASHeaderH hHeader)
Returns the reserved value for the header.
LAS_DLL LASError LASPoint_SetRawX(LASPointH hPoint, long value)
Sets the raw X value for the point.
LAS_DLL char * LASHeader_GetSystemId(const LASHeaderH hHeader)
Returns the System ID for the header.
struct LASReaderHS * LASReaderH
Definition: liblas.h:52
LAS_DLL LASError LASHeader_SetCreationYear(LASHeaderH hHeader, unsigned short value)
Sets the file creation year.
LAS_DLL int LAS_IsLibGeoTIFFEnabled(void)
LAS_DLL unsigned short LASHeader_GetDataRecordLength(const LASHeaderH hHeader)
Returns the record length for the points based on their data format id in bytes.
LAS_DLL LASError LASPoint_SetRawZ(LASPointH hPoint, long value)
Sets the raw Z value for the point.
#define LAS_C_END
Definition: las_config.h:55
LAS_DLL int LASPoint_Validate(LASPointH hPoint)
Returns a bitfield representing the validity of various members enum DataMemberFlag { eReturnNumber =...
LAS_DLL LASError LASVLR_SetUserId(LASVLRH hVLR, const char *value)
Sets the User Id for the VLR.
struct LASWriterHS * LASWriterH
Definition: liblas.h:51
LAS_DLL LASError LASHeader_SetReserved(LASHeaderH hHeader, unsigned short value)
Sets the Reserved value for the header.
LAS_DLL unsigned short LASHeader_GetCreationDOY(const LASHeaderH hHeader)
Returns the file creation day of the year.
LAS_DLL LASError LASSRS_SetWKT(LASSRSH hSRS, const char *value)
LAS_DLL double LASHeader_GetScaleX(const LASHeaderH hHeader)
Return the X scale factor.
LAS_DLL long LASPoint_GetRawX(const LASPointH hPoint)
Returns the raw X value for the point.
LAS_DLL int LASPoint_IsValid(LASPointH hPoint)
Returns a boolean whether or not the point is valid.
LAS_DLL void LASReader_Destroy(LASReaderH hReader)
Closes the file for reading operations represented by the LASReaderH instance.
LAS_DLL void LASPoint_SetHeader(LASPointH hPoint, const LASHeaderH hHeader)
LAS_DLL double LASHeader_GetScaleZ(const LASHeaderH hHeader)
Return the Z scale factor.
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...
LAS_DLL char * LASReader_GetSummaryXML(const LASReaderH hReader)
LAS_DLL LASError LASColor_SetRed(LASColorH hColor, unsigned short value)
Sets the red value for the color.
LAS_DLL LASError LASPoint_SetNumberOfReturns(LASPointH hPoint, unsigned short value)
Sets the number of returns for the point.
LAS_DLL unsigned char LASPoint_GetUserData(const LASPointH hPoint)
Returns the arbitrary user data for the point.
LAS_DLL LASError LASHeader_SetCreationDOY(LASHeaderH hHeader, unsigned short value)
Sets the file creation day of the year.
LAS_DLL LASError LASVLR_SetDescription(LASVLRH hVLR, const char *value)
Sets the description for the VLR.
LAS_DLL double LASHeader_GetMaxY(const LASHeaderH hHeader)
Return the maximum y value.
LAS_DLL unsigned short LASHeader_GetFileSourceId(const LASHeaderH hHeader)
Returns the file source id for the file.
LAS_DLL char LASPoint_GetScanAngleRank(const LASPointH hPoint)
Returns the scan angle for the point.
LAS_DLL LASError LASPoint_SetScanFlags(LASPointH hPoint, unsigned char value)
Sets all of the scan flags for the point.
LAS_DLL double LASHeader_GetScaleY(const LASHeaderH hHeader)
Return the Y scale factor.
LAS_DLL unsigned int LASSchema_GetBaseByteSize(LASSchemaH hFormat)
LAS_DLL LASError LASReader_SetInputSRS(LASReaderH hReader, const LASSRSH hSRS)
LAS_DLL LASError LASPoint_SetScanDirection(LASPointH hPoint, unsigned short value)
Sets the scan direction for a given pulse.
LAS_DLL LASError LASHeader_AddVLR(LASHeaderH hHeader, const LASVLRH hVLR)
Adds a VLR record to the header.
LAS_DLL LASError LASPoint_SetPointSourceId(LASPointH hPoint, unsigned short value)
Sets the point source id for the point.
struct LASSchemaHS * LASSchemaH
Definition: liblas.h:59
LAS_DLL int LAS_IsLibSpatialIndexEnabled(void)
LAS_DLL unsigned char LASHeader_GetDataFormatId(const LASHeaderH hHeader)
Returns the data format id.
LAS_DLL LASError LASHeader_SetDataOffset(const LASHeaderH hHeader, unsigned int value)
Sets the location in number of bytes to start writing point data.
LAS_DLL unsigned int LASHeader_GetDataOffset(const LASHeaderH hHeader)
Returns the byte offset to the start of actual point data for the file.
LAS_DLL LASError LASHeader_SetVersionMajor(LASHeaderH hHeader, unsigned char value)
Sets the major version number for the header.
LAS_DLL LASError LASWriter_SetInputSRS(LASWriterH hWriter, const LASSRSH hSRS)
LAS_DLL unsigned short LASHeader_GetCreationYear(const LASHeaderH hHeader)
Returns the file creation year.
LAS_DLL unsigned short LASPoint_GetReturnNumber(const LASPointH hPoint)
Returns the return number for the point.
LAS_DLL LASError LASSRS_SetGTIF(LASSRSH hSRS, const void *pgtiff, const void *ptiff)
LAS_DLL LASError LASVLR_SetRecordId(LASVLRH hVLR, unsigned short value)
Sets the record id for the VLR.
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...
LAS_DLL int LASGuid_Equals(LASGuidH hId1, LASGuidH hId2)
Determines if two GUIDs are equal.
LAS_DLL LASError LASHeader_SetSRS(LASHeaderH hHeader, const LASSRSH hSRS)
#define LAS_C_START
Definition: las_config.h:54
LAS_DLL LASWriterH LASWriter_Create(const char *filename, const LASHeaderH hHeader, int mode)
Creates a new LASWriterH for write operations on LAS files.
LAS_DLL LASColorH LASColor_Create(void)
Creates a new Color.
LAS_DLL unsigned short LASPoint_GetPointSourceId(LASPointH hPoint)
Returns the point source id for the point.
LAS_DLL LASError LASPoint_SetX(LASPointH hPoint, double value)
Sets the X value for the point.
LAS_DLL unsigned int LASSchema_GetByteSize(LASSchemaH hFormat)
LAS_DLL LASError LASPoint_SetZ(LASPointH hPoint, double value)
Sets the Z value for the point.
LAS_DLL LASError LASPoint_GetData(const LASPointH hPoint, unsigned char *data)
Gets the data stream for the VLR as an array of bytes.
LAS_DLL LASError LASColor_SetGreen(LASColorH hColor, unsigned short value)
Sets the green value for the color.
LAS_DLL double LASHeader_GetMinZ(const LASHeaderH hHeader)
Return the minimum z value.
LAS_DLL double LASHeader_GetOffsetY(const LASHeaderH hHeader)
Return the Y offset.
Definition: liblas.h:75
LAS_DLL LASError LASHeader_SetCompressed(LASHeaderH hHeader, int b)
Sets the compression status of the header.
LAS_DLL LASError LASHeader_SetSoftwareId(LASHeaderH hHeader, const char *value)
Sets the Software ID for the header.
LAS_DLL double LASPoint_GetX(const LASPointH hPoint)
Returns the X value for the point.
LAS_DLL unsigned char LASHeader_GetVersionMinor(const LASHeaderH hHeader)
Returns the min version number for the header.
LAS_DLL LASGuidH LASGuid_Create()
Returns a new random GUID.
LAS_DLL unsigned short LASPoint_GetScanDirection(const LASPointH hPoint)
Returns the scan direction for a given pulse.
LAS_DLL LASError LASPoint_SetScanAngleRank(LASPointH hPoint, char value)
Sets the scan angle for the point.
LAS_DLL LASSRSH LASSRS_Create(void)
Creates a new SRS.
LAS_DLL char * LASError_GetLastErrorMethod(void)
Returns the name of the method the last error message happened in.
LAS_DLL LASError LASSRS_SetFromUserInput(LASSRSH hSRS, const char *value)
LAS_DLL void LASHeader_Destroy(LASHeaderH hHeader)
Destroys/deletes a LASHeader instance.
Definition: liblas.h:74