It is the continuation of issue originally raised against CAPI. They suggest contacting directly to PDAL team as it might be .dll bug.
I am currently writing a small C# program to upload las to Postgres database using PDAL writers.pgpointcloud.
My JSON pipeline:
When executing Pipeline through EXE I am getting a different number of dimensions to compare to executing pipeline from CAPI (direct .dll call).
Other pipelines which I was testing was working fine. Is just something with Postgres import. Not sure if the issue is with CAPI or maybe is deeper in PDAL.dll's. However, when I run pdal.exe from the same folder with pdal.dlls, with the same pipeline, dimensions seem to not be duplicated. The other interesting behaviour I noticed is that when I query for a single dimension in PG, I am getting a single correct result. A number of points are correct too. Maybe there is some metadata underneath which gets corrupted when calling pipeline directly from CAPI or rather dll.
SELECT pc_get(PC_Explode(pa), 'HeightAboveGround') pt
FROM test.sample LIMIT 1;
When I query pointcloud_formats XML schema I can see the dims duplications. At what stage XML is being generated?
SELECT * FROM pointcloud_formats;
<?xml version="1.0" encoding="UTF-8"?>
<pc:PointCloudSchema xmlns:pc="http://pointcloud.org/schemas/PC/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<pc:dimension>
<pc:position>1</pc:position>
<pc:size>1</pc:size>
<pc:description>ASPRS classification. 0 for no classification. See LAS specification for details.</pc:description>
<pc:name>Classification</pc:name>
<pc:interpretation>uint8_t</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>2</pc:position>
<pc:size>1</pc:size>
<pc:description>ASPRS classification. 0 for no classification. See LAS specification for details.</pc:description>
<pc:name>Classification</pc:name>
<pc:interpretation>uint8_t</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>3</pc:position>
<pc:size>8</pc:size>
<pc:description>GPS time that the point was acquired</pc:description>
<pc:name>GpsTime</pc:name>
<pc:interpretation>double</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>4</pc:position>
<pc:size>8</pc:size>
<pc:description>GPS time that the point was acquired</pc:description>
<pc:name>GpsTime</pc:name>
<pc:interpretation>double</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>5</pc:position>
<pc:size>4</pc:size>
<pc:description>Height Above Ground</pc:description>
<pc:name>HeightAboveGround</pc:name>
<pc:interpretation>float</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>6</pc:position>
<pc:size>4</pc:size>
<pc:description>Height Above Ground</pc:description>
<pc:name>HeightAboveGround</pc:name>
<pc:interpretation>float</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>7</pc:position>
<pc:size>8</pc:size>
<pc:description>X coordinate</pc:description>
<pc:name>X</pc:name>
<pc:interpretation>double</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>8</pc:position>
<pc:size>8</pc:size>
<pc:description>X coordinate</pc:description>
<pc:name>X</pc:name>
<pc:interpretation>double</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>9</pc:position>
<pc:size>8</pc:size>
<pc:description>Y coordinate</pc:description>
<pc:name>Y</pc:name>
<pc:interpretation>double</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>10</pc:position>
<pc:size>8</pc:size>
<pc:description>Y coordinate</pc:description>
<pc:name>Y</pc:name>
<pc:interpretation>double</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>11</pc:position>
<pc:size>8</pc:size>
<pc:description>Z coordinate</pc:description>
<pc:name>Z</pc:name>
<pc:interpretation>double</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:dimension>
<pc:position>12</pc:position>
<pc:size>8</pc:size>
<pc:description>Z coordinate</pc:description>
<pc:name>Z</pc:name>
<pc:interpretation>double</pc:interpretation>
<pc:active>true</pc:active>
</pc:dimension>
<pc:metadata>
<Metadata name="compression" type="string">dimensional</Metadata>
</pc:metadata>
<pc:orientation>point</pc:orientation>
<pc:version>1.3</pc:version>
</pc:PointCloudSchema>
Does anyone know the reason why the dimensions get duplicated or observe similar behave?
It is the continuation of issue originally raised against CAPI. They suggest contacting directly to PDAL team as it might be .dll bug. I am currently writing a small C# program to upload las to Postgres database using PDAL writers.pgpointcloud. My JSON pipeline:
When executing Pipeline through EXE I am getting a different number of dimensions to compare to executing pipeline from CAPI (direct .dll call).
Other pipelines which I was testing was working fine. Is just something with Postgres import. Not sure if the issue is with CAPI or maybe is deeper in PDAL.dll's. However, when I run pdal.exe from the same folder with pdal.dlls, with the same pipeline, dimensions seem to not be duplicated. The other interesting behaviour I noticed is that when I query for a single dimension in PG, I am getting a single correct result. A number of points are correct too. Maybe there is some metadata underneath which gets corrupted when calling pipeline directly from CAPI or rather dll.
When I query pointcloud_formats XML schema I can see the dims duplications. At what stage XML is being generated?
Does anyone know the reason why the dimensions get duplicated or observe similar behave?