private void importRoadsAndRoadCenterLinesToolStripMenuItem_Click(object sender, EventArgs e) { // Add select dialog here... dlgOpenMdbFile.Filter = "Addressing Database|*.mdb"; dlgOpenMdbFile.FileName = "*.mdb"; if (dlgOpenMdbFile.ShowDialog() == DialogResult.OK) { var mRoadsFeatureSet = ExtFunctions.GetRoadFeatureSetFromAdmAdrMdb(ref this.pgBar, Log, dlgOpenMdbFile.FileName, 1); var mRoadsLayer = ExtFunctions.GetFeatureLayer(theMap.Layers, mRoadsFeatureSet, "SimplifiedRoads", MapSymbols.LineSymbol(SignColors.AddressUnitSign, 2), KnownCoordinateSystems.Projected.UtmWgs1984.WGS1984UTMZone40N); dlgSaveFile.Filter = "FileGeodatabases|*.gdb"; dlgSaveFile.Title = "Save imported roads to ESRI FileGDB"; if (dlgSaveFile.ShowDialog() == DialogResult.OK) { try { ExtFunctions.ExportFeatureLayerToOGR("FileGDB", mRoadsLayer, dlgSaveFile.FileName, KnownCoordinateSystems.Projected.UtmWgs1984.WGS1984UTMZone40N, KnownCoordinateSystems.Projected.UtmWgs1984.WGS1984UTMZone40N); } catch (Exception ex) { Log("Operation cancelled"); Log(ex.Message); } } else { Log("Export to FileGDB cancelled"); } if (MessageBox.Show("Would you like to add the imported roads to the map?", "Import roads", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) { mRoadsLayer.Reproject(theMap.Projection); theMap.Refresh(); } } else { Log("Operation cancelled, please select an addressing database file"); } }