Skip to content

Commit

Permalink
Do not close projection stream. Fix #48.
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaSzostak committed Jun 30, 2024
1 parent 64e9475 commit e6b6323
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace NetTopologySuite.IO.Esri.Shapefiles.Writers
/// </summary>
public abstract class ShapefileWriter<T> : ShapefileWriter where T : Geometry
{
private const int StreamBufferSize = 1024;
private readonly ShpWriter<T> ShpWriter;

/// <inheritdoc/>
Expand Down Expand Up @@ -55,7 +56,7 @@ internal ShapefileWriter(Stream shpStream, Stream shxStream, Stream dbfStream, S

if (!string.IsNullOrWhiteSpace(options.Projection) && prjStream != null)
{
using (var writer = new StreamWriter(prjStream))
using (var writer = new StreamWriter(prjStream, options.Encoding, StreamBufferSize, true))
{
writer.Write(options.Projection);
}
Expand Down

0 comments on commit e6b6323

Please sign in to comment.