From 2485d177e82743f53cb28f5fa1d24f5f591da451 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 11:52:41 +0100 Subject: [PATCH 01/36] first draft --- source/pdal/pdalc_pointview.cpp | 40 +++++++++++++++++++++++++++++++++ source/pdal/pdalc_pointview.h | 28 +++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 80c900b..e526d67 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -206,6 +206,46 @@ extern "C" return size; } + + uint64_t PDALGetMeshSize(PDALPointViewPtr view) + { + pdal::capi::PointView* wrapper = reinterpret_cast(view); + pdal::TriangularMesh* mesh=wrapper.mesh(); + return mesh && *mesh ? (uint64_t)(*mesh)->size() : 0; + } + + uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buf) + { + uint64_t size = 0; + + if (view && buf) + { + pdal::capi::PointView *capiView = reinterpret_cast(view); + pdal::TriangularMesh* mesh=capiView.mesh(); + + + if (*capiView && *mesh) + { + uint64_t size = 0; + for (unsigned idx = 0; idx < (*mesh)->size(); ++idx) + { + const Triangle& t = (*mesh)[idx]; + uint32_t a = (uint32_t)t.m_a; + std::memcpy(buff, &a, 4); + uint32_t b = (uint32_t)t.m_b; + std::memcpy(buff + 4, &b, 4); + uint32_t c = (uint32_t)t.m_c; + std::memcpy(buff + 8, &c, 4); + + buf += 12; + size += pointSize; + } + } + } + + return size; + } + } } } \ No newline at end of file diff --git a/source/pdal/pdalc_pointview.h b/source/pdal/pdalc_pointview.h index 617a235..bda1ba8 100644 --- a/source/pdal/pdalc_pointview.h +++ b/source/pdal/pdalc_pointview.h @@ -167,6 +167,34 @@ PDALC_API size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr di */ PDALC_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buffer); +/** + * Returns the number of triangles in the provided `view`. + * + * @see pdal::TriangularMesh + * + * @param view The point view + * @return The number of triangles or zero if there is no mesh. + */ +PDALC_API uint64_t PDALGetMeshSize(PDALPointViewPtr view); + +/** + * Retrieves the triangles from the PointView. + * + * @note Behavior will be undefined if `buffer` is not large enough + * to contain all the packed point data + * + * @see Use the product of the values returned by PDALGetPointViewSize + * and 12 to obtain the minimum byte size for `buffer` + * + * @see pdal::TriangularMesh + * + * @param view The view that contains the triangles + * @param[out] buffer Pointer to buffer to fill + * @return The size of the triangles stored in `buf` + * or zero if `view` is NULL, or `buf` is NULL + */ +PDALC_API uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buffer); + #ifdef __cplusplus } } From 65f794a4f6db77e1275a8394d7fd96819acadc42 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 12:25:57 +0100 Subject: [PATCH 02/36] bug fixes --- csharp/PointView.cs | 16 ++++++++++++++++ source/pdal/pdalc_forward.h | 6 ++++++ source/pdal/pdalc_pointview.cpp | 4 ++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/csharp/PointView.cs b/csharp/PointView.cs index 1114e70..7552eb8 100644 --- a/csharp/PointView.cs +++ b/csharp/PointView.cs @@ -82,6 +82,17 @@ public class PointView : IDisposable private IntPtr mNative = IntPtr.Zero; + [DllImport(PDALC_LIBRARY, EntryPoint = "PDALGetMeshViewSize")] + + private static extern ulong meshSize(IntPtr view); + + [DllImport(PDALC_LIBRARY, EntryPoint = "PDALGetAllTriangles")] + + private static extern ulong getAllTriangles(IntPtr view, [MarshalAs(UnmanagedType.LPArray)] byte[] buf); + + private IntPtr mNative = IntPtr.Zero; + + public PointView(IntPtr nativeView) { mNative = nativeView; @@ -232,6 +243,11 @@ public BakedPointCloud GetBakedPointCloud(long size) { pc.Initialize(positions, colors, (int)size); return pc; + } + + public DMesh3 getMesh() + { + } private double parseDouble(byte[] buffer, string interpretationName, int position) { diff --git a/source/pdal/pdalc_forward.h b/source/pdal/pdalc_forward.h index 634b00b..d946f12 100644 --- a/source/pdal/pdalc_forward.h +++ b/source/pdal/pdalc_forward.h @@ -55,15 +55,18 @@ namespace pdal struct DimType; class PipelineExecutor; class PointView; +class TriangularMesh using PointViewPtr = std::shared_ptr; using DimTypeList = std::vector; +using MeshPtr = std::shared_ptr namespace capi { class PointViewIterator; using Pipeline = std::unique_ptr; using PointView = pdal::PointViewPtr; +using TriangularMesh = pdal::MeshPtr; using DimTypeList = std::unique_ptr; } } @@ -105,6 +108,9 @@ typedef void* PDALPointLayoutPtr; /// A pointer to point view typedef void* PDALPointViewPtr; +/// A pointer to a Mesh +typedef void* PDALMeshPtr + /// A pointer to a point view iterator typedef void* PDALPointViewIteratorPtr; diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index e526d67..0c62234 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -210,7 +210,7 @@ extern "C" uint64_t PDALGetMeshSize(PDALPointViewPtr view) { pdal::capi::PointView* wrapper = reinterpret_cast(view); - pdal::TriangularMesh* mesh=wrapper.mesh(); + pdal::TriangularMesh* mesh=reinterpret_castwrapper->mesh(); return mesh && *mesh ? (uint64_t)(*mesh)->size() : 0; } @@ -221,7 +221,7 @@ extern "C" if (view && buf) { pdal::capi::PointView *capiView = reinterpret_cast(view); - pdal::TriangularMesh* mesh=capiView.mesh(); + pdal::capi::TriangularMesh* mesh=reinterpret_castcapiView->mesh(); if (*capiView && *mesh) From 05ac0432bdbac584145b3724a88ae8e3bcacddc8 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 12:37:16 +0100 Subject: [PATCH 03/36] Update pdalc_forward.h --- source/pdal/pdalc_forward.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/pdal/pdalc_forward.h b/source/pdal/pdalc_forward.h index d946f12..89cae54 100644 --- a/source/pdal/pdalc_forward.h +++ b/source/pdal/pdalc_forward.h @@ -55,11 +55,11 @@ namespace pdal struct DimType; class PipelineExecutor; class PointView; -class TriangularMesh +class TriangularMesh; using PointViewPtr = std::shared_ptr; using DimTypeList = std::vector; -using MeshPtr = std::shared_ptr +using MeshPtr = std::shared_ptr; namespace capi { @@ -109,7 +109,7 @@ typedef void* PDALPointLayoutPtr; typedef void* PDALPointViewPtr; /// A pointer to a Mesh -typedef void* PDALMeshPtr +typedef void* PDALMeshPtr; /// A pointer to a point view iterator typedef void* PDALPointViewIteratorPtr; From 6c010d43124585900a8c3a87ad0cc0a45b2ed1eb Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 12:52:06 +0100 Subject: [PATCH 04/36] bug fixes --- csharp/PointView.cs | 12 +++++++++++- source/pdal/pdalc_pointview.cpp | 10 +++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/csharp/PointView.cs b/csharp/PointView.cs index 7552eb8..cf1754f 100644 --- a/csharp/PointView.cs +++ b/csharp/PointView.cs @@ -247,8 +247,18 @@ public BakedPointCloud GetBakedPointCloud(long size) { public DMesh3 getMesh() { + byte[] data = null; - } + if (this.meshSize > 0) + { + ulong byteCount = this.meshSize * 12; + data = new byte[byteCount]; + getAllTriangles(mNative, dims.Native, data); + + } + + return data; + } private double parseDouble(byte[] buffer, string interpretationName, int position) { double value = 0; diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 0c62234..4eb2622 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -210,18 +210,18 @@ extern "C" uint64_t PDALGetMeshSize(PDALPointViewPtr view) { pdal::capi::PointView* wrapper = reinterpret_cast(view); - pdal::TriangularMesh* mesh=reinterpret_castwrapper->mesh(); + pdal::capi::TriangularMesh* mesh=reinterpret_cast(wrapper->mesh()); return mesh && *mesh ? (uint64_t)(*mesh)->size() : 0; } - uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buf) + uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) { uint64_t size = 0; if (view && buf) { - pdal::capi::PointView *capiView = reinterpret_cast(view); - pdal::capi::TriangularMesh* mesh=reinterpret_castcapiView->mesh(); + pdal::capi::PointView* capiView = reinterpret_cast(view); + pdal::capi::TriangularMesh* mesh=reinterpret_cast(capiView->mesh()); if (*capiView && *mesh) @@ -229,7 +229,7 @@ extern "C" uint64_t size = 0; for (unsigned idx = 0; idx < (*mesh)->size(); ++idx) { - const Triangle& t = (*mesh)[idx]; + const Triangle& t = *mesh[idx]; uint32_t a = (uint32_t)t.m_a; std::memcpy(buff, &a, 4); uint32_t b = (uint32_t)t.m_b; From f9fe551750b9e14b99d51149906db4e850cf9d87 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 13:09:28 +0100 Subject: [PATCH 05/36] bug fixes --- csharp/PointView.cs | 6 +++++- source/pdal/pdalc_pointview.cpp | 12 ++++++------ tests/pdal/test_pdalc_pointview.c.in | 22 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/csharp/PointView.cs b/csharp/PointView.cs index cf1754f..23131eb 100644 --- a/csharp/PointView.cs +++ b/csharp/PointView.cs @@ -253,8 +253,12 @@ public DMesh3 getMesh() { ulong byteCount = this.meshSize * 12; data = new byte[byteCount]; - getAllTriangles(mNative, dims.Native, data); + szie = getAllTriangles(mNative, data); + List + for (long i=0; i < size; i++) + { + } } return data; diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 4eb2622..69ad76b 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -210,7 +210,7 @@ extern "C" uint64_t PDALGetMeshSize(PDALPointViewPtr view) { pdal::capi::PointView* wrapper = reinterpret_cast(view); - pdal::capi::TriangularMesh* mesh=reinterpret_cast(wrapper->mesh()); + pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); return mesh && *mesh ? (uint64_t)(*mesh)->size() : 0; } @@ -218,10 +218,10 @@ extern "C" { uint64_t size = 0; - if (view && buf) + if (view && buff) { pdal::capi::PointView* capiView = reinterpret_cast(view); - pdal::capi::TriangularMesh* mesh=reinterpret_cast(capiView->mesh()); + pdal::capi::TriangularMesh* mesh=reinterpret_cast((*capiView)->mesh()); if (*capiView && *mesh) @@ -229,7 +229,7 @@ extern "C" uint64_t size = 0; for (unsigned idx = 0; idx < (*mesh)->size(); ++idx) { - const Triangle& t = *mesh[idx]; + const Triangle& t = (*mesh)[idx]; uint32_t a = (uint32_t)t.m_a; std::memcpy(buff, &a, 4); uint32_t b = (uint32_t)t.m_b; @@ -237,8 +237,8 @@ extern "C" uint32_t c = (uint32_t)t.m_c; std::memcpy(buff + 8, &c, 4); - buf += 12; - size += pointSize; + buff += 12; + size += 12; } } } diff --git a/tests/pdal/test_pdalc_pointview.c.in b/tests/pdal/test_pdalc_pointview.c.in index 70ef40b..6c6b37c 100644 --- a/tests/pdal/test_pdalc_pointview.c.in +++ b/tests/pdal/test_pdalc_pointview.c.in @@ -170,6 +170,28 @@ TEST testPDALGetPointViewSize(void) PASS(); } +TEST testPDALGetMeshSize(void) +{ + ASSERT_EQ(0, PDALGetMeshSize(NULL)); + + PDALResetPointViewIterator(gPointViewIterator); + bool hasNext = PDALHasNextPointView(gPointViewIterator); + ASSERT(hasNext); + + PDALPointViewPtr view = PDALGetNextPointView(gPointViewIterator); + ASSERT(view); + + // Dispose view before assertion to avoid CWE-404 + // See http://cwe.mitre.org/data/definitions/404.html + // See https://scan4.coverity.com/doc/en/cov_checker_ref.html#static_checker_RESOURCE_LEAK + size_t size = PDALGetMeshSize(view); + PDALDisposePointView(view); + ASSERT(size == 0); + + + PASS(); +} + TEST testPDALIsPointViewEmpty(void) { ASSERT(PDALIsPointViewEmpty(NULL)); From d9577d8acd0b1c8880eca4dc95c2648e75142843 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 13:25:35 +0100 Subject: [PATCH 06/36] bug fix --- csharp/PointView.cs | 12 ++++++++---- source/pdal/pdalc_pointview.cpp | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/csharp/PointView.cs b/csharp/PointView.cs index 23131eb..07bc8b0 100644 --- a/csharp/PointView.cs +++ b/csharp/PointView.cs @@ -254,14 +254,18 @@ public DMesh3 getMesh() ulong byteCount = this.meshSize * 12; data = new byte[byteCount]; szie = getAllTriangles(mNative, data); - List - for (long i=0; i < size; i++) + List tris = new List(); + for (int i=0; i < size; i++) { + int position = i * 12; + tris.add(BitConverter.ToUInt32(data, position); + tris.add(BitConverter.ToUInt32(data, position + 4); + tris.add(BitConverter.ToUInt32(data, position + 8); + } - } } - return data; + return default } private double parseDouble(byte[] buffer, string interpretationName, int position) { diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 69ad76b..8dc1971 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -229,7 +229,7 @@ extern "C" uint64_t size = 0; for (unsigned idx = 0; idx < (*mesh)->size(); ++idx) { - const Triangle& t = (*mesh)[idx]; + const Triangle& t = (*(*mesh))[idx]; uint32_t a = (uint32_t)t.m_a; std::memcpy(buff, &a, 4); uint32_t b = (uint32_t)t.m_b; From 5e3a8ba305dd8ee30ab5e7c773177a8a10fde8c7 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 16:42:37 +0100 Subject: [PATCH 07/36] fixe size bug --- .gitignore | 5 ++- csharp/Config.cs | 58 +++++++-------------------- csharp/PointView.cs | 69 ++++++++++++++++++++++++--------- csharp/csharp.csproj | 10 +++++ source/pdal/pdalc_pointview.cpp | 8 ++-- source/pdal/pdalc_pointview.h | 4 +- 6 files changed, 83 insertions(+), 71 deletions(-) create mode 100644 csharp/csharp.csproj diff --git a/.gitignore b/.gitignore index 4b85f2e..1f83022 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ tests/pdal/test_pdalc_*.c .DS_Store # Build directory /build +bin/ +obj/ # Prerequisites *.d @@ -28,6 +30,7 @@ tests/pdal/test_pdalc_*.c *.o *.obj *.elf +*.sln # Linker output *.ilk @@ -72,4 +75,4 @@ Data/ Doxyfile *.tcl -Testing/ \ No newline at end of file +Testing/ diff --git a/csharp/Config.cs b/csharp/Config.cs index d151036..40ef05b 100644 --- a/csharp/Config.cs +++ b/csharp/Config.cs @@ -1,6 +1,7 @@ /****************************************************************************** * Copyright (c) 2019, Simverge Software LLC. All rights reserved. * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following * conditions are met: @@ -27,10 +28,9 @@ this list of conditions and the following disclaimer in the documentation * POSSIBILITY OF SUCH DAMAGE. *****************************************************************************/ -using System.IO; using System.Runtime.InteropServices; using System.Text; -using UnityEngine; +using System; namespace Pdal { @@ -39,19 +39,17 @@ public class PdalConfiguration public static void ConfigurePdal() { Config config = new Config(); - Debug.Log("GDAL Data Path: " + config.GdalData); - Debug.Log("Proj4 Data Path: " + config.Proj4Data); - - Debug.Log("PDAL Version Integer: " + config.VersionInteger); - Debug.Log("PDAL Version Major: " + config.VersionMajor); - Debug.Log("PDAL Version Minor: " + config.VersionMinor); - Debug.Log("PDAL Version Patch: " + config.VersionPatch); - - Debug.Log("PDAL Full Version: " + config.FullVersion); - Debug.Log("PDAL Version: " + config.Version); - Debug.Log("PDAL SHA1: " + config.Sha1); - Debug.Log("PDAL Debug Info: " + config.DebugInfo); - } + + Console.WriteLine("PDAL Version Integer: " + config.VersionInteger); + Console.WriteLine("PDAL Version Major: " + config.VersionMajor); + Console.WriteLine("PDAL Version Minor: " + config.VersionMinor); + Console.WriteLine("PDAL Version Patch: " + config.VersionPatch); + + Console.WriteLine("PDAL Full Version: " + config.FullVersion); + Console.WriteLine("PDAL Version: " + config.Version); + Console.WriteLine("PDAL SHA1: " + config.Sha1); + Console.WriteLine("PDAL Debug Info: " + config.DebugInfo); + } } /** @@ -109,39 +107,9 @@ public class Config */ public Config() { - //string cwd = Environment.CurrentDirectory; - string gdalPath = Application.streamingAssetsPath; - GdalData = Path.Combine(gdalPath, "gdal-data"); - Proj4Data = Path.Combine(gdalPath, "proj"); } - /// The path to the GDAL data directory - public string GdalData - { - get - { - StringBuilder buffer = new StringBuilder(256); - getGdalDataPath(buffer, (uint) buffer.Capacity); - return buffer.ToString(); - } - - set { setGdalDataPath(value); } - } - - /// The path to the proj4 data directory - public string Proj4Data - { - get - { - StringBuilder buffer = new StringBuilder(256); - getProj4DataPath(buffer, (uint) buffer.Capacity); - return buffer.ToString(); - } - - set { setProj4DataPath(value); } - } - /// The PDAL full version string with dot-separated major, minor, and patch version numbers and PDAL commit SHA1 public string FullVersion { diff --git a/csharp/PointView.cs b/csharp/PointView.cs index 07bc8b0..9a71146 100644 --- a/csharp/PointView.cs +++ b/csharp/PointView.cs @@ -82,15 +82,13 @@ public class PointView : IDisposable private IntPtr mNative = IntPtr.Zero; - [DllImport(PDALC_LIBRARY, EntryPoint = "PDALGetMeshViewSize")] + [DllImport(PDALC_LIBRARY, EntryPoint = "PDALGetMeshSize")] - private static extern ulong meshSize(IntPtr view); + private static extern uint meshSize(IntPtr view); [DllImport(PDALC_LIBRARY, EntryPoint = "PDALGetAllTriangles")] - private static extern ulong getAllTriangles(IntPtr view, [MarshalAs(UnmanagedType.LPArray)] byte[] buf); - - private IntPtr mNative = IntPtr.Zero; + private static extern uint getAllTriangles(IntPtr view, [MarshalAs(UnmanagedType.LPArray)] byte[] buf); public PointView(IntPtr nativeView) @@ -114,6 +112,11 @@ public ulong Size get { return size(mNative); } } + public uint MeshSize + { + get { return meshSize(mNative); } + } + public bool Empty { get { return empty(mNative); } @@ -191,6 +194,24 @@ public byte[] GetPackedPoint(DimTypeList dims, ulong idx) return data; } + public byte[] GetPackedMesh( out uint size) + { + byte[] data = null; + size = 0; + + Console.WriteLine($"native Size {meshSize(mNative)}"); + + if (meshSize(mNative) > 0) + { + ulong byteCount = meshSize(mNative) * 12; + Console.WriteLine($"bytecount Size {byteCount}"); + data = new byte[byteCount]; + size = getAllTriangles(mNative, data); + } + + return data; + } + public PointView Clone() { PointView clonedView = null; @@ -204,8 +225,8 @@ public PointView Clone() return clonedView; } - public BakedPointCloud GetBakedPointCloud(long size) { - BakedPointCloud pc = new BakedPointCloud(); + public BpcData GetBakedPointCloud(long size) { + BpcData pc; PointLayout layout = Layout; DimTypeList typelist = layout.Types; byte[] data = GetAllPackedPoints(typelist); @@ -241,31 +262,31 @@ public BakedPointCloud GetBakedPointCloud(long size) { )); } - pc.Initialize(positions, colors, (int)size); + pc.positions = positions; + pc.colors = colors; + pc.size = (int)size; return pc; } public DMesh3 getMesh() { - byte[] data = null; + ulong size; + byte[] data = GetPackedMesh(out size); - if (this.meshSize > 0) - { - ulong byteCount = this.meshSize * 12; - data = new byte[byteCount]; - szie = getAllTriangles(mNative, data); + if (size < 0 ) + { List tris = new List(); - for (int i=0; i < size; i++) + for (int i=0; i < (int)size; i++) { int position = i * 12; - tris.add(BitConverter.ToUInt32(data, position); - tris.add(BitConverter.ToUInt32(data, position + 4); - tris.add(BitConverter.ToUInt32(data, position + 8); + tris.Add(BitConverter.ToUInt32(data, position)); + tris.Add(BitConverter.ToUInt32(data, position + 4)); + tris.Add(BitConverter.ToUInt32(data, position + 8)); } } - return default + return default; } private double parseDouble(byte[] buffer, string interpretationName, int position) { @@ -297,5 +318,15 @@ private double parseDouble(byte[] buffer, string interpretationName, int positio private float parseColor(byte[] buffer, string interpretationName, int position) { return (float) parseDouble(buffer, interpretationName, position) / 256; } + } + + /// + /// Data needed to use the PC data (BPC == Baked Point Cloud) + /// + public struct BpcData + { + public IEnumerable positions; + public IEnumerable colors; + public int size; } } \ No newline at end of file diff --git a/csharp/csharp.csproj b/csharp/csharp.csproj new file mode 100644 index 0000000..4ebef52 --- /dev/null +++ b/csharp/csharp.csproj @@ -0,0 +1,10 @@ + + + + netstandard2.1 + + + + + + diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 8dc1971..12a4756 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -207,16 +207,16 @@ extern "C" return size; } - uint64_t PDALGetMeshSize(PDALPointViewPtr view) + size_t PDALGetMeshSize(PDALPointViewPtr view) { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); return mesh && *mesh ? (uint64_t)(*mesh)->size() : 0; } - uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) + size_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) { - uint64_t size = 0; + size_t size = 0; if (view && buff) { @@ -229,7 +229,7 @@ extern "C" uint64_t size = 0; for (unsigned idx = 0; idx < (*mesh)->size(); ++idx) { - const Triangle& t = (*(*mesh))[idx]; + const Triangle& t = (*mesh).get()[idx]; uint32_t a = (uint32_t)t.m_a; std::memcpy(buff, &a, 4); uint32_t b = (uint32_t)t.m_b; diff --git a/source/pdal/pdalc_pointview.h b/source/pdal/pdalc_pointview.h index bda1ba8..a0a3db5 100644 --- a/source/pdal/pdalc_pointview.h +++ b/source/pdal/pdalc_pointview.h @@ -175,7 +175,7 @@ PDALC_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeList * @param view The point view * @return The number of triangles or zero if there is no mesh. */ -PDALC_API uint64_t PDALGetMeshSize(PDALPointViewPtr view); +PDALC_API size_t PDALGetMeshSize(PDALPointViewPtr view); /** * Retrieves the triangles from the PointView. @@ -193,7 +193,7 @@ PDALC_API uint64_t PDALGetMeshSize(PDALPointViewPtr view); * @return The size of the triangles stored in `buf` * or zero if `view` is NULL, or `buf` is NULL */ -PDALC_API uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buffer); +PDALC_API size_t PDALGetAllTriangles(PDALPointViewPtr view, char *buffer); #ifdef __cplusplus } From 90ae015da4ed44b8730f86693bf2b3c2e339427a Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 16:54:28 +0100 Subject: [PATCH 08/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 12a4756..420ac6d 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -226,8 +226,7 @@ extern "C" if (*capiView && *mesh) { - uint64_t size = 0; - for (unsigned idx = 0; idx < (*mesh)->size(); ++idx) + for (size_t idx = 0; idx < (*mesh)->size(); ++idx) { const Triangle& t = (*mesh).get()[idx]; uint32_t a = (uint32_t)t.m_a; From 6baeb77f09d6a55c546b525b25823181c39e9736 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 16:56:06 +0100 Subject: [PATCH 09/36] mesh twiddle --- source/pdal/pdalc_pointview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 420ac6d..9f49e3d 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -228,7 +228,7 @@ extern "C" { for (size_t idx = 0; idx < (*mesh)->size(); ++idx) { - const Triangle& t = (*mesh).get()[idx]; + const Triangle& t = (*(*mesh))[idx]; uint32_t a = (uint32_t)t.m_a; std::memcpy(buff, &a, 4); uint32_t b = (uint32_t)t.m_b; From dd9a246a9739f8f28167be89fe540c76111726ef Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 16:57:46 +0100 Subject: [PATCH 10/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 9f49e3d..c0d4452 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -211,7 +211,7 @@ extern "C" { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); - return mesh && *mesh ? (uint64_t)(*mesh)->size() : 0; + return mesh && *mesh ? (*mesh)->size() : 0; } size_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) From 194f2cb2c341d8c72ed2782fe6608050b9f5c0e7 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 17:48:52 +0100 Subject: [PATCH 11/36] Debug --- csharp/PointView.cs | 2 +- source/pdal/pdalc_pointview.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/csharp/PointView.cs b/csharp/PointView.cs index 9a71146..054f1fe 100644 --- a/csharp/PointView.cs +++ b/csharp/PointView.cs @@ -270,7 +270,7 @@ public BpcData GetBakedPointCloud(long size) { public DMesh3 getMesh() { - ulong size; + uint size; byte[] data = GetPackedMesh(out size); if (size < 0 ) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index c0d4452..24e6e56 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -211,6 +211,7 @@ extern "C" { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); + std::cout << " Mesh Size : " << std::to_string((*mesh)->size()) return mesh && *mesh ? (*mesh)->size() : 0; } From 6463dd52cac00fa649ec74a007f4fa958f77086f Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 18:41:39 +0100 Subject: [PATCH 12/36] debug --- source/pdal/pdalc_pointview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 24e6e56..7313524 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -211,7 +211,7 @@ extern "C" { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); - std::cout << " Mesh Size : " << std::to_string((*mesh)->size()) + std::cout << " Mesh Size : " << std::to_string((*mesh)->size()); return mesh && *mesh ? (*mesh)->size() : 0; } From 19597806e1a18764487b90f037b040bbd0d17861 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 19:11:26 +0100 Subject: [PATCH 13/36] debug --- source/pdal/pdalc_pointview.cpp | 9 ++++----- source/pdal/pdalc_pointview.h | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 7313524..f75ebba 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -207,15 +207,14 @@ extern "C" return size; } - size_t PDALGetMeshSize(PDALPointViewPtr view) + uint32_t PDALGetMeshSize(PDALPointViewPtr view) { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); - std::cout << " Mesh Size : " << std::to_string((*mesh)->size()); - return mesh && *mesh ? (*mesh)->size() : 0; + return mesh && *mesh ? (uint32_t)(*mesh)->size() : 0; } - size_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) + uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) { size_t size = 0; @@ -243,7 +242,7 @@ extern "C" } } - return size; + return (uint32_t)size; } } diff --git a/source/pdal/pdalc_pointview.h b/source/pdal/pdalc_pointview.h index a0a3db5..f73f45b 100644 --- a/source/pdal/pdalc_pointview.h +++ b/source/pdal/pdalc_pointview.h @@ -175,7 +175,7 @@ PDALC_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeList * @param view The point view * @return The number of triangles or zero if there is no mesh. */ -PDALC_API size_t PDALGetMeshSize(PDALPointViewPtr view); +PDALC_API uint32_t PDALGetMeshSize(PDALPointViewPtr view); /** * Retrieves the triangles from the PointView. @@ -193,7 +193,7 @@ PDALC_API size_t PDALGetMeshSize(PDALPointViewPtr view); * @return The size of the triangles stored in `buf` * or zero if `view` is NULL, or `buf` is NULL */ -PDALC_API size_t PDALGetAllTriangles(PDALPointViewPtr view, char *buffer); +PDALC_API uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buffer); #ifdef __cplusplus } From ce8e747352ed3d7e7aaa11629d4df0c574efbcb3 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 19:27:45 +0100 Subject: [PATCH 14/36] static cast --- csharp/PointView.cs | 4 ++-- source/pdal/pdalc_pointview.cpp | 4 ++-- source/pdal/pdalc_pointview.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/csharp/PointView.cs b/csharp/PointView.cs index 054f1fe..39f28a0 100644 --- a/csharp/PointView.cs +++ b/csharp/PointView.cs @@ -84,7 +84,7 @@ public class PointView : IDisposable [DllImport(PDALC_LIBRARY, EntryPoint = "PDALGetMeshSize")] - private static extern uint meshSize(IntPtr view); + private static extern ulong meshSize(IntPtr view); [DllImport(PDALC_LIBRARY, EntryPoint = "PDALGetAllTriangles")] @@ -112,7 +112,7 @@ public ulong Size get { return size(mNative); } } - public uint MeshSize + public ulong MeshSize { get { return meshSize(mNative); } } diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index f75ebba..fe7cefe 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -207,11 +207,11 @@ extern "C" return size; } - uint32_t PDALGetMeshSize(PDALPointViewPtr view) + uint64_t PDALGetMeshSize(PDALPointViewPtr view) { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); - return mesh && *mesh ? (uint32_t)(*mesh)->size() : 0; + return mesh && *mesh ? static_cast((*mesh)->size()) : 0; } uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) diff --git a/source/pdal/pdalc_pointview.h b/source/pdal/pdalc_pointview.h index f73f45b..8b088c0 100644 --- a/source/pdal/pdalc_pointview.h +++ b/source/pdal/pdalc_pointview.h @@ -175,7 +175,7 @@ PDALC_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeList * @param view The point view * @return The number of triangles or zero if there is no mesh. */ -PDALC_API uint32_t PDALGetMeshSize(PDALPointViewPtr view); +PDALC_API uint64_t PDALGetMeshSize(PDALPointViewPtr view); /** * Retrieves the triangles from the PointView. From bef36192c98e9ddabd3bce2b45e57589f4e05bbc Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 19:50:42 +0100 Subject: [PATCH 15/36] debug --- source/pdal/pdalc_pointview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index fe7cefe..115b3fb 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -211,7 +211,7 @@ extern "C" { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); - return mesh && *mesh ? static_cast((*mesh)->size()) : 0; + return static_cast(101); } uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) From 861b663df30098c0d8340ae820a8439207ffe17c Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 20:05:18 +0100 Subject: [PATCH 16/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 115b3fb..40246f9 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -211,7 +211,7 @@ extern "C" { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); - return static_cast(101); + return mesh && *mesh ? static_cast((*(*mesh)).size()) : 101; } uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) From e8ac9b93cf0d7de37b9d1041d5b9c2f8ef7b19b2 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 20:33:26 +0100 Subject: [PATCH 17/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 40246f9..2978382 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -211,7 +211,11 @@ extern "C" { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); - return mesh && *mesh ? static_cast((*(*mesh)).size()) : 101; + uint64_t idx = 0; + for (size_t i = 0; i < (*(*mesh)).size(), ++i) { + ++idx + } + return mesh && *mesh ? idx : static_cast(101); } uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) From 2c2bec87a747af741b01af65a89b7bb6d2c502fb Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 20:42:17 +0100 Subject: [PATCH 18/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 2978382..996b521 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -212,7 +212,7 @@ extern "C" pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); uint64_t idx = 0; - for (size_t i = 0; i < (*(*mesh)).size(), ++i) { + for (size_t i = 0; i < (*(*mesh)).size(); ++i) { ++idx } return mesh && *mesh ? idx : static_cast(101); From 6393dcc256778b21a1341cd3149ae682d5187270 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 20:51:28 +0100 Subject: [PATCH 19/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 996b521..a18fb54 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -213,7 +213,7 @@ extern "C" pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); uint64_t idx = 0; for (size_t i = 0; i < (*(*mesh)).size(); ++i) { - ++idx + ++idx; } return mesh && *mesh ? idx : static_cast(101); } From 77743ca203d77cb4a96d9928dda8aa9ea4536029 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 21:11:03 +0100 Subject: [PATCH 20/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index a18fb54..5b4aed7 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -210,12 +210,12 @@ extern "C" uint64_t PDALGetMeshSize(PDALPointViewPtr view) { pdal::capi::PointView* wrapper = reinterpret_cast(view); - pdal::capi::TriangularMesh* mesh=reinterpret_cast((*wrapper)->mesh()); + pdal::TriangularMesh* mesh=(*wrapper)->mesh(); uint64_t idx = 0; - for (size_t i = 0; i < (*(*mesh)).size(); ++i) { + for (size_t i = 0; i < (*mesh).size(); ++i) { ++idx; } - return mesh && *mesh ? idx : static_cast(101); + return mesh ? idx : static_cast(101); } uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) From 45faefa1c43def66124188d7fb311f97d16607ca Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 21:29:36 +0100 Subject: [PATCH 21/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 5b4aed7..35c3e2e 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -211,28 +211,25 @@ extern "C" { pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::TriangularMesh* mesh=(*wrapper)->mesh(); - uint64_t idx = 0; - for (size_t i = 0; i < (*mesh).size(); ++i) { - ++idx; - } - return mesh ? idx : static_cast(101); + + return mesh ? static_cast( (*mesh).size()) : 0; } - uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) + uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) { size_t size = 0; if (view && buff) { pdal::capi::PointView* capiView = reinterpret_cast(view); - pdal::capi::TriangularMesh* mesh=reinterpret_cast((*capiView)->mesh()); + pdal::TriangularMesh* mesh=(*capiView)->mesh(); - if (*capiView && *mesh) + if (*capiView && mesh) { for (size_t idx = 0; idx < (*mesh)->size(); ++idx) { - const Triangle& t = (*(*mesh))[idx]; + const Triangle& t = (*mesh)[idx]; uint32_t a = (uint32_t)t.m_a; std::memcpy(buff, &a, 4); uint32_t b = (uint32_t)t.m_b; @@ -246,7 +243,7 @@ extern "C" } } - return (uint32_t)size; + return static_cast(size); } } From 075738d42df00f27d43cca9c2279fb96c4d66dde Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 21:39:50 +0100 Subject: [PATCH 22/36] bug fixes --- source/pdal/pdalc_pointview.cpp | 2 +- source/pdal/pdalc_pointview.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 35c3e2e..473d416 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -227,7 +227,7 @@ extern "C" if (*capiView && mesh) { - for (size_t idx = 0; idx < (*mesh)->size(); ++idx) + for (size_t idx = 0; idx < (*mesh).size(); ++idx) { const Triangle& t = (*mesh)[idx]; uint32_t a = (uint32_t)t.m_a; diff --git a/source/pdal/pdalc_pointview.h b/source/pdal/pdalc_pointview.h index 8b088c0..bda1ba8 100644 --- a/source/pdal/pdalc_pointview.h +++ b/source/pdal/pdalc_pointview.h @@ -193,7 +193,7 @@ PDALC_API uint64_t PDALGetMeshSize(PDALPointViewPtr view); * @return The size of the triangles stored in `buf` * or zero if `view` is NULL, or `buf` is NULL */ -PDALC_API uint32_t PDALGetAllTriangles(PDALPointViewPtr view, char *buffer); +PDALC_API uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buffer); #ifdef __cplusplus } From 774a4aa123ff963e673d1e2925bda8cef9709da4 Mon Sep 17 00:00:00 2001 From: runette Date: Thu, 29 Apr 2021 23:59:59 +0100 Subject: [PATCH 23/36] Everything working --- csharp/PointView.cs | 66 ++++++++++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 27 deletions(-) diff --git a/csharp/PointView.cs b/csharp/PointView.cs index 39f28a0..03953b3 100644 --- a/csharp/PointView.cs +++ b/csharp/PointView.cs @@ -32,6 +32,7 @@ this list of conditions and the following disclaimer in the documentation using System.Text; using g3; using System.Collections.Generic; +using System.Linq; namespace Pdal { @@ -88,7 +89,7 @@ public class PointView : IDisposable [DllImport(PDALC_LIBRARY, EntryPoint = "PDALGetAllTriangles")] - private static extern uint getAllTriangles(IntPtr view, [MarshalAs(UnmanagedType.LPArray)] byte[] buf); + private static extern ulong getAllTriangles(IntPtr view, [MarshalAs(UnmanagedType.LPArray)] byte[] buf); public PointView(IntPtr nativeView) @@ -167,15 +168,16 @@ public PointLayout Layout } } - public byte[] GetAllPackedPoints(DimTypeList dims) + public byte[] GetAllPackedPoints(DimTypeList dims, out ulong size) { byte[] data = null; + size = 0; if (this.Size > 0 && dims != null && dims.Size > 0) { ulong byteCount = this.Size * dims.ByteCount; data = new byte[byteCount]; - getAllPackedPoints(mNative, dims.Native, data); + size = getAllPackedPoints(mNative, dims.Native, data); } return data; @@ -194,17 +196,14 @@ public byte[] GetPackedPoint(DimTypeList dims, ulong idx) return data; } - public byte[] GetPackedMesh( out uint size) + public byte[] GetPackedMesh( out ulong size) { byte[] data = null; size = 0; - Console.WriteLine($"native Size {meshSize(mNative)}"); - if (meshSize(mNative) > 0) { ulong byteCount = meshSize(mNative) * 12; - Console.WriteLine($"bytecount Size {byteCount}"); data = new byte[byteCount]; size = getAllTriangles(mNative, data); } @@ -225,11 +224,12 @@ public PointView Clone() return clonedView; } - public BpcData GetBakedPointCloud(long size) { + public BpcData GetBakedPointCloud() { BpcData pc; + ulong size; PointLayout layout = Layout; DimTypeList typelist = layout.Types; - byte[] data = GetAllPackedPoints(typelist); + byte[] data = GetAllPackedPoints(typelist, out size); List positions = new List(); List colors = new List(); @@ -250,15 +250,15 @@ public BpcData GetBakedPointCloud(long size) { count += interpretationByteCount; } - for (long i = 0; i < size; i++) { - positions.Add( new Vector3d(parseDouble(data, types["X"], (int) (i * pointSize + indexs["X"])), - parseDouble(data, types["Y"], (int) (i * pointSize + indexs["Y"])), - parseDouble(data, types["Z"], (int) (i * pointSize + indexs["Z"])) + for (long i = 0; i < (long)size; i += pointSize) { + positions.Add( new Vector3d(parseDouble(data, types["X"], (int) (i + indexs["X"])), + parseDouble(data, types["Y"], (int) (i + indexs["Y"])), + parseDouble(data, types["Z"], (int) (i + indexs["Z"])) )); if (hasColor) - colors.Add(new Vector3f((float) parseColor(data, types["Red"], (int) (i * pointSize + indexs["Red"])), - (float) parseColor(data, types["Green"], (int) (i * pointSize + indexs["Green"])), - (float) parseColor(data, types["Blue"], (int) (i * pointSize + indexs["Blue"])) + colors.Add(new Vector3f((float) parseColor(data, types["Red"], (int) (i + indexs["Red"])), + (float) parseColor(data, types["Green"], (int) (i + indexs["Green"])), + (float) parseColor(data, types["Blue"], (int) (i + indexs["Blue"])) )); } @@ -270,23 +270,35 @@ public BpcData GetBakedPointCloud(long size) { public DMesh3 getMesh() { - uint size; + BpcData pc = GetBakedPointCloud(); + + ulong size; byte[] data = GetPackedMesh(out size); + Console.WriteLine($"Rawmesh size: {size}"); - if (size < 0 ) - { - List tris = new List(); - for (int i=0; i < (int)size; i++) - { - int position = i * 12; - tris.Add(BitConverter.ToUInt32(data, position)); - tris.Add(BitConverter.ToUInt32(data, position + 4)); - tris.Add(BitConverter.ToUInt32(data, position + 8)); + List tris = new List(); + + if (size > 0) + { + for (int position = 0; position < (int)size; position += 12) + { + tris.Add((int)BitConverter.ToUInt32(data, position)); + tris.Add((int)BitConverter.ToUInt32(data, position + 4)); + tris.Add((int)BitConverter.ToUInt32(data, position + 8)); } } - return default; + DMesh3 dmesh = DMesh3Builder.Build(pc.positions, tris); + if (pc.colors.Count() > 0) + { + dmesh.EnableVertexColors(new Vector3f()); + foreach (int idx in dmesh.VertexIndices()) + { + dmesh.SetVertexColor(idx, pc.colors.ElementAt(idx)); + } + } + return dmesh; } private double parseDouble(byte[] buffer, string interpretationName, int position) { From 7da35020da35d42fe0559648ae01b56135116b20 Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 07:10:22 +0100 Subject: [PATCH 24/36] astyle changes --- source/pdal/pdalc_pointview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 473d416..ba2f805 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -212,7 +212,7 @@ extern "C" pdal::capi::PointView* wrapper = reinterpret_cast(view); pdal::TriangularMesh* mesh=(*wrapper)->mesh(); - return mesh ? static_cast( (*mesh).size()) : 0; + return mesh ? static_cast((*mesh).size()) : 0; } uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) From 6f955f63624aebe5592f3836ce7a28d1f4c70a84 Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 07:13:10 +0100 Subject: [PATCH 25/36] updates to actions --- .github/workflows/linux_test.yml | 2 +- .github/workflows/osx_test.yml | 2 +- .github/workflows/windows_test.yml | 2 +- .gitignore | 5 ++++- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux_test.yml b/.github/workflows/linux_test.yml index 2507049..05be04c 100644 --- a/.github/workflows/linux_test.yml +++ b/.github/workflows/linux_test.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Install Conda - uses: conda-incubator/setup-miniconda@v1.7.0 + uses: conda-incubator/setup-miniconda@v2 - name: Install PDAL shell: bash -l {0} diff --git a/.github/workflows/osx_test.yml b/.github/workflows/osx_test.yml index b4f6cdb..d367c6a 100644 --- a/.github/workflows/osx_test.yml +++ b/.github/workflows/osx_test.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Install Conda - uses: conda-incubator/setup-miniconda@v1.7.0 + uses: conda-incubator/setup-miniconda@v2 - name: Install PDAL shell: bash -l {0} diff --git a/.github/workflows/windows_test.yml b/.github/workflows/windows_test.yml index 35dc99d..581886d 100644 --- a/.github/workflows/windows_test.yml +++ b/.github/workflows/windows_test.yml @@ -11,7 +11,7 @@ jobs: uses: actions/checkout@v2 - name: Install Conda - uses: conda-incubator/setup-miniconda@v1.7.0 + uses: conda-incubator/setup-miniconda@v2 - name: Install PDAL shell: pwsh diff --git a/.gitignore b/.gitignore index 4b85f2e..f359ea6 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,9 @@ tests/pdal/test_pdalc_*.c *.o *.obj *.elf +*.sln +bin/ +obj/ # Linker output *.ilk @@ -72,4 +75,4 @@ Data/ Doxyfile *.tcl -Testing/ \ No newline at end of file +Testing/ From cd2272b403aecfee01e74d98e367667cd3a0078f Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 30 Apr 2021 06:24:34 +0000 Subject: [PATCH 26/36] Automatic Documentation Update --- docs/doxygen/html/_r_e_a_d_m_e_8md.html | 10 +- docs/doxygen/html/annotated.html | 10 +- docs/doxygen/html/classes.html | 27 ++--- .../dir_a542be5b8e919f24a4504a2b5a97aa0f.html | 10 +- docs/doxygen/html/doxygen.css | 107 ++++++++++++++---- docs/doxygen/html/files.html | 10 +- docs/doxygen/html/functions.html | 10 +- docs/doxygen/html/functions_vars.html | 10 +- docs/doxygen/html/globals.html | 10 +- docs/doxygen/html/globals_func.html | 10 +- docs/doxygen/html/globals_type.html | 10 +- docs/doxygen/html/index.html | 52 +++++++-- docs/doxygen/html/navtreedata.js | 14 ++- docs/doxygen/html/navtreeindex0.js | 9 ++ docs/doxygen/html/pdalc_8h.html | 10 +- docs/doxygen/html/pdalc_8h_source.html | 22 ++-- docs/doxygen/html/pdalc__config_8h.html | 10 +- .../doxygen/html/pdalc__config_8h_source.html | 35 +++--- docs/doxygen/html/pdalc__defines_8h.html | 10 +- .../html/pdalc__defines_8h_source.html | 16 +-- docs/doxygen/html/pdalc__dimtype_8h.html | 10 +- .../html/pdalc__dimtype_8h_source.html | 27 +++-- docs/doxygen/html/pdalc__forward_8h.html | 10 +- .../html/pdalc__forward_8h_source.html | 30 ++--- docs/doxygen/html/pdalc__pipeline_8h.html | 10 +- .../html/pdalc__pipeline_8h_source.html | 32 +++--- docs/doxygen/html/pdalc__pointlayout_8h.html | 10 +- .../html/pdalc__pointlayout_8h_source.html | 21 ++-- docs/doxygen/html/pdalc__pointview_8h.html | 10 +- .../html/pdalc__pointview_8h_source.html | 33 +++--- .../html/pdalc__pointviewiterator_8h.html | 10 +- .../pdalc__pointviewiterator_8h_source.html | 20 ++-- docs/doxygen/html/search/all_0.html | 13 ++- docs/doxygen/html/search/all_1.html | 13 ++- docs/doxygen/html/search/all_2.html | 13 ++- docs/doxygen/html/search/all_3.html | 13 ++- docs/doxygen/html/search/all_4.html | 13 ++- docs/doxygen/html/search/all_5.html | 13 ++- docs/doxygen/html/search/classes_0.html | 13 ++- docs/doxygen/html/search/files_0.html | 13 ++- docs/doxygen/html/search/files_1.html | 13 ++- docs/doxygen/html/search/functions_0.html | 13 ++- docs/doxygen/html/search/nomatches.html | 3 +- docs/doxygen/html/search/pages_0.html | 13 ++- docs/doxygen/html/search/search.css | 4 +- docs/doxygen/html/search/search.js | 12 +- docs/doxygen/html/search/typedefs_0.html | 13 ++- docs/doxygen/html/search/variables_0.html | 13 ++- docs/doxygen/html/search/variables_1.html | 13 ++- docs/doxygen/html/search/variables_2.html | 13 ++- docs/doxygen/html/search/variables_3.html | 13 ++- .../doxygen/html/struct_p_d_a_l_dim_type.html | 10 +- 52 files changed, 497 insertions(+), 365 deletions(-) diff --git a/docs/doxygen/html/_r_e_a_d_m_e_8md.html b/docs/doxygen/html/_r_e_a_d_m_e_8md.html index fecebc1..b6668dd 100644 --- a/docs/doxygen/html/_r_e_a_d_m_e_8md.html +++ b/docs/doxygen/html/_r_e_a_d_m_e_8md.html @@ -3,7 +3,7 @@ - + pdal-c: /github/workspace/README.md File Reference @@ -26,7 +26,7 @@
pdal-c -  v2.0.0 +  2.1.1
C API for PDAL
@@ -35,10 +35,10 @@ - + @@ -93,7 +93,7 @@ diff --git a/docs/doxygen/html/annotated.html b/docs/doxygen/html/annotated.html index 9903c36..830589a 100644 --- a/docs/doxygen/html/annotated.html +++ b/docs/doxygen/html/annotated.html @@ -3,7 +3,7 @@ - + pdal-c: Data Structures @@ -26,7 +26,7 @@
pdal-c -  v2.0.0 +  2.1.1
C API for PDAL
@@ -35,10 +35,10 @@ - + @@ -97,7 +97,7 @@ diff --git a/docs/doxygen/html/classes.html b/docs/doxygen/html/classes.html index 5b93440..9d7320e 100644 --- a/docs/doxygen/html/classes.html +++ b/docs/doxygen/html/classes.html @@ -3,7 +3,7 @@ - + pdal-c: Data Structure Index @@ -26,7 +26,7 @@
pdal-c -  v2.0.0 +  2.1.1
C API for PDAL
@@ -35,10 +35,10 @@ - + @@ -87,23 +87,18 @@
Data Structure Index
- - - - - - - - -
  p  
