コード例 #1
0
        public void Test_IndexedS2PolylineLayer_AddsShape()
        {
            S2Builder           builder = new(new Options());
            MutableS2ShapeIndex index   = new();

            builder.StartLayer(new IndexedS2PolylineLayer(index));
            string polyline_str = "0:0, 0:10";

            builder.AddPolyline(MakePolylineOrDie(polyline_str));
            Assert.True(builder.Build(out _));
            Assert.Equal(1, index.NumShapeIds());
            S2Polyline polyline = ((S2Polyline.Shape)
                                   index.Shape(0)).Polyline;

            Assert.Equal(polyline_str, polyline.ToDebugString());
        }
コード例 #2
0
    public void Test_EmptyPolyline()
    {
        var polyline = new S2Polyline();

        Assert.Equal("", polyline.ToDebugString());
    }