mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-24 00:47:57 -05:00
We are now using the code from "qgis" branch: https://github.com/hobu/untwine/tree/qgis It is in sync with "main" branch of untwine as of today, just with a couple of small patches to make it work with PDAL older than 2.4. The new version of untwine includes: - indexing to COPC (in addition to EPT) - fixes to bugs that were reported in QGIS - error reporting Untwine now also directly links to lazperf library (in addition to PDAL).
82 lines
2.3 KiB
C++
82 lines
2.3 KiB
C++
/*****************************************************************************
|
|
* Copyright (c) 2020, Hobu, Inc. (info@hobu.co) *
|
|
* *
|
|
* All rights reserved. *
|
|
* *
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
* it under the terms of the GNU General Public License as published by *
|
|
* the Free Software Foundation; either version 3 of the License, or *
|
|
* (at your option) any later version. *
|
|
* *
|
|
****************************************************************************/
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "../untwine/VoxelKey.hpp"
|
|
|
|
#include "FileInfo.hpp"
|
|
|
|
namespace untwine
|
|
{
|
|
namespace bu
|
|
{
|
|
|
|
class OctantInfo
|
|
{
|
|
public:
|
|
OctantInfo() : m_mustWrite(false)
|
|
{}
|
|
|
|
OctantInfo(const VoxelKey& key) : m_mustWrite(false)
|
|
{ m_key = key; }
|
|
|
|
void appendFileInfo(const FileInfo& fi)
|
|
{ m_fileInfos.push_back(fi); }
|
|
|
|
void prependFileInfo(const FileInfo& fi)
|
|
{ m_fileInfos.push_front(fi); }
|
|
|
|
void appendFileInfos(OctantInfo& o)
|
|
{ m_fileInfos.splice(m_fileInfos.end(), o.m_fileInfos); }
|
|
|
|
size_t numPoints() const
|
|
{
|
|
size_t cnt = 0;
|
|
for (const FileInfo& fi : m_fileInfos)
|
|
cnt += fi.numPoints();
|
|
return cnt;
|
|
}
|
|
|
|
bool hasPoints() const
|
|
{
|
|
for (const FileInfo& fi : m_fileInfos)
|
|
if (fi.numPoints())
|
|
return true;
|
|
return false;
|
|
}
|
|
|
|
void mergeSmallFiles(const std::string tempDir, size_t pointSize);
|
|
|
|
std::list<FileInfo>& fileInfos()
|
|
{ return m_fileInfos; }
|
|
const std::list<FileInfo>& fileInfos() const
|
|
{ return m_fileInfos; }
|
|
VoxelKey key() const
|
|
{ return m_key; }
|
|
void setKey(VoxelKey k)
|
|
{ m_key = k; }
|
|
bool mustWrite() const
|
|
{ return m_mustWrite; }
|
|
void setMustWrite(bool mustWrite)
|
|
{ m_mustWrite = mustWrite; }
|
|
|
|
private:
|
|
FileInfoList m_fileInfos;
|
|
VoxelKey m_key;
|
|
bool m_mustWrite;
|
|
};
|
|
|
|
} // namespace bu
|
|
} // namespace untwine
|