Skip to content

Commit

Permalink
debugging (sync)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanmaierhofer committed Nov 25, 2023
1 parent 5180225 commit d28bcc7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Aardvark.Algodat.Tests/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2766,7 +2766,7 @@ public static async Task Main(string[] _)
await CreateStore(
@"W:\Datasets\Vgm\Data\structured_pointclouds\lowergetikum 20230321.e57",
@"W:\Datasets\Vgm\Stores\lowergetikum 20230321.e57_0.01",
minDist: 0.01
minDist: 0.0
);

//await Parts_Test_20231006_Merge();
Expand Down
2 changes: 1 addition & 1 deletion src/Aardvark.Data.E57/ImportE57.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public static IEnumerable<Chunk> Chunks(this Stream stream, long streamLengthInB
var yieldedRecordCount = 0L;

var partIndex = config.PartIndexOffset;
foreach (var data3d in header.E57Root.Data3D.Take(2))
foreach (var data3d in header.E57Root.Data3D)
{
foreach (var (Positions, Properties) in data3d.StreamPointsFull(config.MaxChunkPointCount, config.Verbose, exclude))
{
Expand Down
23 changes: 22 additions & 1 deletion src/Aardvark.Geometry.PointSet/Octrees/Lod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,30 @@ void addAttributeByRef<T>(string kind, Durable.Def def, Func<IPointCloudNode, bo
if (lodQs != null)
{
upsertData = upsertData
.Add(PartIndexUtils.GetDurableDefForPartIndices(lodQs), lodQs)
//.Add(PartIndexUtils.GetDurableDefForPartIndices(lodQs), lodQs)
.Add(Durable.Octree.PartIndexRange, lodQsRange ?? throw new Exception($"Expected part index range to be not null. Error d355eb9f-02b3-4cd7-b1de-041d4d0e7c3c."))
;

if (lodQs is Array xs)
{
// add attribute by ref to separate blob
var key = Guid.NewGuid();
store?.Add(key, xs);
var def = xs switch
{
byte[] => Durable.Octree.PerPointPartIndex1bReference,
short[] => Durable.Octree.PerPointPartIndex1sReference,
int[] => Durable.Octree.PerPointPartIndex1iReference,
_ => throw new Exception("Invariant 5a25f407-5ccf-4577-a7eb-c0d691093d10.")
};
upsertData = upsertData.Add(def, key);
}
else
{
upsertData = upsertData
.Add(PartIndexUtils.GetDurableDefForPartIndices(lodQs), lodQs)
;
}
}

// ... classifications ...
Expand Down

0 comments on commit d28bcc7

Please sign in to comment.