[Liblas-commits] r1110 - in trunk: include/liblas/capi src
liblas-commits at liblas.org
liblas-commits at liblas.org
Tue Mar 17 13:24:19 EDT 2009
Author: hobu
Date: Tue Mar 17 13:24:18 2009
New Revision: 1110
URL: http://liblas.org/changeset/1110
Log:
fix #110, LASSRS VLR methods for C API
Modified:
trunk/include/liblas/capi/liblas.h
trunk/src/las_c_api.cpp
Modified: trunk/include/liblas/capi/liblas.h
==============================================================================
--- trunk/include/liblas/capi/liblas.h (original)
+++ trunk/include/liblas/capi/liblas.h Tue Mar 17 13:24:18 2009
@@ -1081,7 +1081,8 @@
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, uint32_t i);
+LAS_DLL uint32_t LASSRS_GetVLRCount(const LASSRSH hSRS);
/** Method to ensure that you are freeing char*'s from the
* correct heap.
Modified: trunk/src/las_c_api.cpp
==============================================================================
--- trunk/src/las_c_api.cpp (original)
+++ trunk/src/las_c_api.cpp Tue Mar 17 13:24:18 2009
@@ -1797,6 +1797,19 @@
return LE_None;
}
+LAS_DLL LASVLRH LASSRS_GetVLR(const LASSRSH hSRS, liblas::uint32_t i) {
+ VALIDATE_POINTER1(hSRS, "LASSRS_GetVLR", 0);
+
+ LASVLR vlr = ((LASSRS*) hSRS)->GetVLRs()[i];
+ return (LASVLRH) new LASVLR(vlr);
+}
+
+LAS_DLL liblas::uint32_t LASSRS_GetVLRCount(const LASSRSH hSRS) {
+ VALIDATE_POINTER1(hSRS, "LASSRS_GetVLR", 0);
+
+ liblas::uint32_t size = ((LASSRS*) hSRS)->GetVLRs().size();
+ return size;
+}
LAS_DLL LASErrorEnum LASHeader_SetSRS(LASHeaderH hHeader, const LASSRSH hSRS) {
More information about the Liblas-commits
mailing list