项目作者: xfischer

项目描述 :
Spatial trace and debugger visualizers for NTS
高级语言: C#
项目地址: git://github.com/xfischer/NetTopologySuite.Diagnostics.git
创建时间: 2019-01-04T13:49:00Z
项目社区:https://github.com/xfischer/NetTopologySuite.Diagnostics

开源协议:MIT License

下载


NetTopologySuite.Diagnostics

Spatial tracing and debugger visualizers for NetTopology geometries.

.Net Standard replacement of SqlServerSpatial.Toolkit

  • Only enables tracing for the moment. A viewer will soon be ported.
  1. using NetTopologySuite.Diagnostics.Tracing;
  2. // Enable tracing
  3. SpatialTrace.Enable();
  4. // Trace sample geometry instance.
  5. // Works with any IGeometry instance, and IEnumerable<IGeometry>
  6. SpatialTrace.TraceGeometry(geometry, "Sample geometry with default style");
  7. // Change styling
  8. SpatialTrace.SetLineWidth(3); // Current stroke style is 3px wide
  9. SpatialTrace.SetFillColor(Color.FromArgb(128, 255, 0, 0)); // Fills with red
  10. // Style is applied to subsequent traces
  11. SpatialTrace.TraceGeometry(geometry, "Some text");
  12. // Reset style
  13. SpatialTrace.ResetStyle();