public void SaveDBToShape(DBLayer dBLayer, string shapeFileName) { var allNodesCache = dBLayer.GetAllNodesDictionary(); var nodes = dBLayer.GetBoundNodes(); SaveNodesToShape(shapeFileName, allNodesCache, nodes); }
public void ImportOSM(string pathToOSM, DBLayer dal, bool forceIfTableEmpty = false, MapBoundingBox mapBoundingBox = null) { using (var fileStream = File.OpenRead(pathToOSM)) { // create source stream. OsmStreamSource source; if (Path.GetExtension(pathToOSM).ToLower().Contains("pbf")) { source = ImportOSMPBF(fileStream); } else { source = ImportOSMXML(fileStream); } dal.ImportNodes(source, true, mapBoundingBox); dal.ImportWays(source); dal.ClearUnboundNodes(); } }