Skip to content

Commit aec95a5

Browse files
authored
Merge pull request #238 from Geodan/copilot/fix-octree-tiling-issue
Fix octree tile coordinate calculations causing level 2+ tiles to be invisible
2 parents 02a2db8 + dadfb2d commit aec95a5

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/b3dm.tileset/OctreeTiler.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public List<Tile3D> GenerateTiles3D(BoundingBox3D bbox, int level, Tile3D tile,
3232

3333
var numberOfFeatures = FeatureCountRepository.CountFeaturesInBox(conn, inputTable.TableName, inputTable.GeometryColumn, new Point(bbox.XMin, bbox.YMin, bbox.ZMin), new Point(bbox.XMax, bbox.YMax, bbox.ZMax), where, inputTable.EPSGCode, tilingSettings.KeepProjection);
3434
if (numberOfFeatures == 0) {
35-
var t2 = new Tile3D(level, tile.Z, tile.X, tile.Y);
35+
var t2 = new Tile3D(level, tile.X, tile.Y, tile.Z);
3636
t2.Available = false;
3737
tiles.Add(t2);
3838
}
@@ -55,7 +55,7 @@ public List<Tile3D> GenerateTiles3D(BoundingBox3D bbox, int level, Tile3D tile,
5555
var zend = z_start + dz;
5656
var bbox3d = new BoundingBox3D(xstart, ystart, z_start, xend, yend, zend);
5757

58-
var new_tile = new Tile3D(level, tile.X * 2 + x, tile.Y * 2 + y, tile.Z + z);
58+
var new_tile = new Tile3D(level, tile.X * 2 + x, tile.Y * 2 + y, tile.Z * 2 + z);
5959
GenerateTiles3D(bbox3d, level, new_tile, tiles);
6060
}
6161
}

src/nuget.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
<configuration>
33
<packageSources>
44
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
5-
<add key="myget.org" value="https://www.myget.org/F/bertt/api/v3/index.json"/>
65
</packageSources>
76
</configuration>

0 commit comments

Comments
 (0)