public void Test_GetDimension_PointsLinesAndPolygons() { Assert.Equal(2, S2ShapeIndexMeasures.GetDimension(MakeIndexOrDie( "0:0 # 1:1, 2:2 # 3:3, 3:4, 4:3"))); Assert.Equal(2, S2ShapeIndexMeasures.GetDimension(MakeIndexOrDie("# # empty"))); }
public void Test_GetDimension_PointsAndLines() { Assert.Equal(1, S2ShapeIndexMeasures.GetDimension(MakeIndexOrDie("0:0 # 1:1, 1:2 #"))); // Note that a polyline with one vertex has no edges, so it is effectively // empty for the purpose of testing GetDimension(). Assert.Equal(1, S2ShapeIndexMeasures.GetDimension(MakeIndexOrDie("0:0 # 1:1 #"))); }
public void Test_GetDimension_Points() { Assert.Equal(0, S2ShapeIndexMeasures.GetDimension(MakeIndexOrDie("0:0 # #"))); // Create an index with an empty point set. MutableS2ShapeIndex index = new(); index.Add(new S2PointVectorShape()); Assert.Equal(0, S2ShapeIndexMeasures.GetDimension(index)); }
public void Test_GetDimension_Empty() { Assert.Equal(-1, S2ShapeIndexMeasures.GetDimension(MakeIndexOrDie("# #"))); }