[Liblas-devel] Error reading two Terrascan .BIN file
jeet_sen
suvajit at sce.co.in
Wed May 12 09:12:12 EDT 2010
HI,
I am trying to compare two .BIN files in Windows (VS2008).
Since I do not have the BIn file structure standard, I am following the
structure as defined in ts2las.hpp available in ts2las utility.
As per the structure defined:
Header = 56 bytes
ScanPnt = 24 bytes
Now to compare two files, I read the points simultaneously one after the
other like this:
(strmI and strmO are my two file streams containing same no of record
points)
std::cout << "Istream position is: " << strmI->tellg() << std::endl;
std::cout << "Ostream position is: " << strmO->tellg() << std::endl;
if (hdr->HdrVersion == 20020715) {
// read point frm stream 1
detail::read_n(*pointI, *strmI, sizeof(ScanPnt));
// read point frm stream 2
detail::read_n(*pointO, *strmO, sizeof(ScanPnt));
.......
Strangely I find, that both start reading from pos 56, but stream1 reads
scanpoints by 28 bytes and stream2 reads scanpoints by 20 bytes.
However, if I switch off either of them, they read the points correctly.
Could not trace why read_n is behaving this way where I am reading from
different sources.
Any clues ?
Regards,
Suvajit
--
View this message in context: http://liblas-developers.431198.n3.nabble.com/Error-reading-two-Terrascan-BIN-file-tp812436p812436.html
Sent from the libLAS Developers mailing list archive at Nabble.com.
More information about the Liblas-devel
mailing list