static void TestWorld(bool useLabels = false, bool useIndents = false) { SpatialTrace.Enable(); SpatialTrace.Clear(); List <Country> v_countries = GetCountries(); SpatialTrace.Enable(); foreach (var countryByContinent in v_countries.GroupBy(p => p.Continent)) { if (useIndents) { SpatialTrace.Indent(countryByContinent.Key); } foreach (var country in countryByContinent) { SpatialTrace.TraceGeometry(country.Geometry, country.Name, country.Name); } if (useIndents) { SpatialTrace.Unindent(); } } //SpatialTrace.ShowDialog(); }
static void LineDEMTest(ElevationService elevationService, DEMDataSet dataSet, string wkt, int numSamples) { Stopwatch sw = Stopwatch.StartNew(); elevationService.DownloadMissingFiles(dataSet, GetBoundingBox(wkt)); var lineElevationData = elevationService.GetLineGeometryElevation(wkt, dataSet, InterpolationMode.Bilinear); ElevationMetrics metrics = GeometryService.ComputeMetrics(ref lineElevationData); var lineElevationData_Reduced = DouglasPeucker.DouglasPeuckerReduction(lineElevationData, (metrics.MaxElevation - metrics.MinElevation) / numSamples); sw.Stop(); Console.WriteLine($"LineDEMTest performed in {sw.Elapsed:g}."); SpatialTrace.Enable(); SpatialTrace.Clear(); SpatialTraceLine(lineElevationData, $"Full resolution line ({lineElevationData.Count} points)"); SpatialTraceLine(lineElevationData_Reduced, $"Reduced line ({lineElevationData_Reduced.Count} points)"); SpatialTrace.ShowDialog(); }
private void btn_clearSpatialTrace_Click(object sender, EventArgs e) { SpatialTrace.Enable(); SpatialTrace.Clear(); SpatialTrace.Disable(); }
public void ClearSpatialTrace() { SpatialTrace.Enable(); SpatialTrace.Clear(); SpatialTrace.Disable(); }