[Liblas-commits] hg: lots of typos thanks to search/replace

liblas-commits at liblas.org liblas-commits at liblas.org
Mon Aug 23 14:08:04 EDT 2010


changeset 1ea0e479343a in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=1ea0e479343a
summary: lots of typos thanks to search/replace

diffstat:

 src/lasindex.cpp |  688 +++++++++++++++++++++++++++---------------------------
 1 files changed, 344 insertions(+), 344 deletions(-)

diffs (truncated from 1097 to 300 lines):

diff -r 06ba842fc49e -r 1ea0e479343a src/lasindex.cpp
--- a/src/lasindex.cpp	Mon Aug 23 12:01:11 2010 -0600
+++ b/src/lasindex.cpp	Mon Aug 23 13:07:55 2010 -0500
@@ -156,19 +156,19 @@
 			m_pointheader = m_reader->GetHeader();
 		} // else
 		boost::uint32_t initialVLRs = m_idxheader.GetRecordsCount();
-		for (boost::uint32_t i = 0; i < initialVLRs; ++i)
-		{
-			VariableRecord const& vlr = m_idxheader.GetVLR(i);
-			// a combination of "liblas" and 42 denotes that this is a liblas spatial index id
-			if (std::string(vlr.GetUserId(false)) == std::string("liblas"))
-			{
-				if (vlr.GetRecordId() == 42)
-				{
-					LoadIndexVLR(vlr);
-					IndexFound = true;
-					break;
-				}
-			}
+		for (boost::uint32_t i = 0; i < initialVLRs; ++i)
+		{
+			VariableRecord const& vlr = m_idxheader.GetVLR(i);
+			// a combination of "liblas" and 42 denotes that this is a liblas spatial index id
+			if (std::string(vlr.GetUserId(false)) == std::string("liblas"))
+			{
+				if (vlr.GetRecordId() == 42)
+				{
+					LoadIndexVLR(vlr);
+					IndexFound = true;
+					break;
+				}
+			}
 		}
 		if (IndexFound)
 		{
@@ -208,26 +208,26 @@
 void Index::ClearOldIndex(void)
 {
 	boost::uint32_t initialVLRs = m_idxheader.GetRecordsCount();
-	boost::uint32_t TempDataVLR_ID = GetDataVLR_ID();
-
-	for (boost::uint32_t i = 0; i < initialVLRs; ++i)
-	{
-		VariableRecord const& vlr = m_idxheader.GetVLR(i);
-		// a combination of "liblas" and 42 denotes that this is a liblas spatial index id
-		if (std::string(vlr.GetUserId(false)) == std::string("liblas"))
-		{
-			// 42 is index ID
-			if (vlr.GetRecordId() == 42)
-			{
-				// sets DataVLR_ID to value in index header
-				LoadIndexVLR(vlr);
-				m_idxheader.DeleteVLR(i);
-			} // if
-			else if (vlr.GetRecordId() == GetDataVLR_ID())
-			{
-				m_idxheader.DeleteVLR(i);
-			} // else if
-		} // if
+	boost::uint32_t TempDataVLR_ID = GetDataVLR_ID();
+
+	for (boost::uint32_t i = 0; i < initialVLRs; ++i)
+	{
+		VariableRecord const& vlr = m_idxheader.GetVLR(i);
+		// a combination of "liblas" and 42 denotes that this is a liblas spatial index id
+		if (std::string(vlr.GetUserId(false)) == std::string("liblas"))
+		{
+			// 42 is index ID
+			if (vlr.GetRecordId() == 42)
+			{
+				// sets DataVLR_ID to value in index header
+				LoadIndexVLR(vlr);
+				m_idxheader.DeleteVLR(i);
+			} // if
+			else if (vlr.GetRecordId() == GetDataVLR_ID())
+			{
+				m_idxheader.DeleteVLR(i);
+			} // else if
+		} // if
 	} // for
 	
 	// restore Data VLR ID
@@ -260,17 +260,17 @@
 	m_filterResult.resize(0);
 	if (m_reader)
 	{
-		for (boost::uint32_t i = 0; i < m_idxheader.GetRecordsCount(); ++i)
-		{
-			VariableRecord const& vlr = m_idxheader.GetVLR(i);
-			// a combination of "liblas" and 42 denotes that this is a liblas spatial index id
-			if (std::string(vlr.GetUserId(false)) == std::string("liblas"))
-			{
-				boost::uint16_t RecordID = vlr.GetRecordId();
-				if (RecordID == 42)
-				{
-					if (! LoadIndexVLR(vlr))
-						break;
+		for (boost::uint32_t i = 0; i < m_idxheader.GetRecordsCount(); ++i)
+		{
+			VariableRecord const& vlr = m_idxheader.GetVLR(i);
+			// a combination of "liblas" and 42 denotes that this is a liblas spatial index id
+			if (std::string(vlr.GetUserId(false)) == std::string("liblas"))
+			{
+				boost::uint16_t RecordID = vlr.GetRecordId();
+				if (RecordID == 42)
+				{
+					if (! LoadIndexVLR(vlr))
+						break;
 					// Beyond the first record would be more VLR's with the actual index data
 					// some cells will fall completely inside, some outside and some straddling the filter bounds	
 					SetCellFilterBounds(ParamSrc);
@@ -280,14 +280,14 @@
 							fprintf(m_debugger, "Index bounds do not intersect filter bounds.\n");
 						break;
 					} // if
-				} // if 42
-				else if (RecordID == m_DataVLR_ID)
-				{
-					// some of our data is in this record
-					if (! FilterOneVLR(vlr, i, ParamSrc))
-						break;
-				} // else if ID matches ID stored in index header
-			}
+				} // if 42
+				else if (RecordID == m_DataVLR_ID)
+				{
+					// some of our data is in this record
+					if (! FilterOneVLR(vlr, i, ParamSrc))
+						break;
+				} // else if ID matches ID stored in index header
+			}
 		}
 	} // m_reader
 	return (m_filterResult);
@@ -355,9 +355,9 @@
 
 	try {
 		//boost::uint16_t VLRIndexRecLen = vlr.GetRecordLength();
-		// GetData returns a vector of boost::uint8_t
-		// std::vector<uint8_t>
-		// read the first record of our index data
+		// GetData returns a vector of boost::uint8_t
+		// std::vector<uint8_t>
+		// read the first record of our index data
 		IndexVLRData const& VLRIndexData = vlr.GetData();
 		// parse the index header data
 		ReadVLRData_n(VersionMajor, VLRIndexData, ReadPos);
@@ -422,15 +422,15 @@
 
 } // Index::LoadIndexVLR
 
-bool Index::FilterOneVLR(VariableRecord const& vlr, boost::uint32_t& i, IndexData const& ParamSrc)
-{
-
+bool Index::FilterOneVLR(VariableRecord const& vlr, boost::uint32_t& i, IndexData const& ParamSrc)
+{
+
 	boost::uint16_t ReadPos = 0;
 	boost::uint32_t MinCellX, MinCellY, MaxCellX, MaxCellY, DataRecordSize = 0;
-	IndexVLRData CompositeData;
-	
-	try {
-		IndexVLRData const& VLRIndexRecordData = vlr.GetData();
+	IndexVLRData CompositeData;
+	
+	try {
+		IndexVLRData const& VLRIndexRecordData = vlr.GetData();
 		boost::uint16_t VLRIndexRecLen = vlr.GetRecordLength();
 		CompositeData.resize(VLRIndexRecLen);
 		ReadVLRDataNoInc_str((char *)&CompositeData[0], VLRIndexRecordData, VLRIndexRecLen, 0);
@@ -452,8 +452,8 @@
 			while (UnreadData)
 			{
 				++i;
-				VariableRecord const& vlr2 = m_idxheader.GetVLR(i);
-				IndexVLRData const& TempData = vlr2.GetData();
+				VariableRecord const& vlr2 = m_idxheader.GetVLR(i);
+				IndexVLRData const& TempData = vlr2.GetData();
 				boost::uint16_t TempRecLen = vlr2.GetRecordLength();
 				ReadVLRDataNoInc_str((char *)&CompositeData[ReadData], TempData, TempRecLen, 0);
 				ReadData += TempRecLen;
@@ -464,12 +464,12 @@
 					UnreadData = 0;
 			} // while
 		} // if
-			
-		if (VLRInteresting(MinCellX, MinCellY, MaxCellX, MaxCellY, ParamSrc))
-		{
-			// translate the data for this VLR
-			while (ReadPos + sizeof (boost::uint32_t) < DataRecordSize)
-			{
+			
+		if (VLRInteresting(MinCellX, MinCellY, MaxCellX, MaxCellY, ParamSrc))
+		{
+			// translate the data for this VLR
+			while (ReadPos + sizeof (boost::uint32_t) < DataRecordSize)
+			{
 				// current cell, x, y
 				boost::uint32_t x, y, PtRecords, SubCellsXY, SubCellsZ;
 				ReadVLRData_n(x, CompositeData, ReadPos);
@@ -484,10 +484,10 @@
 				ReadVLRData_n(PtRecords, CompositeData, ReadPos);
 				ReadVLRData_n(SubCellsXY, CompositeData, ReadPos);
 				ReadVLRData_n(SubCellsZ, CompositeData, ReadPos);
-				
-				// read the data stored in Z cells, if any
-				for (boost::uint32_t SubCellZ = 0; SubCellZ < SubCellsZ; ++SubCellZ)
-				{
+				
+				// read the data stored in Z cells, if any
+				for (boost::uint32_t SubCellZ = 0; SubCellZ < SubCellsZ; ++SubCellZ)
+				{
 					boost::uint32_t ZCellID;
 					ReadVLRData_n(ZCellID, CompositeData, ReadPos);
 					// number of point records in subcell
@@ -511,10 +511,10 @@
 							} // for
 						} // if
 					} // for
-				} // for
-				// read the data stored in XY quadtree cells
-				for (boost::uint32_t SubCellXY = 0; SubCellXY < SubCellsXY; ++SubCellXY)
-				{
+				} // for
+				// read the data stored in XY quadtree cells
+				for (boost::uint32_t SubCellXY = 0; SubCellXY < SubCellsXY; ++SubCellXY)
+				{
 					boost::uint32_t SubCellID;
 					ReadVLRData_n(SubCellID, CompositeData, ReadPos);
 					// number of point records in subcell
@@ -522,7 +522,7 @@
 					ReadVLRData_n(SubCellNumRecords, CompositeData, ReadPos);
 					for (uint32_t SubCellPt = 0; SubCellPt < SubCellNumRecords; ++SubCellPt)
 					{
-						boost::uint32_T PointID, LastPointID = static_cast<boost::uint32_T>(~0);
+						boost::uint32_t PointID, LastPointID = static_cast<boost::uint32_t>(~0);
 						bool LastPtRead = 0;
 						ReadVLRData_n(PointID, CompositeData, ReadPos);
 						assert(PointID < m_pointRecordsCount);
@@ -530,7 +530,7 @@
 						ReadVLRData_n(ConsecutivePts, CompositeData, ReadPos);
 						if (TestPointsInThisCell && SubCellInteresting(SubCellID, x, y, ParamSrc))
 						{
-							for (boost::uint32_T PtCt = 0; PtCt < ConsecutivePts; ++PointID, ++PtCt)
+							for (boost::uint32_t PtCt = 0; PtCt < ConsecutivePts; ++PointID, ++PtCt)
 							{
 								if (FilterOnePoint(x, y, 0, PointID, LastPointID, LastPtRead, ParamSrc))
 									m_filterResult.push_back(PointID);
@@ -538,13 +538,13 @@
 							} // for
 						} // if
 					} // for
-				} // for
-				// read data in unsubdivided cells
+				} // for
+				// read data in unsubdivided cells
 				if (! (SubCellsZ || SubCellsXY))
 				{
-					for (boost::uint32_T CurPt = 0; CurPt < PtRecords; ++CurPt)
+					for (boost::uint32_t CurPt = 0; CurPt < PtRecords; ++CurPt)
 					{
-						boost::uint32_T PointID, LastPointID = static_cast<boost::uint32_T>(~0);
+						boost::uint32_t PointID, LastPointID = static_cast<boost::uint32_t>(~0);
 						bool LastPtRead = 0;
 						ReadVLRData_n(PointID, CompositeData, ReadPos);
 						assert(PointID < m_pointRecordsCount);
@@ -552,7 +552,7 @@
 						ReadVLRData_n(ConsecutivePts, CompositeData, ReadPos);
 						if (TestPointsInThisCell)
 						{
-							for (boost::uint32_T PtCt = 0; PtCt < ConsecutivePts; ++PointID, ++PtCt)
+							for (boost::uint32_t PtCt = 0; PtCt < ConsecutivePts; ++PointID, ++PtCt)
 							{
 								if (FilterOnePoint(x, y, 0, PointID, LastPointID, LastPtRead, ParamSrc))
 									m_filterResult.push_back(PointID);
@@ -561,9 +561,9 @@
 						} // if
 					} // for
 				} // if
-			} // while
-		} // if
-	} // try
+			} // while
+		} // if
+	} // try
 	catch (std::bad_alloc) {
 		return (false);
 	} // catch
@@ -571,51 +571,51 @@
 		return (false);
 	} // catch
 	return true;
-	
-} // Index::FilterOneVLR
+	
+} // Index::FilterOneVLR
 
-bool Index::VLRInteresting(boost::int32_t MinCellX, boost::int32_t MinCellY, boost::int32_t MaxCellX, boost::int32_t MaxCellY, IndexData const& ParamSrc)
-{


More information about the Liblas-commits mailing list