From liblas-commits at hobu.net Thu May 1 11:36:17 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 11:36:25 2008 Subject: [Liblas-commits] r621 - trunk/apps Message-ID: <20080501163617.6706F805044@mail.hobu.net> Author: hobu Date: Thu May 1 11:36:16 2008 New Revision: 621 URL: http://liblas.org/changeset/621 Log: add some validation stuff Modified: trunk/apps/las2las.c trunk/apps/las2txt.c Modified: trunk/apps/las2las.c ============================================================================== --- trunk/apps/las2las.c (original) +++ trunk/apps/las2las.c Thu May 1 11:36:16 2008 @@ -21,6 +21,7 @@ LASPointSummary* SummarizePoints(LASReaderH reader); void print_point_summary(LASPointSummary* summary, LASHeaderH header); +void print_point(LASPointH point); void print_header(LASHeaderH header, const char* file_name); void RepairHeader(LASHeaderH header, LASPointSummary* summary) ; Modified: trunk/apps/las2txt.c ============================================================================== --- trunk/apps/las2txt.c (original) +++ trunk/apps/las2txt.c Thu May 1 11:36:16 2008 @@ -93,6 +93,7 @@ int i; int use_stdin = FALSE; int use_stdout = FALSE; + int skip_invalid = FALSE; int verbose = FALSE; char* file_name_in = 0; @@ -121,7 +122,13 @@ ) { verbose = TRUE; - } + } + else if ( strcmp(argv[i],"-s") == 0 || + strcmp(argv[i],"--skip_invalid") == 0 + ) + { + skip_invalid = TRUE; + } else if ( strcmp(argv[i], "--parse") == 0 || strcmp(argv[i], "-parse") == 0 ) @@ -452,6 +459,14 @@ p = LASReader_GetNextPoint(reader); while (p) { + if (skip_invalid && !LASPoint_IsValid(p)) { + if (verbose) { + LASError_Print("Skipping writing invalid point..."); + } + p = LASReader_GetNextPoint(reader); + continue; + } + i = 0; while (TRUE) { @@ -475,7 +490,7 @@ break; /* // the intensity */ case 'i': - fprintf(file_out, "%d", LASPoint_GetIntensity(p)); + fprintf(file_out, "%d", LASPoint_GetIntensity(p)); break; /* the scan angle */ case 'a': From liblas-commits at hobu.net Thu May 1 12:38:46 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 12:39:04 2008 Subject: [Liblas-commits] r622 - trunk/src Message-ID: <20080501173846.8D7E980540C@mail.hobu.net> Author: hobu Date: Thu May 1 12:38:45 2008 New Revision: 622 URL: http://liblas.org/changeset/622 Log: we can't claim classifications > 31 are invalid because the point may have a bit set that denotes synthetic, key-point, or withheld as stated in the specification Modified: trunk/src/laspoint.cpp Modified: trunk/src/laspoint.cpp ============================================================================== --- trunk/src/laspoint.cpp (original) +++ trunk/src/laspoint.cpp Thu May 1 12:38:45 2008 @@ -143,9 +143,6 @@ if (this->GetFlightLineEdge() > 0x01) flags |= eFlightLineEdge; - if (this->GetClassification() > 31) - flags |= eClassification; - if (eScanAngleRankMin > this->GetScanAngleRank() || this->GetScanAngleRank() > eScanAngleRankMax) { @@ -186,9 +183,6 @@ if (this->GetTime() < 0.0) return false; - - if (this->GetClassification() > 31) - return false; return true; } From liblas-commits at hobu.net Thu May 1 12:43:53 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 12:44:00 2008 Subject: [Liblas-commits] r623 - trunk/apps Message-ID: <20080501174353.6821B80553E@mail.hobu.net> Author: hobu Date: Thu May 1 12:43:52 2008 New Revision: 623 URL: http://liblas.org/changeset/623 Log: report Scan Angle Rank's as part of summary output Modified: trunk/apps/lascommon.c Modified: trunk/apps/lascommon.c ============================================================================== --- trunk/apps/lascommon.c (original) +++ trunk/apps/lascommon.c Thu May 1 12:43:52 2008 @@ -168,13 +168,13 @@ fprintf(stderr, "---------------------------------------------------------\n"); fprintf(stderr, " X: \t\t%.6f\n", - LASPoint_GetX(point), + LASPoint_GetX(point) ); fprintf(stderr, " Y: \t\t%.6f\n", - LASPoint_GetY(point), + LASPoint_GetY(point) ); fprintf(stderr, " Z: \t\t%.6f\n", - LASPoint_GetZ(point), + LASPoint_GetZ(point) ); fprintf(stderr, " Time:\t\t\t%.6f\n", LASPoint_GetTime(point) @@ -194,6 +194,10 @@ fprintf(stderr, " Scan Direction Flag:\t%d\n", LASPoint_GetScanDirection(point) ); + fprintf(stderr, " Scan Angle Rank:\t%d\n", + LASPoint_GetScanAngleRank(point) + ); + fprintf(stderr, " Classification:\t%d\n", LASPoint_GetClassification(point) ); @@ -261,6 +265,10 @@ LASPoint_GetScanDirection(summary->pmin), LASPoint_GetScanDirection(summary->pmax) ); + fprintf(stderr, " Scan Angle Rank:\t%d,%d\n", + LASPoint_GetScanAngleRank(summary->pmin), + LASPoint_GetScanAngleRank(summary->pmax) + ); fprintf(stderr, " Classification:\t%d,%d\n", LASPoint_GetClassification(summary->pmin), LASPoint_GetClassification(summary->pmax) From liblas-commits at hobu.net Thu May 1 13:02:12 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 13:02:19 2008 Subject: [Liblas-commits] r624 - trunk/src Message-ID: <20080501180212.84F0B805730@mail.hobu.net> Author: hobu Date: Thu May 1 13:02:11 2008 New Revision: 624 URL: http://liblas.org/changeset/624 Log: The spec doesn't say if negative times are not allowed, so we will allow them Modified: trunk/src/laspoint.cpp Modified: trunk/src/laspoint.cpp ============================================================================== --- trunk/src/laspoint.cpp (original) +++ trunk/src/laspoint.cpp Thu May 1 13:02:11 2008 @@ -149,9 +149,6 @@ flags |= eScanAngleRank; } - if (this->GetTime() < 0.0) - flags |= eTime; - if (flags > 0) { throw invalid_point_data("point data members out of range", flags); @@ -181,8 +178,6 @@ if (this->GetReturnNumber() > 0x07) return false; - if (this->GetTime() < 0.0) - return false; return true; } From liblas-commits at hobu.net Thu May 1 13:26:37 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 13:26:46 2008 Subject: [Liblas-commits] r625 - trunk/python Message-ID: <20080501182637.12BB680599F@mail.hobu.net> Author: hobu Date: Thu May 1 13:26:37 2008 New Revision: 625 URL: http://liblas.org/changeset/625 Log: set data_files to None for *nix Modified: trunk/python/setup.py Modified: trunk/python/setup.py ============================================================================== --- trunk/python/setup.py (original) +++ trunk/python/setup.py Thu May 1 13:26:37 2008 @@ -17,7 +17,7 @@ lib_name = 'liblas%s.dll' % version data_files=[('DLLs', ['DLLs/%s'% lib_name]),] else: - data_files = [(),] + data_files = None print data_files setup(name = 'libLAS', From liblas-commits at hobu.net Thu May 1 13:56:34 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 13:56:42 2008 Subject: [Liblas-commits] r626 - in trunk: include/liblas/capi src Message-ID: <20080501185634.4DC27805C46@mail.hobu.net> Author: hobu Date: Thu May 1 13:56:33 2008 New Revision: 626 URL: http://liblas.org/changeset/626 Log: use the correct return type for scan angle rank 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 Thu May 1 13:56:33 2008 @@ -40,7 +40,7 @@ double x, y, z; uint16_t intensity; uint8_t cls; - uint8_t scan_angle; + int8_t scan_angle; uint8_t user_data; uint16_t retnum; uint16_t numret; @@ -98,8 +98,8 @@ LAS_DLL LASError LASPoint_SetClassification(LASPointH hPoint, uint8_t value); LAS_DLL double LASPoint_GetTime(const LASPointH); LAS_DLL LASError LASPoint_SetTime(LASPointH hPoint, double value); -LAS_DLL uint8_t LASPoint_GetScanAngleRank(const LASPointH); -LAS_DLL LASError LASPoint_SetScanAngleRank(LASPointH hPoint, uint8_t value); +LAS_DLL int8_t LASPoint_GetScanAngleRank(const LASPointH); +LAS_DLL LASError LASPoint_SetScanAngleRank(LASPointH hPoint, int8_t value); LAS_DLL uint8_t LASPoint_GetUserData(const LASPointH); LAS_DLL LASError LASPoint_SetUserData(LASPointH hPoint, uint8_t value); LAS_DLL int LASPoint_Validate(LASPointH hPoint); Modified: trunk/src/las_c_api.cpp ============================================================================== --- trunk/src/las_c_api.cpp (original) +++ trunk/src/las_c_api.cpp Thu May 1 13:56:33 2008 @@ -553,15 +553,15 @@ return value; } -LAS_DLL liblas::uint8_t LASPoint_GetScanAngleRank(const LASPointH hPoint) { +LAS_DLL liblas::int8_t LASPoint_GetScanAngleRank(const LASPointH hPoint) { VALIDATE_POINTER1(hPoint, "LASPoint_GetScanAngleRank", 0); - liblas::uint8_t value = ((LASPoint*) hPoint)->GetScanAngleRank(); + liblas::int8_t value = ((LASPoint*) hPoint)->GetScanAngleRank(); return value; } -LAS_DLL LASErrorEnum LASPoint_SetScanAngleRank(LASPointH hPoint, liblas::uint8_t value) { +LAS_DLL LASErrorEnum LASPoint_SetScanAngleRank(LASPointH hPoint, liblas::int8_t value) { VALIDATE_POINTER1(hPoint, "LASPoint_SetScanAngleRank", LE_Failure); From liblas-commits at hobu.net Thu May 1 13:58:47 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 13:58:54 2008 Subject: [Liblas-commits] r627 - trunk/python/liblas Message-ID: <20080501185847.30498805DA2@mail.hobu.net> Author: hobu Date: Thu May 1 13:58:46 2008 New Revision: 627 URL: http://liblas.org/changeset/627 Log: use int8_t instead of ubyte for return type for scan angle rank Modified: trunk/python/liblas/core.py Modified: trunk/python/liblas/core.py ============================================================================== --- trunk/python/liblas/core.py (original) +++ trunk/python/liblas/core.py Thu May 1 13:58:46 2008 @@ -47,16 +47,16 @@ except ImportError: HAS_NUMPY = False -if os.name == 'nt': - # stolen from Shapely - # http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/shapely/geos.py - lib_name = 'liblas0.9.5.dll' - try: - local_dlls = os.path.abspath(os.__file__ + "../../../DLLs") - original_path = os.environ['PATH'] - os.environ['PATH'] = "%s;%s" % (local_dlls, original_path) - las = ctypes.CDLL(lib_name) - except (ImportError, WindowsError): +if os.name == 'nt': + # stolen from Shapely + # http://trac.gispython.org/projects/PCL/browser/Shapely/trunk/shapely/geos.py + lib_name = 'liblas0.9.5.dll' + try: + local_dlls = os.path.abspath(os.__file__ + "../../../DLLs") + original_path = os.environ['PATH'] + os.environ['PATH'] = "%s;%s" % (local_dlls, original_path) + las = ctypes.CDLL(lib_name) + except (ImportError, WindowsError): raise @@ -65,7 +65,7 @@ if platform == 'Darwin': lib_name = 'liblas.dylib' else: - lib_name = 'liblas.so' + lib_name = 'liblas.so' las = ctypes.CDLL(lib_name) else: raise LASException('Unsupported OS "%s"' % os.name) @@ -175,11 +175,11 @@ las.LASPoint_SetTime.argtypes = [ctypes.c_void_p, ctypes.c_double] las.LASPoint_SetTime.errcheck = check_return -las.LASPoint_GetScanAngleRank.restype = ctypes.c_ubyte +las.LASPoint_GetScanAngleRank.restype = ctypes.c_int8 las.LASPoint_GetScanAngleRank.argtypes = [ctypes.c_void_p] las.LASPoint_GetScanAngleRank.errcheck = check_value las.LASPoint_SetScanAngleRank.restype = ctypes.c_int -las.LASPoint_SetScanAngleRank.argtypes = [ctypes.c_void_p, ctypes.c_ubyte] +las.LASPoint_SetScanAngleRank.argtypes = [ctypes.c_void_p, ctypes.c_int8] las.LASPoint_SetScanAngleRank.errcheck = check_return las.LASPoint_GetUserData.restype = ctypes.c_ubyte From liblas-commits at hobu.net Thu May 1 17:02:20 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 17:02:29 2008 Subject: [Liblas-commits] r628 - trunk/python Message-ID: <20080501220220.B7E3D8069C2@mail.hobu.net> Author: hobu Date: Thu May 1 17:02:19 2008 New Revision: 628 URL: http://liblas.org/changeset/628 Log: ignore dist and build directories Modified: trunk/python/ (props changed) From liblas-commits at hobu.net Thu May 1 17:03:24 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 17:03:32 2008 Subject: [Liblas-commits] r629 - trunk/test/data Message-ID: <20080501220324.E0A9E806A6D@mail.hobu.net> Author: hobu Date: Thu May 1 17:03:24 2008 New Revision: 629 URL: http://liblas.org/changeset/629 Log: add a file with a single bad 1.1 point Added: trunk/test/data/bad_points_1.1.las (contents, props changed) Added: trunk/test/data/bad_points_1.1.las ============================================================================== Binary file. No diff available. From liblas-commits at hobu.net Thu May 1 17:07:37 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 17:07:46 2008 Subject: [Liblas-commits] r630 - trunk Message-ID: <20080501220737.A6D8B806F65@mail.hobu.net> Author: hobu Date: Thu May 1 17:07:36 2008 New Revision: 630 URL: http://liblas.org/changeset/630 Log: libtool should be generated by autogen.sh, not stored in subversion Removed: trunk/libtool From liblas-commits at hobu.net Thu May 1 17:09:31 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 17:09:39 2008 Subject: [Liblas-commits] r631 - in trunk: . apps include src src/detail Message-ID: <20080501220931.41C8E80711B@mail.hobu.net> Author: hobu Date: Thu May 1 17:09:30 2008 New Revision: 631 URL: http://liblas.org/changeset/631 Log: don't store Makefile.in in svn. These are generated with autogen.sh Removed: trunk/Makefile.in trunk/apps/Makefile.in trunk/include/Makefile.in trunk/src/Makefile.in trunk/src/detail/Makefile.in From liblas-commits at hobu.net Thu May 1 17:11:33 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 17:11:41 2008 Subject: [Liblas-commits] r632 - in trunk: . apps include src src/detail Message-ID: <20080501221133.EBD71807283@mail.hobu.net> Author: hobu Date: Thu May 1 17:11:32 2008 New Revision: 632 URL: http://liblas.org/changeset/632 Log: update svn:ignores Modified: trunk/ (props changed) trunk/apps/ (props changed) trunk/include/ (props changed) trunk/src/ (props changed) trunk/src/detail/ (props changed) From liblas-commits at hobu.net Thu May 1 20:15:34 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 20:15:43 2008 Subject: [Liblas-commits] r633 - trunk Message-ID: <20080502011534.C734E808402@mail.hobu.net> Author: hobu Date: Thu May 1 20:15:33 2008 New Revision: 633 URL: http://liblas.org/changeset/633 Log: ignore libtool Modified: trunk/ (props changed) From liblas-commits at hobu.net Thu May 1 21:00:24 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 21:00:32 2008 Subject: [Liblas-commits] r634 - trunk/test/data Message-ID: <20080502020024.B41268086DA@mail.hobu.net> Author: hobu Date: Thu May 1 21:00:23 2008 New Revision: 634 URL: http://liblas.org/changeset/634 Log: add simple script for making bad data Added: trunk/test/data/make_bad_points.py Added: trunk/test/data/make_bad_points.py ============================================================================== --- (empty file) +++ trunk/test/data/make_bad_points.py Thu May 1 21:00:23 2008 @@ -0,0 +1,22 @@ +from liblas import file +from liblas import header +from liblas import point + +import datetime + +h = header.Header() +h.date = datetime.datetime.now() +h.dataformat_id = 1 + +f = file.File('bad_points_1.1.las', mode='w', header=h) + +p = point.Point() +p.flightline_edge = 3 +p.return_number = 3 +p.classification = 63 +p.scan_angle = -127 + +#p.time = datetime.datetime(1969, 12, 31, 17, 59, 59, 2) + +f.write(p) +f.close() From liblas-commits at hobu.net Thu May 1 21:23:49 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 21:23:56 2008 Subject: [Liblas-commits] r635 - trunk Message-ID: <20080502022349.7F5C5808A98@mail.hobu.net> Author: hobu Date: Thu May 1 21:23:48 2008 New Revision: 635 URL: http://liblas.org/changeset/635 Log: delete more autogenerate stuff that should not live in svn Removed: trunk/aclocal.m4 trunk/config.guess trunk/config.sub trunk/configure trunk/ltmain.sh Modified: trunk/ (props changed) From liblas-commits at hobu.net Thu May 1 21:26:08 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 21:26:15 2008 Subject: [Liblas-commits] r636 - trunk/python Message-ID: <20080502022608.4C4E2808B7C@mail.hobu.net> Author: hobu Date: Thu May 1 21:26:07 2008 New Revision: 636 URL: http://liblas.org/changeset/636 Log: remove debugging lint Modified: trunk/python/setup.py Modified: trunk/python/setup.py ============================================================================== --- trunk/python/setup.py (original) +++ trunk/python/setup.py Thu May 1 21:26:07 2008 @@ -10,7 +10,6 @@ version = file('../nmake.opt').readline().strip() version = version.split('=')[1] -print version if os.name == 'nt': # Windows NT library @@ -19,7 +18,6 @@ else: data_files = None -print data_files setup(name = 'libLAS', version = version, description = 'LAS 1.0/1.1 LiDAR data format reader', From liblas-commits at hobu.net Thu May 1 21:50:48 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 21:50:56 2008 Subject: [Liblas-commits] r637 - trunk/test/unit Message-ID: <20080502025048.B5773808E93@mail.hobu.net> Author: mloskot Date: Thu May 1 21:50:47 2008 New Revision: 637 URL: http://liblas.org/changeset/637 Log: Updated unit test to conform to recent update to point data validation logic (r622, r624). Modified: trunk/test/unit/laspoint_test.cpp Modified: trunk/test/unit/laspoint_test.cpp ============================================================================== --- trunk/test/unit/laspoint_test.cpp (original) +++ trunk/test/unit/laspoint_test.cpp Thu May 1 21:50:47 2008 @@ -257,20 +257,6 @@ m_default.SetClassification(endclass); ensure_equals("invalid classification", m_default.GetClassification(), endclass); - - try - { - liblas::uint16_t const errclass = 32; - m_default.SetClassification(errclass); - m_default.Validate(); // throws - - ensure("std::invalid_point_data not thrown", false); - } - catch (liblas::invalid_point_data const& e) - { - ensure_equals(e.who() & liblas::LASPoint::eClassification, - liblas::LASPoint::eClassification); - } } // Test Get/SetScanAngleRank @@ -334,20 +320,6 @@ ensure_equals("invalid time", m_default.GetTime(), time); - - try - { - double const errtime = -9.87654321; // negative time invalid - m_default.SetTime(errtime); - m_default.Validate(); // throws - - ensure("invalid_point_data not thrown", false); - } - catch (liblas::invalid_point_data const& e) - { - ensure_equals(e.who() & liblas::LASPoint::eTime, - liblas::LASPoint::eTime); - } } // Test IsValid method @@ -389,24 +361,10 @@ { liblas::LASPoint p; - liblas::uint16_t const errclass = 32; - p.SetClassification(errclass); - ensure_not(p.IsValid()); - } - - { - liblas::LASPoint p; liblas::int8_t const outofrange = 91; p.SetScanAngleRank(outofrange); ensure_not(p.IsValid()); } - - { - liblas::LASPoint p; - double const errtime = -9.87654321; // negative time invalid - p.SetTime(errtime); - ensure_not(p.IsValid()); - } } } From liblas-commits at hobu.net Thu May 1 22:51:14 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 22:51:23 2008 Subject: [Liblas-commits] r638 - trunk Message-ID: <20080502035114.089C78094B6@mail.hobu.net> Author: hobu Date: Thu May 1 22:51:14 2008 New Revision: 638 URL: http://liblas.org/changeset/638 Log: add myself Modified: trunk/AUTHORS Modified: trunk/AUTHORS ============================================================================== --- trunk/AUTHORS (original) +++ trunk/AUTHORS Thu May 1 22:51:14 2008 @@ -0,0 +1,2 @@ +Howard Butler +hobu.inc@gmail.com From liblas-commits at hobu.net Thu May 1 23:06:08 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 23:06:15 2008 Subject: [Liblas-commits] r639 - trunk Message-ID: <20080502040608.192F38096D5@mail.hobu.net> Author: mloskot Date: Thu May 1 23:06:07 2008 New Revision: 639 URL: http://liblas.org/changeset/639 Log: Removed -ansi from compilation flags used by GCC. The libLAS code is no more ANSI C conformant because it uses some POSIX features. Modified: trunk/configure.ac Modified: trunk/configure.ac ============================================================================== --- trunk/configure.ac (original) +++ trunk/configure.ac Thu May 1 23:06:07 2008 @@ -16,8 +16,8 @@ dnl Default compilation flags debug_default="no" -CFLAGS="-Wall -Wno-long-long -pedantic -ansi $CFLAGS" -CXXFLAGS="-Wall -Wno-long-long -pedantic -ansi -std=c++98 $CXXFLAGS" +CFLAGS="-Wall -Wno-long-long -pedantic $CFLAGS" +CXXFLAGS="-Wall -Wno-long-long -pedantic -std=c++98 $CXXFLAGS" dnl Checks for programs. AM_INIT_AUTOMAKE From liblas-commits at hobu.net Thu May 1 23:08:44 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 23:08:51 2008 Subject: [Liblas-commits] r640 - in trunk: apps include/liblas src Message-ID: <20080502040844.5D6608097A7@mail.hobu.net> Author: mloskot Date: Thu May 1 23:08:43 2008 New Revision: 640 URL: http://liblas.org/changeset/640 Log: Fixed annoying compilation warnings thrown by GCC. Modified: trunk/apps/lascommon.c trunk/include/liblas/cstdint.hpp trunk/src/las_c_api.cpp Modified: trunk/apps/lascommon.c ============================================================================== --- trunk/apps/lascommon.c (original) +++ trunk/apps/lascommon.c Thu May 1 23:08:43 2008 @@ -506,5 +506,5 @@ summary->number_of_points_by_return[i]); } } +} -} \ No newline at end of file Modified: trunk/include/liblas/cstdint.hpp ============================================================================== --- trunk/include/liblas/cstdint.hpp (original) +++ trunk/include/liblas/cstdint.hpp Thu May 1 23:08:43 2008 @@ -111,7 +111,7 @@ #ifndef UINT64_C # if ULONG_MAX != 0xffffffff -# if ULONG_MAX == 18446744073709551615 // 2**64 - 1 +# if ULONG_MAX == 18446744073709551615 /* 2**64 - 1 */ typedef long int64_t; typedef unsigned long uint64_t; # else Modified: trunk/src/las_c_api.cpp ============================================================================== --- trunk/src/las_c_api.cpp (original) +++ trunk/src/las_c_api.cpp Thu May 1 23:08:43 2008 @@ -1208,4 +1208,5 @@ return strdup(PACKAGE_VERSION); } -LAS_C_END \ No newline at end of file +LAS_C_END + From liblas-commits at hobu.net Thu May 1 23:44:57 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 23:45:05 2008 Subject: [Liblas-commits] r641 - in trunk: build/msvc80/liblas_test test/unit Message-ID: <20080502044457.2A9DC80A028@mail.hobu.net> Author: mloskot Date: Thu May 1 23:44:55 2008 New Revision: 641 URL: http://liblas.org/changeset/641 Log: Added liblas::LASFile test (Ticket #25). Added: trunk/test/unit/lasfile_test.cpp Modified: trunk/build/msvc80/liblas_test/liblas_test.vcproj trunk/test/unit/common.cpp trunk/test/unit/common.hpp trunk/test/unit/lasreader_test.cpp Modified: trunk/build/msvc80/liblas_test/liblas_test.vcproj ============================================================================== --- trunk/build/msvc80/liblas_test/liblas_test.vcproj (original) +++ trunk/build/msvc80/liblas_test/liblas_test.vcproj Thu May 1 23:44:55 2008 @@ -207,6 +207,10 @@ > + + Modified: trunk/test/unit/common.cpp ============================================================================== --- trunk/test/unit/common.cpp (original) +++ trunk/test/unit/common.cpp Thu May 1 23:44:55 2008 @@ -110,5 +110,41 @@ ensure("invalid defualt point record", p.IsValid()); } +void test_file10_header(liblas::LASHeader const& h) +{ + ensure_equals(h.GetFileSignature(), liblas::LASHeader::FileSignature); + ensure_equals(h.GetFileSourceId(), 0); + ensure_equals(h.GetReserved(), 0); + + liblas::guid g; + ensure(g.is_null()); + ensure_equals(h.GetProjectId(), g); + + ensure_equals(h.GetVersionMajor(), 1); + ensure_equals(h.GetVersionMinor(), 0); + ensure_equals(h.GetSystemId(), std::string("")); + ensure_equals(h.GetSoftwareId(), std::string("TerraScan")); + ensure_equals(h.GetCreationDOY(), 0); + ensure_equals(h.GetCreationYear(), 0); + ensure_equals(h.GetHeaderSize(), liblas::uint16_t(227)); + ensure_equals(h.GetDataOffset(), liblas::uint32_t(229)); + ensure_equals(h.GetRecordsCount(), liblas::uint32_t(0)); + ensure_equals(h.GetDataFormatId(), liblas::LASHeader::ePointFormat1); + ensure_equals(h.GetDataRecordLength(), liblas::LASHeader::ePointSize1); + ensure_equals(h.GetPointRecordsCount(), liblas::uint32_t(8)); + ensure_equals(h.GetScaleX(), double(0.01)); + ensure_equals(h.GetScaleY(), double(0.01)); + ensure_equals(h.GetScaleZ(), double(0.01)); + ensure_equals(h.GetOffsetX(), double(-0)); + ensure_equals(h.GetOffsetY(), double(-0)); + ensure_equals(h.GetOffsetZ(), double(-0)); + ensure_equals(h.GetMinX(), double(630262.3)); + ensure_equals(h.GetMaxX(), double(630346.83)); + ensure_equals(h.GetMinY(), double(4834500)); + ensure_equals(h.GetMaxY(), double(4834500)); + ensure_equals(h.GetMinZ(), double(50.9)); + ensure_equals(h.GetMaxZ(), double(55.26)); +} + } Modified: trunk/test/unit/common.hpp ============================================================================== --- trunk/test/unit/common.hpp (original) +++ trunk/test/unit/common.hpp Thu May 1 23:44:55 2008 @@ -19,5 +19,8 @@ // Common test procedure for default constructed header data. void test_default_header(liblas::LASHeader const& h); +// Test of header data in trunk/test/data/TO_core_last_clip.las file +void test_file10_header(liblas::LASHeader const& h); + } // namespace tut Added: trunk/test/unit/lasfile_test.cpp ============================================================================== --- (empty file) +++ trunk/test/unit/lasfile_test.cpp Thu May 1 23:44:55 2008 @@ -0,0 +1,263 @@ +// $Id$ +// +// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net +// Distributed under the BSD License +// (See accompanying file LICENSE.txt or copy at +// http://www.opensource.org/licenses/bsd-license.php) +// +#include +#include +#include +#include +#include +#include +#include +#include "liblas_test.hpp" +#include "common.hpp" + +namespace tut +{ + struct lasfile_data + { + std::string tmpfile_; + std::string file10_; + + lasfile_data() + : tmpfile_(g_test_data_path + "//lasfile_tmp.las"), + file10_(g_test_data_path + "//TO_core_last_clip.las") + {} + + ~lasfile_data() + { + // remove temporary file after each test case + int const rc = std::remove(tmpfile_.c_str()); + } + }; + + typedef test_group tg; + typedef tg::object to; + + tg test_group_lasfile("liblas::LASFile"); + + // Test default constructor + template<> + template<> + void to::test<1>() + { + liblas::LASFile file; + ensure(file.IsNull()); + } + + // Test custom constructor + template<> + template<> + void to::test<2>() + { + liblas::LASFile file(file10_); + ensure_not(file.IsNull()); + + ensure_equals(file.GetName(), file10_); + ensure_equals(file.GetMode(), liblas::LASFile::eRead); + + liblas::LASHeader const& header1 = file.GetHeader(); + test_file10_header(header1); + + liblas::LASReader& reader = file.GetReader(); + liblas::LASHeader const& header2 = reader.GetHeader(); + test_file10_header(header2); + + try + { + liblas::LASWriter& writer = file.GetWriter(); + ensure("std::runtime_error not thrown", false); + } + catch (std::runtime_error const& e) + { + ensure_equals(std::string(e.what()).substr(0, 6), std::string("Writer")); + } + } + + // Test custom constructor + template<> + template<> + void to::test<3>() + { + liblas::LASHeader header; + + try + { + liblas::LASFile file(tmpfile_, header, liblas::LASFile::eRead); + ensure("std::runtime_error not thrown", false); + } + catch (std::runtime_error const& e) + { + ensure_equals(std::string(e.what()), + std::string("File mode must be eWrite or eAppend")); + } + } + + // Test custom constructor + template<> + template<> + void to::test<4>() + { + liblas::LASHeader header; + liblas::LASFile file(tmpfile_, header, liblas::LASFile::eWrite); + ensure_not(file.IsNull()); + ensure_equals(file.GetName(), tmpfile_); + ensure_equals(file.GetMode(), liblas::LASFile::eWrite); + + liblas::LASHeader const& header1 = file.GetHeader(); + test_default_header(header1); + + liblas::LASWriter& writer = file.GetWriter(); + liblas::LASHeader const& header2 = writer.GetHeader(); + test_default_header(header2); + + try + { + liblas::LASReader& reader = file.GetReader(); + ensure("std::runtime_error not thrown", false); + } + catch (std::runtime_error const& e) + { + ensure_equals(std::string(e.what()).substr(0, 6), std::string("Reader")); + } + } + + // Test copy constructor on default initialized object + template<> + template<> + void to::test<5>() + { + liblas::LASFile file; + ensure(file.IsNull()); + + liblas::LASFile file2(file); + ensure(file2.IsNull()); + } + + // Test assignment operator + template<> + template<> + void to::test<6>() + { + liblas::LASFile file; + ensure(file.IsNull()); + + liblas::LASFile file2; + file2 = file; + ensure(file2.IsNull()); + } + + // Test copy constructor on read-only file + template<> + template<> + void to::test<7>() + { + liblas::LASFile file(file10_); + + ensure_not(file.IsNull()); + ensure_equals(file.GetName(), file10_); + ensure_equals(file.GetMode(), liblas::LASFile::eRead); + + liblas::LASHeader const& header1 = file.GetHeader(); + test_file10_header(header1); + + liblas::LASFile file2(file); + + ensure_not(file2.IsNull()); + ensure_equals(file2.GetName(), file10_); + ensure_equals(file2.GetMode(), liblas::LASFile::eRead); + + liblas::LASHeader const& header2 = file2.GetHeader(); + test_file10_header(header2); + } + + // Test assignment operator on read-only file + template<> + template<> + void to::test<8>() + { + liblas::LASFile file2; + + { + liblas::LASFile file(file10_); + + ensure_not(file.IsNull()); + ensure_equals(file.GetName(), file10_); + ensure_equals(file.GetMode(), liblas::LASFile::eRead); + + liblas::LASHeader const& header1 = file.GetHeader(); + test_file10_header(header1); + + file2 = file; + + // file object is deallocated here + } + + ensure_not(file2.IsNull()); + ensure_equals(file2.GetName(), file10_); + ensure_equals(file2.GetMode(), liblas::LASFile::eRead); + + liblas::LASHeader const& header1 = file2.GetHeader(); + test_file10_header(header1); + } + + // Test assignment operator on write-only file + template<> + template<> + void to::test<9>() + { + liblas::LASHeader header; + liblas::LASFile file(tmpfile_, header, liblas::LASFile::eWrite); + + ensure_not(file.IsNull()); + ensure_equals(file.GetName(), tmpfile_); + ensure_equals(file.GetMode(), liblas::LASFile::eWrite); + + liblas::LASHeader const& header1 = file.GetHeader(); + test_default_header(header1); + + liblas::LASFile file2(file); + + ensure_not(file2.IsNull()); + ensure_equals(file2.GetName(), tmpfile_); + ensure_equals(file2.GetMode(), liblas::LASFile::eWrite); + + liblas::LASHeader const& header2 = file2.GetHeader(); + test_default_header(header2); + } + + // Test assignment operator on write-only file + template<> + template<> + void to::test<10>() + { + liblas::LASFile file2; + + { + liblas::LASHeader header; + liblas::LASFile file(tmpfile_, header, liblas::LASFile::eWrite); + + ensure_not(file.IsNull()); + ensure_equals(file.GetName(), tmpfile_); + ensure_equals(file.GetMode(), liblas::LASFile::eWrite); + + liblas::LASHeader const& header1 = file.GetHeader(); + test_default_header(header1); + + file2 = file; + + // file object is deallocated here + } + + ensure_not(file2.IsNull()); + ensure_equals(file2.GetName(), tmpfile_); + ensure_equals(file2.GetMode(), liblas::LASFile::eWrite); + + liblas::LASHeader const& header1 = file2.GetHeader(); + test_default_header(header1); + } +} + Modified: trunk/test/unit/lasreader_test.cpp ============================================================================== --- trunk/test/unit/lasreader_test.cpp (original) +++ trunk/test/unit/lasreader_test.cpp Thu May 1 23:44:55 2008 @@ -14,6 +14,7 @@ #include #include #include "liblas_test.hpp" +#include "common.hpp" namespace tut { @@ -92,38 +93,7 @@ liblas::LASReader reader(ifs); liblas::LASHeader const& hdr = reader.GetHeader(); - ensure_equals(hdr.GetFileSignature(), liblas::LASHeader::FileSignature); - ensure_equals(hdr.GetFileSourceId(), 0); - ensure_equals(hdr.GetReserved(), 0); - - liblas::guid g; - ensure(g.is_null()); - ensure_equals(hdr.GetProjectId(), g); - - ensure_equals(hdr.GetVersionMajor(), 1); - ensure_equals(hdr.GetVersionMinor(), 0); - ensure_equals(hdr.GetSystemId(), std::string("")); - ensure_equals(hdr.GetSoftwareId(), std::string("TerraScan")); - ensure_equals(hdr.GetCreationDOY(), 0); - ensure_equals(hdr.GetCreationYear(), 0); - ensure_equals(hdr.GetHeaderSize(), liblas::uint16_t(227)); - ensure_equals(hdr.GetDataOffset(), liblas::uint32_t(229)); - ensure_equals(hdr.GetRecordsCount(), liblas::uint32_t(0)); - ensure_equals(hdr.GetDataFormatId(), liblas::LASHeader::ePointFormat1); - ensure_equals(hdr.GetDataRecordLength(), liblas::LASHeader::ePointSize1); - ensure_equals(hdr.GetPointRecordsCount(), liblas::uint32_t(8)); - ensure_equals(hdr.GetScaleX(), double(0.01)); - ensure_equals(hdr.GetScaleY(), double(0.01)); - ensure_equals(hdr.GetScaleZ(), double(0.01)); - ensure_equals(hdr.GetOffsetX(), double(-0)); - ensure_equals(hdr.GetOffsetY(), double(-0)); - ensure_equals(hdr.GetOffsetZ(), double(-0)); - ensure_equals(hdr.GetMinX(), double(630262.3)); - ensure_equals(hdr.GetMaxX(), double(630346.83)); - ensure_equals(hdr.GetMinY(), double(4834500)); - ensure_equals(hdr.GetMaxY(), double(4834500)); - ensure_equals(hdr.GetMinZ(), double(50.9)); - ensure_equals(hdr.GetMaxZ(), double(55.26)); + test_file10_header(hdr); } // Test GetPoint method From liblas-commits at hobu.net Thu May 1 23:48:28 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Thu May 1 23:48:36 2008 Subject: [Liblas-commits] r642 - trunk/test/unit Message-ID: <20080502044828.B937880A169@mail.hobu.net> Author: mloskot Date: Thu May 1 23:48:27 2008 New Revision: 642 URL: http://liblas.org/changeset/642 Log: Updated svn:keywords property Modified: trunk/test/unit/lasfile_test.cpp (props changed) From liblas-commits at hobu.net Fri May 2 00:03:34 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 00:03:43 2008 Subject: [Liblas-commits] r643 - in trunk: build/msvc80/liblas_test include/liblas test/unit Message-ID: <20080502050334.669BE80A389@mail.hobu.net> Author: mloskot Date: Fri May 2 00:03:33 2008 New Revision: 643 URL: http://liblas.org/changeset/643 Log: Added test for liblas::LASError class (Ticket #30). Added: trunk/test/unit/laserror_test.cpp (contents, props changed) Modified: trunk/build/msvc80/liblas_test/liblas_test.vcproj trunk/include/liblas/laserror.hpp Modified: trunk/build/msvc80/liblas_test/liblas_test.vcproj ============================================================================== --- trunk/build/msvc80/liblas_test/liblas_test.vcproj (original) +++ trunk/build/msvc80/liblas_test/liblas_test.vcproj Fri May 2 00:03:33 2008 @@ -207,6 +207,10 @@ > + + Modified: trunk/include/liblas/laserror.hpp ============================================================================== --- trunk/include/liblas/laserror.hpp (original) +++ trunk/include/liblas/laserror.hpp Fri May 2 00:03:33 2008 @@ -16,23 +16,35 @@ namespace liblas { -/// \todo To be documented. +/// Definition of error notification used on the level of C API. +/// This class describes details of error condition occured in +/// libLAS core. All errors are stacked by C API layer, so it's +/// possible to track problem down to its source. class LASError { public: + /// Custom constructor. + /// This is the main and the only tool to initialize error instance. LASError(int code, std::string const& message, std::string const& method); + + /// Copy constructor. + /// Error objects are copyable. LASError(LASError const& other); + + /// Assignment operator. + /// Error objects are assignable. LASError& operator=(LASError const& rhs); // TODO - mloskot: What about replacing string return by copy with const char* ? // char const* GetMethod() const { return m_method.c_str(); }, etc. - std::string GetMethod() const { return m_method; }; + int GetCode() const { return m_code; }; std::string GetMessage() const { return m_message; }; - int GetCode() const {return m_code; }; + std::string GetMethod() const { return m_method; }; private: + int m_code; std::string m_message; std::string m_method; Added: trunk/test/unit/laserror_test.cpp ============================================================================== --- (empty file) +++ trunk/test/unit/laserror_test.cpp Fri May 2 00:03:33 2008 @@ -0,0 +1,72 @@ +// $Id$ +// +// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net +// Distributed under the BSD License +// (See accompanying file LICENSE.txt or copy at +// http://www.opensource.org/licenses/bsd-license.php) +// +#include +#include +#include + +namespace tut +{ + struct laserror_data + { + int const code; + std::string const msg; + std::string const method; + + laserror_data() + : code(101), msg("Test message"), method("foo") + {} + }; + + typedef test_group tg; + typedef tg::object to; + + tg test_group_laserror("liblas::LASError"); + + // Test constructor + template<> + template<> + void to::test<1>() + { + liblas::LASError err(code, msg, method); + + ensure_equals(err.GetCode(), code); + ensure_equals(err.GetMessage(), msg); + ensure_equals(err.GetMethod(), method); + } + + // Test copy constructor + template<> + template<> + void to::test<2>() + { + liblas::LASError err(code, msg, method); + liblas::LASError copy(err); + + ensure_equals(copy.GetCode(), code); + ensure_equals(copy.GetMessage(), msg); + ensure_equals(copy.GetMethod(), method); + } + + // Test assignment operator + template<> + template<> + void to::test<3>() + { + liblas::LASError copy(0, "", "");; + + { + liblas::LASError err(code, msg, method); + copy = err; + } + + ensure_equals(copy.GetCode(), code); + ensure_equals(copy.GetMessage(), msg); + ensure_equals(copy.GetMethod(), method); + } +} + From liblas-commits at hobu.net Fri May 2 00:06:23 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 00:06:30 2008 Subject: [Liblas-commits] r644 - trunk/test/unit Message-ID: <20080502050623.C729480A511@mail.hobu.net> Author: mloskot Date: Fri May 2 00:06:22 2008 New Revision: 644 URL: http://liblas.org/changeset/644 Log: Updatd CMakeLists.txt for test/unit. Modified: trunk/test/unit/CMakeLists.txt Modified: trunk/test/unit/CMakeLists.txt ============================================================================== --- trunk/test/unit/CMakeLists.txt (original) +++ trunk/test/unit/CMakeLists.txt Fri May 2 00:06:22 2008 @@ -7,10 +7,12 @@ SET( LIBLAS_TEST_SRC common.cpp guid_test.cpp - laspoint_test.cpp + laserror_test.cpp + lasfile_test.cpp lasheader_test.cpp - lasrecordheader_test.cpp + laspoint_test.cpp lasreader_test.cpp + lasrecordheader_test.cpp laswriter_test.cpp liblas_test_suite.cpp ) From liblas-commits at hobu.net Fri May 2 00:48:18 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 00:48:48 2008 Subject: [Liblas-commits] r645 - trunk/test/unit Message-ID: <20080502054818.3539B80A7D4@mail.hobu.net> Author: mloskot Date: Fri May 2 00:48:16 2008 New Revision: 645 URL: http://liblas.org/changeset/645 Log: Fixed EOL to LF. Modified: trunk/test/unit/guid_test.cpp trunk/test/unit/lasreader_test.cpp trunk/test/unit/laswriter_test.cpp Modified: trunk/test/unit/guid_test.cpp ============================================================================== --- trunk/test/unit/guid_test.cpp (original) +++ trunk/test/unit/guid_test.cpp Fri May 2 00:48:16 2008 @@ -151,27 +151,27 @@ liblas::guid g1(strguid); ensure_equals(g1.to_string(), strguid); - // Binary representation of "01234567-89ab-cdef-0123-456789abcdef" - liblas::uint32_t n1 = 19088743; - liblas::uint16_t n2 = 35243; - liblas::uint16_t n3 = 52719; - liblas::uint8_t n4[8] = { 0 }; - n4[0] = 0x01; - n4[1] = 0x23; - n4[2] = 0x45; - n4[3] = 0x67; - n4[4] = 0x89; - n4[5] = 0xab; - n4[6] = 0xcd; + // Binary representation of "01234567-89ab-cdef-0123-456789abcdef" + liblas::uint32_t n1 = 19088743; + liblas::uint16_t n2 = 35243; + liblas::uint16_t n3 = 52719; + liblas::uint8_t n4[8] = { 0 }; + n4[0] = 0x01; + n4[1] = 0x23; + n4[2] = 0x45; + n4[3] = 0x67; + n4[4] = 0x89; + n4[5] = 0xab; + n4[6] = 0xcd; n4[7] = 0xef; liblas::guid g2(n1, n2, n3, n4); ensure_equals(g1, g2); - n1 = n2 = n3 = 0; + n1 = n2 = n3 = 0; std::memset(n4, 0, 8); - g2.output_data(n1, n2, n3, n4); + g2.output_data(n1, n2, n3, n4); liblas::guid g3(n1, n2, n3, n4); ensure_equals(g1, g3); Modified: trunk/test/unit/lasreader_test.cpp ============================================================================== --- trunk/test/unit/lasreader_test.cpp (original) +++ trunk/test/unit/lasreader_test.cpp Fri May 2 00:48:16 2008 @@ -31,11 +31,11 @@ ensure_distance(p.GetX(), double(630262.30), 0.0001); ensure_distance(p.GetY(), double(4834500), 0.0001); ensure_distance(p.GetZ(), double(51.53), 0.0001); - ensure_equals(p.GetIntensity(), 670); - ensure_equals(p.GetClassification(), liblas::uint8_t(1)); - ensure_equals(p.GetScanAngleRank(), 0); - ensure_equals(p.GetUserData(), 3); - ensure_equals(static_cast(p.GetScanFlags()), 9); + ensure_equals(p.GetIntensity(), 670); + ensure_equals(p.GetClassification(), liblas::uint8_t(1)); + ensure_equals(p.GetScanAngleRank(), 0); + ensure_equals(p.GetUserData(), 3); + ensure_equals(static_cast(p.GetScanFlags()), 9); ensure_distance(p.GetTime(), double(413665.23360000004), 0.0001); } @@ -44,11 +44,11 @@ ensure_distance(p.GetX(), double(630282.45), 0.0001); ensure_distance(p.GetY(), double(4834500), 0.0001); ensure_distance(p.GetZ(), double(51.63), 0.0001); - ensure_equals(p.GetIntensity(), 350); - ensure_equals(p.GetClassification(), 1); - ensure_equals(p.GetScanAngleRank(), 0); - ensure_equals(p.GetUserData(), 3); - ensure_equals(static_cast(p.GetScanFlags()), 9); + ensure_equals(p.GetIntensity(), 350); + ensure_equals(p.GetClassification(), 1); + ensure_equals(p.GetScanAngleRank(), 0); + ensure_equals(p.GetUserData(), 3); + ensure_equals(static_cast(p.GetScanFlags()), 9); ensure_distance(p.GetTime(), double(413665.52880000003), 0.0001); } @@ -57,11 +57,11 @@ ensure_distance(p.GetX(), double(630346.83), 0.0001); ensure_distance(p.GetY(), double(4834500), 0.0001); ensure_distance(p.GetZ(), double(50.90), 0.0001); - ensure_equals(p.GetIntensity(), 150); - ensure_equals(p.GetClassification(), 1); - ensure_equals(p.GetScanAngleRank(), 0); - ensure_equals(p.GetUserData(), 4); - ensure_equals(static_cast(p.GetScanFlags()), 18); + ensure_equals(p.GetIntensity(), 150); + ensure_equals(p.GetClassification(), 1); + ensure_equals(p.GetScanAngleRank(), 0); + ensure_equals(p.GetUserData(), 4); + ensure_equals(static_cast(p.GetScanFlags()), 18); ensure_distance(p.GetTime(), double(414093.84360000002), 0.0001); } }; @@ -76,7 +76,7 @@ template<> void to::test<1>() { - std::ifstream ifs; + std::ifstream ifs; ifs.open(file10_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); @@ -88,7 +88,7 @@ template<> void to::test<2>() { - std::ifstream ifs; + std::ifstream ifs; ifs.open(file10_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); liblas::LASHeader const& hdr = reader.GetHeader(); @@ -101,7 +101,7 @@ template<> void to::test<3>() { - std::ifstream ifs; + std::ifstream ifs; ifs.open(file10_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); @@ -115,22 +115,22 @@ template<> void to::test<4>() { - std::ifstream ifs; + std::ifstream ifs; ifs.open(file10_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); - // read 1st point + // read 1st point reader.ReadNextPoint(); test_file10_point1(reader.GetPoint()); - // read 2nd point + // read 2nd point reader.ReadNextPoint(); test_file10_point2(reader.GetPoint()); - // read and skip 3rd point + // read and skip 3rd point reader.ReadNextPoint(); - // read 4th point + // read 4th point reader.ReadNextPoint(); test_file10_point4(reader.GetPoint()); @@ -148,19 +148,19 @@ template<> void to::test<5>() { - std::ifstream ifs; + std::ifstream ifs; ifs.open(file10_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); - // read 1st point + // read 1st point reader.ReadPointAt(0); test_file10_point1(reader.GetPoint()); - // read 4th point + // read 4th point reader.ReadPointAt(3); test_file10_point4(reader.GetPoint()); - // read back to 2nd point + // read back to 2nd point reader.ReadPointAt(1); test_file10_point2(reader.GetPoint()); } @@ -170,14 +170,14 @@ template<> void to::test<6>() { - std::ifstream ifs; + std::ifstream ifs; ifs.open(file10_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); // read 1st point test_file10_point1(reader[0]); - // read 4th point + // read 4th point test_file10_point4(reader[3]); // read back to 2nd point @@ -189,7 +189,7 @@ template<> void to::test<7>() { - std::ifstream ifs; + std::ifstream ifs; ifs.open(file10_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); Modified: trunk/test/unit/laswriter_test.cpp ============================================================================== --- trunk/test/unit/laswriter_test.cpp (original) +++ trunk/test/unit/laswriter_test.cpp Fri May 2 00:48:16 2008 @@ -42,11 +42,11 @@ ensure_distance(p.GetX(), double(630262.30), 0.0001); ensure_distance(p.GetY(), double(4834500), 0.0001); ensure_distance(p.GetZ(), double(51.53), 0.0001); - ensure_equals(p.GetIntensity(), 670); - ensure_equals(p.GetClassification(), 1); - ensure_equals(p.GetScanAngleRank(), 0); - ensure_equals(p.GetUserData(), 0); - ensure_equals(p.GetScanFlags(), 9); + ensure_equals(p.GetIntensity(), 670); + ensure_equals(p.GetClassification(), 1); + ensure_equals(p.GetScanAngleRank(), 0); + ensure_equals(p.GetUserData(), 0); + ensure_equals(p.GetScanFlags(), 9); ensure_distance(p.GetTime(), double(413665.23360000004), 0.0001); } @@ -55,11 +55,11 @@ ensure_distance(p.GetX(), double(630282.45), 0.0001); ensure_distance(p.GetY(), double(4834500), 0.0001); ensure_distance(p.GetZ(), double(51.63), 0.0001); - ensure_equals(p.GetIntensity(), 350); - ensure_equals(p.GetClassification(), 1); - ensure_equals(p.GetScanAngleRank(), 0); - ensure_equals(p.GetUserData(), 0); - ensure_equals(static_cast(p.GetScanFlags()), 9); + ensure_equals(p.GetIntensity(), 350); + ensure_equals(p.GetClassification(), 1); + ensure_equals(p.GetScanAngleRank(), 0); + ensure_equals(p.GetUserData(), 0); + ensure_equals(static_cast(p.GetScanFlags()), 9); ensure_distance(p.GetTime(), double(413665.52880000003), 0.0001); } @@ -68,11 +68,11 @@ ensure_distance(p.GetX(), double(630346.83), 0.0001); ensure_distance(p.GetY(), double(4834500), 0.0001); ensure_distance(p.GetZ(), double(50.90), 0.0001); - ensure_equals(p.GetIntensity(), 150); - ensure_equals(p.GetClassification(), 1); - ensure_equals(p.GetScanAngleRank(), 0); - ensure_equals(p.GetUserData(), 0); - ensure_equals(static_cast(p.GetScanFlags()), 18); + ensure_equals(p.GetIntensity(), 150); + ensure_equals(p.GetClassification(), 1); + ensure_equals(p.GetScanAngleRank(), 0); + ensure_equals(p.GetUserData(), 0); + ensure_equals(static_cast(p.GetScanFlags()), 18); ensure_distance(p.GetTime(), double(414093.84360000002), 0.0001); } }; @@ -89,7 +89,7 @@ { // Create new LAS file using default header block { - std::ofstream ofs; + std::ofstream ofs; ofs.open(tmpfile_.c_str(), std::ios::out | std::ios::binary); // LAS 1.1, Point Format 0 @@ -104,7 +104,7 @@ // Read previously created LAS file and check its header block { - std::ifstream ifs; + std::ifstream ifs; ifs.open(tmpfile_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); @@ -121,7 +121,7 @@ void to::test<2>() { { - std::ofstream ofs; + std::ofstream ofs; ofs.open(tmpfile_.c_str(), std::ios::out | std::ios::binary); // LAS 1.1, Point Format 0 @@ -131,7 +131,7 @@ liblas::LASPoint point; // Write 1st point - point.SetCoordinates(10, 20, 30); + point.SetCoordinates(10, 20, 30); point.SetIntensity(5); point.SetReturnNumber(1); point.SetNumberOfReturns(1); @@ -154,18 +154,18 @@ // Read previously create LAS file with 3 point records { - std::ifstream ifs; + std::ifstream ifs; ifs.open(tmpfile_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); liblas::LASPoint point; // reusable cache - // read 1st point + // read 1st point reader.ReadNextPoint(); point = reader.GetPoint(); ensure_distance(point.GetX(), 10.0, 0.0001); ensure_distance(point.GetY(), 20.0, 0.0001); - ensure_distance(point.GetZ(), 30.0, 0.0001); + ensure_distance(point.GetZ(), 30.0, 0.0001); ensure_equals(point.GetIntensity(), 5); ensure_equals(point.GetReturnNumber(), 1); ensure_equals(point.GetNumberOfReturns(), 1); @@ -175,12 +175,12 @@ ensure_equals(point.GetScanAngleRank(), 90); ensure_equals(point.GetUserData(), 0); - // read 3rd point + // read 3rd point reader.ReadNextPoint(); point = reader.GetPoint(); ensure_distance(point.GetX(), 40.0, 0.0001); ensure_distance(point.GetY(), 50.0, 0.0001); - ensure_distance(point.GetZ(), 60.0, 0.0001); + ensure_distance(point.GetZ(), 60.0, 0.0001); ensure_equals(point.GetIntensity(), 5); ensure_equals(point.GetReturnNumber(), 1); ensure_equals(point.GetNumberOfReturns(), 1); @@ -190,12 +190,12 @@ ensure_equals(point.GetScanAngleRank(), 90); ensure_equals(point.GetUserData(), 0); - // read 1st point + // read 1st point reader.ReadNextPoint(); - point = reader.GetPoint(); + point = reader.GetPoint(); ensure_distance(point.GetX(), 70.0, 0.0001); ensure_distance(point.GetY(), 80.0, 0.0001); - ensure_distance(point.GetZ(), 90.0, 0.0001); + ensure_distance(point.GetZ(), 90.0, 0.0001); ensure_equals(point.GetIntensity(), 5); ensure_equals(point.GetReturnNumber(), 1); ensure_equals(point.GetNumberOfReturns(), 1); @@ -214,7 +214,7 @@ void to::test<3>() { { - std::ofstream ofs; + std::ofstream ofs; ofs.open(tmpfile_.c_str(), std::ios::out | std::ios::binary); liblas::LASHeader header; @@ -238,7 +238,7 @@ // read and check updated header block { - std::ifstream ifs; + std::ifstream ifs; ifs.open(tmpfile_.c_str(), std::ios::in | std::ios::binary); liblas::LASReader reader(ifs); @@ -262,7 +262,7 @@ template<> void to::test<4>() { - std::ofstream ofs; + std::ofstream ofs; ofs.open(tmpfile_.c_str(), std::ios::out | std::ios::binary); liblas::LASHeader header; From liblas-commits at hobu.net Fri May 2 01:01:25 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 01:01:32 2008 Subject: [Liblas-commits] r646 - trunk/test/unit Message-ID: <20080502060125.2F46080A900@mail.hobu.net> Author: mloskot Date: Fri May 2 01:01:24 2008 New Revision: 646 URL: http://liblas.org/changeset/646 Log: Added a few more cases to lasfile_test.cpp. Modified: trunk/test/unit/lasfile_test.cpp Modified: trunk/test/unit/lasfile_test.cpp ============================================================================== --- trunk/test/unit/lasfile_test.cpp (original) +++ trunk/test/unit/lasfile_test.cpp Fri May 2 01:01:24 2008 @@ -30,7 +30,7 @@ ~lasfile_data() { // remove temporary file after each test case - int const rc = std::remove(tmpfile_.c_str()); + std::remove(tmpfile_.c_str()); } }; @@ -69,6 +69,7 @@ try { liblas::LASWriter& writer = file.GetWriter(); + ensure_equals(writer.GetVersion(), liblas::eLASVersion10); ensure("std::runtime_error not thrown", false); } catch (std::runtime_error const& e) @@ -87,6 +88,7 @@ try { liblas::LASFile file(tmpfile_, header, liblas::LASFile::eRead); + ensure_equals(file.GetName(), tmpfile_); ensure("std::runtime_error not thrown", false); } catch (std::runtime_error const& e) @@ -117,6 +119,7 @@ try { liblas::LASReader& reader = file.GetReader(); + ensure_equals(reader.GetVersion(), liblas::eLASVersion10); ensure("std::runtime_error not thrown", false); } catch (std::runtime_error const& e) From liblas-commits at hobu.net Fri May 2 01:02:02 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 01:02:10 2008 Subject: [Liblas-commits] r647 - trunk/test/unit Message-ID: <20080502060202.A56C480A9A5@mail.hobu.net> Author: mloskot Date: Fri May 2 01:02:01 2008 New Revision: 647 URL: http://liblas.org/changeset/647 Log: Fixed incorrect name of test group instance. Modified: trunk/test/unit/laswriter_test.cpp Modified: trunk/test/unit/laswriter_test.cpp ============================================================================== --- trunk/test/unit/laswriter_test.cpp (original) +++ trunk/test/unit/laswriter_test.cpp Fri May 2 01:02:01 2008 @@ -80,7 +80,7 @@ typedef test_group tg; typedef tg::object to; - tg test_group_lasreader("liblas::LASWriter"); + tg test_group_laswriter("liblas::LASWriter"); // Test user-declared constructor template<> From liblas-commits at hobu.net Fri May 2 01:16:37 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 01:16:44 2008 Subject: [Liblas-commits] r648 - in trunk: . test test/unit Message-ID: <20080502061637.4029380AB07@mail.hobu.net> Author: mloskot Date: Fri May 2 01:16:35 2008 New Revision: 648 URL: http://liblas.org/changeset/648 Log: Added new target 'make check' that builds and executes unit test program. Added: trunk/test/Makefile.am trunk/test/unit/Makefile.am Modified: trunk/Makefile.am trunk/configure.ac trunk/test/ (props changed) trunk/test/unit/ (props changed) trunk/test/unit/laswriter_test.cpp trunk/test/unit/liblas_test_suite.cpp Modified: trunk/Makefile.am ============================================================================== --- trunk/Makefile.am (original) +++ trunk/Makefile.am Fri May 2 01:16:35 2008 @@ -1,6 +1 @@ - - -SUBDIRS = src apps include - - - +SUBDIRS = src apps include test Modified: trunk/configure.ac ============================================================================== --- trunk/configure.ac (original) +++ trunk/configure.ac Fri May 2 01:16:35 2008 @@ -109,6 +109,8 @@ src/Makefile src/detail/Makefile apps/Makefile + test/Makefile + test/unit/Makefile ]) AC_OUTPUT Added: trunk/test/Makefile.am ============================================================================== --- (empty file) +++ trunk/test/Makefile.am Fri May 2 01:16:35 2008 @@ -0,0 +1 @@ +SUBDIRS = unit Added: trunk/test/unit/Makefile.am ============================================================================== --- (empty file) +++ trunk/test/unit/Makefile.am Fri May 2 01:16:35 2008 @@ -0,0 +1,21 @@ +INCLUDES = -I. -I../../include + +TESTS = liblas_test + +check_PROGRAMS = liblas_test + +liblas_test_LDADD = \ + $(top_builddir)/src/liblas.la \ + $(NULL) + +liblas_test_SOURCES = \ + guid_test.cpp \ + common.cpp \ + laserror_test.cpp \ + lasfile_test.cpp \ + lasheader_test.cpp \ + laspoint_test.cpp \ + lasreader_test.cpp \ + lasrecordheader_test.cpp \ + laswriter_test.cpp \ + liblas_test_suite.cpp Modified: trunk/test/unit/laswriter_test.cpp ============================================================================== --- trunk/test/unit/laswriter_test.cpp (original) +++ trunk/test/unit/laswriter_test.cpp Fri May 2 01:16:35 2008 @@ -163,9 +163,9 @@ // read 1st point reader.ReadNextPoint(); point = reader.GetPoint(); - ensure_distance(point.GetX(), 10.0, 0.0001); - ensure_distance(point.GetY(), 20.0, 0.0001); - ensure_distance(point.GetZ(), 30.0, 0.0001); + ensure_distance(point.GetX(), 10.0, 0.1); + ensure_distance(point.GetY(), 20.0, 0.1); + ensure_distance(point.GetZ(), 30.0, 0.1); ensure_equals(point.GetIntensity(), 5); ensure_equals(point.GetReturnNumber(), 1); ensure_equals(point.GetNumberOfReturns(), 1); @@ -178,9 +178,9 @@ // read 3rd point reader.ReadNextPoint(); point = reader.GetPoint(); - ensure_distance(point.GetX(), 40.0, 0.0001); - ensure_distance(point.GetY(), 50.0, 0.0001); - ensure_distance(point.GetZ(), 60.0, 0.0001); + ensure_distance(point.GetX(), 40.0, 0.1); + ensure_distance(point.GetY(), 50.0, 0.1); + ensure_distance(point.GetZ(), 60.0, 0.1); ensure_equals(point.GetIntensity(), 5); ensure_equals(point.GetReturnNumber(), 1); ensure_equals(point.GetNumberOfReturns(), 1); @@ -193,9 +193,9 @@ // read 1st point reader.ReadNextPoint(); point = reader.GetPoint(); - ensure_distance(point.GetX(), 70.0, 0.0001); - ensure_distance(point.GetY(), 80.0, 0.0001); - ensure_distance(point.GetZ(), 90.0, 0.0001); + ensure_distance(point.GetX(), 70.0, 0.1); + ensure_distance(point.GetY(), 80.0, 0.1); + ensure_distance(point.GetZ(), 90.0, 0.1); ensure_equals(point.GetIntensity(), 5); ensure_equals(point.GetReturnNumber(), 1); ensure_equals(point.GetNumberOfReturns(), 1); Modified: trunk/test/unit/liblas_test_suite.cpp ============================================================================== --- trunk/test/unit/liblas_test_suite.cpp (original) +++ trunk/test/unit/liblas_test_suite.cpp Fri May 2 01:16:35 2008 @@ -20,13 +20,23 @@ int main(int argc, char* argv[]) { - if (2 != argc) + + if (1 == argc) + { + tut::g_test_data_path = "../data"; // default path + } + else if (2 == argc) + { + tut::g_test_data_path = argv[1]; + } + else { std::cout << "Usage: liblas_test \n"; return 1; } - tut::g_test_data_path = argv[1]; + + std::cout << "libLAS Test Suite:\n=================="; tut::reporter reporter; tut::runner.get().set_callback(&reporter); From liblas-commits at hobu.net Fri May 2 15:44:24 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 15:44:33 2008 Subject: [Liblas-commits] r649 - trunk/python/liblas Message-ID: <20080502204424.EAAE580F99A@mail.hobu.net> Author: hobu Date: Fri May 2 15:44:23 2008 New Revision: 649 URL: http://liblas.org/changeset/649 Log: make sure to import core and other modules so 'import libas' works as expected Modified: trunk/python/liblas/__init__.py Modified: trunk/python/liblas/__init__.py ============================================================================== --- trunk/python/liblas/__init__.py (original) +++ trunk/python/liblas/__init__.py Fri May 2 15:44:23 2008 @@ -0,0 +1,4 @@ +from core import * +import file +import point +import header From liblas-commits at hobu.net Fri May 2 15:56:24 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 15:56:32 2008 Subject: [Liblas-commits] r650 - trunk/include/liblas/capi Message-ID: <20080502205624.019D280FB3F@mail.hobu.net> Author: hobu Date: Fri May 2 15:56:23 2008 New Revision: 650 URL: http://liblas.org/changeset/650 Log: add license header block Modified: trunk/include/liblas/capi/las_config.h (contents, props changed) Modified: trunk/include/liblas/capi/las_config.h ============================================================================== --- trunk/include/liblas/capi/las_config.h (original) +++ trunk/include/liblas/capi/las_config.h Fri May 2 15:56:23 2008 @@ -1,3 +1,44 @@ +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: Basic macros for the libLAS C API + * Author: Howard Butler, hobu.inc@gmail.com + * + ****************************************************************************** + * Copyright (c) 2008, Howard Butler + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LAS_CONFIG_H_INCLUDED #define LAS_CONFIG_H_INCLUDED From liblas-commits at hobu.net Fri May 2 16:26:18 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 16:26:26 2008 Subject: [Liblas-commits] r652 - trunk/include/liblas/detail Message-ID: <20080502212618.4007A80FEFF@mail.hobu.net> Author: hobu Date: Fri May 2 16:26:15 2008 New Revision: 652 URL: http://liblas.org/changeset/652 Log: license additions Modified: trunk/include/liblas/detail/endian.hpp trunk/include/liblas/detail/fwd.hpp trunk/include/liblas/detail/reader.hpp trunk/include/liblas/detail/reader10.hpp trunk/include/liblas/detail/reader11.hpp trunk/include/liblas/detail/sharedptr.hpp trunk/include/liblas/detail/timer.hpp trunk/include/liblas/detail/utility.hpp trunk/include/liblas/detail/writer.hpp trunk/include/liblas/detail/writer10.hpp trunk/include/liblas/detail/writer11.hpp Modified: trunk/include/liblas/detail/endian.hpp ============================================================================== --- trunk/include/liblas/detail/endian.hpp (original) +++ trunk/include/liblas/detail/endian.hpp Fri May 2 16:26:15 2008 @@ -1,16 +1,30 @@ -// $Id$ -// -// This file has been stolen from and -// modified for libLAS purposes. -// -// (C) Copyright Mateusz Loskot 2007, mateusz@loskot.net -// (C) Copyright Caleb Epstein 2005 -// (C) Copyright John Maddock 2006 -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -/* +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: Endian macros + * Author: Mateusz Loskot, mateusz@loskot.net + * + * This file has been stolen from and + * modified for libLAS purposes. + * + * (C) Copyright Mateusz Loskot 2007, mateusz@loskot.net + * (C) Copyright Caleb Epstein 2005 + * (C) Copyright John Maddock 2006 + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * Revision History + * 06 Feb 2006 - Initial Revision + * 09 Nov 2006 - fixed variant and version bits for v4 guids + * 13 Nov 2006 - added serialization + * 17 Nov 2006 - added name-based guid creation + * 20 Nov 2006 - add fixes for gcc (from Tim Blechmann) + * 07 Mar 2007 - converted to header only + * 20 Jan 2008 - removed dependency of Boost and modified for libLAS (by Mateusz Loskot) + ****************************************************************************** + * * Copyright (c) 1997 * Silicon Graphics Computer Systems, Inc. * @@ -21,15 +35,18 @@ * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. - */ - -/* + * + * + * * Copyright notice reproduced from , from * which this code was originally taken. * * Modified by Caleb Epstein to use with GNU libc and to * defined the BOOST_ENDIAN macro. - */ + ****************************************************************************/ + + + #ifndef LIBLAS_DETAIL_ENDIAN_HPP_INCLUDED #define LIBLAS_DETAIL_ENDIAN_HPP_INCLUDED Modified: trunk/include/liblas/detail/fwd.hpp ============================================================================== --- trunk/include/liblas/detail/fwd.hpp (original) +++ trunk/include/liblas/detail/fwd.hpp Fri May 2 16:26:15 2008 @@ -1,10 +1,44 @@ -// $Id$/ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: Forward declarations for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_FWD_HPP_INCLUDED #define LIBLAS_DETAIL_FWD_HPP_INCLUDED Modified: trunk/include/liblas/detail/reader.hpp ============================================================================== --- trunk/include/liblas/detail/reader.hpp (original) +++ trunk/include/liblas/detail/reader.hpp Fri May 2 16:26:15 2008 @@ -1,10 +1,44 @@ -// $Id$ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: Reader implementation for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_READER_HPP_INCLUDED #define LIBLAS_DETAIL_READER_HPP_INCLUDED Modified: trunk/include/liblas/detail/reader10.hpp ============================================================================== --- trunk/include/liblas/detail/reader10.hpp (original) +++ trunk/include/liblas/detail/reader10.hpp Fri May 2 16:26:15 2008 @@ -1,10 +1,44 @@ -// $Id$ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: LAS 1.0 reader implementation for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_READER10_HPP_INCLUDED #define LIBLAS_DETAIL_READER10_HPP_INCLUDED Modified: trunk/include/liblas/detail/reader11.hpp ============================================================================== --- trunk/include/liblas/detail/reader11.hpp (original) +++ trunk/include/liblas/detail/reader11.hpp Fri May 2 16:26:15 2008 @@ -1,10 +1,44 @@ -// $Id$ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: LAS 1.1 reader implementation for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_READER11_HPP_INCLUDED #define LIBLAS_DETAIL_READER11_HPP_INCLUDED Modified: trunk/include/liblas/detail/sharedptr.hpp ============================================================================== --- trunk/include/liblas/detail/sharedptr.hpp (original) +++ trunk/include/liblas/detail/sharedptr.hpp Fri May 2 16:26:15 2008 @@ -1,14 +1,48 @@ -// $Id$/ -// -// The SharedPtr class is based on implementation of CountedPtr -// from the book "The C++ Standard Library - A Tutorial and Reference" -// -// (C) Copyright Nicolai M. Josuttis 1999 -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net (modifications) -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: Shared pointer implementation for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * The SharedPtr class is based on implementation of CountedPtr + * from the book "The C++ Standard Library - A Tutorial and Reference" + * + * (C) Copyright Nicolai M. Josuttis 1999 + * (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net (modifications) + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_SHAREDPTR_HPP_INCLUDED #define LIBLAS_DETAIL_SHAREDPTR_HPP_INCLUDED #include Modified: trunk/include/liblas/detail/timer.hpp ============================================================================== --- trunk/include/liblas/detail/timer.hpp (original) +++ trunk/include/liblas/detail/timer.hpp Fri May 2 16:26:15 2008 @@ -1,10 +1,44 @@ -// $Id$ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: A simple timing class for performance tuning + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_TIMER_HPP_INCLUDED #define LIBLAS_DETAIL_TIMER_HPP_INCLUDED Modified: trunk/include/liblas/detail/utility.hpp ============================================================================== --- trunk/include/liblas/detail/utility.hpp (original) +++ trunk/include/liblas/detail/utility.hpp Fri May 2 16:26:15 2008 @@ -1,9 +1,44 @@ -// $Id$ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: A grab bucket 'o fun for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + // #ifndef LIBLAS_DETAIL_UTILITY_HPP_INCLUDED #define LIBLAS_DETAIL_UTILITY_HPP_INCLUDED Modified: trunk/include/liblas/detail/writer.hpp ============================================================================== --- trunk/include/liblas/detail/writer.hpp (original) +++ trunk/include/liblas/detail/writer.hpp Fri May 2 16:26:15 2008 @@ -1,10 +1,44 @@ -// $Id$ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: LAS writer implementation for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_WRITER_HPP_INCLUDED #define LIBLAS_DETAIL_WRITER_HPP_INCLUDED Modified: trunk/include/liblas/detail/writer10.hpp ============================================================================== --- trunk/include/liblas/detail/writer10.hpp (original) +++ trunk/include/liblas/detail/writer10.hpp Fri May 2 16:26:15 2008 @@ -1,10 +1,44 @@ -// $Id$ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: LAS 1.0 writer implementation for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_WRITER10_HPP_INCLUDED #define LIBLAS_DETAIL_WRITER10_HPP_INCLUDED Modified: trunk/include/liblas/detail/writer11.hpp ============================================================================== --- trunk/include/liblas/detail/writer11.hpp (original) +++ trunk/include/liblas/detail/writer11.hpp Fri May 2 16:26:15 2008 @@ -1,10 +1,44 @@ -// $Id$ -// -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: LAS 1.1 writer implementation for C++ libLAS + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_WRITER11_HPP_INCLUDED #define LIBLAS_DETAIL_WRITER11_HPP_INCLUDED From liblas-commits at hobu.net Fri May 2 16:34:55 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 16:35:03 2008 Subject: [Liblas-commits] r653 - in trunk/include/liblas: . detail Message-ID: <20080502213455.75357810086@mail.hobu.net> Author: hobu Date: Fri May 2 16:34:54 2008 New Revision: 653 URL: http://liblas.org/changeset/653 Log: oops missed one Modified: trunk/include/liblas/detail/file.hpp trunk/include/liblas/lasrecordheader.hpp Modified: trunk/include/liblas/detail/file.hpp ============================================================================== --- trunk/include/liblas/detail/file.hpp (original) +++ trunk/include/liblas/detail/file.hpp Fri May 2 16:34:54 2008 @@ -1,11 +1,45 @@ -// $Id$ -// -// (C) Copyright Howard Butler 2008 -// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// +/****************************************************************************** + * $Id$ + * + * Project: libLAS - http://liblas.org - A BSD library for LAS format data. + * Purpose: A composite class to handle read/write operations + * Author: Mateusz Loskot, mateusz@loskot.net + * + ****************************************************************************** + * Copyright (c) 2008, Mateusz Loskot + * Copyright (c) 2008, Howard Butler + * + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following + * conditions are met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided + * with the distribution. + * * Neither the name of the Martin Isenburg or Iowa Department + * of Natural Resources nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + ****************************************************************************/ + #ifndef LIBLAS_DETAIL_FILE_HPP_INCLUDED #define LIBLAS_DETAIL_FILE_HPP_INCLUDED Modified: trunk/include/liblas/lasrecordheader.hpp ============================================================================== --- trunk/include/liblas/lasrecordheader.hpp (original) +++ trunk/include/liblas/lasrecordheader.hpp Fri May 2 16:34:54 2008 @@ -39,13 +39,6 @@ * OF SUCH DAMAGE. ****************************************************************************/ -// // $Id$ -// -// (C) Copyright Phil Vachon 2008, philippe@cowpig.ca -// Distributed under the BSD License -// (See accompanying file LICENSE.txt or copy at -// http://www.opensource.org/licenses/bsd-license.php) -// #ifndef LIBLAS_LASRECORDHEADER_HPP_INCLUDED #define LIBLAS_LASRECORDHEADER_HPP_INCLUDED From liblas-commits at hobu.net Fri May 2 19:29:06 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Fri May 2 19:29:14 2008 Subject: [Liblas-commits] r655 - trunk/include/liblas/capi Message-ID: <20080503002906.7200B812A81@mail.hobu.net> Author: hobu Date: Fri May 2 19:29:05 2008 New Revision: 655 URL: http://liblas.org/changeset/655 Log: test doc commit Modified: trunk/include/liblas/capi/liblas.h Modified: trunk/include/liblas/capi/liblas.h ============================================================================== --- trunk/include/liblas/capi/liblas.h (original) +++ trunk/include/liblas/capi/liblas.h Fri May 2 19:29:05 2008 @@ -99,7 +99,10 @@ } LASPointSummary; +/// Fetches the compiled-in version string +/// @return the version string for this library LAS_DLL const char* LAS_GetVersion(); + LAS_DLL void LASError_Reset(void); LAS_DLL void LASError_Pop(void); LAS_DLL LASError LASError_GetLastErrorNum(void); From liblas-commits at hobu.net Sat May 3 01:03:31 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Sat May 3 01:03:39 2008 Subject: [Liblas-commits] r656 - trunk/include/liblas/capi Message-ID: <20080503060331.9EDF8813BB6@mail.hobu.net> Author: hobu Date: Sat May 3 01:03:30 2008 New Revision: 656 URL: http://liblas.org/changeset/656 Log: doc updates Modified: trunk/include/liblas/capi/liblas.h Modified: trunk/include/liblas/capi/liblas.h ============================================================================== --- trunk/include/liblas/capi/liblas.h (original) +++ trunk/include/liblas/capi/liblas.h Sat May 3 01:03:30 2008 @@ -103,15 +103,36 @@ /// @return the version string for this library LAS_DLL const char* LAS_GetVersion(); +/// Resets the error stack for the libLAS C API. LAS_DLL void LASError_Reset(void); + +/// Pops the top error off of the error stack for the libLAS C API. LAS_DLL void LASError_Pop(void); + +/// Returns the error number of the last error on the error stack. LAS_DLL LASError LASError_GetLastErrorNum(void); + +/// Returns the error message of the last error on the error stack. LAS_DLL char * LASError_GetLastErrorMsg(void); + +/// Returns the name of the method the last error message happened in/ LAS_DLL char * LASError_GetLastErrorMethod(void); + +/// Returns the number of error messages on the error stack. LAS_DLL int LASError_GetErrorCount(void); + +/// Prints the last error message in the error stack to stderr. If +/// there is no error on the error stack, only the @param message is printed. +/// The function does not alter the error stack in any way. +/// @param message Message to include in the stderr output LAS_DLL void LASError_Print(const char* message); +/// 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. +/// @param filename Filename to open for read LAS_DLL LASReaderH LASReader_Create(const char * filename); + LAS_DLL LASPointH LASReader_GetNextPoint(const LASReaderH hReader); LAS_DLL LASPointH LASReader_GetPointAt(const LASReaderH hReader, uint32_t position); From liblas-commits at hobu.net Sat May 3 01:06:22 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Sat May 3 01:06:31 2008 Subject: [Liblas-commits] r657 - trunk/include/liblas/capi Message-ID: <20080503060622.B239C813C73@mail.hobu.net> Author: hobu Date: Sat May 3 01:06:21 2008 New Revision: 657 URL: http://liblas.org/changeset/657 Log: doc updates Modified: trunk/include/liblas/capi/liblas.h Modified: trunk/include/liblas/capi/liblas.h ============================================================================== --- trunk/include/liblas/capi/liblas.h (original) +++ trunk/include/liblas/capi/liblas.h Sat May 3 01:06:21 2008 @@ -115,14 +115,14 @@ /// Returns the error message of the last error on the error stack. 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 char * LASError_GetLastErrorMethod(void); /// Returns the number of error messages on the error stack. LAS_DLL int LASError_GetErrorCount(void); /// Prints the last error message in the error stack to stderr. If -/// there is no error on the error stack, only the @param message is printed. +/// there is no error on the error stack, only the message is printed. /// The function does not alter the error stack in any way. /// @param message Message to include in the stderr output LAS_DLL void LASError_Print(const char* message); @@ -130,6 +130,7 @@ /// 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. +/// @return LASReaderH opaque pointer to a LASReader instance. /// @param filename Filename to open for read LAS_DLL LASReaderH LASReader_Create(const char * filename); From liblas-commits at hobu.net Sat May 3 01:22:18 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Sat May 3 01:22:28 2008 Subject: [Liblas-commits] r658 - trunk/include/liblas/capi Message-ID: <20080503062218.EB60F813DC2@mail.hobu.net> Author: hobu Date: Sat May 3 01:22:17 2008 New Revision: 658 URL: http://liblas.org/changeset/658 Log: doc updates Modified: trunk/include/liblas/capi/liblas.h Modified: trunk/include/liblas/capi/liblas.h ============================================================================== --- trunk/include/liblas/capi/liblas.h (original) +++ trunk/include/liblas/capi/liblas.h Sat May 3 01:22:17 2008 @@ -99,8 +99,8 @@ } LASPointSummary; -/// Fetches the compiled-in version string -/// @return the version string for this library +/// Returns the version string for this library. +/// @return the version string for this library. LAS_DLL const char* LAS_GetVersion(); /// Resets the error stack for the libLAS C API. @@ -110,15 +110,19 @@ LAS_DLL void LASError_Pop(void); /// Returns the error number of the last error on the error stack. +/// @return the error number of the last error on the error stack. LAS_DLL LASError LASError_GetLastErrorNum(void); -/// Returns the error message of the last error on the error stack. +/// Returns the name of the method the last error message happened in. +/// @return 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. +/// @return the name of the method the last error message happened in. LAS_DLL char * LASError_GetLastErrorMethod(void); /// Returns the number of error messages on the error stack. +/// @return the number of error messages on the error stack. LAS_DLL int LASError_GetErrorCount(void); /// Prints the last error message in the error stack to stderr. If @@ -130,11 +134,32 @@ /// 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. -/// @return LASReaderH opaque pointer to a LASReader instance. +/// @return opaque pointer to a LASReaderH instance. /// @param filename Filename to open for read LAS_DLL LASReaderH LASReader_Create(const char * filename); +/// 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. +/// @param hReader the opaque handle to the LASReaderH +/// @return 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_GetNextPoint(const LASReaderH hReader); + +/// 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. +/// @param hReader the opaque handle to the LASReaderH +/// @param position the integer position of the point in the file to read. +/// @return 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 LASPointH LASReader_GetPointAt(const LASReaderH hReader, uint32_t position); LAS_DLL void LASReader_Destroy(LASReaderH hReader); From liblas-commits at hobu.net Sat May 3 01:28:22 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Sat May 3 01:28:31 2008 Subject: [Liblas-commits] r659 - trunk/include/liblas/capi Message-ID: <20080503062822.5AC4C813E8E@mail.hobu.net> Author: hobu Date: Sat May 3 01:28:21 2008 New Revision: 659 URL: http://liblas.org/changeset/659 Log: doc updates Modified: trunk/include/liblas/capi/liblas.h Modified: trunk/include/liblas/capi/liblas.h ============================================================================== --- trunk/include/liblas/capi/liblas.h (original) +++ trunk/include/liblas/capi/liblas.h Sat May 3 01:28:21 2008 @@ -99,10 +99,15 @@ } LASPointSummary; -/// Returns the version string for this library. -/// @return the version string for this library. +/* Returns the version string for this library. + @return the version string for this library. +*/ LAS_DLL const char* LAS_GetVersion(); +/****************************************************************************/ +/* Error handling */ +/****************************************************************************/ + /// Resets the error stack for the libLAS C API. LAS_DLL void LASError_Reset(void); @@ -131,6 +136,10 @@ /// @param message Message to include in the stderr output LAS_DLL void LASError_Print(const char* message); +/****************************************************************************/ +/* Reader operations */ +/****************************************************************************/ + /// 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. @@ -162,35 +171,42 @@ /// if NULL is returned. LAS_DLL LASPointH LASReader_GetPointAt(const LASReaderH hReader, uint32_t position); +/// Closes the file for reading operations represented by the LASReaderH instance. +/// @param hReader the opqaue handle to the LASReaderH LAS_DLL void LASReader_Destroy(LASReaderH hReader); -LAS_DLL double LASPoint_GetX(const LASPointH); +/****************************************************************************/ +/* Point operations */ +/****************************************************************************/ + + +LAS_DLL double LASPoint_GetX(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetX(LASPointH hPoint, double value); -LAS_DLL double LASPoint_GetY(const LASPointH); +LAS_DLL double LASPoint_GetY(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetY(LASPointH hPoint, double value); -LAS_DLL double LASPoint_GetZ(const LASPointH); +LAS_DLL double LASPoint_GetZ(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetZ(LASPointH hPoint, double value); -LAS_DLL uint16_t LASPoint_GetIntensity(const LASPointH); +LAS_DLL uint16_t LASPoint_GetIntensity(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetIntensity(LASPointH hPoint, uint16_t value); -LAS_DLL uint16_t LASPoint_GetReturnNumber(const LASPointH); +LAS_DLL uint16_t LASPoint_GetReturnNumber(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetReturnNumber(LASPointH hPoint, uint16_t value); -LAS_DLL uint16_t LASPoint_GetNumberOfReturns(const LASPointH); +LAS_DLL uint16_t LASPoint_GetNumberOfReturns(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetNumberOfReturns(LASPointH hPoint, uint16_t value); -LAS_DLL uint16_t LASPoint_GetScanDirection(const LASPointH); +LAS_DLL uint16_t LASPoint_GetScanDirection(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetScanDirection(LASPointH hPoint, uint16_t value); -LAS_DLL uint16_t LASPoint_GetFlightLineEdge(const LASPointH); +LAS_DLL uint16_t LASPoint_GetFlightLineEdge(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetFlightLineEdge(LASPointH hPoint, uint16_t value); -LAS_DLL uint8_t LASPoint_GetScanFlags(const LASPointH); +LAS_DLL uint8_t LASPoint_GetScanFlags(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetScanFlags(LASPointH hPoint, uint8_t value); -LAS_DLL uint8_t LASPoint_GetClassification(const LASPointH); +LAS_DLL uint8_t LASPoint_GetClassification(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetClassification(LASPointH hPoint, uint8_t value); -LAS_DLL double LASPoint_GetTime(const LASPointH); +LAS_DLL double LASPoint_GetTime(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetTime(LASPointH hPoint, double value); -LAS_DLL int8_t LASPoint_GetScanAngleRank(const LASPointH); +LAS_DLL int8_t LASPoint_GetScanAngleRank(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetScanAngleRank(LASPointH hPoint, int8_t value); -LAS_DLL uint8_t LASPoint_GetUserData(const LASPointH); +LAS_DLL uint8_t LASPoint_GetUserData(const LASPointH hPoint); LAS_DLL LASError LASPoint_SetUserData(LASPointH hPoint, uint8_t value); LAS_DLL int LASPoint_Validate(LASPointH hPoint); LAS_DLL int LASPoint_IsValid(LASPointH hPoint); From liblas-commits at hobu.net Sat May 3 01:31:34 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Sat May 3 01:31:42 2008 Subject: [Liblas-commits] r660 - trunk/include/liblas/capi Message-ID: <20080503063134.B66D2813F45@mail.hobu.net> Author: hobu Date: Sat May 3 01:31:33 2008 New Revision: 660 URL: http://liblas.org/changeset/660 Log: doc updates Modified: trunk/include/liblas/capi/liblas.h Modified: trunk/include/liblas/capi/liblas.h ============================================================================== --- trunk/include/liblas/capi/liblas.h (original) +++ trunk/include/liblas/capi/liblas.h Sat May 3 01:31:33 2008 @@ -99,8 +99,8 @@ } LASPointSummary; -/* Returns the version string for this library. - @return the version string for this library. +/** Returns the version string for this library. + * @return the version string for this library. */ LAS_DLL const char* LAS_GetVersion(); From liblas-commits at hobu.net Sat May 3 01:35:40 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Sat May 3 01:35:48 2008 Subject: [Liblas-commits] r661 - trunk/include/liblas/capi Message-ID: <20080503063540.379FF813FFE@mail.hobu.net> Author: hobu Date: Sat May 3 01:35:39 2008 New Revision: 661 URL: http://liblas.org/changeset/661 Log: do'h. need c-style comments Modified: trunk/include/liblas/capi/liblas.h Modified: trunk/include/liblas/capi/liblas.h ============================================================================== --- trunk/include/liblas/capi/liblas.h (original) +++ trunk/include/liblas/capi/liblas.h Sat May 3 01:35:39 2008 @@ -108,71 +108,82 @@ /* Error handling */ /****************************************************************************/ -/// Resets the error stack for the libLAS C API. +/** Resets the error stack for the libLAS C API. +*/ LAS_DLL void LASError_Reset(void); -/// Pops the top error off of the error stack for the libLAS C API. +/** Pops the top error off of the error stack for the libLAS C API. +*/ LAS_DLL void LASError_Pop(void); -/// Returns the error number of the last error on the error stack. -/// @return the error number of the last error on the error stack. +/** Returns the error number of the last error on the error stack. + * @return the error number of the last error on the error stack. +*/ LAS_DLL LASError LASError_GetLastErrorNum(void); -/// Returns the name of the method the last error message happened in. -/// @return the name of the method the last error message happened in. +/** Returns the name of the method the last error message happened in. + * @return 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. -/// @return the name of the method the last error message happened in. +/** Returns the name of the method the last error message happened in. + * @return the name of the method the last error message happened in. +*/ LAS_DLL char * LASError_GetLastErrorMethod(void); -/// Returns the number of error messages on the error stack. -/// @return the number of error messages on the error stack. +/** Returns the number of error messages on the error stack. + * @return the number of error messages on the error stack. +*/ LAS_DLL int LASError_GetErrorCount(void); -/// 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. -/// @param message Message to include in the stderr output +/** 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. + * @param message Message to include in the stderr output +*/ LAS_DLL void LASError_Print(const char* message); /****************************************************************************/ /* Reader operations */ /****************************************************************************/ -/// 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. -/// @return opaque pointer to a LASReaderH instance. -/// @param filename Filename to open for read +/** 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. + * @return opaque pointer to a LASReaderH instance. + * @param filename Filename to open for read +*/ LAS_DLL LASReaderH LASReader_Create(const char * filename); -/// 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. -/// @param hReader the opaque handle to the LASReaderH -/// @return 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. +/** 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. + * @param hReader the opaque handle to the LASReaderH + * @return 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_GetNextPoint(const LASReaderH hReader); -/// 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. -/// @param hReader the opaque handle to the LASReaderH -/// @param position the integer position of the point in the file to read. -/// @return 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. +/** 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. + * @param hReader the opaque handle to the LASReaderH + * @param position the integer position of the point in the file to read. + * @return 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 LASPointH LASReader_GetPointAt(const LASReaderH hReader, uint32_t position); -/// Closes the file for reading operations represented by the LASReaderH instance. -/// @param hReader the opqaue handle to the LASReaderH +/** Closes the file for reading operations represented by the LASReaderH instance. + * @param hReader the opqaue handle to the LASReaderH +*/ LAS_DLL void LASReader_Destroy(LASReaderH hReader); /****************************************************************************/ From liblas-commits at hobu.net Sat May 3 01:48:49 2008 From: liblas-commits at hobu.net (liblas-commits@hobu.net) Date: Sat May 3 01:48:57 2008 Subject: [Liblas-commits] r662 - trunk/include/liblas/capi Message-ID: <20080503064849.BCC59814126@mail.hobu.net> Author: hobu Date: Sat May 3 01:48:48 2008 New Revision: 662 URL: http://liblas.org/changeset/662 Log: doc updates Modified: trunk/include/liblas/capi/liblas.h Modified: trunk/include/liblas/capi/liblas.h ============================================================================== --- trunk/include/liblas/capi/liblas.h (original) +++ trunk/include/liblas/capi/liblas.h Sat May 3 01:48:48 2008 @@ -190,12 +190,55 @@ /* Point operations */ /****************************************************************************/ - +/** Returns the 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. + * @param hPoint the opaque pointer to the LASPointH instance + * @return the X value for the LASPointH +*/ LAS_DLL double LASPoint_GetX(const LASPointH hPoint); + +/** Sets the X value for the point. This value must be scaled or offset + * by any header values before being set. + * @param hPoint the opaque pointer to the LASPointH instance + * @param value the double value to set for the X value of the point + * @return an error number if an error occured during the setting of the point. +*/ LAS_DLL LASError LASPoint_SetX(LASPointH hPoint, double value); + +/** Returns the Y 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. + * @param hPoint the opaque pointer to the LASPointH instance + * @return the Y value for the LASPointH +*/ LAS_DLL double LASPoint_GetY(const LASPointH hPoint); + +/** Sets the Y value for the point. This value must be scaled or offset + * by any header values before being set. + * @param hPoint the opaque pointer to the LASPointH instance + * @param value the double value to set for the Y value of the point + * @return an error number if an error occured during the setting of the point. +*/ LAS_DLL LASError LASPoint_SetY(LASPointH hPoint, double value); + +/** Returns the Z 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. + * @param hPoint the opaque pointer to the LASPointH instance + *