mirror of
https://github.com/JHUAPL/pubgeo.git
synced 2026-01-09 14:38:06 -05:00
SHR3D is available as writers.shr3d and can be appended to any PDAL pipeline. PDAL will not be altered to infer writers.shr3d (many writers could write a TIF), so users will have to specify writers.shr3d explicitly. ALIGN3D is available as filters.align3d and can be inserted into any PDAL pipeline. ALIGN3D will take the first incoming PointView as the fixed or reference PointView, and will register all subsequent PointViews to this reference view. Minor changes: Ignore build directory for in-source builds. Add clang-format config file (the plugin code adheres to this). PubGeo common code updated to read directly from PDAL PointViews. Common code also updated to silence a bunch of warnings.
64 lines
2.0 KiB
C++
64 lines
2.0 KiB
C++
// Copyright (c) 2017, Bradley J Chambers (brad.chambers@gmail.com)
|
|
// All rights reserved.
|
|
//
|
|
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
// of this software and associated documentation files (the "Software"), to deal
|
|
// in the Software without restriction, including without limitation the rights
|
|
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
// copies of the Software, and to permit persons to whom the Software is
|
|
// furnished to do so, subject to the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be included in
|
|
// all copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
// SOFTWARE.
|
|
|
|
// PDAL Plugin of S. Almes, S. Hagstrom, D. Chilcott, H. Goldberg, M. Brown,
|
|
// “Open Source Geospatial Tools to Enable Large Scale 3D Scene Modeling,”
|
|
// FOSS4G, 2017.
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <string>
|
|
|
|
#include <pdal/Writer.hpp>
|
|
#include <pdal/pdal_export.hpp>
|
|
#include <pdal/util/ProgramArgs.hpp>
|
|
|
|
namespace pdal
|
|
{
|
|
|
|
class PDAL_DLL Shr3dWriter : public Writer
|
|
{
|
|
public:
|
|
Shr3dWriter()
|
|
{
|
|
}
|
|
|
|
static void* create();
|
|
static int32_t destroy(void*);
|
|
std::string getName() const;
|
|
|
|
private:
|
|
virtual void addArgs(ProgramArgs& args);
|
|
virtual void write(const PointViewPtr view);
|
|
|
|
std::string m_filename;
|
|
double m_dh;
|
|
double m_dz;
|
|
double m_agl;
|
|
double m_area;
|
|
bool m_egm96;
|
|
|
|
Shr3dWriter& operator=(const Shr3dWriter&) = delete;
|
|
Shr3dWriter(const Shr3dWriter&) = delete;
|
|
};
|
|
}
|