/// <summary> /// Converts the geometry to svg and writes the svg to a file. /// </summary> /// <param name="filename">The name of the svg file.</param> /// <param name="pm">The precision model for the geometries</param> /// <param name="a">The geometry to be written to svg.</param> public void CreateSVG(string filename, Geotools.Geometries.PrecisionModel pm, Geometry a) { GeometrySVGWriter svgWriter = new GeometrySVGWriter(pm); StreamWriter sw = new StreamWriter(filename); double minx, miny, maxx, maxy; a.Extent2D(out minx, out miny, out maxx, out maxy); sw.WriteLine(String.Format("<svg viewBox=\"{0} {1} {2} {3}\">",minx,miny,maxx,maxy*1.2)); svgWriter.Write(a,sw,"fill-rule:evenodd;","fill:ltgray;stroke:blue;stroke-width:1;fill-opacity:0.2"); sw.WriteLine("</svg>"); sw.Close(); }