[Liblas-commits] r1229 - trunk/apps
liblas-commits at liblas.org
liblas-commits at liblas.org
Thu Apr 16 18:44:18 EDT 2009
Author: mloskot
Date: Thu Apr 16 18:44:17 2009
New Revision: 1229
URL: http://liblas.org/changeset/1229
Log:
Added newline at end of ts2las.cpp file. Added copyright and license notice to ts2las.cpp.
Modified:
trunk/apps/ts2las.cpp
Modified: trunk/apps/ts2las.cpp
==============================================================================
--- trunk/apps/ts2las.cpp (original)
+++ trunk/apps/ts2las.cpp Thu Apr 16 18:44:17 2009
@@ -1,15 +1,23 @@
-
+// $Id$
+//
+// ts2las translates TerraSolid .bin file to ASPRS LAS file.
+//
+// TerraSolid format: http://cdn.terrasolid.fi/tscan.pdf
+//
+// (C) Copyright Howard Butler 2009, hobu.inc at gmail.com
+//
+// Distributed under the BSD License
+// (See accompanying file LICENSE.txt or copy at
+// http://www.opensource.org/licenses/bsd-license.php)
+//
#include "ts2las.hpp"
#include <fstream>
#include <iostream>
#include <string>
-// from http://cdn.terrasolid.fi/tscan.pdf
-
using namespace liblas;
-
std::istream* OpenInput(std::string filename)
{
std::ios::openmode const mode = std::ios::in | std::ios::binary;
@@ -81,13 +89,17 @@
std::cout << "scale: " << scale << std::endl;
header.SetScale(scale, scale, scale);
header.SetOffset(hdr->OrgX*scale, hdr->OrgY*scale, hdr->OrgZ*scale);
- std::cout << "offset x: " << header.GetOffsetX() << " offset y: " << header.GetOffsetY() << " offset z: " <<header.GetOffsetZ() << std::endl;
+ std::cout << "offset x: " << header.GetOffsetX()
+ << " offset y: " << header.GetOffsetY()
+ << " offset z: " <<header.GetOffsetZ() << std::endl;
return header;
}
-bool ReadHeader(ScanHdr* hdr, std::istream* istrm) {
-
- try {
+
+bool ReadHeader(ScanHdr* hdr, std::istream* istrm)
+{
+ try
+ {
liblas::detail::read_n(*hdr, *istrm, sizeof(ScanHdr));
if (hdr->Tunniste != 970401) return false;
@@ -111,8 +123,8 @@
bool WritePoints(LASWriter* writer, std::istream* strm, ScanHdr* hdr)
{
- while (true) {
-
+ while (true)
+ {
///std::cout << "We have header version" << std::endl;
ScanPnt* point = new ScanPnt;
@@ -229,7 +241,8 @@
std::string input;
std::string output;
- for (int i = 1; i < argc; i++) {
+ for (int i = 1; i < argc; i++)
+ {
if ( strcmp(argv[i],"-h") == 0 ||
strcmp(argv[i],"--help") == 0
)
@@ -299,4 +312,5 @@
std::cout << "Point Count: " << header.GetPointRecordsCount() <<std::endl;
std::cout << "success: " << success << std::endl;
return rc;
-}
\ No newline at end of file
+}
+
More information about the Liblas-commits
mailing list