[Liblas-commits] hg: 2 new changesets

liblas-commits at liblas.org liblas-commits at liblas.org
Tue Nov 9 17:13:49 EST 2010


changeset ae07d3f34c9e in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=ae07d3f34c9e
summary: Add 400Pts.las synthetic sample file for iterator testing. Minor cleanup.

changeset 2502a515f73a in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=2502a515f73a
summary: Fixed point count bug in index iterator filtering when resuming point scanning mid-cell and mid-VLR.

diffstat:

 apps/lasindex_test.cpp |  18 +++++++++++++++---
 src/lasindex.cpp       |  19 +++++++++++--------
 2 files changed, 26 insertions(+), 11 deletions(-)

diffs (75 lines):

diff -r 07104a34d7c6 -r 2502a515f73a apps/lasindex_test.cpp
--- a/apps/lasindex_test.cpp	Tue Nov 09 13:46:53 2010 -0600
+++ b/apps/lasindex_test.cpp	Tue Nov 09 15:13:09 2010 -0700
@@ -261,7 +261,7 @@
 	*/
 	/*---------------------Mount St Helens Oct 4 2004-------------------------*/
 	/*----------------------------build index-----------------------------------
-	const char* arggv[] = {"foo", "-t", "C:\\LibLAS\\Mount St Helens Oct 4 2004.tmp",
+	const char* arggv[] = {"foo", "-t", "C:\\LibLAS\\Samples\\Mount St Helens Oct 4 2004.tmp",
 		 "-i", "C:\\LibLAS\\Samples\\Mount St Helens Oct 4 2004.las", "-a", SAMPLE_AUTHOR, "-c", SAMPLE_COMMENT, "-d", SAMPLE_DATE,
 		 "-o", "C:\\LibLAS\\Samples\\Mount St Helens Oct 4 2004_idx.las", "-b", "100"};
 	argc = 15;
@@ -285,7 +285,7 @@
 	*/
 	/*------------------------------flatDataset-------------------------------*/
 	/*------------------------------build index---------------------------------
-	const char* arggv[] = {"foo", "-t", "C:\\LibLAS\\flatDataset.tmp",
+	const char* arggv[] = {"foo", "-t", "C:\\LibLAS\\Samples\\flatDataset.tmp",
 		 "-i", "C:\\LibLAS\\Samples\\flatDataset.las", "-a", SAMPLE_AUTHOR, "-c", SAMPLE_COMMENT, "-d", SAMPLE_DATE,
 		 "-o", "C:\\LibLAS\\Samples\\flatDataset_idx.las"};
 	argc = 13;
@@ -307,11 +307,23 @@
 		 "-o", "K:\\FME\\billion_points_idx.ldx", "-s", "-it", "5000000"};
 	argc = 16;
 	*/
-	/*-------------------filter from standalone file using iterator---------------
+	/*-------------------filter from standalone file using iterator-------------
 	const char* arggv[] = {"foo", "-i", "D:\\Zips\\FME\\billion_points.las",
 		 "-n", "K:\\FME\\billion_points_idx.ldx", "-r", "-it", "5000000"};
 	argc = 8;
 	*/
+	/*---------------------------billion_points-------------------------------*/
+	/*-----------------build index in standalone file---------------------------
+	const char* arggv[] = {"foo", "-t", "C:\\LibLAS\\Samples\\400Pts.tmp",
+		 "-i", "C:\\LibLAS\\Samples\\400Pts.las", "-a", SAMPLE_AUTHOR, "-c", SAMPLE_COMMENT, "-d", SAMPLE_DATE,
+		 "-o", "C:\\LibLAS\\Samples\\400Pts_idx.ldx", "-s", "-it", "25"};
+	argc = 16;
+	*/
+	/*-------------------filter from standalone file using iterator-------------
+	const char* arggv[] = {"foo", "-i", "C:\\LibLAS\\Samples\\400Pts.las",
+		 "-n", "C:\\LibLAS\\Samples\\400Pts_idx.ldx", "-r", "-it", "25"};
+	argc = 8;
+	*/
 	
 	for (int i = 1; i < argc; i++)
     {
diff -r 07104a34d7c6 -r 2502a515f73a src/lasindex.cpp
--- a/src/lasindex.cpp	Tue Nov 09 13:46:53 2010 -0600
+++ b/src/lasindex.cpp	Tue Nov 09 15:13:09 2010 -0700
@@ -683,14 +683,17 @@
 				if (ParamSrc.m_iterator && (m_filterResult.size() >= ParamSrc.m_iterator->m_chunkSize))
 					break;
 			} // while
-			PointsScannedCurVLR += PointsScannedThisTime;
-			if (PointsScannedCurVLR >= PointsThisRecord)
-				VLRDone = true;
-			if (ParamSrc.m_iterator)
-			{
-				ParamSrc.m_iterator->m_totalPointsScanned += PointsScannedThisTime;
-				ParamSrc.m_iterator->m_ptsScannedCurVLR = PointsScannedCurVLR;
-			} // if
+			if (PointsScannedThisTime >= PointsToIgnore)
+			{
+				PointsScannedCurVLR += PointsScannedThisTime - PointsToIgnore;
+				if (PointsScannedCurVLR >= PointsThisRecord)
+					VLRDone = true;
+				if (ParamSrc.m_iterator)
+				{
+					ParamSrc.m_iterator->m_totalPointsScanned += PointsScannedThisTime - PointsToIgnore;
+					ParamSrc.m_iterator->m_ptsScannedCurVLR = PointsScannedCurVLR;
+				} // if
+			} // if
 		} // if
 		else if (ParamSrc.m_iterator)
 		{


More information about the Liblas-commits mailing list