-
PDALDimType   
- + +
+
+
P
+
PDALDimType
+
diff --git a/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html b/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html index 49dd1ad..d6a4011 100644 --- a/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html +++ b/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html @@ -3,7 +3,7 @@ - + pdal-c: pdal Directory Reference @@ -26,7 +26,7 @@
pdal-c -  v2.0.0 +  2.1.1
C API for PDAL
@@ -35,10 +35,10 @@ - + @@ -122,7 +122,7 @@ diff --git a/docs/doxygen/html/doxygen.css b/docs/doxygen/html/doxygen.css index f640966..ffbff02 100644 --- a/docs/doxygen/html/doxygen.css +++ b/docs/doxygen/html/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.8.20 */ +/* The standard CSS for doxygen 1.9.1 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; @@ -103,30 +103,96 @@ caption { } span.legend { - font-size: 70%; - text-align: center; + font-size: 70%; + text-align: center; } h3.version { - font-size: 90%; - text-align: center; + font-size: 90%; + text-align: center; } -div.qindex, div.navtab{ - background-color: #EBEFF6; - border: 1px solid #A3B4D7; - text-align: center; +div.navtab { + border-right: 1px solid #A3B4D7; + padding-right: 15px; + text-align: right; + line-height: 110%; +} + +div.navtab table { + border-spacing: 0; +} + +td.navtab { + padding-right: 6px; + padding-left: 6px; +} +td.navtabHL { + background-image: url('tab_a.png'); + background-repeat:repeat-x; + padding-right: 6px; + padding-left: 6px; +} + +td.navtabHL a, td.navtabHL a:visited { + color: #fff; + text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); +} + +a.navtab { + font-weight: bold; } -div.qindex, div.navpath { +div.qindex{ + text-align: center; width: 100%; line-height: 140%; + font-size: 130%; + color: #A0A0A0; } -div.navtab { - margin-right: 15px; +dt.alphachar{ + font-size: 180%; + font-weight: bold; +} + +.alphachar a{ + color: black; +} + +.alphachar a:hover, .alphachar a:visited{ + text-decoration: none; } +.classindex dl { + padding: 25px; + column-count:1 +} + +.classindex dd { + display:inline-block; + margin-left: 50px; + width: 90%; + line-height: 1.15em; +} + +.classindex dl.odd { + background-color: #F8F9FC; +} + +@media(min-width: 1120px) { + .classindex dl { + column-count:2 + } +} + +@media(min-width: 1320px) { + .classindex dl { + column-count:3 + } +} + + /* @group Link Styling */ a { @@ -143,17 +209,6 @@ a:hover { text-decoration: underline; } -a.qindex { - font-weight: bold; -} - -a.qindexHL { - font-weight: bold; - background-color: #9CAFD4; - color: #FFFFFF; - border: 1px double #869DCA; -} - .contents a.qindexHL:visited { color: #FFFFFF; } @@ -1426,6 +1481,12 @@ div.toc li.level4 { margin-left: 45px; } +span.emoji { + /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html + * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; + */ +} + .PageDocRTL-title div.toc li.level1 { margin-left: 0 !important; margin-right: 0; diff --git a/docs/doxygen/html/files.html b/docs/doxygen/html/files.html index 6677ae5..511b32f 100644 --- a/docs/doxygen/html/files.html +++ b/docs/doxygen/html/files.html @@ -3,7 +3,7 @@ - + pdal-c: File List @@ -26,7 +26,7 @@
pdal-c -  v2.0.0 +  2.1.1
C API for PDAL
@@ -35,10 +35,10 @@ - + @@ -106,7 +106,7 @@ diff --git a/docs/doxygen/html/functions.html b/docs/doxygen/html/functions.html index 146b6c6..02b21dc 100644 --- a/docs/doxygen/html/functions.html +++ b/docs/doxygen/html/functions.html @@ -3,7 +3,7 @@ - + pdal-c: Data Fields @@ -26,7 +26,7 @@
pdal-c -  v2.0.0 +  2.1.1
C API for PDAL
@@ -35,10 +35,10 @@ - + @@ -102,7 +102,7 @@ diff --git a/docs/doxygen/html/functions_vars.html b/docs/doxygen/html/functions_vars.html index b71877c..877d5e7 100644 --- a/docs/doxygen/html/functions_vars.html +++ b/docs/doxygen/html/functions_vars.html @@ -3,7 +3,7 @@ - + pdal-c: Data Fields - Variables @@ -26,7 +26,7 @@
pdal-c -  v2.0.0 +  2.1.1
C API for PDAL
@@ -35,10 +35,10 @@ - + @@ -102,7 +102,7 @@ diff --git a/docs/doxygen/html/globals.html b/docs/doxygen/html/globals.html index 72e3bf2..bc10c48 100644 --- a/docs/doxygen/html/globals.html +++ b/docs/doxygen/html/globals.html @@ -3,7 +3,7 @@ - + pdal-c: Globals @@ -26,7 +26,7 @@
pdal-c -  v2.0.0 +  2.1.1
C API for PDAL
@@ -35,10 +35,10 @@ - + @@ -263,7 +263,7 @@

- p -

    diff --git a/docs/doxygen/html/globals_func.html b/docs/doxygen/html/globals_func.html index c44e520..84689cd 100644 --- a/docs/doxygen/html/globals_func.html +++ b/docs/doxygen/html/globals_func.html @@ -3,7 +3,7 @@ - + pdal-c: Globals @@ -26,7 +26,7 @@
    pdal-c -  v2.0.0 +  2.1.1
    C API for PDAL
    @@ -35,10 +35,10 @@ - + @@ -245,7 +245,7 @@

    - p -

      diff --git a/docs/doxygen/html/globals_type.html b/docs/doxygen/html/globals_type.html index d67724d..5fc7ff9 100644 --- a/docs/doxygen/html/globals_type.html +++ b/docs/doxygen/html/globals_type.html @@ -3,7 +3,7 @@ - + pdal-c: Globals @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -108,7 +108,7 @@ diff --git a/docs/doxygen/html/index.html b/docs/doxygen/html/index.html index b5c020e..96d4a46 100644 --- a/docs/doxygen/html/index.html +++ b/docs/doxygen/html/index.html @@ -3,7 +3,7 @@ - + pdal-c: pdal-c: PDAL C API @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -89,15 +89,53 @@

      )

      -

      pdal-c is a C API for the Point Data Abstraction Library (PDAL) and is compatible with PDAL 1.7 and later.

      -

      pdal-c is released under the BSD 3-clause license.

      +

      +Basics

      +

      pdal-c is a C API for the Point Data Abstraction Library (PDAL) and is compatible with PDAL 1.7 and later.

      +

      pdal-c is released under the BSD 3-clause license.

      +

      +Documentation

      +

      API Documentation

      +

      +Installation

      +

      The library can be installed as a package on Windows, Mac and Linux using Conda.

      +
      conda install -c conda-forge pdal-c
      +

      The conda package includes a tool called test_pdalc. Run this to confirm that the API configuration is correct and to report on the version of PDAL that the API is connected to.

      +

      +Dependencies

      +

      The library is dependent on PDAL and has currently been tested up to v2.2.0.

      +

      +Usage

      +

      An example of the use of the API is given in the csharp folder which contains an integration to PDAL in C#.

      +

      NOTE - these scripts are provided for information only as examples and are not supported in any way!

      +

      +For Developers

      +

      +Build on Windows

      +

      The library can be built on Windows using the following command - which assumes that you are in a conda environment that has the conda-forge pdal package loaded:

      +
      cd CAPI
      +
      make.bat
      +

      +Build on Linux and Mac

      +

      The library can be built on Linux and Mac using the following command - which assumes that you are in a conda environment that has the conda-forge pdal package loaded:

      +
      cd CAPI
      +
      cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCONDA_BUILD=OFF .
      +
      make
      +
      make install
      +

      +Code Style

      +

      This project enforces the PDAL code styles, which can checked as follows :

      +
        +
      • On Windows - as per astylerc
      • +
      • On Linux by running ./check_all.bash
      • +
      diff --git a/docs/doxygen/html/navtreedata.js b/docs/doxygen/html/navtreedata.js index 50ae779..22e8a9e 100644 --- a/docs/doxygen/html/navtreedata.js +++ b/docs/doxygen/html/navtreedata.js @@ -25,7 +25,19 @@ var NAVTREE = [ [ "pdal-c", "index.html", [ - [ "pdal-c: PDAL C API", "index.html", null ], + [ "pdal-c: PDAL C API", "index.html", [ + [ "Basics", "index.html#autotoc_md0", null ], + [ "Documentation", "index.html#autotoc_md1", null ], + [ "Installation", "index.html#autotoc_md2", [ + [ "Dependencies", "index.html#autotoc_md3", null ] + ] ], + [ "Usage", "index.html#autotoc_md4", null ], + [ "For Developers", "index.html#autotoc_md5", [ + [ "Build on Windows", "index.html#autotoc_md6", null ], + [ "Build on Linux and Mac", "index.html#autotoc_md7", null ], + [ "Code Style", "index.html#autotoc_md8", null ] + ] ] + ] ], [ "Data Structures", "annotated.html", [ [ "Data Structures", "annotated.html", "annotated_dup" ], [ "Data Structure Index", "classes.html", null ], diff --git a/docs/doxygen/html/navtreeindex0.js b/docs/doxygen/html/navtreeindex0.js index e1948cd..1ad6d12 100644 --- a/docs/doxygen/html/navtreeindex0.js +++ b/docs/doxygen/html/navtreeindex0.js @@ -11,6 +11,15 @@ var NAVTREEINDEX0 = "globals_type.html":[2,1,2], "index.html":[], "index.html":[0], +"index.html#autotoc_md0":[0,0], +"index.html#autotoc_md1":[0,1], +"index.html#autotoc_md2":[0,2], +"index.html#autotoc_md3":[0,2,0], +"index.html#autotoc_md4":[0,3], +"index.html#autotoc_md5":[0,4], +"index.html#autotoc_md6":[0,4,0], +"index.html#autotoc_md7":[0,4,1], +"index.html#autotoc_md8":[0,4,2], "pages.html":[], "pdalc_8h.html":[2,0,0,0], "pdalc_8h_source.html":[2,0,0,0], diff --git a/docs/doxygen/html/pdalc_8h.html b/docs/doxygen/html/pdalc_8h.html index 11023e8..1cb7ec3 100644 --- a/docs/doxygen/html/pdalc_8h.html +++ b/docs/doxygen/html/pdalc_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -95,7 +95,7 @@ diff --git a/docs/doxygen/html/pdalc_8h_source.html b/docs/doxygen/html/pdalc_8h_source.html index 0c3af77..e09a963 100644 --- a/docs/doxygen/html/pdalc_8h_source.html +++ b/docs/doxygen/html/pdalc_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -127,19 +127,19 @@
      39 
      40 #endif
      - - -
      Functions to inspect the contents of a PDAL point view iterator.
      -
      Functions to inspect the contents of a PDAL point view.
      -
      Functions to launch and inspect the results of a PDAL pipeline.
      -
      Functions to inspect the contents of a PDAL point layout.
      Functions to retrieve PDAL version and configuration information.
      Functions to inspect PDAL dimension types.
      +
      Functions to launch and inspect the results of a PDAL pipeline.
      +
      Functions to inspect the contents of a PDAL point layout.
      +
      Functions to inspect the contents of a PDAL point view.
      +
      Functions to inspect the contents of a PDAL point view iterator.
      + + diff --git a/docs/doxygen/html/pdalc__config_8h.html b/docs/doxygen/html/pdalc__config_8h.html index 652f1c5..fb44572 100644 --- a/docs/doxygen/html/pdalc__config_8h.html +++ b/docs/doxygen/html/pdalc__config_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_config.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -556,7 +556,7 @@

        - +
      diff --git a/docs/doxygen/html/pdalc__config_8h_source.html b/docs/doxygen/html/pdalc__config_8h_source.html index 66b6e53..d5d981b 100644 --- a/docs/doxygen/html/pdalc__config_8h_source.html +++ b/docs/doxygen/html/pdalc__config_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_config.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -132,7 +132,6 @@
      48 #else
      49 #include <stddef.h> // for size_t
      50 #endif
      -
      51 
      58 PDALC_API size_t PDALGetGdalDataPath(char *path, size_t size);
      59 
      67 PDALC_API size_t PDALGetProj4DataPath(char *path, size_t size);
      @@ -166,27 +165,27 @@
      185 #endif
      186 
      187 #endif
      - - -
      PDALC_API void PDALSetGdalDataPath(const char *path)
      Sets the path to the GDAL data directory.
      -
      PDALC_API size_t PDALSha1(char *sha1, size_t size)
      Retrieves PDAL's Git commit SHA1 as a string.
      -
      Forward declarations for the PDAL C API.
      -
      PDALC_API size_t PDALGetGdalDataPath(char *path, size_t size)
      Retrieves the path to the GDAL data directory.
      -
      PDALC_API int PDALVersionInteger()
      Returns an integer representation of the PDAL version.
      -
      PDALC_API size_t PDALFullVersionString(char *version, size_t size)
      Retrieves the full PDAL version string.
      -
      PDALC_API size_t PDALGetProj4DataPath(char *path, size_t size)
      Retrieves the path to the proj4 data directory.
      -
      PDALC_API size_t PDALVersionString(char *version, size_t size)
      Retrieves the PDAL version string.
      PDALC_API int PDALVersionMinor()
      Returns the PDAL minor version number.
      PDALC_API int PDALVersionMajor()
      Returns the PDAL major version number.
      +
      PDALC_API size_t PDALGetGdalDataPath(char *path, size_t size)
      Retrieves the path to the GDAL data directory.
      +
      PDALC_API int PDALVersionPatch()
      Returns the PDAL patch version number.
      PDALC_API size_t PDALDebugInformation(char *info, size_t size)
      Retrieves PDAL debugging information.
      -
      PDALC_API void PDALSetProj4DataPath(const char *path)
      Sets the path to the proj4 data directory.
      PDALC_API size_t PDALPluginInstallPath(char *path, size_t size)
      Retrieves the path to the PDAL installation.
      -
      PDALC_API int PDALVersionPatch()
      Returns the PDAL patch version number.
      +
      PDALC_API size_t PDALGetProj4DataPath(char *path, size_t size)
      Retrieves the path to the proj4 data directory.
      +
      PDALC_API void PDALSetProj4DataPath(const char *path)
      Sets the path to the proj4 data directory.
      +
      PDALC_API int PDALVersionInteger()
      Returns an integer representation of the PDAL version.
      +
      PDALC_API void PDALSetGdalDataPath(const char *path)
      Sets the path to the GDAL data directory.
      +
      PDALC_API size_t PDALVersionString(char *version, size_t size)
      Retrieves the PDAL version string.
      +
      PDALC_API size_t PDALFullVersionString(char *version, size_t size)
      Retrieves the full PDAL version string.
      +
      PDALC_API size_t PDALSha1(char *sha1, size_t size)
      Retrieves PDAL's Git commit SHA1 as a string.
      +
      Forward declarations for the PDAL C API.
      + + diff --git a/docs/doxygen/html/pdalc__defines_8h.html b/docs/doxygen/html/pdalc__defines_8h.html index 48cb957..2d0f040 100644 --- a/docs/doxygen/html/pdalc__defines_8h.html +++ b/docs/doxygen/html/pdalc__defines_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_defines.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -95,7 +95,7 @@ diff --git a/docs/doxygen/html/pdalc__defines_8h_source.html b/docs/doxygen/html/pdalc__defines_8h_source.html index b335535..5069928 100644 --- a/docs/doxygen/html/pdalc__defines_8h_source.html +++ b/docs/doxygen/html/pdalc__defines_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_defines.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -128,9 +128,9 @@
      39 // GCC-compatible
      40 #elif defined(__GNUC__)
      41 #if defined(__ELF__)
      -
      42 #define PDALC_EXPORT_API __attribute__((visibility("default")))
      -
      43 #define PDALC_IMPORT_API __attribute__((visibility("default")))
      -
      44 #define PDALC_STATIC_API __attribute__((visibility("default")))
      +
      42 #define PDALC_EXPORT_API __attribute__((visibility("default")))
      +
      43 #define PDALC_IMPORT_API __attribute__((visibility("default")))
      +
      44 #define PDALC_STATIC_API __attribute__((visibility("default")))
      45 // Use symbols compatible with Visual Studio in Windows
      46 #elif defined(_WIN32)
      47 #define PDALC_EXPORT_API __declspec(dllexport)
      @@ -158,7 +158,7 @@ diff --git a/docs/doxygen/html/pdalc__dimtype_8h.html b/docs/doxygen/html/pdalc__dimtype_8h.html index 9643507..6480ed4 100644 --- a/docs/doxygen/html/pdalc__dimtype_8h.html +++ b/docs/doxygen/html/pdalc__dimtype_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_dimtype.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -392,7 +392,7 @@

        - +
      diff --git a/docs/doxygen/html/pdalc__dimtype_8h_source.html b/docs/doxygen/html/pdalc__dimtype_8h_source.html index 7e155ac..4a14415 100644 --- a/docs/doxygen/html/pdalc__dimtype_8h_source.html +++ b/docs/doxygen/html/pdalc__dimtype_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_dimtype.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -132,7 +132,6 @@
      48 #else
      49 #include <stddef.h> // for size_t
      50 #endif
      -
      51 
      58 
      @@ -156,24 +155,24 @@
      130 }
      131 #endif
      132 #endif
      - - -
      PDALC_API PDALDimType PDALGetDimType(PDALDimTypeListPtr types, size_t index)
      Returns the dimension type at the provided index from a dimension type list.
      PDALC_API PDALDimType PDALGetInvalidDimType()
      Returns the invalid dimension type.
      -
      Forward declarations for the PDAL C API.
      PDALC_API void PDALDisposeDimTypeList(PDALDimTypeListPtr types)
      Disposes the provided dimension type list.
      -
      PDALC_API size_t PDALGetDimTypeInterpretationByteCount(PDALDimType dim)
      Retrieves the byte count of a dimension type's interpretation, i.e., its data size.
      -
      void * PDALDimTypeListPtr
      A pointer to a dimension type list.
      Definition: pdalc_forward.h:94
      -
      PDALC_API size_t PDALGetDimTypeListSize(PDALDimTypeListPtr types)
      Returns the number of elements in a dimension type list.
      +
      PDALC_API uint64_t PDALGetDimTypeListByteCount(PDALDimTypeListPtr types)
      Returns the number of bytes required to store data referenced by a dimension type list.
      PDALC_API size_t PDALGetDimTypeIdName(PDALDimType dim, char *name, size_t size)
      Retrieves the name of a dimension type's ID.
      +
      PDALC_API PDALDimType PDALGetDimType(PDALDimTypeListPtr types, size_t index)
      Returns the dimension type at the provided index from a dimension type list.
      PDALC_API size_t PDALGetDimTypeInterpretationName(PDALDimType dim, char *name, size_t size)
      Retrieves the name of a dimension type's interpretation, i.e., its data type.
      -
      PDALC_API uint64_t PDALGetDimTypeListByteCount(PDALDimTypeListPtr types)
      Returns the number of bytes required to store data referenced by a dimension type list.
      +
      PDALC_API size_t PDALGetDimTypeInterpretationByteCount(PDALDimType dim)
      Retrieves the byte count of a dimension type's interpretation, i.e., its data size.
      +
      PDALC_API size_t PDALGetDimTypeListSize(PDALDimTypeListPtr types)
      Returns the number of elements in a dimension type list.
      +
      Forward declarations for the PDAL C API.
      +
      void * PDALDimTypeListPtr
      A pointer to a dimension type list.
      Definition: pdalc_forward.h:94
      A dimension type.
      Definition: pdalc_forward.h:79
      + + diff --git a/docs/doxygen/html/pdalc__forward_8h.html b/docs/doxygen/html/pdalc__forward_8h.html index e37d1ae..03f4667 100644 --- a/docs/doxygen/html/pdalc__forward_8h.html +++ b/docs/doxygen/html/pdalc__forward_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_forward.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -228,7 +228,7 @@

        - +
      diff --git a/docs/doxygen/html/pdalc__forward_8h_source.html b/docs/doxygen/html/pdalc__forward_8h_source.html index 23f0508..2f0ea67 100644 --- a/docs/doxygen/html/pdalc__forward_8h_source.html +++ b/docs/doxygen/html/pdalc__forward_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_forward.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -182,25 +182,25 @@
      110 
      111 #endif /* PDALC_FORWARD_H */
      - - -
      double offset
      The dimension's offset value.
      Definition: pdalc_forward.h:90
      -
      uint64_t PDALPointId
      An index to a point in a list.
      Definition: pdalc_forward.h:100
      -
      uint32_t type
      The dimension's interpretation type.
      Definition: pdalc_forward.h:84
      + +
      void * PDALPointViewPtr
      A pointer to point view.
      Definition: pdalc_forward.h:106
      void * PDALPointViewIteratorPtr
      A pointer to a point view iterator.
      Definition: pdalc_forward.h:109
      -
      void * PDALPointLayoutPtr
      A pointer to a point layout.
      Definition: pdalc_forward.h:103
      -
      uint32_t id
      The dimension's identifier.
      Definition: pdalc_forward.h:81
      +
      uint64_t PDALPointId
      An index to a point in a list.
      Definition: pdalc_forward.h:100
      void * PDALPipelinePtr
      A pointer to a pipeline.
      Definition: pdalc_forward.h:97
      void * PDALDimTypeListPtr
      A pointer to a dimension type list.
      Definition: pdalc_forward.h:94
      -
      double scale
      The dimension's scaling factor.
      Definition: pdalc_forward.h:87
      - -
      void * PDALPointViewPtr
      A pointer to point view.
      Definition: pdalc_forward.h:106
      +
      void * PDALPointLayoutPtr
      A pointer to a point layout.
      Definition: pdalc_forward.h:103
      A dimension type.
      Definition: pdalc_forward.h:79
      +
      double offset
      The dimension's offset value.
      Definition: pdalc_forward.h:90
      +
      uint32_t id
      The dimension's identifier.
      Definition: pdalc_forward.h:81
      +
      double scale
      The dimension's scaling factor.
      Definition: pdalc_forward.h:87
      +
      uint32_t type
      The dimension's interpretation type.
      Definition: pdalc_forward.h:84
      + + diff --git a/docs/doxygen/html/pdalc__pipeline_8h.html b/docs/doxygen/html/pdalc__pipeline_8h.html index 3ca52a0..542b881 100644 --- a/docs/doxygen/html/pdalc__pipeline_8h.html +++ b/docs/doxygen/html/pdalc__pipeline_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pipeline.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -521,7 +521,7 @@

        - +
      diff --git a/docs/doxygen/html/pdalc__pipeline_8h_source.html b/docs/doxygen/html/pdalc__pipeline_8h_source.html index 7efec0f..ae9105e 100644 --- a/docs/doxygen/html/pdalc__pipeline_8h_source.html +++ b/docs/doxygen/html/pdalc__pipeline_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pipeline.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -164,27 +164,27 @@
      161 }
      162 #endif /* _cplusplus */
      163 #endif /* PDALC_PIPELINE_H */
      - - -
      PDALC_API size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size)
      Retrieves a pipeline's execution log.
      -
      PDALC_API int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline)
      Returns a pipeline's log level.
      Forward declarations for the PDAL C API.
      -
      PDALC_API bool PDALValidatePipeline(PDALPipelinePtr pipeline)
      Validates a pipeline.
      -
      PDALC_API void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level)
      Sets a pipeline's log level.
      void * PDALPointViewIteratorPtr
      A pointer to a point view iterator.
      Definition: pdalc_forward.h:109
      -
      PDALC_API size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size)
      Retrieves a pipeline's computed metadata.
      -
      PDALC_API size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size)
      Retrieves a pipeline's computed schema.
      -
      PDALC_API size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size)
      Retrieves a string representation of a pipeline.
      -
      PDALC_API PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline)
      Gets the resulting point views from a pipeline execution.
      void * PDALPipelinePtr
      A pointer to a pipeline.
      Definition: pdalc_forward.h:97
      -
      PDALC_API int64_t PDALExecutePipeline(PDALPipelinePtr pipeline)
      Executes a pipeline.
      PDALC_API void PDALDisposePipeline(PDALPipelinePtr pipeline)
      Disposes a PDAL pipeline.
      +
      PDALC_API int64_t PDALExecutePipeline(PDALPipelinePtr pipeline)
      Executes a pipeline.
      PDALC_API PDALPipelinePtr PDALCreatePipeline(const char *json)
      Creates a PDAL pipeline from a JSON text string.
      +
      PDALC_API void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level)
      Sets a pipeline's log level.
      +
      PDALC_API int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline)
      Returns a pipeline's log level.
      +
      PDALC_API size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size)
      Retrieves a pipeline's computed schema.
      +
      PDALC_API bool PDALValidatePipeline(PDALPipelinePtr pipeline)
      Validates a pipeline.
      +
      PDALC_API size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size)
      Retrieves a string representation of a pipeline.
      +
      PDALC_API size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size)
      Retrieves a pipeline's execution log.
      +
      PDALC_API size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size)
      Retrieves a pipeline's computed metadata.
      +
      PDALC_API PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline)
      Gets the resulting point views from a pipeline execution.
      + + diff --git a/docs/doxygen/html/pdalc__pointlayout_8h.html b/docs/doxygen/html/pdalc__pointlayout_8h.html index 7809d9e..e406620 100644 --- a/docs/doxygen/html/pdalc__pointlayout_8h.html +++ b/docs/doxygen/html/pdalc__pointlayout_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointlayout.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -291,7 +291,7 @@

        - +
      diff --git a/docs/doxygen/html/pdalc__pointlayout_8h_source.html b/docs/doxygen/html/pdalc__pointlayout_8h_source.html index 39f23fa..3dd50f3 100644 --- a/docs/doxygen/html/pdalc__pointlayout_8h_source.html +++ b/docs/doxygen/html/pdalc__pointlayout_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointlayout.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -132,7 +132,6 @@
      49 #else
      50 #include <stddef.h> // for size_t
      51 #endif
      -
      52 
      62 
      71 PDALC_API PDALDimType PDALFindDimType(PDALPointLayoutPtr layout, const char *name);
      @@ -150,22 +149,22 @@
      105 #endif
      106 
      107 #endif
      - -
      Forward declarations for the PDAL C API.
      -
      PDALC_API size_t PDALGetDimSize(PDALPointLayoutPtr layout, const char *name)
      Returns the byte size of a dimension type value within a layout.
      -
      PDALC_API size_t PDALGetPointSize(PDALPointLayoutPtr layout)
      Returns the byte size of a point in the provided layout.
      +
      void * PDALDimTypeListPtr
      A pointer to a dimension type list.
      Definition: pdalc_forward.h:94
      void * PDALPointLayoutPtr
      A pointer to a point layout.
      Definition: pdalc_forward.h:103
      +
      PDALC_API size_t PDALGetDimSize(PDALPointLayoutPtr layout, const char *name)
      Returns the byte size of a dimension type value within a layout.
      PDALC_API PDALDimTypeListPtr PDALGetPointLayoutDimTypes(PDALPointLayoutPtr layout)
      Returns the list of dimension types used by the provided layout.
      +
      PDALC_API size_t PDALGetPointSize(PDALPointLayoutPtr layout)
      Returns the byte size of a point in the provided layout.
      PDALC_API PDALDimType PDALFindDimType(PDALPointLayoutPtr layout, const char *name)
      Finds the dimension type identified by the provided name in a layout.
      -
      void * PDALDimTypeListPtr
      A pointer to a dimension type list.
      Definition: pdalc_forward.h:94
      PDALC_API size_t PDALGetDimPackedOffset(PDALPointLayoutPtr layout, const char *name)
      Returns the byte offset of a dimension type within a layout.
      A dimension type.
      Definition: pdalc_forward.h:79
      + + diff --git a/docs/doxygen/html/pdalc__pointview_8h.html b/docs/doxygen/html/pdalc__pointview_8h.html index 2914774..7fb360a 100644 --- a/docs/doxygen/html/pdalc__pointview_8h.html +++ b/docs/doxygen/html/pdalc__pointview_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointview.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -504,7 +504,7 @@

        - +
      diff --git a/docs/doxygen/html/pdalc__pointview_8h_source.html b/docs/doxygen/html/pdalc__pointview_8h_source.html index bd3b1dc..6ab5a15 100644 --- a/docs/doxygen/html/pdalc__pointview_8h_source.html +++ b/docs/doxygen/html/pdalc__pointview_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointview.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -134,7 +134,6 @@
      50 #include <stddef.h> // for size_t
      51 #include <stdint.h> // for uint64_t
      52 #endif
      -
      53 
      59 
      @@ -162,28 +161,28 @@
      174 #endif /* __cplusplus */
      175 
      176 #endif
      - - -
      PDALC_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buffer)
      Retrieves data for all points based on the provided dimension list.
      -
      PDALC_API PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view)
      Clones the provided point view.
      Forward declarations for the PDAL C API.
      +
      void * PDALPointViewPtr
      A pointer to point view.
      Definition: pdalc_forward.h:106
      uint64_t PDALPointId
      An index to a point in a list.
      Definition: pdalc_forward.h:100
      -
      PDALC_API size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buffer)
      Retrieves data for a point based on the provided dimension list.
      -
      PDALC_API size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty)
      Returns the Well-Known Text (WKT) projection string for the provided point view.
      +
      void * PDALDimTypeListPtr
      A pointer to a dimension type list.
      Definition: pdalc_forward.h:94
      void * PDALPointLayoutPtr
      A pointer to a point layout.
      Definition: pdalc_forward.h:103
      -
      PDALC_API PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view)
      Returns the point layout for the provided point view.
      +
      PDALC_API int PDALGetPointViewId(PDALPointViewPtr view)
      Returns the ID of the provided point view.
      +
      PDALC_API void PDALDisposePointView(PDALPointViewPtr view)
      Disposes the provided point view.
      +
      PDALC_API PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view)
      Clones the provided point view.
      PDALC_API bool PDALIsPointViewEmpty(PDALPointViewPtr view)
      Returns whether the provided point view is empty, i.e., has no points.
      +
      PDALC_API size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buffer)
      Retrieves data for a point based on the provided dimension list.
      +
      PDALC_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buffer)
      Retrieves data for all points based on the provided dimension list.
      +
      PDALC_API size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty)
      Returns the Well-Known Text (WKT) projection string for the provided point view.
      PDALC_API size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size)
      Returns the proj4 projection string for the provided point view.
      -
      void * PDALDimTypeListPtr
      A pointer to a dimension type list.
      Definition: pdalc_forward.h:94
      -
      PDALC_API void PDALDisposePointView(PDALPointViewPtr view)
      Disposes the provided point view.
      -
      PDALC_API int PDALGetPointViewId(PDALPointViewPtr view)
      Returns the ID of the provided point view.
      PDALC_API uint64_t PDALGetPointViewSize(PDALPointViewPtr view)
      Returns the number of points in the provided view.
      -
      void * PDALPointViewPtr
      A pointer to point view.
      Definition: pdalc_forward.h:106
      +
      PDALC_API PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view)
      Returns the point layout for the provided point view.
      + + diff --git a/docs/doxygen/html/pdalc__pointviewiterator_8h.html b/docs/doxygen/html/pdalc__pointviewiterator_8h.html index fa19a4e..b61909b 100644 --- a/docs/doxygen/html/pdalc__pointviewiterator_8h.html +++ b/docs/doxygen/html/pdalc__pointviewiterator_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointviewiterator.h File Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -226,7 +226,7 @@

        - +
      diff --git a/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html b/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html index 864fa5d..6182d23 100644 --- a/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html +++ b/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointviewiterator.h Source File @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -162,20 +162,20 @@
      103 #endif /* __cplusplus */
      104 
      105 #endif
      - - -
      PDALC_API void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr)
      Disposes the provided point view iterator.
      Forward declarations for the PDAL C API.
      +
      void * PDALPointViewPtr
      A pointer to point view.
      Definition: pdalc_forward.h:106
      void * PDALPointViewIteratorPtr
      A pointer to a point view iterator.
      Definition: pdalc_forward.h:109
      PDALC_API void PDALResetPointViewIterator(PDALPointViewIteratorPtr itr)
      Resets the provided point view iterator to its starting position.
      -
      PDALC_API PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr)
      Returns the next available point view in the provided iterator.
      PDALC_API bool PDALHasNextPointView(PDALPointViewIteratorPtr itr)
      Returns whether another point view is available in the provided iterator.
      -
      void * PDALPointViewPtr
      A pointer to point view.
      Definition: pdalc_forward.h:106
      +
      PDALC_API void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr)
      Disposes the provided point view iterator.
      +
      PDALC_API PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr)
      Returns the next available point view in the provided iterator.
      + + diff --git a/docs/doxygen/html/search/all_0.html b/docs/doxygen/html/search/all_0.html index a34319f..1ec5b2d 100644 --- a/docs/doxygen/html/search/all_0.html +++ b/docs/doxygen/html/search/all_0.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/all_1.html b/docs/doxygen/html/search/all_1.html index 51aff6f..9f80e90 100644 --- a/docs/doxygen/html/search/all_1.html +++ b/docs/doxygen/html/search/all_1.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/all_2.html b/docs/doxygen/html/search/all_2.html index 1f81f66..02cfffc 100644 --- a/docs/doxygen/html/search/all_2.html +++ b/docs/doxygen/html/search/all_2.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/all_3.html b/docs/doxygen/html/search/all_3.html index 2e31ab9..39767b8 100644 --- a/docs/doxygen/html/search/all_3.html +++ b/docs/doxygen/html/search/all_3.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/all_4.html b/docs/doxygen/html/search/all_4.html index 0540c16..fc40463 100644 --- a/docs/doxygen/html/search/all_4.html +++ b/docs/doxygen/html/search/all_4.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/all_5.html b/docs/doxygen/html/search/all_5.html index ebec30b..9dd9344 100644 --- a/docs/doxygen/html/search/all_5.html +++ b/docs/doxygen/html/search/all_5.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/classes_0.html b/docs/doxygen/html/search/classes_0.html index 7e0afc8..af8159e 100644 --- a/docs/doxygen/html/search/classes_0.html +++ b/docs/doxygen/html/search/classes_0.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/files_0.html b/docs/doxygen/html/search/files_0.html index 76b64f5..9498842 100644 --- a/docs/doxygen/html/search/files_0.html +++ b/docs/doxygen/html/search/files_0.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/files_1.html b/docs/doxygen/html/search/files_1.html index c8edef8..7050ef4 100644 --- a/docs/doxygen/html/search/files_1.html +++ b/docs/doxygen/html/search/files_1.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/functions_0.html b/docs/doxygen/html/search/functions_0.html index f04535a..eb4c501 100644 --- a/docs/doxygen/html/search/functions_0.html +++ b/docs/doxygen/html/search/functions_0.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/nomatches.html b/docs/doxygen/html/search/nomatches.html index 4377320..2b9360b 100644 --- a/docs/doxygen/html/search/nomatches.html +++ b/docs/doxygen/html/search/nomatches.html @@ -1,5 +1,6 @@ - + + diff --git a/docs/doxygen/html/search/pages_0.html b/docs/doxygen/html/search/pages_0.html index a281c4b..8517b48 100644 --- a/docs/doxygen/html/search/pages_0.html +++ b/docs/doxygen/html/search/pages_0.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/search.css b/docs/doxygen/html/search/search.css index 933cf08..9074198 100644 --- a/docs/doxygen/html/search/search.css +++ b/docs/doxygen/html/search/search.css @@ -204,19 +204,21 @@ a.SRScope:focus, a.SRScope:active { span.SRScope { padding-left: 4px; + font-family: Arial, Verdana, sans-serif; } .SRPage .SRStatus { padding: 2px 5px; font-size: 8pt; font-style: italic; + font-family: Arial, Verdana, sans-serif; } .SRResult { display: none; } -DIV.searchresults { +div.searchresults { margin-left: 10px; margin-right: 10px; } diff --git a/docs/doxygen/html/search/search.js b/docs/doxygen/html/search/search.js index 92b6094..fb226f7 100644 --- a/docs/doxygen/html/search/search.js +++ b/docs/doxygen/html/search/search.js @@ -80,9 +80,10 @@ function getYPos(item) storing this instance. Is needed to be able to set timeouts. resultPath - path to use for external files */ -function SearchBox(name, resultsPath, inFrame, label) +function SearchBox(name, resultsPath, inFrame, label, extension) { if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } + if (!extension || extension == "") { extension = ".html"; } // ---------- Instance variables this.name = name; @@ -97,6 +98,7 @@ function SearchBox(name, resultsPath, inFrame, label) this.searchActive = false; this.insideFrame = inFrame; this.searchLabel = label; + this.extension = extension; // ----------- DOM Elements @@ -347,13 +349,13 @@ function SearchBox(name, resultsPath, inFrame, label) if (idx!=-1) { var hexCode=idx.toString(16); - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; resultsPageWithSearch = resultsPage+'?'+escape(searchValue); hasResultsPage = true; } else // nothing available for this search term { - resultsPage = this.resultsPath + '/nomatches.html'; + resultsPage = this.resultsPath + '/nomatches' + this.extension; resultsPageWithSearch = resultsPage; hasResultsPage = false; } @@ -439,12 +441,12 @@ function SearchResults(name) while (element && element!=parentElement) { - if (element.nodeName == 'DIV' && element.className == 'SRChildren') + if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') { return element; } - if (element.nodeName == 'DIV' && element.hasChildNodes()) + if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) { element = element.firstChild; } diff --git a/docs/doxygen/html/search/typedefs_0.html b/docs/doxygen/html/search/typedefs_0.html index b66f0a7..a4684c4 100644 --- a/docs/doxygen/html/search/typedefs_0.html +++ b/docs/doxygen/html/search/typedefs_0.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/variables_0.html b/docs/doxygen/html/search/variables_0.html index 2edd111..1e477c0 100644 --- a/docs/doxygen/html/search/variables_0.html +++ b/docs/doxygen/html/search/variables_0.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/variables_1.html b/docs/doxygen/html/search/variables_1.html index 98b95a9..ea73d9a 100644 --- a/docs/doxygen/html/search/variables_1.html +++ b/docs/doxygen/html/search/variables_1.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/variables_2.html b/docs/doxygen/html/search/variables_2.html index 3e0c591..0580462 100644 --- a/docs/doxygen/html/search/variables_2.html +++ b/docs/doxygen/html/search/variables_2.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/search/variables_3.html b/docs/doxygen/html/search/variables_3.html index 7867da3..0d69e76 100644 --- a/docs/doxygen/html/search/variables_3.html +++ b/docs/doxygen/html/search/variables_3.html @@ -1,7 +1,8 @@ - + + - + @@ -10,14 +11,14 @@
      Loading...
      - +
      Searching...
      No Matches
      - +
      diff --git a/docs/doxygen/html/struct_p_d_a_l_dim_type.html b/docs/doxygen/html/struct_p_d_a_l_dim_type.html index 78a3fa9..ff35465 100644 --- a/docs/doxygen/html/struct_p_d_a_l_dim_type.html +++ b/docs/doxygen/html/struct_p_d_a_l_dim_type.html @@ -3,7 +3,7 @@ - + pdal-c: PDALDimType Struct Reference @@ -26,7 +26,7 @@
      pdal-c -  v2.0.0 +  2.1.1
      C API for PDAL
      @@ -35,10 +35,10 @@ - + @@ -181,7 +181,7 @@

        - +
      From 31dd28aedc74facfbe73d574138012e21aca73c5 Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 07:26:03 +0100 Subject: [PATCH 27/36] Update update_docs.yml --- .github/workflows/update_docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/update_docs.yml b/.github/workflows/update_docs.yml index 52ff03b..1e3e501 100644 --- a/.github/workflows/update_docs.yml +++ b/.github/workflows/update_docs.yml @@ -29,7 +29,7 @@ jobs: > Doxyfile - name: Run Doxygen - uses: mattnotmitt/doxygen-action@v1.2.0 + uses: mattnotmitt/doxygen-action@v1.3.0 with: doxyfile-path: 'docs/Doxyfile' From 64dedecef68aca2f79b871c06dbeb0d782b66a88 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 30 Apr 2021 06:27:34 +0000 Subject: [PATCH 28/36] Automatic Documentation Update --- docs/doxygen/html/_r_e_a_d_m_e_8md.html | 4 ++-- docs/doxygen/html/annotated.html | 4 ++-- docs/doxygen/html/classes.html | 4 ++-- docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html | 4 ++-- docs/doxygen/html/files.html | 4 ++-- docs/doxygen/html/functions.html | 4 ++-- docs/doxygen/html/functions_vars.html | 4 ++-- docs/doxygen/html/globals.html | 4 ++-- docs/doxygen/html/globals_func.html | 4 ++-- docs/doxygen/html/globals_type.html | 4 ++-- docs/doxygen/html/index.html | 4 ++-- docs/doxygen/html/pdalc_8h.html | 4 ++-- docs/doxygen/html/pdalc_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__config_8h.html | 4 ++-- docs/doxygen/html/pdalc__config_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__defines_8h.html | 4 ++-- docs/doxygen/html/pdalc__defines_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__dimtype_8h.html | 4 ++-- docs/doxygen/html/pdalc__dimtype_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__forward_8h.html | 4 ++-- docs/doxygen/html/pdalc__forward_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__pipeline_8h.html | 4 ++-- docs/doxygen/html/pdalc__pipeline_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__pointlayout_8h.html | 4 ++-- docs/doxygen/html/pdalc__pointlayout_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__pointview_8h.html | 4 ++-- docs/doxygen/html/pdalc__pointview_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__pointviewiterator_8h.html | 4 ++-- docs/doxygen/html/pdalc__pointviewiterator_8h_source.html | 4 ++-- docs/doxygen/html/struct_p_d_a_l_dim_type.html | 4 ++-- 30 files changed, 60 insertions(+), 60 deletions(-) diff --git a/docs/doxygen/html/_r_e_a_d_m_e_8md.html b/docs/doxygen/html/_r_e_a_d_m_e_8md.html index b6668dd..4269159 100644 --- a/docs/doxygen/html/_r_e_a_d_m_e_8md.html +++ b/docs/doxygen/html/_r_e_a_d_m_e_8md.html @@ -26,7 +26,7 @@
      pdal-c -  2.1.1 +  test2
      C API for PDAL
      @@ -93,7 +93,7 @@ diff --git a/docs/doxygen/html/annotated.html b/docs/doxygen/html/annotated.html index 830589a..90ca12c 100644 --- a/docs/doxygen/html/annotated.html +++ b/docs/doxygen/html/annotated.html @@ -26,7 +26,7 @@
      pdal-c -  2.1.1 +  test2
      C API for PDAL
      @@ -97,7 +97,7 @@ diff --git a/docs/doxygen/html/classes.html b/docs/doxygen/html/classes.html index 9d7320e..c398f9f 100644 --- a/docs/doxygen/html/classes.html +++ b/docs/doxygen/html/classes.html @@ -26,7 +26,7 @@
      pdal-c -  2.1.1 +  test2
      C API for PDAL
      @@ -98,7 +98,7 @@ diff --git a/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html b/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html index d6a4011..cfc9bf1 100644 --- a/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html +++ b/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html @@ -26,7 +26,7 @@
      pdal-c -  2.1.1 +  test2
      C API for PDAL
      @@ -122,7 +122,7 @@ diff --git a/docs/doxygen/html/files.html b/docs/doxygen/html/files.html index 511b32f..0b696fa 100644 --- a/docs/doxygen/html/files.html +++ b/docs/doxygen/html/files.html @@ -26,7 +26,7 @@
      pdal-c -  2.1.1 +  test2
      C API for PDAL
      @@ -106,7 +106,7 @@ diff --git a/docs/doxygen/html/functions.html b/docs/doxygen/html/functions.html index 02b21dc..c5fad98 100644 --- a/docs/doxygen/html/functions.html +++ b/docs/doxygen/html/functions.html @@ -26,7 +26,7 @@
      pdal-c -  2.1.1 +  test2
      C API for PDAL
      @@ -102,7 +102,7 @@ diff --git a/docs/doxygen/html/functions_vars.html b/docs/doxygen/html/functions_vars.html index 877d5e7..f8ac2d7 100644 --- a/docs/doxygen/html/functions_vars.html +++ b/docs/doxygen/html/functions_vars.html @@ -26,7 +26,7 @@
      pdal-c -  2.1.1 +  test2
      C API for PDAL
      @@ -102,7 +102,7 @@ diff --git a/docs/doxygen/html/globals.html b/docs/doxygen/html/globals.html index bc10c48..d0ed22f 100644 --- a/docs/doxygen/html/globals.html +++ b/docs/doxygen/html/globals.html @@ -26,7 +26,7 @@
      pdal-c -  2.1.1 +  test2
      C API for PDAL
      @@ -263,7 +263,7 @@

      - p -

        diff --git a/docs/doxygen/html/globals_func.html b/docs/doxygen/html/globals_func.html index 84689cd..8026fa0 100644 --- a/docs/doxygen/html/globals_func.html +++ b/docs/doxygen/html/globals_func.html @@ -26,7 +26,7 @@
        pdal-c -  2.1.1 +  test2
        C API for PDAL
        @@ -245,7 +245,7 @@

        - p -

          diff --git a/docs/doxygen/html/globals_type.html b/docs/doxygen/html/globals_type.html index 5fc7ff9..2538644 100644 --- a/docs/doxygen/html/globals_type.html +++ b/docs/doxygen/html/globals_type.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -108,7 +108,7 @@ diff --git a/docs/doxygen/html/index.html b/docs/doxygen/html/index.html index 96d4a46..ccc0242 100644 --- a/docs/doxygen/html/index.html +++ b/docs/doxygen/html/index.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -135,7 +135,7 @@

          diff --git a/docs/doxygen/html/pdalc_8h.html b/docs/doxygen/html/pdalc_8h.html index 1cb7ec3..762aab8 100644 --- a/docs/doxygen/html/pdalc_8h.html +++ b/docs/doxygen/html/pdalc_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -95,7 +95,7 @@ diff --git a/docs/doxygen/html/pdalc_8h_source.html b/docs/doxygen/html/pdalc_8h_source.html index e09a963..82f30d6 100644 --- a/docs/doxygen/html/pdalc_8h_source.html +++ b/docs/doxygen/html/pdalc_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -139,7 +139,7 @@ diff --git a/docs/doxygen/html/pdalc__config_8h.html b/docs/doxygen/html/pdalc__config_8h.html index fb44572..a4b1fd9 100644 --- a/docs/doxygen/html/pdalc__config_8h.html +++ b/docs/doxygen/html/pdalc__config_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -556,7 +556,7 @@

            - +
          diff --git a/docs/doxygen/html/pdalc__config_8h_source.html b/docs/doxygen/html/pdalc__config_8h_source.html index d5d981b..dadc0fa 100644 --- a/docs/doxygen/html/pdalc__config_8h_source.html +++ b/docs/doxygen/html/pdalc__config_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -185,7 +185,7 @@ diff --git a/docs/doxygen/html/pdalc__defines_8h.html b/docs/doxygen/html/pdalc__defines_8h.html index 2d0f040..ce88e49 100644 --- a/docs/doxygen/html/pdalc__defines_8h.html +++ b/docs/doxygen/html/pdalc__defines_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -95,7 +95,7 @@ diff --git a/docs/doxygen/html/pdalc__defines_8h_source.html b/docs/doxygen/html/pdalc__defines_8h_source.html index 5069928..0a5d28c 100644 --- a/docs/doxygen/html/pdalc__defines_8h_source.html +++ b/docs/doxygen/html/pdalc__defines_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -158,7 +158,7 @@ diff --git a/docs/doxygen/html/pdalc__dimtype_8h.html b/docs/doxygen/html/pdalc__dimtype_8h.html index 6480ed4..1113c6e 100644 --- a/docs/doxygen/html/pdalc__dimtype_8h.html +++ b/docs/doxygen/html/pdalc__dimtype_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -392,7 +392,7 @@

            - +
          diff --git a/docs/doxygen/html/pdalc__dimtype_8h_source.html b/docs/doxygen/html/pdalc__dimtype_8h_source.html index 4a14415..4fc1329 100644 --- a/docs/doxygen/html/pdalc__dimtype_8h_source.html +++ b/docs/doxygen/html/pdalc__dimtype_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -172,7 +172,7 @@ diff --git a/docs/doxygen/html/pdalc__forward_8h.html b/docs/doxygen/html/pdalc__forward_8h.html index 03f4667..d306790 100644 --- a/docs/doxygen/html/pdalc__forward_8h.html +++ b/docs/doxygen/html/pdalc__forward_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -228,7 +228,7 @@

            - +
          diff --git a/docs/doxygen/html/pdalc__forward_8h_source.html b/docs/doxygen/html/pdalc__forward_8h_source.html index 2f0ea67..89eddf7 100644 --- a/docs/doxygen/html/pdalc__forward_8h_source.html +++ b/docs/doxygen/html/pdalc__forward_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -200,7 +200,7 @@ diff --git a/docs/doxygen/html/pdalc__pipeline_8h.html b/docs/doxygen/html/pdalc__pipeline_8h.html index 542b881..c5c6fc5 100644 --- a/docs/doxygen/html/pdalc__pipeline_8h.html +++ b/docs/doxygen/html/pdalc__pipeline_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -521,7 +521,7 @@

            - +
          diff --git a/docs/doxygen/html/pdalc__pipeline_8h_source.html b/docs/doxygen/html/pdalc__pipeline_8h_source.html index ae9105e..ca86d04 100644 --- a/docs/doxygen/html/pdalc__pipeline_8h_source.html +++ b/docs/doxygen/html/pdalc__pipeline_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -184,7 +184,7 @@ diff --git a/docs/doxygen/html/pdalc__pointlayout_8h.html b/docs/doxygen/html/pdalc__pointlayout_8h.html index e406620..b858f40 100644 --- a/docs/doxygen/html/pdalc__pointlayout_8h.html +++ b/docs/doxygen/html/pdalc__pointlayout_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -291,7 +291,7 @@

            - +
          diff --git a/docs/doxygen/html/pdalc__pointlayout_8h_source.html b/docs/doxygen/html/pdalc__pointlayout_8h_source.html index 3dd50f3..b6d57c8 100644 --- a/docs/doxygen/html/pdalc__pointlayout_8h_source.html +++ b/docs/doxygen/html/pdalc__pointlayout_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -164,7 +164,7 @@ diff --git a/docs/doxygen/html/pdalc__pointview_8h.html b/docs/doxygen/html/pdalc__pointview_8h.html index 7fb360a..b409082 100644 --- a/docs/doxygen/html/pdalc__pointview_8h.html +++ b/docs/doxygen/html/pdalc__pointview_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -504,7 +504,7 @@

            - +
          diff --git a/docs/doxygen/html/pdalc__pointview_8h_source.html b/docs/doxygen/html/pdalc__pointview_8h_source.html index 6ab5a15..a84de98 100644 --- a/docs/doxygen/html/pdalc__pointview_8h_source.html +++ b/docs/doxygen/html/pdalc__pointview_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -182,7 +182,7 @@ diff --git a/docs/doxygen/html/pdalc__pointviewiterator_8h.html b/docs/doxygen/html/pdalc__pointviewiterator_8h.html index b61909b..2c197c5 100644 --- a/docs/doxygen/html/pdalc__pointviewiterator_8h.html +++ b/docs/doxygen/html/pdalc__pointviewiterator_8h.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -226,7 +226,7 @@

            - +
          diff --git a/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html b/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html index 6182d23..3e9ae4a 100644 --- a/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html +++ b/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -175,7 +175,7 @@ diff --git a/docs/doxygen/html/struct_p_d_a_l_dim_type.html b/docs/doxygen/html/struct_p_d_a_l_dim_type.html index ff35465..81c10b2 100644 --- a/docs/doxygen/html/struct_p_d_a_l_dim_type.html +++ b/docs/doxygen/html/struct_p_d_a_l_dim_type.html @@ -26,7 +26,7 @@
          pdal-c -  2.1.1 +  test2
          C API for PDAL
          @@ -181,7 +181,7 @@

            - +
          From 63b4781fcbab79e2b3f3391a1f5a43511ce39c7f Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 07:43:08 +0100 Subject: [PATCH 29/36] astyle changes --- source/pdal/CMakeLists.txt | 82 +++--- source/pdal/pdalc_dimtype.cpp | 138 ++++----- source/pdal/pdalc_forward.h | 16 +- source/pdal/pdalc_pipeline.cpp | 358 ++++++++++++------------ source/pdal/pdalc_pointlayout.cpp | 80 +++--- source/pdal/pdalc_pointview.cpp | 282 +++++++++---------- source/pdal/pdalc_pointviewiterator.cpp | 76 ++--- source/pdal/pdalc_pointviewiterator.h | 12 +- 8 files changed, 522 insertions(+), 522 deletions(-) diff --git a/source/pdal/CMakeLists.txt b/source/pdal/CMakeLists.txt index 0a2e82b..7a8715e 100644 --- a/source/pdal/CMakeLists.txt +++ b/source/pdal/CMakeLists.txt @@ -4,65 +4,65 @@ find_package(PDAL REQUIRED CONFIG) message(STATUS "Found PDAL ${PDAL_VERSION}") set(SOURCES - pdalc_config.cpp - pdalc_dimtype.cpp - pdalc_pipeline.cpp - pdalc_pointlayout.cpp - pdalc_pointview.cpp - pdalc_pointviewiterator.cpp -) + pdalc_config.cpp + pdalc_dimtype.cpp + pdalc_pipeline.cpp + pdalc_pointlayout.cpp + pdalc_pointview.cpp + pdalc_pointviewiterator.cpp + ) set(HEADERS - pdalc.h - pdalc_config.h - pdalc_defines.h - pdalc_dimtype.h - pdalc_forward.h - pdalc_pipeline.h - pdalc_pointlayout.h - pdalc_pointview.h - pdalc_pointviewiterator.h -) + pdalc.h + pdalc_config.h + pdalc_defines.h + pdalc_dimtype.h + pdalc_forward.h + pdalc_pipeline.h + pdalc_pointlayout.h + pdalc_pointview.h + pdalc_pointviewiterator.h + ) set(DEPENDENCIES - ${PDAL_LIBRARIES} -) + $ {PDAL_LIBRARIES} + ) link_directories( - ${PDAL_LIBRARY_DIRS} + $ {PDAL_LIBRARY_DIRS} ) include_directories( - ${PDAL_INCLUDE_DIRS} + $ {PDAL_INCLUDE_DIRS} ) -add_definitions(${PDAL_DEFINITIONS}) +add_definitions($ {PDAL_DEFINITIONS}) -add_library(${TARGET} SHARED ${SOURCES} ${HEADERS}) +add_library($ {TARGET} SHARED $ {SOURCES} $ {HEADERS}) string(TOUPPER "${TARGET}_BUILD_DLL" BUILD_SYMBOL) -set_target_properties(${TARGET} PROPERTIES - DEFINE_SYMBOL ${BUILD_SYMBOL} - VERSION ${PDAL_VERSION} - SOVERSION ${PDAL_VERSION} -) +set_target_properties($ {TARGET} PROPERTIES + DEFINE_SYMBOL $ {BUILD_SYMBOL} + VERSION $ {PDAL_VERSION} + SOVERSION $ {PDAL_VERSION} + ) # Measure code coverage on gcc if(CMAKE_COMPILER_IS_GNUCXX AND PDALC_ENABLE_CODE_COVERAGE AND PDALC_ENABLE_TESTS) - SETUP_TARGET_FOR_COVERAGE( - NAME coverage_${TARGET} - EXECUTABLE test_${TARGET} - DEPENDENCIES test_${TARGET} - ) -endif() + SETUP_TARGET_FOR_COVERAGE( + NAME coverage_$ {TARGET} + EXECUTABLE test_$ {TARGET} + DEPENDENCIES test_$ {TARGET} + ) + endif() -target_link_libraries(${TARGET} ${DEPENDENCIES}) + target_link_libraries($ {TARGET} $ {DEPENDENCIES}) -install(TARGETS ${TARGET} - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) + install(TARGETS $ {TARGET} + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin) -file(RELATIVE_PATH ${TARGET}_PATH ${CMAKE_SOURCE_DIR}/source ${CMAKE_CURRENT_SOURCE_DIR}) -install(FILES ${HEADERS} DESTINATION include/${${TARGET}_PATH}) + file(RELATIVE_PATH $ {TARGET} _PATH $ {CMAKE_SOURCE_DIR}/source $ {CMAKE_CURRENT_SOURCE_DIR}) + install(FILES $ {HEADERS} DESTINATION include/$ {${TARGET} _PATH}) diff --git a/source/pdal/pdalc_dimtype.cpp b/source/pdal/pdalc_dimtype.cpp index b1d782d..9e771cc 100644 --- a/source/pdal/pdalc_dimtype.cpp +++ b/source/pdal/pdalc_dimtype.cpp @@ -37,122 +37,122 @@ namespace capi { size_t PDALGetDimTypeListSize(PDALDimTypeListPtr types) { - pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); +pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); - size_t size = 0; +size_t size = 0; - if (wrapper && wrapper->get()) +if (wrapper && wrapper->get()) +{ + try { - try - { - pdal::DimTypeList *list = wrapper->get(); - size = list->size(); - } - catch (const std::exception &e) - { - printf("%s\n", e.what()); - } + pdal::DimTypeList *list = wrapper->get(); + size = list->size(); } + catch (const std::exception &e) + { + printf("%s\n", e.what()); + } +} - return size; +return size; } uint64_t PDALGetDimTypeListByteCount(PDALDimTypeListPtr types) { - uint64_t byteCount = 0; - size_t pointCount = PDALGetDimTypeListSize(types); +uint64_t byteCount = 0; +size_t pointCount = PDALGetDimTypeListSize(types); - for (size_t i = 0; i < pointCount; ++i) - { - byteCount += PDALGetDimTypeInterpretationByteCount(PDALGetDimType(types, i)); - } +for (size_t i = 0; i < pointCount; ++i) +{ + byteCount += PDALGetDimTypeInterpretationByteCount(PDALGetDimType(types, i)); +} - return byteCount; +return byteCount; } PDALDimType PDALGetInvalidDimType() { - PDALDimType dim = - { - static_cast(pdal::Dimension::id("")), static_cast(pdal::Dimension::type("")), - 1.0, 0.0 - }; +PDALDimType dim = +{ + static_cast(pdal::Dimension::id("")), static_cast(pdal::Dimension::type("")), + 1.0, 0.0 +}; - return dim; +return dim; } size_t PDALGetDimTypeIdName(PDALDimType dim, char *name, size_t size) { - size_t result = 0; +size_t result = 0; - if (name && size > 0) - { - std::string s = pdal::Dimension::name( - static_cast(dim.id)); - std::strncpy(name, s.c_str(), size); - result = std::min(std::strlen(name), size); - } +if (name && size > 0) +{ + std::string s = pdal::Dimension::name( + static_cast(dim.id)); + std::strncpy(name, s.c_str(), size); + result = std::min(std::strlen(name), size); +} - return result; +return result; } size_t PDALGetDimTypeInterpretationName(PDALDimType dim, char *name, size_t size) { - size_t result = 0; +size_t result = 0; - if (name && size > 0) - { - std::string s = pdal::Dimension::interpretationName( - static_cast(dim.type)); - std::strncpy(name, s.c_str(), size); - result = std::min(std::strlen(name), size); - } +if (name && size > 0) +{ + std::string s = pdal::Dimension::interpretationName( + static_cast(dim.type)); + std::strncpy(name, s.c_str(), size); + result = std::min(std::strlen(name), size); +} - return result; +return result; } size_t PDALGetDimTypeInterpretationByteCount(PDALDimType dim) { - return pdal::Dimension::size(static_cast(dim.type)); +return pdal::Dimension::size(static_cast(dim.type)); } PDALDimType PDALGetDimType(PDALDimTypeListPtr types, size_t index) { - pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); +pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); - PDALDimType dim = PDALGetInvalidDimType(); +PDALDimType dim = PDALGetInvalidDimType(); - if (wrapper && wrapper->get()) +if (wrapper && wrapper->get()) +{ + try { - try - { - pdal::DimTypeList *list = wrapper->get(); - - if (index < list->size()) - { - pdal::DimType nativeDim = list->at(index); - dim.id = static_cast(nativeDim.m_id); - dim.type = static_cast(nativeDim.m_type); - dim.scale = nativeDim.m_xform.m_scale.m_val; - dim.offset = nativeDim.m_xform.m_offset.m_val; - } - } - catch (const std::exception &e) + pdal::DimTypeList *list = wrapper->get(); + + if (index < list->size()) { - printf("%s\n", e.what()); + pdal::DimType nativeDim = list->at(index); + dim.id = static_cast(nativeDim.m_id); + dim.type = static_cast(nativeDim.m_type); + dim.scale = nativeDim.m_xform.m_scale.m_val; + dim.offset = nativeDim.m_xform.m_offset.m_val; } } + catch (const std::exception &e) + { + printf("%s\n", e.what()); + } +} - return dim; +return dim; } void PDALDisposeDimTypeList(PDALDimTypeListPtr types) { - if (types) - { - pdal::capi::DimTypeList *ptr = reinterpret_cast(types); - delete ptr; - } +if (types) +{ + pdal::capi::DimTypeList *ptr = reinterpret_cast(types); + delete ptr; +} } } } \ No newline at end of file diff --git a/source/pdal/pdalc_forward.h b/source/pdal/pdalc_forward.h index 89cae54..f909042 100644 --- a/source/pdal/pdalc_forward.h +++ b/source/pdal/pdalc_forward.h @@ -80,17 +80,17 @@ typedef struct PDALDimType PDALDimType; /// A dimension type struct PDALDimType { - /// The dimension's identifier - uint32_t id; +/// The dimension's identifier +uint32_t id; - /// The dimension's interpretation type - uint32_t type; +/// The dimension's interpretation type +uint32_t type; - /// The dimension's scaling factor - double scale; +/// The dimension's scaling factor +double scale; - /// The dimension's offset value - double offset; +/// The dimension's offset value +double offset; }; /// A pointer to a dimension type list diff --git a/source/pdal/pdalc_pipeline.cpp b/source/pdal/pdalc_pipeline.cpp index fd7dfe8..85838ea 100644 --- a/source/pdal/pdalc_pipeline.cpp +++ b/source/pdal/pdalc_pipeline.cpp @@ -44,267 +44,267 @@ namespace capi { extern "C" { - PDALPipelinePtr PDALCreatePipeline(const char* json) +PDALPipelinePtr PDALCreatePipeline(const char* json) +{ + PDALPipelinePtr pipeline = nullptr; + + if (json && std::strlen(json) > 0) { - PDALPipelinePtr pipeline = nullptr; + pdal::PipelineExecutor *executor = nullptr; + + try + { + pdal::PipelineExecutor stackpipe(json); + executor = new pdal::PipelineExecutor(json); + } + catch (const std::exception &e) + { + printf("Could not create pipeline: %s\n%s\n", e.what(), json); + executor = nullptr; + } - if (json && std::strlen(json) > 0) + if (executor) { - pdal::PipelineExecutor *executor = nullptr; + bool valid = false; try { - pdal::PipelineExecutor stackpipe(json); - executor = new pdal::PipelineExecutor(json); + valid = executor->validate(); } catch (const std::exception &e) { - printf("Could not create pipeline: %s\n%s\n", e.what(), json); - executor = nullptr; + printf("Error while validating pipeline: %s\n%s\n", e.what(), json); } - if (executor) + if (valid) { - bool valid = false; - - try - { - valid = executor->validate(); - } - catch (const std::exception &e) - { - printf("Error while validating pipeline: %s\n%s\n", e.what(), json); - } - - if (valid) - { - pipeline = new Pipeline(executor); - } - else - { - delete executor; - executor = NULL; - printf("The pipeline is invalid:\n%s\n", json); - } + pipeline = new Pipeline(executor); + } + else + { + delete executor; + executor = NULL; + printf("The pipeline is invalid:\n%s\n", json); } } - - return pipeline; } - void PDALDisposePipeline(PDALPipelinePtr pipeline) - { - if (pipeline) - { - Pipeline *ptr = reinterpret_cast(pipeline); - delete ptr; - } - } + return pipeline; +} - size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size) +void PDALDisposePipeline(PDALPipelinePtr pipeline) +{ + if (pipeline) { - size_t result = 0; - - if (pipeline && buffer && size > 0) - { - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - buffer[0] = '\0'; - buffer[size - 1] = '\0'; - - if (executor) - { - try - { - std::string s = executor->getPipeline(); - std::strncpy(buffer, s.c_str(), size - 1); - result = std::min(s.length(), size); - } - catch (const std::exception &e) - { - printf("Found error while retrieving pipeline's string representation: %s\n", e.what()); - } - } - - } - - return result; + Pipeline *ptr = reinterpret_cast(pipeline); + delete ptr; } +} + +size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size) +{ + size_t result = 0; - size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size) + if (pipeline && buffer && size > 0) { - size_t result = 0; + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + buffer[0] = '\0'; + buffer[size - 1] = '\0'; - if (pipeline && metadata && size > 0) + if (executor) { - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - metadata[0] = '\0'; - metadata[size - 1] = '\0'; - - if (executor) + try { - try - { - std::string s = executor->getMetadata(); - std::strncpy(metadata, s.c_str(), size); - result = std::min(s.length(), size); - } - catch (const std::exception &e) - { - printf("Found error while retrieving pipeline's metadata: %s\n", e.what()); - } + std::string s = executor->getPipeline(); + std::strncpy(buffer, s.c_str(), size - 1); + result = std::min(s.length(), size); } - } - - return result; - } - - size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size) - { - size_t result = 0; - - if (pipeline && schema && size > 0) - { - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - schema[0] = '\0'; - schema[size - 1] = '\0'; - - if (executor) + catch (const std::exception &e) { - try - { - std::string s = executor->getSchema(); - std::strncpy(schema, s.c_str(), size); - result = std::min(s.length(), size); - } - catch (const std::exception &e) - { - printf("Found error while retrieving pipeline's schema: %s\n", e.what()); - } + printf("Found error while retrieving pipeline's string representation: %s\n", e.what()); } } - return result; } - size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size) - { - size_t result = 0; - - if (pipeline && log && size > 0) - { - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - log[0] = '\0'; - log[size - 1] = '\0'; - - if (executor) - { - try - { - std::string s = executor->getLog(); - std::strncpy(log, s.c_str(), size); - result = std::min(s.length(), size); - } - catch (const std::exception &e) - { - printf("Found error while retrieving pipeline's log: %s\n", e.what()); - } - } - } + return result; +} - return result; - } +size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size) +{ + size_t result = 0; - void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level) + if (pipeline && metadata && size > 0) { Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + metadata[0] = '\0'; + metadata[size - 1] = '\0'; - if (ptr && ptr->get()) + if (executor) { try { - ptr->get()->setLogLevel(level); + std::string s = executor->getMetadata(); + std::strncpy(metadata, s.c_str(), size); + result = std::min(s.length(), size); } catch (const std::exception &e) { - printf("Found error while setting log level: %s\n", e.what()); + printf("Found error while retrieving pipeline's metadata: %s\n", e.what()); } } } - int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline) - { - Pipeline *ptr = reinterpret_cast(pipeline); - return (ptr && ptr->get()) ? ptr->get()->getLogLevel() : 0; - } + return result; +} - int64_t PDALExecutePipeline(PDALPipelinePtr pipeline) +size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size) +{ + size_t result = 0; + + if (pipeline && schema && size > 0) { - int64_t result = 0; Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + schema[0] = '\0'; + schema[size - 1] = '\0'; - if (ptr && ptr->get()) + if (executor) { try { - result = ptr->get()->execute(); + std::string s = executor->getSchema(); + std::strncpy(schema, s.c_str(), size); + result = std::min(s.length(), size); } catch (const std::exception &e) { - printf("Found error while executing pipeline: %s", e.what()); + printf("Found error while retrieving pipeline's schema: %s\n", e.what()); } } - - return result; } - bool PDALValidatePipeline(PDALPipelinePtr pipeline) + return result; +} + +size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size) +{ + size_t result = 0; + + if (pipeline && log && size > 0) { - int64_t result = 0; Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + log[0] = '\0'; + log[size - 1] = '\0'; - if (ptr && ptr->get()) + if (executor) { try { - result = ptr->get()->validate(); + std::string s = executor->getLog(); + std::strncpy(log, s.c_str(), size); + result = std::min(s.length(), size); } catch (const std::exception &e) { - printf("Found error while validating pipeline: %s", e.what()); + printf("Found error while retrieving pipeline's log: %s\n", e.what()); } } + } + + return result; +} - return result; +void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level) +{ + Pipeline *ptr = reinterpret_cast(pipeline); + + if (ptr && ptr->get()) + { + try + { + ptr->get()->setLogLevel(level); + } + catch (const std::exception &e) + { + printf("Found error while setting log level: %s\n", e.what()); + } } +} + +int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline) +{ + Pipeline *ptr = reinterpret_cast(pipeline); + return (ptr && ptr->get()) ? ptr->get()->getLogLevel() : 0; +} - PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline) +int64_t PDALExecutePipeline(PDALPipelinePtr pipeline) +{ + int64_t result = 0; + Pipeline *ptr = reinterpret_cast(pipeline); + + if (ptr && ptr->get()) { - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::capi::PointViewIterator *views = nullptr; + try + { + result = ptr->get()->execute(); + } + catch (const std::exception &e) + { + printf("Found error while executing pipeline: %s", e.what()); + } + } + + return result; +} - if (ptr && ptr->get()) +bool PDALValidatePipeline(PDALPipelinePtr pipeline) +{ + int64_t result = 0; + Pipeline *ptr = reinterpret_cast(pipeline); + + if (ptr && ptr->get()) + { + try { - try - { - auto &v = ptr->get()->getManagerConst().views(); + result = ptr->get()->validate(); + } + catch (const std::exception &e) + { + printf("Found error while validating pipeline: %s", e.what()); + } + } - if (!v.empty()) - { - views = new pdal::capi::PointViewIterator(v); - } - } - catch (const std::exception &e) + return result; +} + +PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline) +{ + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::capi::PointViewIterator *views = nullptr; + + if (ptr && ptr->get()) + { + try + { + auto &v = ptr->get()->getManagerConst().views(); + + if (!v.empty()) { - printf("Found error while retrieving point views: %s\n", e.what()); + views = new pdal::capi::PointViewIterator(v); } } - - return views; + catch (const std::exception &e) + { + printf("Found error while retrieving point views: %s\n", e.what()); + } } + + return views; +} } } } diff --git a/source/pdal/pdalc_pointlayout.cpp b/source/pdal/pdalc_pointlayout.cpp index 11ed3d5..253711c 100644 --- a/source/pdal/pdalc_pointlayout.cpp +++ b/source/pdal/pdalc_pointlayout.cpp @@ -41,76 +41,76 @@ namespace capi PDALDimTypeListPtr PDALGetPointLayoutDimTypes(PDALPointLayoutPtr layout) { - PDALDimTypeListPtr types = NULL; - pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); +PDALDimTypeListPtr types = NULL; +pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); - if (nativeLayout) - { - pdal::DimTypeList *list = new pdal::DimTypeList(nativeLayout->dimTypes()); +if (nativeLayout) +{ + pdal::DimTypeList *list = new pdal::DimTypeList(nativeLayout->dimTypes()); - types = new pdal::capi::DimTypeList(list); - } + types = new pdal::capi::DimTypeList(list); +} - return types; +return types; } PDALDimType PDALFindDimType(PDALPointLayoutPtr layout, const char *name) { - PDALDimType dim = PDALGetInvalidDimType(); - pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); +PDALDimType dim = PDALGetInvalidDimType(); +pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); - if (name && nativeLayout) - { - pdal::DimType nativeDim = nativeLayout->findDimType(name); +if (name && nativeLayout) +{ + pdal::DimType nativeDim = nativeLayout->findDimType(name); - dim.id = static_cast(nativeDim.m_id); - dim.type = static_cast(nativeDim.m_type); - dim.scale = nativeDim.m_xform.m_scale.m_val; - dim.offset = nativeDim.m_xform.m_offset.m_val; - } + dim.id = static_cast(nativeDim.m_id); + dim.type = static_cast(nativeDim.m_type); + dim.scale = nativeDim.m_xform.m_scale.m_val; + dim.offset = nativeDim.m_xform.m_offset.m_val; +} - return dim; +return dim; } size_t PDALGetDimSize(PDALPointLayoutPtr layout, const char *name) { - pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); - return (name && nativeLayout) ? nativeLayout->dimSize(nativeLayout->findDim(name)) : 0; +pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); +return (name && nativeLayout) ? nativeLayout->dimSize(nativeLayout->findDim(name)) : 0; } size_t PDALGetDimPackedOffset(PDALPointLayoutPtr layout, const char *name) { - size_t offset = 0; +size_t offset = 0; - pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); +pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); - if (name && nativeLayout) - { - pdal::DimType type = nativeLayout->findDimType(name); - pdal::DimTypeList dims = nativeLayout->dimTypes(); - std::string nameString = pdal::Dimension::name(type.m_id); +if (name && nativeLayout) +{ + pdal::DimType type = nativeLayout->findDimType(name); + pdal::DimTypeList dims = nativeLayout->dimTypes(); + std::string nameString = pdal::Dimension::name(type.m_id); - for (auto dim : dims) + for (auto dim : dims) + { + if (nameString == pdal::Dimension::name(dim.m_id)) { - if (nameString == pdal::Dimension::name(dim.m_id)) - { - break; - } - else - { - offset += nativeLayout->dimSize(dim.m_id); - } + break; + } + else + { + offset += nativeLayout->dimSize(dim.m_id); } } +} - return offset; +return offset; } size_t PDALGetPointSize(PDALPointLayoutPtr layout) { - pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); - return nativeLayout ? nativeLayout->pointSize() : 0; +pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); +return nativeLayout ? nativeLayout->pointSize() : 0; } } } \ No newline at end of file diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index ba2f805..527d80c 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -39,213 +39,213 @@ namespace capi { extern "C" { - void PDALDisposePointView(PDALPointViewPtr view) - { - pdal::capi::PointView *wrapper = reinterpret_cast(view); +void PDALDisposePointView(PDALPointViewPtr view) +{ + pdal::capi::PointView *wrapper = reinterpret_cast(view); - if (wrapper) - { - delete wrapper; - } + if (wrapper) + { + delete wrapper; } +} - int PDALGetPointViewId(PDALPointViewPtr view) - { - pdal::capi::PointView *wrapper = reinterpret_cast(view); +int PDALGetPointViewId(PDALPointViewPtr view) +{ + pdal::capi::PointView *wrapper = reinterpret_cast(view); - return wrapper && *wrapper ? (*wrapper)->id() : 0; - } + return wrapper && *wrapper ? (*wrapper)->id() : 0; +} - uint64_t PDALGetPointViewSize(PDALPointViewPtr view) - { - pdal::capi::PointView *wrapper = reinterpret_cast(view); - return wrapper && *wrapper ? (*wrapper)->size() : 0; - } +uint64_t PDALGetPointViewSize(PDALPointViewPtr view) +{ + pdal::capi::PointView *wrapper = reinterpret_cast(view); + return wrapper && *wrapper ? (*wrapper)->size() : 0; +} + +bool PDALIsPointViewEmpty(PDALPointViewPtr view) +{ + pdal::capi::PointView *wrapper = reinterpret_cast(view); + return !wrapper || !*wrapper || (*wrapper)->empty(); +} - bool PDALIsPointViewEmpty(PDALPointViewPtr view) +PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view) +{ + pdal::capi::PointView *wrapper = reinterpret_cast(view); + + PDALPointViewPtr ptr = nullptr; + + if (wrapper && *wrapper) { - pdal::capi::PointView *wrapper = reinterpret_cast(view); - return !wrapper || !*wrapper || (*wrapper)->empty(); + ptr = new pdal::capi::PointView(std::move((*wrapper)->makeNew())); } - PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view) - { - pdal::capi::PointView *wrapper = reinterpret_cast(view); + return ptr; +} + +size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size) +{ + pdal::capi::PointView *wrapper = reinterpret_cast(view); + + size_t result = 0; - PDALPointViewPtr ptr = nullptr; + if (size > 0 && proj) + { + proj[0] = '\0'; + proj[size-1] = '\0'; if (wrapper && *wrapper) { - ptr = new pdal::capi::PointView(std::move((*wrapper)->makeNew())); + std::string s = (*wrapper)->spatialReference().getProj4(); + std::strncpy(proj, s.c_str(), size - 1); + result = std::min(s.length(), size); } - - return ptr; } - size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size) - { - pdal::capi::PointView *wrapper = reinterpret_cast(view); - - size_t result = 0; - - if (size > 0 && proj) - { - proj[0] = '\0'; - proj[size-1] = '\0'; + return result; +} - if (wrapper && *wrapper) - { - std::string s = (*wrapper)->spatialReference().getProj4(); - std::strncpy(proj, s.c_str(), size - 1); - result = std::min(s.length(), size); - } - } +size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty) +{ + pdal::capi::PointView *wrapper = reinterpret_cast(view); - return result; - } + size_t result = 0; - size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty) + if (size > 0 && wkt) { - pdal::capi::PointView *wrapper = reinterpret_cast(view); - - size_t result = 0; + wkt[0] = '\0'; + wkt[size-1] = '\0'; - if (size > 0 && wkt) + if (wrapper && *wrapper) { - wkt[0] = '\0'; - wkt[size-1] = '\0'; + std::string s = (*wrapper)->spatialReference().getWKT(); - if (wrapper && *wrapper) + if (pretty) { - std::string s = (*wrapper)->spatialReference().getWKT(); - - if (pretty) - { - s = SpatialReference::prettyWkt(s); - } - - std::strncpy(wkt, s.c_str(), size - 1); - result = std::min(s.length(), size); + s = SpatialReference::prettyWkt(s); } - } - return result; + std::strncpy(wkt, s.c_str(), size - 1); + result = std::min(s.length(), size); + } } - PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view) - { - pdal::capi::PointView *wrapper = reinterpret_cast(view); + return result; +} - PDALPointLayoutPtr layout = nullptr; +PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view) +{ + pdal::capi::PointView *wrapper = reinterpret_cast(view); - if (wrapper && *wrapper) - { - layout = (*wrapper)->layout(); - } + PDALPointLayoutPtr layout = nullptr; - return layout; + if (wrapper && *wrapper) + { + layout = (*wrapper)->layout(); } - size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buf) - { - size_t size = 0; + return layout; +} - if (view && dims && buf) - { - pdal::capi::PointView *capiView = reinterpret_cast(view); +size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buf) +{ + size_t size = 0; - pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); + if (view && dims && buf) + { + pdal::capi::PointView *capiView = reinterpret_cast(view); + pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); - if (*capiView && *capiDims) - { - pdal::DimTypeList *list = capiDims->get(); - (*capiView)->getPackedPoint(*list, idx, buf); + if (*capiView && *capiDims) + { + pdal::DimTypeList *list = capiDims->get(); - for (const auto &dim : *list) - { - size += pdal::Dimension::size(dim.m_type); - } + (*capiView)->getPackedPoint(*list, idx, buf); + + for (const auto &dim : *list) + { + size += pdal::Dimension::size(dim.m_type); } } - - return size; } - uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buf) + return size; +} + +uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buf) +{ + uint64_t size = 0; + + if (view && dims && buf) { - uint64_t size = 0; + pdal::capi::PointView *capiView = reinterpret_cast(view); - if (view && dims && buf) - { - pdal::capi::PointView *capiView = reinterpret_cast(view); + pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); - pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); + if (*capiView && *capiDims) + { + pdal::DimTypeList *list = capiDims->get(); - if (*capiView && *capiDims) + for (unsigned i = 0; i < (*capiView)->size(); ++i) { - pdal::DimTypeList *list = capiDims->get(); + size_t pointSize = 0; + (*capiView)->getPackedPoint(*list, i, buf); - for (unsigned i = 0; i < (*capiView)->size(); ++i) + for (const auto &dim : *list) { - size_t pointSize = 0; - (*capiView)->getPackedPoint(*list, i, buf); - - for (const auto &dim : *list) - { - pointSize += pdal::Dimension::size(dim.m_type); - } - - buf += pointSize; - size += pointSize; + pointSize += pdal::Dimension::size(dim.m_type); } + + buf += pointSize; + size += pointSize; } } - - return size; } - uint64_t PDALGetMeshSize(PDALPointViewPtr view) - { - pdal::capi::PointView* wrapper = reinterpret_cast(view); - pdal::TriangularMesh* mesh=(*wrapper)->mesh(); + return size; +} - return mesh ? static_cast((*mesh).size()) : 0; - } +uint64_t PDALGetMeshSize(PDALPointViewPtr view) +{ + pdal::capi::PointView* wrapper = reinterpret_cast(view); + pdal::TriangularMesh* mesh=(*wrapper)->mesh(); - uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) + return mesh ? static_cast((*mesh).size()) : 0; +} + +uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) +{ + size_t size = 0; + + if (view && buff) { - size_t size = 0; + pdal::capi::PointView* capiView = reinterpret_cast(view); + pdal::TriangularMesh* mesh=(*capiView)->mesh(); - if (view && buff) - { - pdal::capi::PointView* capiView = reinterpret_cast(view); - pdal::TriangularMesh* mesh=(*capiView)->mesh(); - - if (*capiView && mesh) + if (*capiView && mesh) + { + for (size_t idx = 0; idx < (*mesh).size(); ++idx) { - for (size_t idx = 0; idx < (*mesh).size(); ++idx) - { - const Triangle& t = (*mesh)[idx]; - uint32_t a = (uint32_t)t.m_a; - std::memcpy(buff, &a, 4); - uint32_t b = (uint32_t)t.m_b; - std::memcpy(buff + 4, &b, 4); - uint32_t c = (uint32_t)t.m_c; - std::memcpy(buff + 8, &c, 4); - - buff += 12; - size += 12; - } + const Triangle& t = (*mesh)[idx]; + uint32_t a = (uint32_t)t.m_a; + std::memcpy(buff, &a, 4); + uint32_t b = (uint32_t)t.m_b; + std::memcpy(buff + 4, &b, 4); + uint32_t c = (uint32_t)t.m_c; + std::memcpy(buff + 8, &c, 4); + + buff += 12; + size += 12; } } - - return static_cast(size); } + return static_cast(size); +} + } } } \ No newline at end of file diff --git a/source/pdal/pdalc_pointviewiterator.cpp b/source/pdal/pdalc_pointviewiterator.cpp index 876930c..4649104 100644 --- a/source/pdal/pdalc_pointviewiterator.cpp +++ b/source/pdal/pdalc_pointviewiterator.cpp @@ -34,74 +34,74 @@ namespace pdal namespace capi { PointViewIterator::PointViewIterator(const pdal::PointViewSet& views) : - m_views(views) +m_views(views) { - reset(); +reset(); } bool PointViewIterator::hasNext() const { - return (m_itr != m_views.cend()); +return (m_itr != m_views.cend()); } const pdal::PointViewPtr PointViewIterator::next() { - return hasNext() ? *(m_itr++) : nullptr; +return hasNext() ? *(m_itr++) : nullptr; } void PointViewIterator::reset() { - m_itr = m_views.cbegin(); +m_itr = m_views.cbegin(); } extern "C" { - bool PDALHasNextPointView(PDALPointViewIteratorPtr itr) - { - auto ptr = reinterpret_cast(itr); - return ptr && ptr->hasNext(); - } +bool PDALHasNextPointView(PDALPointViewIteratorPtr itr) +{ + auto ptr = reinterpret_cast(itr); + return ptr && ptr->hasNext(); +} + +PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr) +{ + auto ptr = reinterpret_cast(itr); + PDALPointViewPtr view = nullptr; - PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr) + if (ptr) { - auto ptr = reinterpret_cast(itr); - PDALPointViewPtr view = nullptr; + pdal::PointViewPtr v = ptr->next(); - if (ptr) + if (v) { - pdal::PointViewPtr v = ptr->next(); - - if (v) - { - view = new pdal::PointViewPtr(std::move(v)); - } + view = new pdal::PointViewPtr(std::move(v)); } - - return view; } - void PDALResetPointViewIterator(PDALPointViewIteratorPtr itr) - { - auto ptr = reinterpret_cast(itr); + return view; +} - if (ptr) - { - ptr->reset(); - } - } +void PDALResetPointViewIterator(PDALPointViewIteratorPtr itr) +{ + auto ptr = reinterpret_cast(itr); - void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr) + if (ptr) { - auto ptr = reinterpret_cast(itr); + ptr->reset(); + } +} - if (ptr) - { - delete ptr; - ptr = nullptr; - itr = nullptr; - } +void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr) +{ + auto ptr = reinterpret_cast(itr); + + if (ptr) + { + delete ptr; + ptr = nullptr; + itr = nullptr; } +} } diff --git a/source/pdal/pdalc_pointviewiterator.h b/source/pdal/pdalc_pointviewiterator.h index 4e7a64d..eafee9b 100644 --- a/source/pdal/pdalc_pointviewiterator.h +++ b/source/pdal/pdalc_pointviewiterator.h @@ -47,14 +47,14 @@ namespace capi class PointViewIterator { public: - PointViewIterator(const pdal::PointViewSet& views); - bool hasNext() const; - const pdal::PointViewPtr next(); - void reset(); +PointViewIterator(const pdal::PointViewSet& views); +bool hasNext() const; +const pdal::PointViewPtr next(); +void reset(); private: - const pdal::PointViewSet &m_views; - pdal::PointViewSet::const_iterator m_itr; +const pdal::PointViewSet &m_views; +pdal::PointViewSet::const_iterator m_itr; }; extern "C" From 0aa9734da184908af0e091c2f4c3e5efc129c021 Mon Sep 17 00:00:00 2001 From: Paul Harwood Date: Fri, 30 Apr 2021 08:09:16 +0100 Subject: [PATCH 30/36] more astyle --- source/pdal/pdalc_dimtype.cpp | 138 ++++----- source/pdal/pdalc_forward.h | 8 +- source/pdal/pdalc_pipeline.cpp | 358 ++++++++++++------------ source/pdal/pdalc_pointlayout.cpp | 80 +++--- source/pdal/pdalc_pointview.cpp | 282 +++++++++---------- source/pdal/pdalc_pointviewiterator.cpp | 76 ++--- source/pdal/pdalc_pointviewiterator.h | 12 +- 7 files changed, 477 insertions(+), 477 deletions(-) diff --git a/source/pdal/pdalc_dimtype.cpp b/source/pdal/pdalc_dimtype.cpp index 9e771cc..b1d782d 100644 --- a/source/pdal/pdalc_dimtype.cpp +++ b/source/pdal/pdalc_dimtype.cpp @@ -37,122 +37,122 @@ namespace capi { size_t PDALGetDimTypeListSize(PDALDimTypeListPtr types) { -pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); + pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); -size_t size = 0; + size_t size = 0; -if (wrapper && wrapper->get()) -{ - try - { - pdal::DimTypeList *list = wrapper->get(); - size = list->size(); - } - catch (const std::exception &e) + if (wrapper && wrapper->get()) { - printf("%s\n", e.what()); + try + { + pdal::DimTypeList *list = wrapper->get(); + size = list->size(); + } + catch (const std::exception &e) + { + printf("%s\n", e.what()); + } } -} -return size; + return size; } uint64_t PDALGetDimTypeListByteCount(PDALDimTypeListPtr types) { -uint64_t byteCount = 0; -size_t pointCount = PDALGetDimTypeListSize(types); + uint64_t byteCount = 0; + size_t pointCount = PDALGetDimTypeListSize(types); -for (size_t i = 0; i < pointCount; ++i) -{ - byteCount += PDALGetDimTypeInterpretationByteCount(PDALGetDimType(types, i)); -} + for (size_t i = 0; i < pointCount; ++i) + { + byteCount += PDALGetDimTypeInterpretationByteCount(PDALGetDimType(types, i)); + } -return byteCount; + return byteCount; } PDALDimType PDALGetInvalidDimType() { -PDALDimType dim = -{ - static_cast(pdal::Dimension::id("")), static_cast(pdal::Dimension::type("")), - 1.0, 0.0 -}; + PDALDimType dim = + { + static_cast(pdal::Dimension::id("")), static_cast(pdal::Dimension::type("")), + 1.0, 0.0 + }; -return dim; + return dim; } size_t PDALGetDimTypeIdName(PDALDimType dim, char *name, size_t size) { -size_t result = 0; + size_t result = 0; -if (name && size > 0) -{ - std::string s = pdal::Dimension::name( - static_cast(dim.id)); - std::strncpy(name, s.c_str(), size); - result = std::min(std::strlen(name), size); -} + if (name && size > 0) + { + std::string s = pdal::Dimension::name( + static_cast(dim.id)); + std::strncpy(name, s.c_str(), size); + result = std::min(std::strlen(name), size); + } -return result; + return result; } size_t PDALGetDimTypeInterpretationName(PDALDimType dim, char *name, size_t size) { -size_t result = 0; + size_t result = 0; -if (name && size > 0) -{ - std::string s = pdal::Dimension::interpretationName( - static_cast(dim.type)); - std::strncpy(name, s.c_str(), size); - result = std::min(std::strlen(name), size); -} + if (name && size > 0) + { + std::string s = pdal::Dimension::interpretationName( + static_cast(dim.type)); + std::strncpy(name, s.c_str(), size); + result = std::min(std::strlen(name), size); + } -return result; + return result; } size_t PDALGetDimTypeInterpretationByteCount(PDALDimType dim) { -return pdal::Dimension::size(static_cast(dim.type)); + return pdal::Dimension::size(static_cast(dim.type)); } PDALDimType PDALGetDimType(PDALDimTypeListPtr types, size_t index) { -pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); + pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); -PDALDimType dim = PDALGetInvalidDimType(); + PDALDimType dim = PDALGetInvalidDimType(); -if (wrapper && wrapper->get()) -{ - try + if (wrapper && wrapper->get()) { - pdal::DimTypeList *list = wrapper->get(); - - if (index < list->size()) + try { - pdal::DimType nativeDim = list->at(index); - dim.id = static_cast(nativeDim.m_id); - dim.type = static_cast(nativeDim.m_type); - dim.scale = nativeDim.m_xform.m_scale.m_val; - dim.offset = nativeDim.m_xform.m_offset.m_val; + pdal::DimTypeList *list = wrapper->get(); + + if (index < list->size()) + { + pdal::DimType nativeDim = list->at(index); + dim.id = static_cast(nativeDim.m_id); + dim.type = static_cast(nativeDim.m_type); + dim.scale = nativeDim.m_xform.m_scale.m_val; + dim.offset = nativeDim.m_xform.m_offset.m_val; + } + } + catch (const std::exception &e) + { + printf("%s\n", e.what()); } } - catch (const std::exception &e) - { - printf("%s\n", e.what()); - } -} -return dim; + return dim; } void PDALDisposeDimTypeList(PDALDimTypeListPtr types) { -if (types) -{ - pdal::capi::DimTypeList *ptr = reinterpret_cast(types); - delete ptr; -} + if (types) + { + pdal::capi::DimTypeList *ptr = reinterpret_cast(types); + delete ptr; + } } } } \ No newline at end of file diff --git a/source/pdal/pdalc_forward.h b/source/pdal/pdalc_forward.h index f909042..0c68b16 100644 --- a/source/pdal/pdalc_forward.h +++ b/source/pdal/pdalc_forward.h @@ -81,16 +81,16 @@ typedef struct PDALDimType PDALDimType; struct PDALDimType { /// The dimension's identifier -uint32_t id; + uint32_t id; /// The dimension's interpretation type -uint32_t type; + uint32_t type; /// The dimension's scaling factor -double scale; + double scale; /// The dimension's offset value -double offset; + double offset; }; /// A pointer to a dimension type list diff --git a/source/pdal/pdalc_pipeline.cpp b/source/pdal/pdalc_pipeline.cpp index 85838ea..fd7dfe8 100644 --- a/source/pdal/pdalc_pipeline.cpp +++ b/source/pdal/pdalc_pipeline.cpp @@ -44,267 +44,267 @@ namespace capi { extern "C" { -PDALPipelinePtr PDALCreatePipeline(const char* json) -{ - PDALPipelinePtr pipeline = nullptr; - - if (json && std::strlen(json) > 0) + PDALPipelinePtr PDALCreatePipeline(const char* json) { - pdal::PipelineExecutor *executor = nullptr; - - try - { - pdal::PipelineExecutor stackpipe(json); - executor = new pdal::PipelineExecutor(json); - } - catch (const std::exception &e) - { - printf("Could not create pipeline: %s\n%s\n", e.what(), json); - executor = nullptr; - } + PDALPipelinePtr pipeline = nullptr; - if (executor) + if (json && std::strlen(json) > 0) { - bool valid = false; + pdal::PipelineExecutor *executor = nullptr; try { - valid = executor->validate(); + pdal::PipelineExecutor stackpipe(json); + executor = new pdal::PipelineExecutor(json); } catch (const std::exception &e) { - printf("Error while validating pipeline: %s\n%s\n", e.what(), json); + printf("Could not create pipeline: %s\n%s\n", e.what(), json); + executor = nullptr; } - if (valid) + if (executor) { - pipeline = new Pipeline(executor); - } - else - { - delete executor; - executor = NULL; - printf("The pipeline is invalid:\n%s\n", json); + bool valid = false; + + try + { + valid = executor->validate(); + } + catch (const std::exception &e) + { + printf("Error while validating pipeline: %s\n%s\n", e.what(), json); + } + + if (valid) + { + pipeline = new Pipeline(executor); + } + else + { + delete executor; + executor = NULL; + printf("The pipeline is invalid:\n%s\n", json); + } } } - } - return pipeline; -} + return pipeline; + } -void PDALDisposePipeline(PDALPipelinePtr pipeline) -{ - if (pipeline) + void PDALDisposePipeline(PDALPipelinePtr pipeline) { - Pipeline *ptr = reinterpret_cast(pipeline); - delete ptr; + if (pipeline) + { + Pipeline *ptr = reinterpret_cast(pipeline); + delete ptr; + } } -} -size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size) -{ - size_t result = 0; + size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size) + { + size_t result = 0; + + if (pipeline && buffer && size > 0) + { + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + buffer[0] = '\0'; + buffer[size - 1] = '\0'; + + if (executor) + { + try + { + std::string s = executor->getPipeline(); + std::strncpy(buffer, s.c_str(), size - 1); + result = std::min(s.length(), size); + } + catch (const std::exception &e) + { + printf("Found error while retrieving pipeline's string representation: %s\n", e.what()); + } + } + + } + + return result; + } - if (pipeline && buffer && size > 0) + size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size) { - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - buffer[0] = '\0'; - buffer[size - 1] = '\0'; + size_t result = 0; - if (executor) + if (pipeline && metadata && size > 0) { - try + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + metadata[0] = '\0'; + metadata[size - 1] = '\0'; + + if (executor) { - std::string s = executor->getPipeline(); - std::strncpy(buffer, s.c_str(), size - 1); - result = std::min(s.length(), size); + try + { + std::string s = executor->getMetadata(); + std::strncpy(metadata, s.c_str(), size); + result = std::min(s.length(), size); + } + catch (const std::exception &e) + { + printf("Found error while retrieving pipeline's metadata: %s\n", e.what()); + } } - catch (const std::exception &e) + } + + return result; + } + + size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size) + { + size_t result = 0; + + if (pipeline && schema && size > 0) + { + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + schema[0] = '\0'; + schema[size - 1] = '\0'; + + if (executor) { - printf("Found error while retrieving pipeline's string representation: %s\n", e.what()); + try + { + std::string s = executor->getSchema(); + std::strncpy(schema, s.c_str(), size); + result = std::min(s.length(), size); + } + catch (const std::exception &e) + { + printf("Found error while retrieving pipeline's schema: %s\n", e.what()); + } } } + return result; } - return result; -} + size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size) + { + size_t result = 0; -size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size) -{ - size_t result = 0; + if (pipeline && log && size > 0) + { + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + log[0] = '\0'; + log[size - 1] = '\0'; + + if (executor) + { + try + { + std::string s = executor->getLog(); + std::strncpy(log, s.c_str(), size); + result = std::min(s.length(), size); + } + catch (const std::exception &e) + { + printf("Found error while retrieving pipeline's log: %s\n", e.what()); + } + } + } - if (pipeline && metadata && size > 0) + return result; + } + + void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level) { Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - metadata[0] = '\0'; - metadata[size - 1] = '\0'; - if (executor) + if (ptr && ptr->get()) { try { - std::string s = executor->getMetadata(); - std::strncpy(metadata, s.c_str(), size); - result = std::min(s.length(), size); + ptr->get()->setLogLevel(level); } catch (const std::exception &e) { - printf("Found error while retrieving pipeline's metadata: %s\n", e.what()); + printf("Found error while setting log level: %s\n", e.what()); } } } - return result; -} - -size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size) -{ - size_t result = 0; + int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline) + { + Pipeline *ptr = reinterpret_cast(pipeline); + return (ptr && ptr->get()) ? ptr->get()->getLogLevel() : 0; + } - if (pipeline && schema && size > 0) + int64_t PDALExecutePipeline(PDALPipelinePtr pipeline) { + int64_t result = 0; Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - schema[0] = '\0'; - schema[size - 1] = '\0'; - if (executor) + if (ptr && ptr->get()) { try { - std::string s = executor->getSchema(); - std::strncpy(schema, s.c_str(), size); - result = std::min(s.length(), size); + result = ptr->get()->execute(); } catch (const std::exception &e) { - printf("Found error while retrieving pipeline's schema: %s\n", e.what()); + printf("Found error while executing pipeline: %s", e.what()); } } - } - return result; -} - -size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size) -{ - size_t result = 0; + return result; + } - if (pipeline && log && size > 0) + bool PDALValidatePipeline(PDALPipelinePtr pipeline) { + int64_t result = 0; Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - log[0] = '\0'; - log[size - 1] = '\0'; - if (executor) + if (ptr && ptr->get()) { try { - std::string s = executor->getLog(); - std::strncpy(log, s.c_str(), size); - result = std::min(s.length(), size); + result = ptr->get()->validate(); } catch (const std::exception &e) { - printf("Found error while retrieving pipeline's log: %s\n", e.what()); + printf("Found error while validating pipeline: %s", e.what()); } } - } - - return result; -} -void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level) -{ - Pipeline *ptr = reinterpret_cast(pipeline); - - if (ptr && ptr->get()) - { - try - { - ptr->get()->setLogLevel(level); - } - catch (const std::exception &e) - { - printf("Found error while setting log level: %s\n", e.what()); - } - } -} - -int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline) -{ - Pipeline *ptr = reinterpret_cast(pipeline); - return (ptr && ptr->get()) ? ptr->get()->getLogLevel() : 0; -} - -int64_t PDALExecutePipeline(PDALPipelinePtr pipeline) -{ - int64_t result = 0; - Pipeline *ptr = reinterpret_cast(pipeline); - - if (ptr && ptr->get()) - { - try - { - result = ptr->get()->execute(); - } - catch (const std::exception &e) - { - printf("Found error while executing pipeline: %s", e.what()); - } + return result; } - return result; -} - -bool PDALValidatePipeline(PDALPipelinePtr pipeline) -{ - int64_t result = 0; - Pipeline *ptr = reinterpret_cast(pipeline); - - if (ptr && ptr->get()) + PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline) { - try - { - result = ptr->get()->validate(); - } - catch (const std::exception &e) - { - printf("Found error while validating pipeline: %s", e.what()); - } - } - - return result; -} - -PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline) -{ - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::capi::PointViewIterator *views = nullptr; + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::capi::PointViewIterator *views = nullptr; - if (ptr && ptr->get()) - { - try + if (ptr && ptr->get()) { - auto &v = ptr->get()->getManagerConst().views(); + try + { + auto &v = ptr->get()->getManagerConst().views(); - if (!v.empty()) + if (!v.empty()) + { + views = new pdal::capi::PointViewIterator(v); + } + } + catch (const std::exception &e) { - views = new pdal::capi::PointViewIterator(v); + printf("Found error while retrieving point views: %s\n", e.what()); } } - catch (const std::exception &e) - { - printf("Found error while retrieving point views: %s\n", e.what()); - } - } - return views; -} + return views; + } } } } diff --git a/source/pdal/pdalc_pointlayout.cpp b/source/pdal/pdalc_pointlayout.cpp index 253711c..11ed3d5 100644 --- a/source/pdal/pdalc_pointlayout.cpp +++ b/source/pdal/pdalc_pointlayout.cpp @@ -41,76 +41,76 @@ namespace capi PDALDimTypeListPtr PDALGetPointLayoutDimTypes(PDALPointLayoutPtr layout) { -PDALDimTypeListPtr types = NULL; -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + PDALDimTypeListPtr types = NULL; + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); -if (nativeLayout) -{ - pdal::DimTypeList *list = new pdal::DimTypeList(nativeLayout->dimTypes()); + if (nativeLayout) + { + pdal::DimTypeList *list = new pdal::DimTypeList(nativeLayout->dimTypes()); - types = new pdal::capi::DimTypeList(list); -} + types = new pdal::capi::DimTypeList(list); + } -return types; + return types; } PDALDimType PDALFindDimType(PDALPointLayoutPtr layout, const char *name) { -PDALDimType dim = PDALGetInvalidDimType(); -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + PDALDimType dim = PDALGetInvalidDimType(); + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); -if (name && nativeLayout) -{ - pdal::DimType nativeDim = nativeLayout->findDimType(name); + if (name && nativeLayout) + { + pdal::DimType nativeDim = nativeLayout->findDimType(name); - dim.id = static_cast(nativeDim.m_id); - dim.type = static_cast(nativeDim.m_type); - dim.scale = nativeDim.m_xform.m_scale.m_val; - dim.offset = nativeDim.m_xform.m_offset.m_val; -} + dim.id = static_cast(nativeDim.m_id); + dim.type = static_cast(nativeDim.m_type); + dim.scale = nativeDim.m_xform.m_scale.m_val; + dim.offset = nativeDim.m_xform.m_offset.m_val; + } -return dim; + return dim; } size_t PDALGetDimSize(PDALPointLayoutPtr layout, const char *name) { -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); -return (name && nativeLayout) ? nativeLayout->dimSize(nativeLayout->findDim(name)) : 0; + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + return (name && nativeLayout) ? nativeLayout->dimSize(nativeLayout->findDim(name)) : 0; } size_t PDALGetDimPackedOffset(PDALPointLayoutPtr layout, const char *name) { -size_t offset = 0; - -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + size_t offset = 0; -if (name && nativeLayout) -{ - pdal::DimType type = nativeLayout->findDimType(name); - pdal::DimTypeList dims = nativeLayout->dimTypes(); - std::string nameString = pdal::Dimension::name(type.m_id); + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); - for (auto dim : dims) + if (name && nativeLayout) { - if (nameString == pdal::Dimension::name(dim.m_id)) - { - break; - } - else + pdal::DimType type = nativeLayout->findDimType(name); + pdal::DimTypeList dims = nativeLayout->dimTypes(); + std::string nameString = pdal::Dimension::name(type.m_id); + + for (auto dim : dims) { - offset += nativeLayout->dimSize(dim.m_id); + if (nameString == pdal::Dimension::name(dim.m_id)) + { + break; + } + else + { + offset += nativeLayout->dimSize(dim.m_id); + } } } -} -return offset; + return offset; } size_t PDALGetPointSize(PDALPointLayoutPtr layout) { -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); -return nativeLayout ? nativeLayout->pointSize() : 0; + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + return nativeLayout ? nativeLayout->pointSize() : 0; } } } \ No newline at end of file diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 527d80c..b1de2cd 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -39,212 +39,212 @@ namespace capi { extern "C" { -void PDALDisposePointView(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - - if (wrapper) + void PDALDisposePointView(PDALPointViewPtr view) { - delete wrapper; - } -} - -int PDALGetPointViewId(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); + pdal::capi::PointView *wrapper = reinterpret_cast(view); - return wrapper && *wrapper ? (*wrapper)->id() : 0; -} - -uint64_t PDALGetPointViewSize(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - return wrapper && *wrapper ? (*wrapper)->size() : 0; -} - -bool PDALIsPointViewEmpty(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - return !wrapper || !*wrapper || (*wrapper)->empty(); -} + if (wrapper) + { + delete wrapper; + } + } -PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); + int PDALGetPointViewId(PDALPointViewPtr view) + { + pdal::capi::PointView *wrapper = reinterpret_cast(view); - PDALPointViewPtr ptr = nullptr; + return wrapper && *wrapper ? (*wrapper)->id() : 0; + } - if (wrapper && *wrapper) + uint64_t PDALGetPointViewSize(PDALPointViewPtr view) { - ptr = new pdal::capi::PointView(std::move((*wrapper)->makeNew())); + pdal::capi::PointView *wrapper = reinterpret_cast(view); + return wrapper && *wrapper ? (*wrapper)->size() : 0; } - return ptr; -} - -size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - - size_t result = 0; + bool PDALIsPointViewEmpty(PDALPointViewPtr view) + { + pdal::capi::PointView *wrapper = reinterpret_cast(view); + return !wrapper || !*wrapper || (*wrapper)->empty(); + } - if (size > 0 && proj) + PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view) { - proj[0] = '\0'; - proj[size-1] = '\0'; + pdal::capi::PointView *wrapper = reinterpret_cast(view); + + PDALPointViewPtr ptr = nullptr; if (wrapper && *wrapper) { - std::string s = (*wrapper)->spatialReference().getProj4(); - std::strncpy(proj, s.c_str(), size - 1); - result = std::min(s.length(), size); + ptr = new pdal::capi::PointView(std::move((*wrapper)->makeNew())); } - } - - return result; -} -size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - - size_t result = 0; + return ptr; + } - if (size > 0 && wkt) + size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size) { - wkt[0] = '\0'; - wkt[size-1] = '\0'; + pdal::capi::PointView *wrapper = reinterpret_cast(view); - if (wrapper && *wrapper) + size_t result = 0; + + if (size > 0 && proj) { - std::string s = (*wrapper)->spatialReference().getWKT(); + proj[0] = '\0'; + proj[size-1] = '\0'; - if (pretty) + if (wrapper && *wrapper) { - s = SpatialReference::prettyWkt(s); + std::string s = (*wrapper)->spatialReference().getProj4(); + std::strncpy(proj, s.c_str(), size - 1); + result = std::min(s.length(), size); } - - std::strncpy(wkt, s.c_str(), size - 1); - result = std::min(s.length(), size); } + + return result; } - return result; -} + size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty) + { + pdal::capi::PointView *wrapper = reinterpret_cast(view); -PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); + size_t result = 0; - PDALPointLayoutPtr layout = nullptr; + if (size > 0 && wkt) + { + wkt[0] = '\0'; + wkt[size-1] = '\0'; - if (wrapper && *wrapper) - { - layout = (*wrapper)->layout(); - } + if (wrapper && *wrapper) + { + std::string s = (*wrapper)->spatialReference().getWKT(); - return layout; -} + if (pretty) + { + s = SpatialReference::prettyWkt(s); + } -size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buf) -{ - size_t size = 0; + std::strncpy(wkt, s.c_str(), size - 1); + result = std::min(s.length(), size); + } + } - if (view && dims && buf) + return result; + } + + PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view) { - pdal::capi::PointView *capiView = reinterpret_cast(view); + pdal::capi::PointView *wrapper = reinterpret_cast(view); + + PDALPointLayoutPtr layout = nullptr; - pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); + if (wrapper && *wrapper) + { + layout = (*wrapper)->layout(); + } + return layout; + } + + size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buf) + { + size_t size = 0; - if (*capiView && *capiDims) + if (view && dims && buf) { - pdal::DimTypeList *list = capiDims->get(); + pdal::capi::PointView *capiView = reinterpret_cast(view); - (*capiView)->getPackedPoint(*list, idx, buf); + pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); - for (const auto &dim : *list) + + if (*capiView && *capiDims) { - size += pdal::Dimension::size(dim.m_type); + pdal::DimTypeList *list = capiDims->get(); + + (*capiView)->getPackedPoint(*list, idx, buf); + + for (const auto &dim : *list) + { + size += pdal::Dimension::size(dim.m_type); + } } } - } - - return size; -} -uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buf) -{ - uint64_t size = 0; + return size; + } - if (view && dims && buf) + uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buf) { - pdal::capi::PointView *capiView = reinterpret_cast(view); + uint64_t size = 0; - pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); + if (view && dims && buf) + { + pdal::capi::PointView *capiView = reinterpret_cast(view); + pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); - if (*capiView && *capiDims) - { - pdal::DimTypeList *list = capiDims->get(); - for (unsigned i = 0; i < (*capiView)->size(); ++i) + if (*capiView && *capiDims) { - size_t pointSize = 0; - (*capiView)->getPackedPoint(*list, i, buf); + pdal::DimTypeList *list = capiDims->get(); - for (const auto &dim : *list) + for (unsigned i = 0; i < (*capiView)->size(); ++i) { - pointSize += pdal::Dimension::size(dim.m_type); - } + size_t pointSize = 0; + (*capiView)->getPackedPoint(*list, i, buf); + + for (const auto &dim : *list) + { + pointSize += pdal::Dimension::size(dim.m_type); + } - buf += pointSize; - size += pointSize; + buf += pointSize; + size += pointSize; + } } } - } - - return size; -} -uint64_t PDALGetMeshSize(PDALPointViewPtr view) -{ - pdal::capi::PointView* wrapper = reinterpret_cast(view); - pdal::TriangularMesh* mesh=(*wrapper)->mesh(); + return size; + } - return mesh ? static_cast((*mesh).size()) : 0; -} + uint64_t PDALGetMeshSize(PDALPointViewPtr view) + { + pdal::capi::PointView* wrapper = reinterpret_cast(view); + pdal::TriangularMesh* mesh=(*wrapper)->mesh(); -uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) -{ - size_t size = 0; + return mesh ? static_cast((*mesh).size()) : 0; + } - if (view && buff) + uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) { - pdal::capi::PointView* capiView = reinterpret_cast(view); - pdal::TriangularMesh* mesh=(*capiView)->mesh(); + size_t size = 0; - - if (*capiView && mesh) + if (view && buff) { - for (size_t idx = 0; idx < (*mesh).size(); ++idx) + pdal::capi::PointView* capiView = reinterpret_cast(view); + pdal::TriangularMesh* mesh=(*capiView)->mesh(); + + + if (*capiView && mesh) { - const Triangle& t = (*mesh)[idx]; - uint32_t a = (uint32_t)t.m_a; - std::memcpy(buff, &a, 4); - uint32_t b = (uint32_t)t.m_b; - std::memcpy(buff + 4, &b, 4); - uint32_t c = (uint32_t)t.m_c; - std::memcpy(buff + 8, &c, 4); - - buff += 12; - size += 12; + for (size_t idx = 0; idx < (*mesh).size(); ++idx) + { + const Triangle& t = (*mesh)[idx]; + uint32_t a = (uint32_t)t.m_a; + std::memcpy(buff, &a, 4); + uint32_t b = (uint32_t)t.m_b; + std::memcpy(buff + 4, &b, 4); + uint32_t c = (uint32_t)t.m_c; + std::memcpy(buff + 8, &c, 4); + + buff += 12; + size += 12; + } } } - } - return static_cast(size); -} + return static_cast(size); + } } } diff --git a/source/pdal/pdalc_pointviewiterator.cpp b/source/pdal/pdalc_pointviewiterator.cpp index 4649104..876930c 100644 --- a/source/pdal/pdalc_pointviewiterator.cpp +++ b/source/pdal/pdalc_pointviewiterator.cpp @@ -34,74 +34,74 @@ namespace pdal namespace capi { PointViewIterator::PointViewIterator(const pdal::PointViewSet& views) : -m_views(views) + m_views(views) { -reset(); + reset(); } bool PointViewIterator::hasNext() const { -return (m_itr != m_views.cend()); + return (m_itr != m_views.cend()); } const pdal::PointViewPtr PointViewIterator::next() { -return hasNext() ? *(m_itr++) : nullptr; + return hasNext() ? *(m_itr++) : nullptr; } void PointViewIterator::reset() { -m_itr = m_views.cbegin(); + m_itr = m_views.cbegin(); } extern "C" { -bool PDALHasNextPointView(PDALPointViewIteratorPtr itr) -{ - auto ptr = reinterpret_cast(itr); - return ptr && ptr->hasNext(); -} - -PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr) -{ - auto ptr = reinterpret_cast(itr); - PDALPointViewPtr view = nullptr; + bool PDALHasNextPointView(PDALPointViewIteratorPtr itr) + { + auto ptr = reinterpret_cast(itr); + return ptr && ptr->hasNext(); + } - if (ptr) + PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr) { - pdal::PointViewPtr v = ptr->next(); + auto ptr = reinterpret_cast(itr); + PDALPointViewPtr view = nullptr; - if (v) + if (ptr) { - view = new pdal::PointViewPtr(std::move(v)); - } - } + pdal::PointViewPtr v = ptr->next(); - return view; -} + if (v) + { + view = new pdal::PointViewPtr(std::move(v)); + } + } -void PDALResetPointViewIterator(PDALPointViewIteratorPtr itr) -{ - auto ptr = reinterpret_cast(itr); + return view; + } - if (ptr) + void PDALResetPointViewIterator(PDALPointViewIteratorPtr itr) { - ptr->reset(); - } -} + auto ptr = reinterpret_cast(itr); -void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr) -{ - auto ptr = reinterpret_cast(itr); + if (ptr) + { + ptr->reset(); + } + } - if (ptr) + void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr) { - delete ptr; - ptr = nullptr; - itr = nullptr; + auto ptr = reinterpret_cast(itr); + + if (ptr) + { + delete ptr; + ptr = nullptr; + itr = nullptr; + } } -} } diff --git a/source/pdal/pdalc_pointviewiterator.h b/source/pdal/pdalc_pointviewiterator.h index eafee9b..4e7a64d 100644 --- a/source/pdal/pdalc_pointviewiterator.h +++ b/source/pdal/pdalc_pointviewiterator.h @@ -47,14 +47,14 @@ namespace capi class PointViewIterator { public: -PointViewIterator(const pdal::PointViewSet& views); -bool hasNext() const; -const pdal::PointViewPtr next(); -void reset(); + PointViewIterator(const pdal::PointViewSet& views); + bool hasNext() const; + const pdal::PointViewPtr next(); + void reset(); private: -const pdal::PointViewSet &m_views; -pdal::PointViewSet::const_iterator m_itr; + const pdal::PointViewSet &m_views; + pdal::PointViewSet::const_iterator m_itr; }; extern "C" From 6006cc3139ef4fdae0c57109586fa1545d3d6623 Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 08:31:13 +0100 Subject: [PATCH 31/36] Revert "astyle changes" This reverts commit 63b4781fcbab79e2b3f3391a1f5a43511ce39c7f. --- source/pdal/CMakeLists.txt | 82 +++--- source/pdal/pdalc_dimtype.cpp | 138 ++++----- source/pdal/pdalc_forward.h | 16 +- source/pdal/pdalc_pipeline.cpp | 358 ++++++++++++------------ source/pdal/pdalc_pointlayout.cpp | 80 +++--- source/pdal/pdalc_pointview.cpp | 282 +++++++++---------- source/pdal/pdalc_pointviewiterator.cpp | 76 ++--- source/pdal/pdalc_pointviewiterator.h | 12 +- 8 files changed, 522 insertions(+), 522 deletions(-) diff --git a/source/pdal/CMakeLists.txt b/source/pdal/CMakeLists.txt index 7a8715e..0a2e82b 100644 --- a/source/pdal/CMakeLists.txt +++ b/source/pdal/CMakeLists.txt @@ -4,65 +4,65 @@ find_package(PDAL REQUIRED CONFIG) message(STATUS "Found PDAL ${PDAL_VERSION}") set(SOURCES - pdalc_config.cpp - pdalc_dimtype.cpp - pdalc_pipeline.cpp - pdalc_pointlayout.cpp - pdalc_pointview.cpp - pdalc_pointviewiterator.cpp - ) + pdalc_config.cpp + pdalc_dimtype.cpp + pdalc_pipeline.cpp + pdalc_pointlayout.cpp + pdalc_pointview.cpp + pdalc_pointviewiterator.cpp +) set(HEADERS - pdalc.h - pdalc_config.h - pdalc_defines.h - pdalc_dimtype.h - pdalc_forward.h - pdalc_pipeline.h - pdalc_pointlayout.h - pdalc_pointview.h - pdalc_pointviewiterator.h - ) + pdalc.h + pdalc_config.h + pdalc_defines.h + pdalc_dimtype.h + pdalc_forward.h + pdalc_pipeline.h + pdalc_pointlayout.h + pdalc_pointview.h + pdalc_pointviewiterator.h +) set(DEPENDENCIES - $ {PDAL_LIBRARIES} - ) + ${PDAL_LIBRARIES} +) link_directories( - $ {PDAL_LIBRARY_DIRS} + ${PDAL_LIBRARY_DIRS} ) include_directories( - $ {PDAL_INCLUDE_DIRS} + ${PDAL_INCLUDE_DIRS} ) -add_definitions($ {PDAL_DEFINITIONS}) +add_definitions(${PDAL_DEFINITIONS}) -add_library($ {TARGET} SHARED $ {SOURCES} $ {HEADERS}) +add_library(${TARGET} SHARED ${SOURCES} ${HEADERS}) string(TOUPPER "${TARGET}_BUILD_DLL" BUILD_SYMBOL) -set_target_properties($ {TARGET} PROPERTIES - DEFINE_SYMBOL $ {BUILD_SYMBOL} - VERSION $ {PDAL_VERSION} - SOVERSION $ {PDAL_VERSION} - ) +set_target_properties(${TARGET} PROPERTIES + DEFINE_SYMBOL ${BUILD_SYMBOL} + VERSION ${PDAL_VERSION} + SOVERSION ${PDAL_VERSION} +) # Measure code coverage on gcc if(CMAKE_COMPILER_IS_GNUCXX AND PDALC_ENABLE_CODE_COVERAGE AND PDALC_ENABLE_TESTS) - SETUP_TARGET_FOR_COVERAGE( - NAME coverage_$ {TARGET} - EXECUTABLE test_$ {TARGET} - DEPENDENCIES test_$ {TARGET} - ) - endif() + SETUP_TARGET_FOR_COVERAGE( + NAME coverage_${TARGET} + EXECUTABLE test_${TARGET} + DEPENDENCIES test_${TARGET} + ) +endif() - target_link_libraries($ {TARGET} $ {DEPENDENCIES}) +target_link_libraries(${TARGET} ${DEPENDENCIES}) - install(TARGETS $ {TARGET} - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin) +install(TARGETS ${TARGET} + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin) - file(RELATIVE_PATH $ {TARGET} _PATH $ {CMAKE_SOURCE_DIR}/source $ {CMAKE_CURRENT_SOURCE_DIR}) - install(FILES $ {HEADERS} DESTINATION include/$ {${TARGET} _PATH}) +file(RELATIVE_PATH ${TARGET}_PATH ${CMAKE_SOURCE_DIR}/source ${CMAKE_CURRENT_SOURCE_DIR}) +install(FILES ${HEADERS} DESTINATION include/${${TARGET}_PATH}) diff --git a/source/pdal/pdalc_dimtype.cpp b/source/pdal/pdalc_dimtype.cpp index 9e771cc..b1d782d 100644 --- a/source/pdal/pdalc_dimtype.cpp +++ b/source/pdal/pdalc_dimtype.cpp @@ -37,122 +37,122 @@ namespace capi { size_t PDALGetDimTypeListSize(PDALDimTypeListPtr types) { -pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); + pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); -size_t size = 0; + size_t size = 0; -if (wrapper && wrapper->get()) -{ - try - { - pdal::DimTypeList *list = wrapper->get(); - size = list->size(); - } - catch (const std::exception &e) + if (wrapper && wrapper->get()) { - printf("%s\n", e.what()); + try + { + pdal::DimTypeList *list = wrapper->get(); + size = list->size(); + } + catch (const std::exception &e) + { + printf("%s\n", e.what()); + } } -} -return size; + return size; } uint64_t PDALGetDimTypeListByteCount(PDALDimTypeListPtr types) { -uint64_t byteCount = 0; -size_t pointCount = PDALGetDimTypeListSize(types); + uint64_t byteCount = 0; + size_t pointCount = PDALGetDimTypeListSize(types); -for (size_t i = 0; i < pointCount; ++i) -{ - byteCount += PDALGetDimTypeInterpretationByteCount(PDALGetDimType(types, i)); -} + for (size_t i = 0; i < pointCount; ++i) + { + byteCount += PDALGetDimTypeInterpretationByteCount(PDALGetDimType(types, i)); + } -return byteCount; + return byteCount; } PDALDimType PDALGetInvalidDimType() { -PDALDimType dim = -{ - static_cast(pdal::Dimension::id("")), static_cast(pdal::Dimension::type("")), - 1.0, 0.0 -}; + PDALDimType dim = + { + static_cast(pdal::Dimension::id("")), static_cast(pdal::Dimension::type("")), + 1.0, 0.0 + }; -return dim; + return dim; } size_t PDALGetDimTypeIdName(PDALDimType dim, char *name, size_t size) { -size_t result = 0; + size_t result = 0; -if (name && size > 0) -{ - std::string s = pdal::Dimension::name( - static_cast(dim.id)); - std::strncpy(name, s.c_str(), size); - result = std::min(std::strlen(name), size); -} + if (name && size > 0) + { + std::string s = pdal::Dimension::name( + static_cast(dim.id)); + std::strncpy(name, s.c_str(), size); + result = std::min(std::strlen(name), size); + } -return result; + return result; } size_t PDALGetDimTypeInterpretationName(PDALDimType dim, char *name, size_t size) { -size_t result = 0; + size_t result = 0; -if (name && size > 0) -{ - std::string s = pdal::Dimension::interpretationName( - static_cast(dim.type)); - std::strncpy(name, s.c_str(), size); - result = std::min(std::strlen(name), size); -} + if (name && size > 0) + { + std::string s = pdal::Dimension::interpretationName( + static_cast(dim.type)); + std::strncpy(name, s.c_str(), size); + result = std::min(std::strlen(name), size); + } -return result; + return result; } size_t PDALGetDimTypeInterpretationByteCount(PDALDimType dim) { -return pdal::Dimension::size(static_cast(dim.type)); + return pdal::Dimension::size(static_cast(dim.type)); } PDALDimType PDALGetDimType(PDALDimTypeListPtr types, size_t index) { -pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); + pdal::capi::DimTypeList *wrapper = reinterpret_cast(types); -PDALDimType dim = PDALGetInvalidDimType(); + PDALDimType dim = PDALGetInvalidDimType(); -if (wrapper && wrapper->get()) -{ - try + if (wrapper && wrapper->get()) { - pdal::DimTypeList *list = wrapper->get(); - - if (index < list->size()) + try { - pdal::DimType nativeDim = list->at(index); - dim.id = static_cast(nativeDim.m_id); - dim.type = static_cast(nativeDim.m_type); - dim.scale = nativeDim.m_xform.m_scale.m_val; - dim.offset = nativeDim.m_xform.m_offset.m_val; + pdal::DimTypeList *list = wrapper->get(); + + if (index < list->size()) + { + pdal::DimType nativeDim = list->at(index); + dim.id = static_cast(nativeDim.m_id); + dim.type = static_cast(nativeDim.m_type); + dim.scale = nativeDim.m_xform.m_scale.m_val; + dim.offset = nativeDim.m_xform.m_offset.m_val; + } + } + catch (const std::exception &e) + { + printf("%s\n", e.what()); } } - catch (const std::exception &e) - { - printf("%s\n", e.what()); - } -} -return dim; + return dim; } void PDALDisposeDimTypeList(PDALDimTypeListPtr types) { -if (types) -{ - pdal::capi::DimTypeList *ptr = reinterpret_cast(types); - delete ptr; -} + if (types) + { + pdal::capi::DimTypeList *ptr = reinterpret_cast(types); + delete ptr; + } } } } \ No newline at end of file diff --git a/source/pdal/pdalc_forward.h b/source/pdal/pdalc_forward.h index f909042..89cae54 100644 --- a/source/pdal/pdalc_forward.h +++ b/source/pdal/pdalc_forward.h @@ -80,17 +80,17 @@ typedef struct PDALDimType PDALDimType; /// A dimension type struct PDALDimType { -/// The dimension's identifier -uint32_t id; + /// The dimension's identifier + uint32_t id; -/// The dimension's interpretation type -uint32_t type; + /// The dimension's interpretation type + uint32_t type; -/// The dimension's scaling factor -double scale; + /// The dimension's scaling factor + double scale; -/// The dimension's offset value -double offset; + /// The dimension's offset value + double offset; }; /// A pointer to a dimension type list diff --git a/source/pdal/pdalc_pipeline.cpp b/source/pdal/pdalc_pipeline.cpp index 85838ea..fd7dfe8 100644 --- a/source/pdal/pdalc_pipeline.cpp +++ b/source/pdal/pdalc_pipeline.cpp @@ -44,267 +44,267 @@ namespace capi { extern "C" { -PDALPipelinePtr PDALCreatePipeline(const char* json) -{ - PDALPipelinePtr pipeline = nullptr; - - if (json && std::strlen(json) > 0) + PDALPipelinePtr PDALCreatePipeline(const char* json) { - pdal::PipelineExecutor *executor = nullptr; - - try - { - pdal::PipelineExecutor stackpipe(json); - executor = new pdal::PipelineExecutor(json); - } - catch (const std::exception &e) - { - printf("Could not create pipeline: %s\n%s\n", e.what(), json); - executor = nullptr; - } + PDALPipelinePtr pipeline = nullptr; - if (executor) + if (json && std::strlen(json) > 0) { - bool valid = false; + pdal::PipelineExecutor *executor = nullptr; try { - valid = executor->validate(); + pdal::PipelineExecutor stackpipe(json); + executor = new pdal::PipelineExecutor(json); } catch (const std::exception &e) { - printf("Error while validating pipeline: %s\n%s\n", e.what(), json); + printf("Could not create pipeline: %s\n%s\n", e.what(), json); + executor = nullptr; } - if (valid) + if (executor) { - pipeline = new Pipeline(executor); - } - else - { - delete executor; - executor = NULL; - printf("The pipeline is invalid:\n%s\n", json); + bool valid = false; + + try + { + valid = executor->validate(); + } + catch (const std::exception &e) + { + printf("Error while validating pipeline: %s\n%s\n", e.what(), json); + } + + if (valid) + { + pipeline = new Pipeline(executor); + } + else + { + delete executor; + executor = NULL; + printf("The pipeline is invalid:\n%s\n", json); + } } } - } - return pipeline; -} + return pipeline; + } -void PDALDisposePipeline(PDALPipelinePtr pipeline) -{ - if (pipeline) + void PDALDisposePipeline(PDALPipelinePtr pipeline) { - Pipeline *ptr = reinterpret_cast(pipeline); - delete ptr; + if (pipeline) + { + Pipeline *ptr = reinterpret_cast(pipeline); + delete ptr; + } } -} -size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size) -{ - size_t result = 0; + size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size) + { + size_t result = 0; + + if (pipeline && buffer && size > 0) + { + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + buffer[0] = '\0'; + buffer[size - 1] = '\0'; + + if (executor) + { + try + { + std::string s = executor->getPipeline(); + std::strncpy(buffer, s.c_str(), size - 1); + result = std::min(s.length(), size); + } + catch (const std::exception &e) + { + printf("Found error while retrieving pipeline's string representation: %s\n", e.what()); + } + } + + } + + return result; + } - if (pipeline && buffer && size > 0) + size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size) { - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - buffer[0] = '\0'; - buffer[size - 1] = '\0'; + size_t result = 0; - if (executor) + if (pipeline && metadata && size > 0) { - try + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + metadata[0] = '\0'; + metadata[size - 1] = '\0'; + + if (executor) { - std::string s = executor->getPipeline(); - std::strncpy(buffer, s.c_str(), size - 1); - result = std::min(s.length(), size); + try + { + std::string s = executor->getMetadata(); + std::strncpy(metadata, s.c_str(), size); + result = std::min(s.length(), size); + } + catch (const std::exception &e) + { + printf("Found error while retrieving pipeline's metadata: %s\n", e.what()); + } } - catch (const std::exception &e) + } + + return result; + } + + size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size) + { + size_t result = 0; + + if (pipeline && schema && size > 0) + { + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + schema[0] = '\0'; + schema[size - 1] = '\0'; + + if (executor) { - printf("Found error while retrieving pipeline's string representation: %s\n", e.what()); + try + { + std::string s = executor->getSchema(); + std::strncpy(schema, s.c_str(), size); + result = std::min(s.length(), size); + } + catch (const std::exception &e) + { + printf("Found error while retrieving pipeline's schema: %s\n", e.what()); + } } } + return result; } - return result; -} + size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size) + { + size_t result = 0; -size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size) -{ - size_t result = 0; + if (pipeline && log && size > 0) + { + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::PipelineExecutor *executor = ptr->get(); + log[0] = '\0'; + log[size - 1] = '\0'; + + if (executor) + { + try + { + std::string s = executor->getLog(); + std::strncpy(log, s.c_str(), size); + result = std::min(s.length(), size); + } + catch (const std::exception &e) + { + printf("Found error while retrieving pipeline's log: %s\n", e.what()); + } + } + } - if (pipeline && metadata && size > 0) + return result; + } + + void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level) { Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - metadata[0] = '\0'; - metadata[size - 1] = '\0'; - if (executor) + if (ptr && ptr->get()) { try { - std::string s = executor->getMetadata(); - std::strncpy(metadata, s.c_str(), size); - result = std::min(s.length(), size); + ptr->get()->setLogLevel(level); } catch (const std::exception &e) { - printf("Found error while retrieving pipeline's metadata: %s\n", e.what()); + printf("Found error while setting log level: %s\n", e.what()); } } } - return result; -} - -size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size) -{ - size_t result = 0; + int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline) + { + Pipeline *ptr = reinterpret_cast(pipeline); + return (ptr && ptr->get()) ? ptr->get()->getLogLevel() : 0; + } - if (pipeline && schema && size > 0) + int64_t PDALExecutePipeline(PDALPipelinePtr pipeline) { + int64_t result = 0; Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - schema[0] = '\0'; - schema[size - 1] = '\0'; - if (executor) + if (ptr && ptr->get()) { try { - std::string s = executor->getSchema(); - std::strncpy(schema, s.c_str(), size); - result = std::min(s.length(), size); + result = ptr->get()->execute(); } catch (const std::exception &e) { - printf("Found error while retrieving pipeline's schema: %s\n", e.what()); + printf("Found error while executing pipeline: %s", e.what()); } } - } - return result; -} - -size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size) -{ - size_t result = 0; + return result; + } - if (pipeline && log && size > 0) + bool PDALValidatePipeline(PDALPipelinePtr pipeline) { + int64_t result = 0; Pipeline *ptr = reinterpret_cast(pipeline); - pdal::PipelineExecutor *executor = ptr->get(); - log[0] = '\0'; - log[size - 1] = '\0'; - if (executor) + if (ptr && ptr->get()) { try { - std::string s = executor->getLog(); - std::strncpy(log, s.c_str(), size); - result = std::min(s.length(), size); + result = ptr->get()->validate(); } catch (const std::exception &e) { - printf("Found error while retrieving pipeline's log: %s\n", e.what()); + printf("Found error while validating pipeline: %s", e.what()); } } - } - - return result; -} -void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level) -{ - Pipeline *ptr = reinterpret_cast(pipeline); - - if (ptr && ptr->get()) - { - try - { - ptr->get()->setLogLevel(level); - } - catch (const std::exception &e) - { - printf("Found error while setting log level: %s\n", e.what()); - } - } -} - -int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline) -{ - Pipeline *ptr = reinterpret_cast(pipeline); - return (ptr && ptr->get()) ? ptr->get()->getLogLevel() : 0; -} - -int64_t PDALExecutePipeline(PDALPipelinePtr pipeline) -{ - int64_t result = 0; - Pipeline *ptr = reinterpret_cast(pipeline); - - if (ptr && ptr->get()) - { - try - { - result = ptr->get()->execute(); - } - catch (const std::exception &e) - { - printf("Found error while executing pipeline: %s", e.what()); - } + return result; } - return result; -} - -bool PDALValidatePipeline(PDALPipelinePtr pipeline) -{ - int64_t result = 0; - Pipeline *ptr = reinterpret_cast(pipeline); - - if (ptr && ptr->get()) + PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline) { - try - { - result = ptr->get()->validate(); - } - catch (const std::exception &e) - { - printf("Found error while validating pipeline: %s", e.what()); - } - } - - return result; -} - -PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline) -{ - Pipeline *ptr = reinterpret_cast(pipeline); - pdal::capi::PointViewIterator *views = nullptr; + Pipeline *ptr = reinterpret_cast(pipeline); + pdal::capi::PointViewIterator *views = nullptr; - if (ptr && ptr->get()) - { - try + if (ptr && ptr->get()) { - auto &v = ptr->get()->getManagerConst().views(); + try + { + auto &v = ptr->get()->getManagerConst().views(); - if (!v.empty()) + if (!v.empty()) + { + views = new pdal::capi::PointViewIterator(v); + } + } + catch (const std::exception &e) { - views = new pdal::capi::PointViewIterator(v); + printf("Found error while retrieving point views: %s\n", e.what()); } } - catch (const std::exception &e) - { - printf("Found error while retrieving point views: %s\n", e.what()); - } - } - return views; -} + return views; + } } } } diff --git a/source/pdal/pdalc_pointlayout.cpp b/source/pdal/pdalc_pointlayout.cpp index 253711c..11ed3d5 100644 --- a/source/pdal/pdalc_pointlayout.cpp +++ b/source/pdal/pdalc_pointlayout.cpp @@ -41,76 +41,76 @@ namespace capi PDALDimTypeListPtr PDALGetPointLayoutDimTypes(PDALPointLayoutPtr layout) { -PDALDimTypeListPtr types = NULL; -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + PDALDimTypeListPtr types = NULL; + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); -if (nativeLayout) -{ - pdal::DimTypeList *list = new pdal::DimTypeList(nativeLayout->dimTypes()); + if (nativeLayout) + { + pdal::DimTypeList *list = new pdal::DimTypeList(nativeLayout->dimTypes()); - types = new pdal::capi::DimTypeList(list); -} + types = new pdal::capi::DimTypeList(list); + } -return types; + return types; } PDALDimType PDALFindDimType(PDALPointLayoutPtr layout, const char *name) { -PDALDimType dim = PDALGetInvalidDimType(); -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + PDALDimType dim = PDALGetInvalidDimType(); + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); -if (name && nativeLayout) -{ - pdal::DimType nativeDim = nativeLayout->findDimType(name); + if (name && nativeLayout) + { + pdal::DimType nativeDim = nativeLayout->findDimType(name); - dim.id = static_cast(nativeDim.m_id); - dim.type = static_cast(nativeDim.m_type); - dim.scale = nativeDim.m_xform.m_scale.m_val; - dim.offset = nativeDim.m_xform.m_offset.m_val; -} + dim.id = static_cast(nativeDim.m_id); + dim.type = static_cast(nativeDim.m_type); + dim.scale = nativeDim.m_xform.m_scale.m_val; + dim.offset = nativeDim.m_xform.m_offset.m_val; + } -return dim; + return dim; } size_t PDALGetDimSize(PDALPointLayoutPtr layout, const char *name) { -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); -return (name && nativeLayout) ? nativeLayout->dimSize(nativeLayout->findDim(name)) : 0; + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + return (name && nativeLayout) ? nativeLayout->dimSize(nativeLayout->findDim(name)) : 0; } size_t PDALGetDimPackedOffset(PDALPointLayoutPtr layout, const char *name) { -size_t offset = 0; - -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + size_t offset = 0; -if (name && nativeLayout) -{ - pdal::DimType type = nativeLayout->findDimType(name); - pdal::DimTypeList dims = nativeLayout->dimTypes(); - std::string nameString = pdal::Dimension::name(type.m_id); + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); - for (auto dim : dims) + if (name && nativeLayout) { - if (nameString == pdal::Dimension::name(dim.m_id)) - { - break; - } - else + pdal::DimType type = nativeLayout->findDimType(name); + pdal::DimTypeList dims = nativeLayout->dimTypes(); + std::string nameString = pdal::Dimension::name(type.m_id); + + for (auto dim : dims) { - offset += nativeLayout->dimSize(dim.m_id); + if (nameString == pdal::Dimension::name(dim.m_id)) + { + break; + } + else + { + offset += nativeLayout->dimSize(dim.m_id); + } } } -} -return offset; + return offset; } size_t PDALGetPointSize(PDALPointLayoutPtr layout) { -pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); -return nativeLayout ? nativeLayout->pointSize() : 0; + pdal::PointLayoutPtr nativeLayout = reinterpret_cast(layout); + return nativeLayout ? nativeLayout->pointSize() : 0; } } } \ No newline at end of file diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 527d80c..ba2f805 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -39,212 +39,212 @@ namespace capi { extern "C" { -void PDALDisposePointView(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - - if (wrapper) + void PDALDisposePointView(PDALPointViewPtr view) { - delete wrapper; - } -} - -int PDALGetPointViewId(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); + pdal::capi::PointView *wrapper = reinterpret_cast(view); - return wrapper && *wrapper ? (*wrapper)->id() : 0; -} - -uint64_t PDALGetPointViewSize(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - return wrapper && *wrapper ? (*wrapper)->size() : 0; -} - -bool PDALIsPointViewEmpty(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - return !wrapper || !*wrapper || (*wrapper)->empty(); -} + if (wrapper) + { + delete wrapper; + } + } -PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); + int PDALGetPointViewId(PDALPointViewPtr view) + { + pdal::capi::PointView *wrapper = reinterpret_cast(view); - PDALPointViewPtr ptr = nullptr; + return wrapper && *wrapper ? (*wrapper)->id() : 0; + } - if (wrapper && *wrapper) + uint64_t PDALGetPointViewSize(PDALPointViewPtr view) { - ptr = new pdal::capi::PointView(std::move((*wrapper)->makeNew())); + pdal::capi::PointView *wrapper = reinterpret_cast(view); + return wrapper && *wrapper ? (*wrapper)->size() : 0; } - return ptr; -} - -size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - - size_t result = 0; + bool PDALIsPointViewEmpty(PDALPointViewPtr view) + { + pdal::capi::PointView *wrapper = reinterpret_cast(view); + return !wrapper || !*wrapper || (*wrapper)->empty(); + } - if (size > 0 && proj) + PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view) { - proj[0] = '\0'; - proj[size-1] = '\0'; + pdal::capi::PointView *wrapper = reinterpret_cast(view); + + PDALPointViewPtr ptr = nullptr; if (wrapper && *wrapper) { - std::string s = (*wrapper)->spatialReference().getProj4(); - std::strncpy(proj, s.c_str(), size - 1); - result = std::min(s.length(), size); + ptr = new pdal::capi::PointView(std::move((*wrapper)->makeNew())); } - } - - return result; -} -size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); - - size_t result = 0; + return ptr; + } - if (size > 0 && wkt) + size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size) { - wkt[0] = '\0'; - wkt[size-1] = '\0'; + pdal::capi::PointView *wrapper = reinterpret_cast(view); - if (wrapper && *wrapper) + size_t result = 0; + + if (size > 0 && proj) { - std::string s = (*wrapper)->spatialReference().getWKT(); + proj[0] = '\0'; + proj[size-1] = '\0'; - if (pretty) + if (wrapper && *wrapper) { - s = SpatialReference::prettyWkt(s); + std::string s = (*wrapper)->spatialReference().getProj4(); + std::strncpy(proj, s.c_str(), size - 1); + result = std::min(s.length(), size); } - - std::strncpy(wkt, s.c_str(), size - 1); - result = std::min(s.length(), size); } + + return result; } - return result; -} + size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty) + { + pdal::capi::PointView *wrapper = reinterpret_cast(view); -PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view) -{ - pdal::capi::PointView *wrapper = reinterpret_cast(view); + size_t result = 0; - PDALPointLayoutPtr layout = nullptr; + if (size > 0 && wkt) + { + wkt[0] = '\0'; + wkt[size-1] = '\0'; - if (wrapper && *wrapper) - { - layout = (*wrapper)->layout(); - } + if (wrapper && *wrapper) + { + std::string s = (*wrapper)->spatialReference().getWKT(); - return layout; -} + if (pretty) + { + s = SpatialReference::prettyWkt(s); + } -size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buf) -{ - size_t size = 0; + std::strncpy(wkt, s.c_str(), size - 1); + result = std::min(s.length(), size); + } + } - if (view && dims && buf) + return result; + } + + PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view) { - pdal::capi::PointView *capiView = reinterpret_cast(view); + pdal::capi::PointView *wrapper = reinterpret_cast(view); + + PDALPointLayoutPtr layout = nullptr; - pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); + if (wrapper && *wrapper) + { + layout = (*wrapper)->layout(); + } + return layout; + } + + size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buf) + { + size_t size = 0; - if (*capiView && *capiDims) + if (view && dims && buf) { - pdal::DimTypeList *list = capiDims->get(); + pdal::capi::PointView *capiView = reinterpret_cast(view); - (*capiView)->getPackedPoint(*list, idx, buf); + pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); - for (const auto &dim : *list) + + if (*capiView && *capiDims) { - size += pdal::Dimension::size(dim.m_type); + pdal::DimTypeList *list = capiDims->get(); + + (*capiView)->getPackedPoint(*list, idx, buf); + + for (const auto &dim : *list) + { + size += pdal::Dimension::size(dim.m_type); + } } } - } - - return size; -} -uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buf) -{ - uint64_t size = 0; + return size; + } - if (view && dims && buf) + uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buf) { - pdal::capi::PointView *capiView = reinterpret_cast(view); + uint64_t size = 0; - pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); + if (view && dims && buf) + { + pdal::capi::PointView *capiView = reinterpret_cast(view); + pdal::capi::DimTypeList *capiDims = reinterpret_cast(dims); - if (*capiView && *capiDims) - { - pdal::DimTypeList *list = capiDims->get(); - for (unsigned i = 0; i < (*capiView)->size(); ++i) + if (*capiView && *capiDims) { - size_t pointSize = 0; - (*capiView)->getPackedPoint(*list, i, buf); + pdal::DimTypeList *list = capiDims->get(); - for (const auto &dim : *list) + for (unsigned i = 0; i < (*capiView)->size(); ++i) { - pointSize += pdal::Dimension::size(dim.m_type); - } + size_t pointSize = 0; + (*capiView)->getPackedPoint(*list, i, buf); + + for (const auto &dim : *list) + { + pointSize += pdal::Dimension::size(dim.m_type); + } - buf += pointSize; - size += pointSize; + buf += pointSize; + size += pointSize; + } } } - } - - return size; -} -uint64_t PDALGetMeshSize(PDALPointViewPtr view) -{ - pdal::capi::PointView* wrapper = reinterpret_cast(view); - pdal::TriangularMesh* mesh=(*wrapper)->mesh(); + return size; + } - return mesh ? static_cast((*mesh).size()) : 0; -} + uint64_t PDALGetMeshSize(PDALPointViewPtr view) + { + pdal::capi::PointView* wrapper = reinterpret_cast(view); + pdal::TriangularMesh* mesh=(*wrapper)->mesh(); -uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) -{ - size_t size = 0; + return mesh ? static_cast((*mesh).size()) : 0; + } - if (view && buff) + uint64_t PDALGetAllTriangles(PDALPointViewPtr view, char *buff) { - pdal::capi::PointView* capiView = reinterpret_cast(view); - pdal::TriangularMesh* mesh=(*capiView)->mesh(); - + size_t size = 0; - if (*capiView && mesh) + if (view && buff) { - for (size_t idx = 0; idx < (*mesh).size(); ++idx) + pdal::capi::PointView* capiView = reinterpret_cast(view); + pdal::TriangularMesh* mesh=(*capiView)->mesh(); + + + if (*capiView && mesh) { - const Triangle& t = (*mesh)[idx]; - uint32_t a = (uint32_t)t.m_a; - std::memcpy(buff, &a, 4); - uint32_t b = (uint32_t)t.m_b; - std::memcpy(buff + 4, &b, 4); - uint32_t c = (uint32_t)t.m_c; - std::memcpy(buff + 8, &c, 4); - - buff += 12; - size += 12; + for (size_t idx = 0; idx < (*mesh).size(); ++idx) + { + const Triangle& t = (*mesh)[idx]; + uint32_t a = (uint32_t)t.m_a; + std::memcpy(buff, &a, 4); + uint32_t b = (uint32_t)t.m_b; + std::memcpy(buff + 4, &b, 4); + uint32_t c = (uint32_t)t.m_c; + std::memcpy(buff + 8, &c, 4); + + buff += 12; + size += 12; + } } } - } - return static_cast(size); -} + return static_cast(size); + } } } diff --git a/source/pdal/pdalc_pointviewiterator.cpp b/source/pdal/pdalc_pointviewiterator.cpp index 4649104..876930c 100644 --- a/source/pdal/pdalc_pointviewiterator.cpp +++ b/source/pdal/pdalc_pointviewiterator.cpp @@ -34,74 +34,74 @@ namespace pdal namespace capi { PointViewIterator::PointViewIterator(const pdal::PointViewSet& views) : -m_views(views) + m_views(views) { -reset(); + reset(); } bool PointViewIterator::hasNext() const { -return (m_itr != m_views.cend()); + return (m_itr != m_views.cend()); } const pdal::PointViewPtr PointViewIterator::next() { -return hasNext() ? *(m_itr++) : nullptr; + return hasNext() ? *(m_itr++) : nullptr; } void PointViewIterator::reset() { -m_itr = m_views.cbegin(); + m_itr = m_views.cbegin(); } extern "C" { -bool PDALHasNextPointView(PDALPointViewIteratorPtr itr) -{ - auto ptr = reinterpret_cast(itr); - return ptr && ptr->hasNext(); -} - -PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr) -{ - auto ptr = reinterpret_cast(itr); - PDALPointViewPtr view = nullptr; + bool PDALHasNextPointView(PDALPointViewIteratorPtr itr) + { + auto ptr = reinterpret_cast(itr); + return ptr && ptr->hasNext(); + } - if (ptr) + PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr) { - pdal::PointViewPtr v = ptr->next(); + auto ptr = reinterpret_cast(itr); + PDALPointViewPtr view = nullptr; - if (v) + if (ptr) { - view = new pdal::PointViewPtr(std::move(v)); - } - } + pdal::PointViewPtr v = ptr->next(); - return view; -} + if (v) + { + view = new pdal::PointViewPtr(std::move(v)); + } + } -void PDALResetPointViewIterator(PDALPointViewIteratorPtr itr) -{ - auto ptr = reinterpret_cast(itr); + return view; + } - if (ptr) + void PDALResetPointViewIterator(PDALPointViewIteratorPtr itr) { - ptr->reset(); - } -} + auto ptr = reinterpret_cast(itr); -void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr) -{ - auto ptr = reinterpret_cast(itr); + if (ptr) + { + ptr->reset(); + } + } - if (ptr) + void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr) { - delete ptr; - ptr = nullptr; - itr = nullptr; + auto ptr = reinterpret_cast(itr); + + if (ptr) + { + delete ptr; + ptr = nullptr; + itr = nullptr; + } } -} } diff --git a/source/pdal/pdalc_pointviewiterator.h b/source/pdal/pdalc_pointviewiterator.h index eafee9b..4e7a64d 100644 --- a/source/pdal/pdalc_pointviewiterator.h +++ b/source/pdal/pdalc_pointviewiterator.h @@ -47,14 +47,14 @@ namespace capi class PointViewIterator { public: -PointViewIterator(const pdal::PointViewSet& views); -bool hasNext() const; -const pdal::PointViewPtr next(); -void reset(); + PointViewIterator(const pdal::PointViewSet& views); + bool hasNext() const; + const pdal::PointViewPtr next(); + void reset(); private: -const pdal::PointViewSet &m_views; -pdal::PointViewSet::const_iterator m_itr; + const pdal::PointViewSet &m_views; + pdal::PointViewSet::const_iterator m_itr; }; extern "C" From 9c704be7a77d9f267e4bd8dfe363cd0f2cfe74bc Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 10:12:19 +0100 Subject: [PATCH 32/36] added tests --- source/pdal/pdalc_pointview.cpp | 8 ++++-- tests/data/simple-reproject.json.in | 3 ++ tests/pdal/test_pdalc_pointview.c.in | 42 ++++++++++++++++++++++++++-- 3 files changed, 48 insertions(+), 5 deletions(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index f33baa1..1704a97 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -209,8 +209,12 @@ extern "C" uint64_t PDALGetMeshSize(PDALPointViewPtr view) { - pdal::capi::PointView* wrapper = reinterpret_cast(view); - pdal::TriangularMesh* mesh=(*wrapper)->mesh(); + pdal::capi::PointView *wrapper = reinterpret_cast(view); + pdal::TriangularMesh* mesh = nullptr; + + if (wrapper && *wrapper) { + mesh=(*wrapper)->mesh(); + } return mesh ? static_cast((*mesh).size()) : 0; } diff --git a/tests/data/simple-reproject.json.in b/tests/data/simple-reproject.json.in index 30695e3..a5fc627 100644 --- a/tests/data/simple-reproject.json.in +++ b/tests/data/simple-reproject.json.in @@ -7,6 +7,9 @@ { "type": "filters.reprojection", "out_srs": "EPSG:4326" + }, + { + "type": "filters.delaunay" } ] } diff --git a/tests/pdal/test_pdalc_pointview.c.in b/tests/pdal/test_pdalc_pointview.c.in index 6c6b37c..6e78813 100644 --- a/tests/pdal/test_pdalc_pointview.c.in +++ b/tests/pdal/test_pdalc_pointview.c.in @@ -172,7 +172,8 @@ TEST testPDALGetPointViewSize(void) TEST testPDALGetMeshSize(void) { - ASSERT_EQ(0, PDALGetMeshSize(NULL)); + uint64_t size = PDALGetMeshSize(NULL); + ASSERT(size == 0); PDALResetPointViewIterator(gPointViewIterator); bool hasNext = PDALHasNextPointView(gPointViewIterator); @@ -184,9 +185,9 @@ TEST testPDALGetMeshSize(void) // Dispose view before assertion to avoid CWE-404 // See http://cwe.mitre.org/data/definitions/404.html // See https://scan4.coverity.com/doc/en/cov_checker_ref.html#static_checker_RESOURCE_LEAK - size_t size = PDALGetMeshSize(view); + size = PDALGetMeshSize(view); PDALDisposePointView(view); - ASSERT(size == 0); + ASSERT(size == 2114); PASS(); @@ -675,6 +676,39 @@ TEST testPDALGetAllPackedPoints(void) PASS(); } +TEST testPDALGetAllTriangles(void) +{ + PDALResetPointViewIterator(gPointViewIterator); + bool hasNext = PDALHasNextPointView(gPointViewIterator); + ASSERT(hasNext); + + PDALPointViewPtr view = PDALGetNextPointView(gPointViewIterator); + ASSERT(view); + + uint64_t numPoints = PDALGetMeshSize(view); + + if (numPoints == 0) + { + PDALDisposePointView(view); + FAILm("PDALGetMeshSize returned tri size of zero for a valid view"); + } + + char *actualPoints = calloc(numPoints, 12); + + if (!actualPoints) + { + PDALDisposePointView(view); + FAILm("Could not allocate packed point list buffer"); + } + + uint64_t actualSize = PDALGetAllTriangles(view, actualPoints); + ASSERT_EQ(actualSize, 25368); + + free(actualPoints); + PDALDisposePointView(view); + PASS(); +} + GREATEST_SUITE(test_pdalc_pointview) { SET_SETUP(setup_test_pdalc_pointview, NULL); @@ -682,6 +716,7 @@ GREATEST_SUITE(test_pdalc_pointview) RUN_TEST(testPDALGetPointViewId); RUN_TEST(testPDALGetPointViewSize); + RUN_TEST(testPDALGetMeshSize); RUN_TEST(testPDALIsPointViewEmpty); RUN_TEST(testPDALClonePointView); RUN_TEST(testPDALGetPointViewProj4); @@ -689,6 +724,7 @@ GREATEST_SUITE(test_pdalc_pointview) RUN_TEST(testPDALGetPointViewLayout); RUN_TEST(testPDALGetPackedPoint); RUN_TEST(testPDALGetAllPackedPoints); + RUN_TEST(testPDALGetAllTriangles); SET_SETUP(NULL, NULL); SET_TEARDOWN(NULL, NULL); From 0aae54768ca2fbd2aa7608a0818787d21570e3c6 Mon Sep 17 00:00:00 2001 From: Paul Harwood Date: Fri, 30 Apr 2021 10:14:14 +0100 Subject: [PATCH 33/36] Update pdalc_pointview.cpp --- source/pdal/pdalc_pointview.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/pdal/pdalc_pointview.cpp b/source/pdal/pdalc_pointview.cpp index 1704a97..b83ae42 100644 --- a/source/pdal/pdalc_pointview.cpp +++ b/source/pdal/pdalc_pointview.cpp @@ -212,7 +212,8 @@ extern "C" pdal::capi::PointView *wrapper = reinterpret_cast(view); pdal::TriangularMesh* mesh = nullptr; - if (wrapper && *wrapper) { + if (wrapper && *wrapper) + { mesh=(*wrapper)->mesh(); } From fb08dcc57c353b5c9cbc8192dc84e900af06986f Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 10:28:26 +0100 Subject: [PATCH 34/36] Revert "Automatic Documentation Update" This reverts commit 64dedecef68aca2f79b871c06dbeb0d782b66a88. --- docs/doxygen/html/_r_e_a_d_m_e_8md.html | 4 ++-- docs/doxygen/html/annotated.html | 4 ++-- docs/doxygen/html/classes.html | 4 ++-- docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html | 4 ++-- docs/doxygen/html/files.html | 4 ++-- docs/doxygen/html/functions.html | 4 ++-- docs/doxygen/html/functions_vars.html | 4 ++-- docs/doxygen/html/globals.html | 4 ++-- docs/doxygen/html/globals_func.html | 4 ++-- docs/doxygen/html/globals_type.html | 4 ++-- docs/doxygen/html/index.html | 4 ++-- docs/doxygen/html/pdalc_8h.html | 4 ++-- docs/doxygen/html/pdalc_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__config_8h.html | 4 ++-- docs/doxygen/html/pdalc__config_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__defines_8h.html | 4 ++-- docs/doxygen/html/pdalc__defines_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__dimtype_8h.html | 4 ++-- docs/doxygen/html/pdalc__dimtype_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__forward_8h.html | 4 ++-- docs/doxygen/html/pdalc__forward_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__pipeline_8h.html | 4 ++-- docs/doxygen/html/pdalc__pipeline_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__pointlayout_8h.html | 4 ++-- docs/doxygen/html/pdalc__pointlayout_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__pointview_8h.html | 4 ++-- docs/doxygen/html/pdalc__pointview_8h_source.html | 4 ++-- docs/doxygen/html/pdalc__pointviewiterator_8h.html | 4 ++-- docs/doxygen/html/pdalc__pointviewiterator_8h_source.html | 4 ++-- docs/doxygen/html/struct_p_d_a_l_dim_type.html | 4 ++-- 30 files changed, 60 insertions(+), 60 deletions(-) diff --git a/docs/doxygen/html/_r_e_a_d_m_e_8md.html b/docs/doxygen/html/_r_e_a_d_m_e_8md.html index 4269159..b6668dd 100644 --- a/docs/doxygen/html/_r_e_a_d_m_e_8md.html +++ b/docs/doxygen/html/_r_e_a_d_m_e_8md.html @@ -26,7 +26,7 @@
          pdal-c -  test2 +  2.1.1
          C API for PDAL
          @@ -93,7 +93,7 @@ diff --git a/docs/doxygen/html/annotated.html b/docs/doxygen/html/annotated.html index 90ca12c..830589a 100644 --- a/docs/doxygen/html/annotated.html +++ b/docs/doxygen/html/annotated.html @@ -26,7 +26,7 @@
          pdal-c -  test2 +  2.1.1
          C API for PDAL
          @@ -97,7 +97,7 @@ diff --git a/docs/doxygen/html/classes.html b/docs/doxygen/html/classes.html index c398f9f..9d7320e 100644 --- a/docs/doxygen/html/classes.html +++ b/docs/doxygen/html/classes.html @@ -26,7 +26,7 @@
          pdal-c -  test2 +  2.1.1
          C API for PDAL
          @@ -98,7 +98,7 @@ diff --git a/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html b/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html index cfc9bf1..d6a4011 100644 --- a/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html +++ b/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html @@ -26,7 +26,7 @@
          pdal-c -  test2 +  2.1.1
          C API for PDAL
          @@ -122,7 +122,7 @@ diff --git a/docs/doxygen/html/files.html b/docs/doxygen/html/files.html index 0b696fa..511b32f 100644 --- a/docs/doxygen/html/files.html +++ b/docs/doxygen/html/files.html @@ -26,7 +26,7 @@
          pdal-c -  test2 +  2.1.1
          C API for PDAL
          @@ -106,7 +106,7 @@ diff --git a/docs/doxygen/html/functions.html b/docs/doxygen/html/functions.html index c5fad98..02b21dc 100644 --- a/docs/doxygen/html/functions.html +++ b/docs/doxygen/html/functions.html @@ -26,7 +26,7 @@
          pdal-c -  test2 +  2.1.1
          C API for PDAL
          @@ -102,7 +102,7 @@ diff --git a/docs/doxygen/html/functions_vars.html b/docs/doxygen/html/functions_vars.html index f8ac2d7..877d5e7 100644 --- a/docs/doxygen/html/functions_vars.html +++ b/docs/doxygen/html/functions_vars.html @@ -26,7 +26,7 @@
          pdal-c -  test2 +  2.1.1
          C API for PDAL
          @@ -102,7 +102,7 @@ diff --git a/docs/doxygen/html/globals.html b/docs/doxygen/html/globals.html index d0ed22f..bc10c48 100644 --- a/docs/doxygen/html/globals.html +++ b/docs/doxygen/html/globals.html @@ -26,7 +26,7 @@
          pdal-c -  test2 +  2.1.1
          C API for PDAL
          @@ -263,7 +263,7 @@

          - p -

            diff --git a/docs/doxygen/html/globals_func.html b/docs/doxygen/html/globals_func.html index 8026fa0..84689cd 100644 --- a/docs/doxygen/html/globals_func.html +++ b/docs/doxygen/html/globals_func.html @@ -26,7 +26,7 @@
            pdal-c -  test2 +  2.1.1
            C API for PDAL
            @@ -245,7 +245,7 @@

            - p -

              diff --git a/docs/doxygen/html/globals_type.html b/docs/doxygen/html/globals_type.html index 2538644..5fc7ff9 100644 --- a/docs/doxygen/html/globals_type.html +++ b/docs/doxygen/html/globals_type.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -108,7 +108,7 @@ diff --git a/docs/doxygen/html/index.html b/docs/doxygen/html/index.html index ccc0242..96d4a46 100644 --- a/docs/doxygen/html/index.html +++ b/docs/doxygen/html/index.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -135,7 +135,7 @@

              diff --git a/docs/doxygen/html/pdalc_8h.html b/docs/doxygen/html/pdalc_8h.html index 762aab8..1cb7ec3 100644 --- a/docs/doxygen/html/pdalc_8h.html +++ b/docs/doxygen/html/pdalc_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -95,7 +95,7 @@ diff --git a/docs/doxygen/html/pdalc_8h_source.html b/docs/doxygen/html/pdalc_8h_source.html index 82f30d6..e09a963 100644 --- a/docs/doxygen/html/pdalc_8h_source.html +++ b/docs/doxygen/html/pdalc_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -139,7 +139,7 @@ diff --git a/docs/doxygen/html/pdalc__config_8h.html b/docs/doxygen/html/pdalc__config_8h.html index a4b1fd9..fb44572 100644 --- a/docs/doxygen/html/pdalc__config_8h.html +++ b/docs/doxygen/html/pdalc__config_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -556,7 +556,7 @@

                - +
              diff --git a/docs/doxygen/html/pdalc__config_8h_source.html b/docs/doxygen/html/pdalc__config_8h_source.html index dadc0fa..d5d981b 100644 --- a/docs/doxygen/html/pdalc__config_8h_source.html +++ b/docs/doxygen/html/pdalc__config_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -185,7 +185,7 @@ diff --git a/docs/doxygen/html/pdalc__defines_8h.html b/docs/doxygen/html/pdalc__defines_8h.html index ce88e49..2d0f040 100644 --- a/docs/doxygen/html/pdalc__defines_8h.html +++ b/docs/doxygen/html/pdalc__defines_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -95,7 +95,7 @@ diff --git a/docs/doxygen/html/pdalc__defines_8h_source.html b/docs/doxygen/html/pdalc__defines_8h_source.html index 0a5d28c..5069928 100644 --- a/docs/doxygen/html/pdalc__defines_8h_source.html +++ b/docs/doxygen/html/pdalc__defines_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -158,7 +158,7 @@ diff --git a/docs/doxygen/html/pdalc__dimtype_8h.html b/docs/doxygen/html/pdalc__dimtype_8h.html index 1113c6e..6480ed4 100644 --- a/docs/doxygen/html/pdalc__dimtype_8h.html +++ b/docs/doxygen/html/pdalc__dimtype_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -392,7 +392,7 @@

                - +
              diff --git a/docs/doxygen/html/pdalc__dimtype_8h_source.html b/docs/doxygen/html/pdalc__dimtype_8h_source.html index 4fc1329..4a14415 100644 --- a/docs/doxygen/html/pdalc__dimtype_8h_source.html +++ b/docs/doxygen/html/pdalc__dimtype_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -172,7 +172,7 @@ diff --git a/docs/doxygen/html/pdalc__forward_8h.html b/docs/doxygen/html/pdalc__forward_8h.html index d306790..03f4667 100644 --- a/docs/doxygen/html/pdalc__forward_8h.html +++ b/docs/doxygen/html/pdalc__forward_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -228,7 +228,7 @@

                - +
              diff --git a/docs/doxygen/html/pdalc__forward_8h_source.html b/docs/doxygen/html/pdalc__forward_8h_source.html index 89eddf7..2f0ea67 100644 --- a/docs/doxygen/html/pdalc__forward_8h_source.html +++ b/docs/doxygen/html/pdalc__forward_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -200,7 +200,7 @@ diff --git a/docs/doxygen/html/pdalc__pipeline_8h.html b/docs/doxygen/html/pdalc__pipeline_8h.html index c5c6fc5..542b881 100644 --- a/docs/doxygen/html/pdalc__pipeline_8h.html +++ b/docs/doxygen/html/pdalc__pipeline_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -521,7 +521,7 @@

                - +
              diff --git a/docs/doxygen/html/pdalc__pipeline_8h_source.html b/docs/doxygen/html/pdalc__pipeline_8h_source.html index ca86d04..ae9105e 100644 --- a/docs/doxygen/html/pdalc__pipeline_8h_source.html +++ b/docs/doxygen/html/pdalc__pipeline_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -184,7 +184,7 @@ diff --git a/docs/doxygen/html/pdalc__pointlayout_8h.html b/docs/doxygen/html/pdalc__pointlayout_8h.html index b858f40..e406620 100644 --- a/docs/doxygen/html/pdalc__pointlayout_8h.html +++ b/docs/doxygen/html/pdalc__pointlayout_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -291,7 +291,7 @@

                - +
              diff --git a/docs/doxygen/html/pdalc__pointlayout_8h_source.html b/docs/doxygen/html/pdalc__pointlayout_8h_source.html index b6d57c8..3dd50f3 100644 --- a/docs/doxygen/html/pdalc__pointlayout_8h_source.html +++ b/docs/doxygen/html/pdalc__pointlayout_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -164,7 +164,7 @@ diff --git a/docs/doxygen/html/pdalc__pointview_8h.html b/docs/doxygen/html/pdalc__pointview_8h.html index b409082..7fb360a 100644 --- a/docs/doxygen/html/pdalc__pointview_8h.html +++ b/docs/doxygen/html/pdalc__pointview_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -504,7 +504,7 @@

                - +
              diff --git a/docs/doxygen/html/pdalc__pointview_8h_source.html b/docs/doxygen/html/pdalc__pointview_8h_source.html index a84de98..6ab5a15 100644 --- a/docs/doxygen/html/pdalc__pointview_8h_source.html +++ b/docs/doxygen/html/pdalc__pointview_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -182,7 +182,7 @@ diff --git a/docs/doxygen/html/pdalc__pointviewiterator_8h.html b/docs/doxygen/html/pdalc__pointviewiterator_8h.html index 2c197c5..b61909b 100644 --- a/docs/doxygen/html/pdalc__pointviewiterator_8h.html +++ b/docs/doxygen/html/pdalc__pointviewiterator_8h.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -226,7 +226,7 @@

                - +
              diff --git a/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html b/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html index 3e9ae4a..6182d23 100644 --- a/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html +++ b/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -175,7 +175,7 @@ diff --git a/docs/doxygen/html/struct_p_d_a_l_dim_type.html b/docs/doxygen/html/struct_p_d_a_l_dim_type.html index 81c10b2..ff35465 100644 --- a/docs/doxygen/html/struct_p_d_a_l_dim_type.html +++ b/docs/doxygen/html/struct_p_d_a_l_dim_type.html @@ -26,7 +26,7 @@
              pdal-c -  test2 +  2.1.1
              C API for PDAL
              @@ -181,7 +181,7 @@

                - +
              From bc5a8bf06ebdd36bcfc2c416b7b897e67b980208 Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 10:32:11 +0100 Subject: [PATCH 35/36] Revert "Automatic Documentation Update" This reverts commit cd2272b403aecfee01e74d98e367667cd3a0078f. --- docs/doxygen/html/_r_e_a_d_m_e_8md.html | 10 +- docs/doxygen/html/annotated.html | 10 +- docs/doxygen/html/classes.html | 27 +++-- .../dir_a542be5b8e919f24a4504a2b5a97aa0f.html | 10 +- docs/doxygen/html/doxygen.css | 107 ++++-------------- docs/doxygen/html/files.html | 10 +- docs/doxygen/html/functions.html | 10 +- docs/doxygen/html/functions_vars.html | 10 +- docs/doxygen/html/globals.html | 10 +- docs/doxygen/html/globals_func.html | 10 +- docs/doxygen/html/globals_type.html | 10 +- docs/doxygen/html/index.html | 52 ++------- docs/doxygen/html/navtreedata.js | 14 +-- docs/doxygen/html/navtreeindex0.js | 9 -- docs/doxygen/html/pdalc_8h.html | 10 +- docs/doxygen/html/pdalc_8h_source.html | 22 ++-- docs/doxygen/html/pdalc__config_8h.html | 10 +- .../doxygen/html/pdalc__config_8h_source.html | 35 +++--- docs/doxygen/html/pdalc__defines_8h.html | 10 +- .../html/pdalc__defines_8h_source.html | 16 +-- docs/doxygen/html/pdalc__dimtype_8h.html | 10 +- .../html/pdalc__dimtype_8h_source.html | 27 ++--- docs/doxygen/html/pdalc__forward_8h.html | 10 +- .../html/pdalc__forward_8h_source.html | 30 ++--- docs/doxygen/html/pdalc__pipeline_8h.html | 10 +- .../html/pdalc__pipeline_8h_source.html | 32 +++--- docs/doxygen/html/pdalc__pointlayout_8h.html | 10 +- .../html/pdalc__pointlayout_8h_source.html | 21 ++-- docs/doxygen/html/pdalc__pointview_8h.html | 10 +- .../html/pdalc__pointview_8h_source.html | 33 +++--- .../html/pdalc__pointviewiterator_8h.html | 10 +- .../pdalc__pointviewiterator_8h_source.html | 20 ++-- docs/doxygen/html/search/all_0.html | 13 +-- docs/doxygen/html/search/all_1.html | 13 +-- docs/doxygen/html/search/all_2.html | 13 +-- docs/doxygen/html/search/all_3.html | 13 +-- docs/doxygen/html/search/all_4.html | 13 +-- docs/doxygen/html/search/all_5.html | 13 +-- docs/doxygen/html/search/classes_0.html | 13 +-- docs/doxygen/html/search/files_0.html | 13 +-- docs/doxygen/html/search/files_1.html | 13 +-- docs/doxygen/html/search/functions_0.html | 13 +-- docs/doxygen/html/search/nomatches.html | 3 +- docs/doxygen/html/search/pages_0.html | 13 +-- docs/doxygen/html/search/search.css | 4 +- docs/doxygen/html/search/search.js | 12 +- docs/doxygen/html/search/typedefs_0.html | 13 +-- docs/doxygen/html/search/variables_0.html | 13 +-- docs/doxygen/html/search/variables_1.html | 13 +-- docs/doxygen/html/search/variables_2.html | 13 +-- docs/doxygen/html/search/variables_3.html | 13 +-- .../doxygen/html/struct_p_d_a_l_dim_type.html | 10 +- 52 files changed, 365 insertions(+), 497 deletions(-) diff --git a/docs/doxygen/html/_r_e_a_d_m_e_8md.html b/docs/doxygen/html/_r_e_a_d_m_e_8md.html index b6668dd..fecebc1 100644 --- a/docs/doxygen/html/_r_e_a_d_m_e_8md.html +++ b/docs/doxygen/html/_r_e_a_d_m_e_8md.html @@ -3,7 +3,7 @@ - + pdal-c: /github/workspace/README.md File Reference @@ -26,7 +26,7 @@
              pdal-c -  2.1.1 +  v2.0.0
              C API for PDAL
              @@ -35,10 +35,10 @@ - + @@ -93,7 +93,7 @@ diff --git a/docs/doxygen/html/annotated.html b/docs/doxygen/html/annotated.html index 830589a..9903c36 100644 --- a/docs/doxygen/html/annotated.html +++ b/docs/doxygen/html/annotated.html @@ -3,7 +3,7 @@ - + pdal-c: Data Structures @@ -26,7 +26,7 @@
              pdal-c -  2.1.1 +  v2.0.0
              C API for PDAL
              @@ -35,10 +35,10 @@ - + @@ -97,7 +97,7 @@ diff --git a/docs/doxygen/html/classes.html b/docs/doxygen/html/classes.html index 9d7320e..5b93440 100644 --- a/docs/doxygen/html/classes.html +++ b/docs/doxygen/html/classes.html @@ -3,7 +3,7 @@ - + pdal-c: Data Structure Index @@ -26,7 +26,7 @@
              pdal-c -  2.1.1 +  v2.0.0
              C API for PDAL
              @@ -35,10 +35,10 @@ - + @@ -87,18 +87,23 @@
              Data Structure Index
              - -
              -
              -
              P
              -
              PDALDimType
              -
              + + + + + + + + +
                p  
              +
              PDALDimType   
              +
              diff --git a/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html b/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html index d6a4011..49dd1ad 100644 --- a/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html +++ b/docs/doxygen/html/dir_a542be5b8e919f24a4504a2b5a97aa0f.html @@ -3,7 +3,7 @@ - + pdal-c: pdal Directory Reference @@ -26,7 +26,7 @@
              pdal-c -  2.1.1 +  v2.0.0
              C API for PDAL
              @@ -35,10 +35,10 @@ - + @@ -122,7 +122,7 @@ diff --git a/docs/doxygen/html/doxygen.css b/docs/doxygen/html/doxygen.css index ffbff02..f640966 100644 --- a/docs/doxygen/html/doxygen.css +++ b/docs/doxygen/html/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.9.1 */ +/* The standard CSS for doxygen 1.8.20 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; @@ -103,96 +103,30 @@ caption { } span.legend { - font-size: 70%; - text-align: center; + font-size: 70%; + text-align: center; } h3.version { - font-size: 90%; - text-align: center; -} - -div.navtab { - border-right: 1px solid #A3B4D7; - padding-right: 15px; - text-align: right; - line-height: 110%; -} - -div.navtab table { - border-spacing: 0; -} - -td.navtab { - padding-right: 6px; - padding-left: 6px; -} -td.navtabHL { - background-image: url('tab_a.png'); - background-repeat:repeat-x; - padding-right: 6px; - padding-left: 6px; -} - -td.navtabHL a, td.navtabHL a:visited { - color: #fff; - text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); + font-size: 90%; + text-align: center; } -a.navtab { - font-weight: bold; +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; } -div.qindex{ - text-align: center; +div.qindex, div.navpath { width: 100%; line-height: 140%; - font-size: 130%; - color: #A0A0A0; } -dt.alphachar{ - font-size: 180%; - font-weight: bold; -} - -.alphachar a{ - color: black; -} - -.alphachar a:hover, .alphachar a:visited{ - text-decoration: none; -} - -.classindex dl { - padding: 25px; - column-count:1 -} - -.classindex dd { - display:inline-block; - margin-left: 50px; - width: 90%; - line-height: 1.15em; -} - -.classindex dl.odd { - background-color: #F8F9FC; -} - -@media(min-width: 1120px) { - .classindex dl { - column-count:2 - } -} - -@media(min-width: 1320px) { - .classindex dl { - column-count:3 - } +div.navtab { + margin-right: 15px; } - /* @group Link Styling */ a { @@ -209,6 +143,17 @@ a:hover { text-decoration: underline; } +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #FFFFFF; + border: 1px double #869DCA; +} + .contents a.qindexHL:visited { color: #FFFFFF; } @@ -1481,12 +1426,6 @@ div.toc li.level4 { margin-left: 45px; } -span.emoji { - /* font family used at the site: https://unicode.org/emoji/charts/full-emoji-list.html - * font-family: "Noto Color Emoji", "Apple Color Emoji", "Segoe UI Emoji", Times, Symbola, Aegyptus, Code2000, Code2001, Code2002, Musica, serif, LastResort; - */ -} - .PageDocRTL-title div.toc li.level1 { margin-left: 0 !important; margin-right: 0; diff --git a/docs/doxygen/html/files.html b/docs/doxygen/html/files.html index 511b32f..6677ae5 100644 --- a/docs/doxygen/html/files.html +++ b/docs/doxygen/html/files.html @@ -3,7 +3,7 @@ - + pdal-c: File List @@ -26,7 +26,7 @@
              pdal-c -  2.1.1 +  v2.0.0
              C API for PDAL
              @@ -35,10 +35,10 @@ - + @@ -106,7 +106,7 @@ diff --git a/docs/doxygen/html/functions.html b/docs/doxygen/html/functions.html index 02b21dc..146b6c6 100644 --- a/docs/doxygen/html/functions.html +++ b/docs/doxygen/html/functions.html @@ -3,7 +3,7 @@ - + pdal-c: Data Fields @@ -26,7 +26,7 @@
              pdal-c -  2.1.1 +  v2.0.0
              C API for PDAL
              @@ -35,10 +35,10 @@ - + @@ -102,7 +102,7 @@ diff --git a/docs/doxygen/html/functions_vars.html b/docs/doxygen/html/functions_vars.html index 877d5e7..b71877c 100644 --- a/docs/doxygen/html/functions_vars.html +++ b/docs/doxygen/html/functions_vars.html @@ -3,7 +3,7 @@ - + pdal-c: Data Fields - Variables @@ -26,7 +26,7 @@
              pdal-c -  2.1.1 +  v2.0.0
              C API for PDAL
              @@ -35,10 +35,10 @@ - + @@ -102,7 +102,7 @@ diff --git a/docs/doxygen/html/globals.html b/docs/doxygen/html/globals.html index bc10c48..72e3bf2 100644 --- a/docs/doxygen/html/globals.html +++ b/docs/doxygen/html/globals.html @@ -3,7 +3,7 @@ - + pdal-c: Globals @@ -26,7 +26,7 @@
              pdal-c -  2.1.1 +  v2.0.0
              C API for PDAL
              @@ -35,10 +35,10 @@ - + @@ -263,7 +263,7 @@

              - p -

                diff --git a/docs/doxygen/html/globals_func.html b/docs/doxygen/html/globals_func.html index 84689cd..c44e520 100644 --- a/docs/doxygen/html/globals_func.html +++ b/docs/doxygen/html/globals_func.html @@ -3,7 +3,7 @@ - + pdal-c: Globals @@ -26,7 +26,7 @@
                pdal-c -  2.1.1 +  v2.0.0
                C API for PDAL
                @@ -35,10 +35,10 @@ - + @@ -245,7 +245,7 @@

                - p -

                  diff --git a/docs/doxygen/html/globals_type.html b/docs/doxygen/html/globals_type.html index 5fc7ff9..d67724d 100644 --- a/docs/doxygen/html/globals_type.html +++ b/docs/doxygen/html/globals_type.html @@ -3,7 +3,7 @@ - + pdal-c: Globals @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -108,7 +108,7 @@ diff --git a/docs/doxygen/html/index.html b/docs/doxygen/html/index.html index 96d4a46..b5c020e 100644 --- a/docs/doxygen/html/index.html +++ b/docs/doxygen/html/index.html @@ -3,7 +3,7 @@ - + pdal-c: pdal-c: PDAL C API @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -89,53 +89,15 @@

                  )

                  -

                  -Basics

                  -

                  pdal-c is a C API for the Point Data Abstraction Library (PDAL) and is compatible with PDAL 1.7 and later.

                  -

                  pdal-c is released under the BSD 3-clause license.

                  -

                  -Documentation

                  -

                  API Documentation

                  -

                  -Installation

                  -

                  The library can be installed as a package on Windows, Mac and Linux using Conda.

                  -
                  conda install -c conda-forge pdal-c
                  -

                  The conda package includes a tool called test_pdalc. Run this to confirm that the API configuration is correct and to report on the version of PDAL that the API is connected to.

                  -

                  -Dependencies

                  -

                  The library is dependent on PDAL and has currently been tested up to v2.2.0.

                  -

                  -Usage

                  -

                  An example of the use of the API is given in the csharp folder which contains an integration to PDAL in C#.

                  -

                  NOTE - these scripts are provided for information only as examples and are not supported in any way!

                  -

                  -For Developers

                  -

                  -Build on Windows

                  -

                  The library can be built on Windows using the following command - which assumes that you are in a conda environment that has the conda-forge pdal package loaded:

                  -
                  cd CAPI
                  -
                  make.bat
                  -

                  -Build on Linux and Mac

                  -

                  The library can be built on Linux and Mac using the following command - which assumes that you are in a conda environment that has the conda-forge pdal package loaded:

                  -
                  cd CAPI
                  -
                  cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCONDA_BUILD=OFF .
                  -
                  make
                  -
                  make install
                  -

                  -Code Style

                  -

                  This project enforces the PDAL code styles, which can checked as follows :

                  -
                    -
                  • On Windows - as per astylerc
                  • -
                  • On Linux by running ./check_all.bash
                  • -
                  +

                  pdal-c is a C API for the Point Data Abstraction Library (PDAL) and is compatible with PDAL 1.7 and later.

                  +

                  pdal-c is released under the BSD 3-clause license.

                  diff --git a/docs/doxygen/html/navtreedata.js b/docs/doxygen/html/navtreedata.js index 22e8a9e..50ae779 100644 --- a/docs/doxygen/html/navtreedata.js +++ b/docs/doxygen/html/navtreedata.js @@ -25,19 +25,7 @@ var NAVTREE = [ [ "pdal-c", "index.html", [ - [ "pdal-c: PDAL C API", "index.html", [ - [ "Basics", "index.html#autotoc_md0", null ], - [ "Documentation", "index.html#autotoc_md1", null ], - [ "Installation", "index.html#autotoc_md2", [ - [ "Dependencies", "index.html#autotoc_md3", null ] - ] ], - [ "Usage", "index.html#autotoc_md4", null ], - [ "For Developers", "index.html#autotoc_md5", [ - [ "Build on Windows", "index.html#autotoc_md6", null ], - [ "Build on Linux and Mac", "index.html#autotoc_md7", null ], - [ "Code Style", "index.html#autotoc_md8", null ] - ] ] - ] ], + [ "pdal-c: PDAL C API", "index.html", null ], [ "Data Structures", "annotated.html", [ [ "Data Structures", "annotated.html", "annotated_dup" ], [ "Data Structure Index", "classes.html", null ], diff --git a/docs/doxygen/html/navtreeindex0.js b/docs/doxygen/html/navtreeindex0.js index 1ad6d12..e1948cd 100644 --- a/docs/doxygen/html/navtreeindex0.js +++ b/docs/doxygen/html/navtreeindex0.js @@ -11,15 +11,6 @@ var NAVTREEINDEX0 = "globals_type.html":[2,1,2], "index.html":[], "index.html":[0], -"index.html#autotoc_md0":[0,0], -"index.html#autotoc_md1":[0,1], -"index.html#autotoc_md2":[0,2], -"index.html#autotoc_md3":[0,2,0], -"index.html#autotoc_md4":[0,3], -"index.html#autotoc_md5":[0,4], -"index.html#autotoc_md6":[0,4,0], -"index.html#autotoc_md7":[0,4,1], -"index.html#autotoc_md8":[0,4,2], "pages.html":[], "pdalc_8h.html":[2,0,0,0], "pdalc_8h_source.html":[2,0,0,0], diff --git a/docs/doxygen/html/pdalc_8h.html b/docs/doxygen/html/pdalc_8h.html index 1cb7ec3..11023e8 100644 --- a/docs/doxygen/html/pdalc_8h.html +++ b/docs/doxygen/html/pdalc_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -95,7 +95,7 @@ diff --git a/docs/doxygen/html/pdalc_8h_source.html b/docs/doxygen/html/pdalc_8h_source.html index e09a963..0c3af77 100644 --- a/docs/doxygen/html/pdalc_8h_source.html +++ b/docs/doxygen/html/pdalc_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -127,19 +127,19 @@
                  39 
                  40 #endif
                  -
                  Functions to retrieve PDAL version and configuration information.
                  -
                  Functions to inspect PDAL dimension types.
                  -
                  Functions to launch and inspect the results of a PDAL pipeline.
                  -
                  Functions to inspect the contents of a PDAL point layout.
                  -
                  Functions to inspect the contents of a PDAL point view.
                  -
                  Functions to inspect the contents of a PDAL point view iterator.
                  +
                  Functions to inspect the contents of a PDAL point view iterator.
                  +
                  Functions to inspect the contents of a PDAL point view.
                  +
                  Functions to launch and inspect the results of a PDAL pipeline.
                  +
                  Functions to inspect the contents of a PDAL point layout.
                  +
                  Functions to retrieve PDAL version and configuration information.
                  +
                  Functions to inspect PDAL dimension types.
                  diff --git a/docs/doxygen/html/pdalc__config_8h.html b/docs/doxygen/html/pdalc__config_8h.html index fb44572..652f1c5 100644 --- a/docs/doxygen/html/pdalc__config_8h.html +++ b/docs/doxygen/html/pdalc__config_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_config.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -556,7 +556,7 @@

                    - +
                  diff --git a/docs/doxygen/html/pdalc__config_8h_source.html b/docs/doxygen/html/pdalc__config_8h_source.html index d5d981b..66b6e53 100644 --- a/docs/doxygen/html/pdalc__config_8h_source.html +++ b/docs/doxygen/html/pdalc__config_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_config.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -132,6 +132,7 @@
                  48 #else
                  49 #include <stddef.h> // for size_t
                  50 #endif
                  +
                  51 
                  58 PDALC_API size_t PDALGetGdalDataPath(char *path, size_t size);
                  59 
                  67 PDALC_API size_t PDALGetProj4DataPath(char *path, size_t size);
                  @@ -165,27 +166,27 @@
                  185 #endif
                  186 
                  187 #endif
                  + + +
                  PDALC_API void PDALSetGdalDataPath(const char *path)
                  Sets the path to the GDAL data directory.
                  +
                  PDALC_API size_t PDALSha1(char *sha1, size_t size)
                  Retrieves PDAL's Git commit SHA1 as a string.
                  +
                  Forward declarations for the PDAL C API.
                  +
                  PDALC_API size_t PDALGetGdalDataPath(char *path, size_t size)
                  Retrieves the path to the GDAL data directory.
                  +
                  PDALC_API int PDALVersionInteger()
                  Returns an integer representation of the PDAL version.
                  +
                  PDALC_API size_t PDALFullVersionString(char *version, size_t size)
                  Retrieves the full PDAL version string.
                  +
                  PDALC_API size_t PDALGetProj4DataPath(char *path, size_t size)
                  Retrieves the path to the proj4 data directory.
                  +
                  PDALC_API size_t PDALVersionString(char *version, size_t size)
                  Retrieves the PDAL version string.
                  PDALC_API int PDALVersionMinor()
                  Returns the PDAL minor version number.
                  PDALC_API int PDALVersionMajor()
                  Returns the PDAL major version number.
                  -
                  PDALC_API size_t PDALGetGdalDataPath(char *path, size_t size)
                  Retrieves the path to the GDAL data directory.
                  -
                  PDALC_API int PDALVersionPatch()
                  Returns the PDAL patch version number.
                  PDALC_API size_t PDALDebugInformation(char *info, size_t size)
                  Retrieves PDAL debugging information.
                  -
                  PDALC_API size_t PDALPluginInstallPath(char *path, size_t size)
                  Retrieves the path to the PDAL installation.
                  -
                  PDALC_API size_t PDALGetProj4DataPath(char *path, size_t size)
                  Retrieves the path to the proj4 data directory.
                  PDALC_API void PDALSetProj4DataPath(const char *path)
                  Sets the path to the proj4 data directory.
                  -
                  PDALC_API int PDALVersionInteger()
                  Returns an integer representation of the PDAL version.
                  -
                  PDALC_API void PDALSetGdalDataPath(const char *path)
                  Sets the path to the GDAL data directory.
                  -
                  PDALC_API size_t PDALVersionString(char *version, size_t size)
                  Retrieves the PDAL version string.
                  -
                  PDALC_API size_t PDALFullVersionString(char *version, size_t size)
                  Retrieves the full PDAL version string.
                  -
                  PDALC_API size_t PDALSha1(char *sha1, size_t size)
                  Retrieves PDAL's Git commit SHA1 as a string.
                  -
                  Forward declarations for the PDAL C API.
                  - - +
                  PDALC_API size_t PDALPluginInstallPath(char *path, size_t size)
                  Retrieves the path to the PDAL installation.
                  +
                  PDALC_API int PDALVersionPatch()
                  Returns the PDAL patch version number.
                  diff --git a/docs/doxygen/html/pdalc__defines_8h.html b/docs/doxygen/html/pdalc__defines_8h.html index 2d0f040..48cb957 100644 --- a/docs/doxygen/html/pdalc__defines_8h.html +++ b/docs/doxygen/html/pdalc__defines_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_defines.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -95,7 +95,7 @@ diff --git a/docs/doxygen/html/pdalc__defines_8h_source.html b/docs/doxygen/html/pdalc__defines_8h_source.html index 5069928..b335535 100644 --- a/docs/doxygen/html/pdalc__defines_8h_source.html +++ b/docs/doxygen/html/pdalc__defines_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_defines.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -128,9 +128,9 @@
                  39 // GCC-compatible
                  40 #elif defined(__GNUC__)
                  41 #if defined(__ELF__)
                  -
                  42 #define PDALC_EXPORT_API __attribute__((visibility("default")))
                  -
                  43 #define PDALC_IMPORT_API __attribute__((visibility("default")))
                  -
                  44 #define PDALC_STATIC_API __attribute__((visibility("default")))
                  +
                  42 #define PDALC_EXPORT_API __attribute__((visibility("default")))
                  +
                  43 #define PDALC_IMPORT_API __attribute__((visibility("default")))
                  +
                  44 #define PDALC_STATIC_API __attribute__((visibility("default")))
                  45 // Use symbols compatible with Visual Studio in Windows
                  46 #elif defined(_WIN32)
                  47 #define PDALC_EXPORT_API __declspec(dllexport)
                  @@ -158,7 +158,7 @@ diff --git a/docs/doxygen/html/pdalc__dimtype_8h.html b/docs/doxygen/html/pdalc__dimtype_8h.html index 6480ed4..9643507 100644 --- a/docs/doxygen/html/pdalc__dimtype_8h.html +++ b/docs/doxygen/html/pdalc__dimtype_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_dimtype.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -392,7 +392,7 @@

                    - +
                  diff --git a/docs/doxygen/html/pdalc__dimtype_8h_source.html b/docs/doxygen/html/pdalc__dimtype_8h_source.html index 4a14415..7e155ac 100644 --- a/docs/doxygen/html/pdalc__dimtype_8h_source.html +++ b/docs/doxygen/html/pdalc__dimtype_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_dimtype.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -132,6 +132,7 @@
                  48 #else
                  49 #include <stddef.h> // for size_t
                  50 #endif
                  +
                  51 
                  58 
                  @@ -155,24 +156,24 @@
                  130 }
                  131 #endif
                  132 #endif
                  + + +
                  PDALC_API PDALDimType PDALGetDimType(PDALDimTypeListPtr types, size_t index)
                  Returns the dimension type at the provided index from a dimension type list.
                  PDALC_API PDALDimType PDALGetInvalidDimType()
                  Returns the invalid dimension type.
                  +
                  Forward declarations for the PDAL C API.
                  PDALC_API void PDALDisposeDimTypeList(PDALDimTypeListPtr types)
                  Disposes the provided dimension type list.
                  -
                  PDALC_API uint64_t PDALGetDimTypeListByteCount(PDALDimTypeListPtr types)
                  Returns the number of bytes required to store data referenced by a dimension type list.
                  -
                  PDALC_API size_t PDALGetDimTypeIdName(PDALDimType dim, char *name, size_t size)
                  Retrieves the name of a dimension type's ID.
                  -
                  PDALC_API PDALDimType PDALGetDimType(PDALDimTypeListPtr types, size_t index)
                  Returns the dimension type at the provided index from a dimension type list.
                  -
                  PDALC_API size_t PDALGetDimTypeInterpretationName(PDALDimType dim, char *name, size_t size)
                  Retrieves the name of a dimension type's interpretation, i.e., its data type.
                  PDALC_API size_t PDALGetDimTypeInterpretationByteCount(PDALDimType dim)
                  Retrieves the byte count of a dimension type's interpretation, i.e., its data size.
                  -
                  PDALC_API size_t PDALGetDimTypeListSize(PDALDimTypeListPtr types)
                  Returns the number of elements in a dimension type list.
                  -
                  Forward declarations for the PDAL C API.
                  void * PDALDimTypeListPtr
                  A pointer to a dimension type list.
                  Definition: pdalc_forward.h:94
                  +
                  PDALC_API size_t PDALGetDimTypeListSize(PDALDimTypeListPtr types)
                  Returns the number of elements in a dimension type list.
                  +
                  PDALC_API size_t PDALGetDimTypeIdName(PDALDimType dim, char *name, size_t size)
                  Retrieves the name of a dimension type's ID.
                  +
                  PDALC_API size_t PDALGetDimTypeInterpretationName(PDALDimType dim, char *name, size_t size)
                  Retrieves the name of a dimension type's interpretation, i.e., its data type.
                  +
                  PDALC_API uint64_t PDALGetDimTypeListByteCount(PDALDimTypeListPtr types)
                  Returns the number of bytes required to store data referenced by a dimension type list.
                  A dimension type.
                  Definition: pdalc_forward.h:79
                  - - diff --git a/docs/doxygen/html/pdalc__forward_8h.html b/docs/doxygen/html/pdalc__forward_8h.html index 03f4667..e37d1ae 100644 --- a/docs/doxygen/html/pdalc__forward_8h.html +++ b/docs/doxygen/html/pdalc__forward_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_forward.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -228,7 +228,7 @@

                    - +
                  diff --git a/docs/doxygen/html/pdalc__forward_8h_source.html b/docs/doxygen/html/pdalc__forward_8h_source.html index 2f0ea67..23f0508 100644 --- a/docs/doxygen/html/pdalc__forward_8h_source.html +++ b/docs/doxygen/html/pdalc__forward_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_forward.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -182,25 +182,25 @@
                  110 
                  111 #endif /* PDALC_FORWARD_H */
                  - -
                  void * PDALPointViewPtr
                  A pointer to point view.
                  Definition: pdalc_forward.h:106
                  -
                  void * PDALPointViewIteratorPtr
                  A pointer to a point view iterator.
                  Definition: pdalc_forward.h:109
                  + + +
                  double offset
                  The dimension's offset value.
                  Definition: pdalc_forward.h:90
                  uint64_t PDALPointId
                  An index to a point in a list.
                  Definition: pdalc_forward.h:100
                  -
                  void * PDALPipelinePtr
                  A pointer to a pipeline.
                  Definition: pdalc_forward.h:97
                  -
                  void * PDALDimTypeListPtr
                  A pointer to a dimension type list.
                  Definition: pdalc_forward.h:94
                  +
                  uint32_t type
                  The dimension's interpretation type.
                  Definition: pdalc_forward.h:84
                  +
                  void * PDALPointViewIteratorPtr
                  A pointer to a point view iterator.
                  Definition: pdalc_forward.h:109
                  void * PDALPointLayoutPtr
                  A pointer to a point layout.
                  Definition: pdalc_forward.h:103
                  -
                  A dimension type.
                  Definition: pdalc_forward.h:79
                  -
                  double offset
                  The dimension's offset value.
                  Definition: pdalc_forward.h:90
                  uint32_t id
                  The dimension's identifier.
                  Definition: pdalc_forward.h:81
                  +
                  void * PDALPipelinePtr
                  A pointer to a pipeline.
                  Definition: pdalc_forward.h:97
                  +
                  void * PDALDimTypeListPtr
                  A pointer to a dimension type list.
                  Definition: pdalc_forward.h:94
                  double scale
                  The dimension's scaling factor.
                  Definition: pdalc_forward.h:87
                  -
                  uint32_t type
                  The dimension's interpretation type.
                  Definition: pdalc_forward.h:84
                  - - + +
                  void * PDALPointViewPtr
                  A pointer to point view.
                  Definition: pdalc_forward.h:106
                  +
                  A dimension type.
                  Definition: pdalc_forward.h:79
                  diff --git a/docs/doxygen/html/pdalc__pipeline_8h.html b/docs/doxygen/html/pdalc__pipeline_8h.html index 542b881..3ca52a0 100644 --- a/docs/doxygen/html/pdalc__pipeline_8h.html +++ b/docs/doxygen/html/pdalc__pipeline_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pipeline.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -521,7 +521,7 @@

                    - +
                  diff --git a/docs/doxygen/html/pdalc__pipeline_8h_source.html b/docs/doxygen/html/pdalc__pipeline_8h_source.html index ae9105e..7efec0f 100644 --- a/docs/doxygen/html/pdalc__pipeline_8h_source.html +++ b/docs/doxygen/html/pdalc__pipeline_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pipeline.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -164,27 +164,27 @@
                  161 }
                  162 #endif /* _cplusplus */
                  163 #endif /* PDALC_PIPELINE_H */
                  + + +
                  PDALC_API size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size)
                  Retrieves a pipeline's execution log.
                  +
                  PDALC_API int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline)
                  Returns a pipeline's log level.
                  Forward declarations for the PDAL C API.
                  -
                  void * PDALPointViewIteratorPtr
                  A pointer to a point view iterator.
                  Definition: pdalc_forward.h:109
                  -
                  void * PDALPipelinePtr
                  A pointer to a pipeline.
                  Definition: pdalc_forward.h:97
                  -
                  PDALC_API void PDALDisposePipeline(PDALPipelinePtr pipeline)
                  Disposes a PDAL pipeline.
                  -
                  PDALC_API int64_t PDALExecutePipeline(PDALPipelinePtr pipeline)
                  Executes a pipeline.
                  -
                  PDALC_API PDALPipelinePtr PDALCreatePipeline(const char *json)
                  Creates a PDAL pipeline from a JSON text string.
                  +
                  PDALC_API bool PDALValidatePipeline(PDALPipelinePtr pipeline)
                  Validates a pipeline.
                  PDALC_API void PDALSetPipelineLogLevel(PDALPipelinePtr pipeline, int level)
                  Sets a pipeline's log level.
                  -
                  PDALC_API int PDALGetPipelineLogLevel(PDALPipelinePtr pipeline)
                  Returns a pipeline's log level.
                  +
                  void * PDALPointViewIteratorPtr
                  A pointer to a point view iterator.
                  Definition: pdalc_forward.h:109
                  +
                  PDALC_API size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size)
                  Retrieves a pipeline's computed metadata.
                  PDALC_API size_t PDALGetPipelineSchema(PDALPipelinePtr pipeline, char *schema, size_t size)
                  Retrieves a pipeline's computed schema.
                  -
                  PDALC_API bool PDALValidatePipeline(PDALPipelinePtr pipeline)
                  Validates a pipeline.
                  PDALC_API size_t PDALGetPipelineAsString(PDALPipelinePtr pipeline, char *buffer, size_t size)
                  Retrieves a string representation of a pipeline.
                  -
                  PDALC_API size_t PDALGetPipelineLog(PDALPipelinePtr pipeline, char *log, size_t size)
                  Retrieves a pipeline's execution log.
                  -
                  PDALC_API size_t PDALGetPipelineMetadata(PDALPipelinePtr pipeline, char *metadata, size_t size)
                  Retrieves a pipeline's computed metadata.
                  PDALC_API PDALPointViewIteratorPtr PDALGetPointViews(PDALPipelinePtr pipeline)
                  Gets the resulting point views from a pipeline execution.
                  - - +
                  void * PDALPipelinePtr
                  A pointer to a pipeline.
                  Definition: pdalc_forward.h:97
                  +
                  PDALC_API int64_t PDALExecutePipeline(PDALPipelinePtr pipeline)
                  Executes a pipeline.
                  +
                  PDALC_API void PDALDisposePipeline(PDALPipelinePtr pipeline)
                  Disposes a PDAL pipeline.
                  +
                  PDALC_API PDALPipelinePtr PDALCreatePipeline(const char *json)
                  Creates a PDAL pipeline from a JSON text string.
                  diff --git a/docs/doxygen/html/pdalc__pointlayout_8h.html b/docs/doxygen/html/pdalc__pointlayout_8h.html index e406620..7809d9e 100644 --- a/docs/doxygen/html/pdalc__pointlayout_8h.html +++ b/docs/doxygen/html/pdalc__pointlayout_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointlayout.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -291,7 +291,7 @@

                    - +
                  diff --git a/docs/doxygen/html/pdalc__pointlayout_8h_source.html b/docs/doxygen/html/pdalc__pointlayout_8h_source.html index 3dd50f3..39f23fa 100644 --- a/docs/doxygen/html/pdalc__pointlayout_8h_source.html +++ b/docs/doxygen/html/pdalc__pointlayout_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointlayout.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -132,6 +132,7 @@
                  49 #else
                  50 #include <stddef.h> // for size_t
                  51 #endif
                  +
                  52 
                  62 
                  71 PDALC_API PDALDimType PDALFindDimType(PDALPointLayoutPtr layout, const char *name);
                  @@ -149,22 +150,22 @@
                  105 #endif
                  106 
                  107 #endif
                  + +
                  Forward declarations for the PDAL C API.
                  -
                  void * PDALDimTypeListPtr
                  A pointer to a dimension type list.
                  Definition: pdalc_forward.h:94
                  -
                  void * PDALPointLayoutPtr
                  A pointer to a point layout.
                  Definition: pdalc_forward.h:103
                  PDALC_API size_t PDALGetDimSize(PDALPointLayoutPtr layout, const char *name)
                  Returns the byte size of a dimension type value within a layout.
                  -
                  PDALC_API PDALDimTypeListPtr PDALGetPointLayoutDimTypes(PDALPointLayoutPtr layout)
                  Returns the list of dimension types used by the provided layout.
                  PDALC_API size_t PDALGetPointSize(PDALPointLayoutPtr layout)
                  Returns the byte size of a point in the provided layout.
                  +
                  void * PDALPointLayoutPtr
                  A pointer to a point layout.
                  Definition: pdalc_forward.h:103
                  +
                  PDALC_API PDALDimTypeListPtr PDALGetPointLayoutDimTypes(PDALPointLayoutPtr layout)
                  Returns the list of dimension types used by the provided layout.
                  PDALC_API PDALDimType PDALFindDimType(PDALPointLayoutPtr layout, const char *name)
                  Finds the dimension type identified by the provided name in a layout.
                  +
                  void * PDALDimTypeListPtr
                  A pointer to a dimension type list.
                  Definition: pdalc_forward.h:94
                  PDALC_API size_t PDALGetDimPackedOffset(PDALPointLayoutPtr layout, const char *name)
                  Returns the byte offset of a dimension type within a layout.
                  A dimension type.
                  Definition: pdalc_forward.h:79
                  - - diff --git a/docs/doxygen/html/pdalc__pointview_8h.html b/docs/doxygen/html/pdalc__pointview_8h.html index 7fb360a..2914774 100644 --- a/docs/doxygen/html/pdalc__pointview_8h.html +++ b/docs/doxygen/html/pdalc__pointview_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointview.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -504,7 +504,7 @@

                    - +
                  diff --git a/docs/doxygen/html/pdalc__pointview_8h_source.html b/docs/doxygen/html/pdalc__pointview_8h_source.html index 6ab5a15..bd3b1dc 100644 --- a/docs/doxygen/html/pdalc__pointview_8h_source.html +++ b/docs/doxygen/html/pdalc__pointview_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointview.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -134,6 +134,7 @@
                  50 #include <stddef.h> // for size_t
                  51 #include <stdint.h> // for uint64_t
                  52 #endif
                  +
                  53 
                  59 
                  @@ -161,28 +162,28 @@
                  174 #endif /* __cplusplus */
                  175 
                  176 #endif
                  + + +
                  PDALC_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buffer)
                  Retrieves data for all points based on the provided dimension list.
                  +
                  PDALC_API PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view)
                  Clones the provided point view.
                  Forward declarations for the PDAL C API.
                  -
                  void * PDALPointViewPtr
                  A pointer to point view.
                  Definition: pdalc_forward.h:106
                  uint64_t PDALPointId
                  An index to a point in a list.
                  Definition: pdalc_forward.h:100
                  -
                  void * PDALDimTypeListPtr
                  A pointer to a dimension type list.
                  Definition: pdalc_forward.h:94
                  -
                  void * PDALPointLayoutPtr
                  A pointer to a point layout.
                  Definition: pdalc_forward.h:103
                  -
                  PDALC_API int PDALGetPointViewId(PDALPointViewPtr view)
                  Returns the ID of the provided point view.
                  -
                  PDALC_API void PDALDisposePointView(PDALPointViewPtr view)
                  Disposes the provided point view.
                  -
                  PDALC_API PDALPointViewPtr PDALClonePointView(PDALPointViewPtr view)
                  Clones the provided point view.
                  -
                  PDALC_API bool PDALIsPointViewEmpty(PDALPointViewPtr view)
                  Returns whether the provided point view is empty, i.e., has no points.
                  PDALC_API size_t PDALGetPackedPoint(PDALPointViewPtr view, PDALDimTypeListPtr dims, PDALPointId idx, char *buffer)
                  Retrieves data for a point based on the provided dimension list.
                  -
                  PDALC_API uint64_t PDALGetAllPackedPoints(PDALPointViewPtr view, PDALDimTypeListPtr dims, char *buffer)
                  Retrieves data for all points based on the provided dimension list.
                  PDALC_API size_t PDALGetPointViewWkt(PDALPointViewPtr view, char *wkt, size_t size, bool pretty)
                  Returns the Well-Known Text (WKT) projection string for the provided point view.
                  +
                  void * PDALPointLayoutPtr
                  A pointer to a point layout.
                  Definition: pdalc_forward.h:103
                  +
                  PDALC_API PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view)
                  Returns the point layout for the provided point view.
                  +
                  PDALC_API bool PDALIsPointViewEmpty(PDALPointViewPtr view)
                  Returns whether the provided point view is empty, i.e., has no points.
                  PDALC_API size_t PDALGetPointViewProj4(PDALPointViewPtr view, char *proj, size_t size)
                  Returns the proj4 projection string for the provided point view.
                  +
                  void * PDALDimTypeListPtr
                  A pointer to a dimension type list.
                  Definition: pdalc_forward.h:94
                  +
                  PDALC_API void PDALDisposePointView(PDALPointViewPtr view)
                  Disposes the provided point view.
                  +
                  PDALC_API int PDALGetPointViewId(PDALPointViewPtr view)
                  Returns the ID of the provided point view.
                  PDALC_API uint64_t PDALGetPointViewSize(PDALPointViewPtr view)
                  Returns the number of points in the provided view.
                  -
                  PDALC_API PDALPointLayoutPtr PDALGetPointViewLayout(PDALPointViewPtr view)
                  Returns the point layout for the provided point view.
                  - - +
                  void * PDALPointViewPtr
                  A pointer to point view.
                  Definition: pdalc_forward.h:106
                  diff --git a/docs/doxygen/html/pdalc__pointviewiterator_8h.html b/docs/doxygen/html/pdalc__pointviewiterator_8h.html index b61909b..fa19a4e 100644 --- a/docs/doxygen/html/pdalc__pointviewiterator_8h.html +++ b/docs/doxygen/html/pdalc__pointviewiterator_8h.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointviewiterator.h File Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -226,7 +226,7 @@

                    - +
                  diff --git a/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html b/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html index 6182d23..864fa5d 100644 --- a/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html +++ b/docs/doxygen/html/pdalc__pointviewiterator_8h_source.html @@ -3,7 +3,7 @@ - + pdal-c: pdal/pdalc_pointviewiterator.h Source File @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -162,20 +162,20 @@
                  103 #endif /* __cplusplus */
                  104 
                  105 #endif
                  + + +
                  PDALC_API void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr)
                  Disposes the provided point view iterator.
                  Forward declarations for the PDAL C API.
                  -
                  void * PDALPointViewPtr
                  A pointer to point view.
                  Definition: pdalc_forward.h:106
                  void * PDALPointViewIteratorPtr
                  A pointer to a point view iterator.
                  Definition: pdalc_forward.h:109
                  PDALC_API void PDALResetPointViewIterator(PDALPointViewIteratorPtr itr)
                  Resets the provided point view iterator to its starting position.
                  -
                  PDALC_API bool PDALHasNextPointView(PDALPointViewIteratorPtr itr)
                  Returns whether another point view is available in the provided iterator.
                  -
                  PDALC_API void PDALDisposePointViewIterator(PDALPointViewIteratorPtr itr)
                  Disposes the provided point view iterator.
                  PDALC_API PDALPointViewPtr PDALGetNextPointView(PDALPointViewIteratorPtr itr)
                  Returns the next available point view in the provided iterator.
                  - - +
                  PDALC_API bool PDALHasNextPointView(PDALPointViewIteratorPtr itr)
                  Returns whether another point view is available in the provided iterator.
                  +
                  void * PDALPointViewPtr
                  A pointer to point view.
                  Definition: pdalc_forward.h:106
                  diff --git a/docs/doxygen/html/search/all_0.html b/docs/doxygen/html/search/all_0.html index 1ec5b2d..a34319f 100644 --- a/docs/doxygen/html/search/all_0.html +++ b/docs/doxygen/html/search/all_0.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/all_1.html b/docs/doxygen/html/search/all_1.html index 9f80e90..51aff6f 100644 --- a/docs/doxygen/html/search/all_1.html +++ b/docs/doxygen/html/search/all_1.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/all_2.html b/docs/doxygen/html/search/all_2.html index 02cfffc..1f81f66 100644 --- a/docs/doxygen/html/search/all_2.html +++ b/docs/doxygen/html/search/all_2.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/all_3.html b/docs/doxygen/html/search/all_3.html index 39767b8..2e31ab9 100644 --- a/docs/doxygen/html/search/all_3.html +++ b/docs/doxygen/html/search/all_3.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/all_4.html b/docs/doxygen/html/search/all_4.html index fc40463..0540c16 100644 --- a/docs/doxygen/html/search/all_4.html +++ b/docs/doxygen/html/search/all_4.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/all_5.html b/docs/doxygen/html/search/all_5.html index 9dd9344..ebec30b 100644 --- a/docs/doxygen/html/search/all_5.html +++ b/docs/doxygen/html/search/all_5.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/classes_0.html b/docs/doxygen/html/search/classes_0.html index af8159e..7e0afc8 100644 --- a/docs/doxygen/html/search/classes_0.html +++ b/docs/doxygen/html/search/classes_0.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/files_0.html b/docs/doxygen/html/search/files_0.html index 9498842..76b64f5 100644 --- a/docs/doxygen/html/search/files_0.html +++ b/docs/doxygen/html/search/files_0.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/files_1.html b/docs/doxygen/html/search/files_1.html index 7050ef4..c8edef8 100644 --- a/docs/doxygen/html/search/files_1.html +++ b/docs/doxygen/html/search/files_1.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/functions_0.html b/docs/doxygen/html/search/functions_0.html index eb4c501..f04535a 100644 --- a/docs/doxygen/html/search/functions_0.html +++ b/docs/doxygen/html/search/functions_0.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/nomatches.html b/docs/doxygen/html/search/nomatches.html index 2b9360b..4377320 100644 --- a/docs/doxygen/html/search/nomatches.html +++ b/docs/doxygen/html/search/nomatches.html @@ -1,6 +1,5 @@ - - + diff --git a/docs/doxygen/html/search/pages_0.html b/docs/doxygen/html/search/pages_0.html index 8517b48..a281c4b 100644 --- a/docs/doxygen/html/search/pages_0.html +++ b/docs/doxygen/html/search/pages_0.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/search.css b/docs/doxygen/html/search/search.css index 9074198..933cf08 100644 --- a/docs/doxygen/html/search/search.css +++ b/docs/doxygen/html/search/search.css @@ -204,21 +204,19 @@ a.SRScope:focus, a.SRScope:active { span.SRScope { padding-left: 4px; - font-family: Arial, Verdana, sans-serif; } .SRPage .SRStatus { padding: 2px 5px; font-size: 8pt; font-style: italic; - font-family: Arial, Verdana, sans-serif; } .SRResult { display: none; } -div.searchresults { +DIV.searchresults { margin-left: 10px; margin-right: 10px; } diff --git a/docs/doxygen/html/search/search.js b/docs/doxygen/html/search/search.js index fb226f7..92b6094 100644 --- a/docs/doxygen/html/search/search.js +++ b/docs/doxygen/html/search/search.js @@ -80,10 +80,9 @@ function getYPos(item) storing this instance. Is needed to be able to set timeouts. resultPath - path to use for external files */ -function SearchBox(name, resultsPath, inFrame, label, extension) +function SearchBox(name, resultsPath, inFrame, label) { if (!name || !resultsPath) { alert("Missing parameters to SearchBox."); } - if (!extension || extension == "") { extension = ".html"; } // ---------- Instance variables this.name = name; @@ -98,7 +97,6 @@ function SearchBox(name, resultsPath, inFrame, label, extension) this.searchActive = false; this.insideFrame = inFrame; this.searchLabel = label; - this.extension = extension; // ----------- DOM Elements @@ -349,13 +347,13 @@ function SearchBox(name, resultsPath, inFrame, label, extension) if (idx!=-1) { var hexCode=idx.toString(16); - resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + this.extension; + resultsPage = this.resultsPath + '/' + indexSectionNames[this.searchIndex] + '_' + hexCode + '.html'; resultsPageWithSearch = resultsPage+'?'+escape(searchValue); hasResultsPage = true; } else // nothing available for this search term { - resultsPage = this.resultsPath + '/nomatches' + this.extension; + resultsPage = this.resultsPath + '/nomatches.html'; resultsPageWithSearch = resultsPage; hasResultsPage = false; } @@ -441,12 +439,12 @@ function SearchResults(name) while (element && element!=parentElement) { - if (element.nodeName.toLowerCase() == 'div' && element.className == 'SRChildren') + if (element.nodeName == 'DIV' && element.className == 'SRChildren') { return element; } - if (element.nodeName.toLowerCase() == 'div' && element.hasChildNodes()) + if (element.nodeName == 'DIV' && element.hasChildNodes()) { element = element.firstChild; } diff --git a/docs/doxygen/html/search/typedefs_0.html b/docs/doxygen/html/search/typedefs_0.html index a4684c4..b66f0a7 100644 --- a/docs/doxygen/html/search/typedefs_0.html +++ b/docs/doxygen/html/search/typedefs_0.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/variables_0.html b/docs/doxygen/html/search/variables_0.html index 1e477c0..2edd111 100644 --- a/docs/doxygen/html/search/variables_0.html +++ b/docs/doxygen/html/search/variables_0.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/variables_1.html b/docs/doxygen/html/search/variables_1.html index ea73d9a..98b95a9 100644 --- a/docs/doxygen/html/search/variables_1.html +++ b/docs/doxygen/html/search/variables_1.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/variables_2.html b/docs/doxygen/html/search/variables_2.html index 0580462..3e0c591 100644 --- a/docs/doxygen/html/search/variables_2.html +++ b/docs/doxygen/html/search/variables_2.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/search/variables_3.html b/docs/doxygen/html/search/variables_3.html index 0d69e76..7867da3 100644 --- a/docs/doxygen/html/search/variables_3.html +++ b/docs/doxygen/html/search/variables_3.html @@ -1,8 +1,7 @@ - - + - + @@ -11,14 +10,14 @@
                  Loading...
                  - +-->
                  Searching...
                  No Matches
                  - +-->
                  diff --git a/docs/doxygen/html/struct_p_d_a_l_dim_type.html b/docs/doxygen/html/struct_p_d_a_l_dim_type.html index ff35465..78a3fa9 100644 --- a/docs/doxygen/html/struct_p_d_a_l_dim_type.html +++ b/docs/doxygen/html/struct_p_d_a_l_dim_type.html @@ -3,7 +3,7 @@ - + pdal-c: PDALDimType Struct Reference @@ -26,7 +26,7 @@
                  pdal-c -  2.1.1 +  v2.0.0
                  C API for PDAL
                  @@ -35,10 +35,10 @@ - + @@ -181,7 +181,7 @@

                    - +
                  From 6977af8880d7e1582d0e0b18eca9c9bd6eaf9d53 Mon Sep 17 00:00:00 2001 From: runette Date: Fri, 30 Apr 2021 10:51:27 +0100 Subject: [PATCH 36/36] doc updates --- CHANGELOG.md | 11 +++++++++ README.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..9d2564c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Version 2.1.0 + +This version adds + +- Access to face data in PDAL using the `GetMeshSize` and `getAllTriangles` methods, +- Updates the sample C# P/Invoke scripts to add the Mesh functions and remove depedencies on Unity. Asdded .csproj files and improved some signatures +- added more examples to readme. + +# Version 2.0.0 + +This was the first version released through conda. \ No newline at end of file diff --git a/README.md b/README.md index 9e838eb..24232e9 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,74 @@ An example of the use of the API is given in the `csharp` folder which contains NOTE - these scripts are provided for information only as examples and are not supported in any way! +## Example C# Program + +``` c# +using System; +using System.Collections.Generic; +using Pdal; +using Newtonsoft.Json; +using g3; + +namespace pdal_mesh +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + Config pdal = new Config(); + Console.WriteLine(pdal.Version); + + List pipe = new List(); + pipe.Add(".../CAPI/tests/data/las/1.2-with-color.las"); + pipe.Add(new + { + type = "filters.splitter", + length = 1000 + }); + pipe.Add(new + { + type = "filters.delaunay" + }); + + string json = JsonConvert.SerializeObject(pipe.ToArray()); + + Pipeline pl = new Pipeline(json); + + long count = pl.Execute(); + + Console.WriteLine($"Point Count is {count}"); + + using (PointViewIterator views = pl.Views) { + views.Reset(); + + while (views.HasNext()) + { + PointView view = views.Next; + if (view != null) + { + Console.WriteLine($"Point Count is {view.Size}"); + Console.WriteLine($"Triangle Count is {view.MeshSize}"); + + BpcData pc = view.GetBakedPointCloud(); + + DMesh3 mesh = view.getMesh(); + + } + } + } + } + } +} +``` + +This takes a LAS file, splits the file into tiles and then creates a Delaunay Triangulation (i.e. Mesh) for each one. + +This code uses the sample bindings as-is and has a dependency on [Geometry3Sharp](https://github.com/gradientspace/geometry3Sharp) only. + +Note that `BcpData` is a custom data structure that holds the Point Cloud in a form suitable to create a [Baked PointCloud](https://medium.com/realities-io/point-cloud-rendering-7bd83c6220c8) suitable for rendering as a VFX graph in Unity. This is an efficient way to display point cloud data in VR and I have used it successfully with point clouds of 10 million points. + # For Developers ## Build on Windows