public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Test(); } } private void Test() { System.Diagnostics.Stopwatch stopWatch = new System.Diagnostics.Stopwatch(); stopWatch.Start(); // Preparation ShapeFileFeatureSource shapeFileFeatureSource = new ShapeFileFeatureSource(MapPath("~/Data/austinstreets.shp")); shapeFileFeatureSource.Open(); Collection featureSourceColumns = shapeFileFeatureSource.GetColumns(); string[] columnsNames = new string[featureSourceColumns.Count]; for (int i = 0; i < columnsNames.Length; i++) { columnsNames[i] = featureSourceColumns[i].ColumnName; } // Set the inMemory data source InMemoryFeatureSource inMemoryFeatureSource = new InMemoryFeatureSource(featureSourceColumns); inMemoryFeatureSource.Open(); inMemoryFeatureSource.BeginTransaction(); // Get feature from the shp file and add them to inMemoryDataSource one by one. int count = shapeFileFeatureSource.GetCount(); for (int i = 1; i <= count; i++) { Feature feature = shapeFileFeatureSource.GetFeatureById(i.ToString().Trim(), columnsNames); inMemoryFeatureSource.AddFeature(feature); } inMemoryFeatureSource.CommitTransaction(); System.Diagnostics.Debug.WriteLine(stopWatch.ElapsedMilliseconds); } }