hmm, that is certainly not indicative of what I am experiencing. I am using the latest build as of a few days ago.
The code below when passing in the results of an interpolation of about 130k records takes well over a minute. While working on my project today I currently have it in a state that it won’t compile but I will get it back working tomorrow and see if I can duplicate again.
While we are discussing performance, as I think these two may be related, while rendering the results of that GridCells[,] when it is around 130k features also takes over 30 seconds. I was able to step outside of ThinkGeo and render the equivalent manually by drawing straight to a bitmap canvas in less than a second, so I’m not sure what is going on here.
private static void CreateShapeFile2(GridCell[,] cells)
{
string shapeFilePath = “c:\temp\points.shp”;
DbfColumn NameColumn = new DbfColumn(“Name”, DbfColumnType.String, 30, 0);
DbfColumn PopulationColumn = new DbfColumn(“Population”, DbfColumnType.Integer, 10, 0);
var cellArray = (from GridCell c in cells select c).ToArray();
ShapeFileFeatureSource.CreateShapeFile(ShapeFileType.Point, shapeFilePath, new DbfColumn[] { NameColumn, PopulationColumn }, Encoding.Default, OverwriteMode.Overwrite);
ShapeFileFeatureSource citiesShapeFile = new ShapeFileFeatureSource(shapeFilePath, ShapeFileReadWriteMode.ReadWrite);
citiesShapeFile.Open();
citiesShapeFile.BeginTransaction();
foreach (GridCell cell in cellArray)
{
citiesShapeFile.AddFeature(new PointShape(cell.CenterX, cell.CenterY));
}
citiesShapeFile.CommitTransaction();
citiesShapeFile.Close();
}