3
// (C) Copyright Mateusz Loskot 2008, mateusz@loskot.net
4
// Distributed under the BSD License
5
// (See accompanying file LICENSE.txt or copy at
6
// http://www.opensource.org/licenses/bsd-license.php)
8
#if defined(_MSC_VER) && defined(USE_VLD)
12
#include <liblas/liblas.hpp>
13
#include <liblas/lasheader.hpp>
14
#include <liblas/laspoint.hpp>
15
#include <liblas/laswriter.hpp>
16
#include <liblas/guid.hpp>
29
#include "utility.hpp"
34
using liblas::LASHeader;
38
char const* name = "test.las";
41
if (!liblas::Create(ofs, name))
43
throw std::runtime_error(std::string("Can not create ") + name);
46
liblas::LASHeader hdr;
47
hdr.SetVersionMajor(1);
48
hdr.SetVersionMinor(1);
49
hdr.SetDataFormatId(LASHeader::ePointFormat1);
50
hdr.SetPointRecordsCount(1000); // should be corrected automatically by writer
51
liblas::LASWriter writer(ofs, hdr);
54
p.SetCoordinates(10, 20, 30);
58
catch (std::exception const& e)
60
std::cerr << "Error: " << e.what() << std::endl;
64
std::cerr << "Unknown error\n";