private void AddShapefile(IShapeCollection shapes, string title) { this.Presenter.ShapeCollections.Add(new ShapeCollection(shapes, title)); var geometries = shapes.Select(i => i.AsSqlGeometry(0)).ToList(); var vertexes = shapes.ExtractPoints().Select(i => (((Ham.SpatialBase.IPoint)i).AsSqlGeometry(0))).ToList(); this.map.DrawGeometries(geometries, Guid.NewGuid().ToString(), VisualParameters.CreateNew(.7)); this.map.DrawGeometries(vertexes, Guid.NewGuid().ToString(), VisualParameters.CreateNew(.9)); }
public ShapeCollection(IShapeCollection shapes, string title) { this.Title = title; this.Shapes = shapes; this.Geometries = shapes.Select(i => i.AsSqlGeometry(0)).ToList(); this.Statistics = new AreaStatistics(shapes); this.AngleStat = new AngleStatistics(shapes); }