Skip to content

Commit f5e51ca

Browse files
committed
Moved DeleteShapefile to FeatureSet class
1 parent 9c2f9cb commit f5e51ca

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

test/MW5.Tools.Test/GeoprocessingTests.cs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public void TestFixShapefile()
105105
_timer.Restart();
106106
var fs = OpenFeatureSet(Path.Combine(NlShapefilesPath, "Buurtkaart.shp"));
107107
var outputFilename = Path.ChangeExtension(fs.Filename, ".fixed.shp");
108-
DeleteShapefile(outputFilename);
108+
FeatureSet.DeleteShapefile(outputFilename);
109109

110110
Debug.Write("Fix shapefile");
111111
var tool = new FixShapefileTool { Input = new DatasourceInput(fs), Output = new OutputLayerInfo { Filename = outputFilename, MemoryLayer = false, Overwrite = true } };
@@ -254,20 +254,6 @@ public void TestRandomPointsRaster()
254254
}
255255

256256
#endregion
257-
private static void DeleteShapefile(string filename)
258-
{
259-
var folder = Path.GetDirectoryName(filename);
260-
if (folder == null)
261-
{
262-
return;
263-
}
264-
265-
foreach (string f in Directory.EnumerateFiles(folder, Path.GetFileNameWithoutExtension(filename) + ".*"))
266-
{
267-
Debug.WriteLine("Deleting " + f);
268-
File.Delete(f);
269-
}
270-
}
271257

272258
private static string GetDateString(long milliseconds)
273259
{

0 commit comments

Comments
 (0)