Ejemplo n.º 1
0
 /// <summary>
 /// Simplifies the line with the given tolerance.
 /// Writes the result in file.
 /// </summary>
 /// <param name="line">Line to simplify</param>
 /// <param name="tolerance">Tolerance to use by simplify function</param>
 /// <param name="supposedResult">The supposed result</param>
 /// <param name="index"></param>
 public void Simplify(ILineString line, double tolerance, ILineString supposedResult, int index)
 {
     try
     {
         Console.WriteLine("Job {0} started", index);
         var geometry = TopologyPreservingSimplifier.Simplify((ILineString)line.Copy(), tolerance);
         Assert.IsTrue(geometry.Equals(supposedResult));
         Console.WriteLine("Job {0} terminated", index);
     }
     finally
     {
         Interlocked.Increment(ref _finishedJob);
     }
 }