Changeset 662:4dd7b4faeee0
- Timestamp:
- 05/18/08 22:17:27 (2 years ago)
- Branch:
- default
- Convert:
- svn:1766ff46-f334-0410-ab20-d63176f87757/trunk@729
- Files:
-
- 2 edited
-
include/liblas/capi/liblas.h (modified) (3 diffs)
-
src/las_c_api.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
include/liblas/capi/liblas.h
r654 r662 758 758 LAS_DLL LASError LASHeader_SetProj4(LASHeaderH hHeader, const char* value); 759 759 760 /** Returns the VLR record for the given index. Use LASHeader_GetRecordsCount to 761 * determine the number of VLR records available on the header. 762 * @param hHeader the LASHeaderH instance 763 * @param i the index starting from 0 of the VLR to fetch 764 * @return LASVLRH instance that models the Variable Length Record 765 */ 766 LAS_DLL LASVLRH LASHeader_GetVLR(const LASHeaderH hHeader, uint32_t i); 767 768 /** Deletes a VLR record from the header for the given index. 769 * @param hHeader the LASHeaderH instance 770 * @param index the index starting from 0 of the VLR to delete 771 * @return LASErrorEnum 772 */ 773 LAS_DLL LASError LASHeader_DeleteVLR(LASHeaderH hHeader, uint32_t index); 774 775 /** Adds a VLR record to the header. 776 * @param hHeader the LASHeaderH instance 777 * @param hVLR the VLR to add to the header 778 * @return LASErrorEnum 779 */ 780 LAS_DLL LASError LASHeader_AddVLR(LASHeaderH hHeader, const LASVLRH hVLR); 781 760 782 /****************************************************************************/ 761 783 /* Writer Operations */ … … 842 864 LAS_DLL char* LASGuid_AsString(LASGuidH hId); 843 865 844 /** Returns the VLR record for the given index. Use LASHeader_GetRecordsCount to 845 * determine the number of VLR records available on the header. 846 * @param hHeader the LASHeaderH instance 847 * @param i the index starting from 0 of the VLR to fetch 848 * @return LASVLRH instance that models the Variable Length Record 849 */ 850 LAS_DLL LASVLRH LASHeader_GetVLR(const LASHeaderH hHeader, uint32_t i); 851 852 /** Deletes a VLR record from the header for the given index. 853 * @param hHeader the LASHeaderH instance 854 * @param index the index starting from 0 of the VLR to delete 855 * @return LASErrorEnum 856 */ 857 LAS_DLL LASError LASHeader_DeleteVLR(LASHeaderH hHeader, uint32_t index); 858 859 /** Adds a VLR record to the header. 860 * @param hHeader the LASHeaderH instance 861 * @param hVLR the VLR to add to the header 862 * @return LASErrorEnum 863 */ 864 LAS_DLL LASError LASHeader_AddVLR(LASHeaderH hHeader, const LASVLRH hVLR); 866 /****************************************************************************/ 867 /* VLR Operations */ 868 /****************************************************************************/ 865 869 866 870 /** Creates a new VLR record … … 947 951 * @return LASErrorEnum 948 952 */ 949 LAS_DLL LASError LASVLR_GetData(const LASVLRH hVLR, uint8_t* data, int* length);953 LAS_DLL LASError LASVLR_GetData(const LASVLRH hVLR, uint8_t** data, int* length); 950 954 951 955 LAS_C_END -
src/las_c_api.cpp
r654 r662 1431 1431 } 1432 1432 1433 LAS_DLL LASErrorEnum LASVLR_GetData(const LASVLRH hVLR, liblas::uint8_t* data, int* length) {1433 LAS_DLL LASErrorEnum LASVLR_GetData(const LASVLRH hVLR, liblas::uint8_t** data, int* length) { 1434 1434 1435 1435 VALIDATE_POINTER1(hVLR, "LASVLR_GetData", LE_Failure); … … 1437 1437 try { 1438 1438 std::vector<liblas::uint8_t> *d = new std::vector<liblas::uint8_t>(((LASVLR*) hVLR)->GetData()); 1439 *data = d->front(); 1439 *data = &(d->front()); 1440 //data = &(d[0]) 1440 1441 *length = static_cast<int>(d->size()); 1442 printf("GetData length %d\n", *length); 1441 1443 } 1442 1444 catch (std::exception const& e) {
Note: See TracChangeset
for help on using the changeset viewer.
