Esempio n. 1
0
        public void TestGeneral2()
        {
            string inputFC = Path.Combine(curves2Gdb, @"duval\roads_smooth");
            double ang     = 0.65;

            ClassLib.Helpers.makeOutputPath(inputFC, ang);

            ClassLib.IdentifyCurves curv = new ClassLib.IdentifyCurves(inputFC, ang, true);
            curv.RunCurves();
            curv.MakeOutputFeatureClass(ClassLib.Helpers.makeOutputPath(inputFC, ang) + "_compare");
        }
Esempio n. 2
0
        public void TestGeneral()
        {
            //string inputFC = @"C:\Users\glenn\Documents\TOPS\CurveFinder\Curves_2.gdb\duval\roads";
            string inputFC = Path.Combine(curves2Gdb, @"duval\roads");
            double ang     = 0.7;
            string outPath = ClassLib.Helpers.makeOutputPath(inputFC, ang);

            ClassLib.IdentifyCurves curv = new ClassLib.IdentifyCurves(inputFC, ang, true);
            curv.RunCurves();
            curv.MakeOutputFeatureClass(ClassLib.Helpers.makeOutputPath(inputFC, ang) + Guid.NewGuid().ToString().Replace("-", ""));
        }
Esempio n. 3
0
        public void TestWrongField()
        {
            string inputFC = Path.Combine(curves2Gdb, @"duval\roads_smooth");
            double ang     = 0.65;

            ClassLib.Helpers.makeOutputPath(inputFC, ang);

            ClassLib.IdentifyCurves curv = new ClassLib.IdentifyCurves(inputFC, ang, true);
            curv.RunCurves("CATS");
            curv.MakeOutputFeatureClass(ClassLib.Helpers.makeOutputPath(inputFC, ang) + "_compare_wrong");
            //throw new Exception();
        }
Esempio n. 4
0
        public void TestMkShpUndis()
        {
            //string inputFC = @"C:\Users\glenn\Desktop\RockMM\duval.shp";
            string inputFC = Path.Combine(rockMM, "duval.shp");
            double ang     = 0.65;

            ClassLib.Helpers.makeOutputPath(inputFC, ang);

            ClassLib.IdentifyCurves curv = new ClassLib.IdentifyCurves(inputFC, ang, false);
            curv.RunCurves();
            //curv.MakeOutputFeatureClass(@"C:\Users\glenn\Desktop\RockMM\duval_mk_shp_undis.shp");
            curv.MakeOutputFeatureClass(Path.Combine(rockMM, "duval_mk_shp_undis.shp"));
        }
Esempio n. 5
0
        public void TestWrongInput()
        {
            string inputFC = Path.Combine(curves2Gdb, @"duval\roads_smooth_____");
            double ang     = 0.65;

            ClassLib.Helpers.makeOutputPath(inputFC, ang);

            bool raised = false;

            try
            {
                ClassLib.IdentifyCurves curv = new ClassLib.IdentifyCurves(inputFC, ang, true);
            }
            catch (FileNotFoundException ex)
            {
                raised = true;
            }

            Assert.IsTrue(raised);
        }
Esempio n. 6
0
        public void TestWrongOutput()
        {
            string inputFC = System.IO.Path.Combine(curves2Gdb, @"duval\roads_smooth");
            double ang     = 0.65;

            ClassLib.Helpers.makeOutputPath(inputFC, ang);

            ClassLib.IdentifyCurves curv = new ClassLib.IdentifyCurves(inputFC, ang, true);
            curv.RunCurves();
            bool raised = false;

            try
            {
                curv.MakeOutputFeatureClass("Bad output");
            }
            catch (System.IO.FileNotFoundException)
            {
                raised = true;
            }

            Assert.IsTrue(raised);
        }
Esempio n. 7
0
 public void AnalyzeShp()
 {
     ClassLib.IdentifyCurves curv = new ClassLib.IdentifyCurves(Path.Combine(rockMM, "SegmentsFt.shp"), 1, true);
     curv.RunCurves();
 }