NetTopologySuite / NetTopologySuite.IO.GPX

GPX I/O for NetTopologySuite
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Problem with write, I think #15

Closed HarelM closed 6 years ago

HarelM commented 6 years ago

The following test fails, I think due to writing 1e-5 to the gpx file:

        [TestMethod]
        public void TestWriteRead()
        {
            var stream = new MemoryStream();
            var writer = new XmlTextWriter(stream, Encoding.UTF8);
            GpxWriter.Write(writer, 
                new GpxWriterSettings(), 
                new GpxMetadata(""), 
                new [] { new GpxWaypoint(new GpxLongitude(0.00001), new GpxLatitude(0.00001), null) }, 
                new GpxRoute[0], 
                new GpxTrack[0], 
                null);
            writer.Flush();
            stream.Seek(0, SeekOrigin.Begin);
            var reader = new XmlTextReader(stream);
            GpxReader.Read(reader, new GpxReaderSettings(), new NetTopologySuiteFeatureBuilderGpxVisitor(new GeometryFactory()));
        }
airbreather commented 6 years ago

Thanks for the report, the fix will be in 0.2.0.

HarelM commented 6 years ago

Thanks for the quick fix! Do you have an estimation when 0.2 will be released?

airbreather commented 6 years ago

Do you have an estimation when 0.2 will be released?

Probably a couple of weeks or so. In the meantime, I have it set up so that each commit triggers an automated build that goes to my personal MyGet feed so you can try it out early: https://myget.org/feed/airbreather/package/nuget/NetTopologySuite.IO.GPX

HarelM commented 6 years ago

It would be great if you could push this bug fix to a pre-release to NuGet, I would like to avoid adding NuGet sources to my project if possible...

airbreather commented 6 years ago

Do you have an estimation when 0.2 will be released?

0.2.0 is on NuGet now.

It would be great if you could push this bug fix to a pre-release to NuGet, I would like to avoid adding NuGet sources to my project if possible...

Once this graduates past the 0.x series, then I think it'll make more sense to have small bug fixes go to NuGet with little delay. Until 1.0 (and even after) MyGet is always going to be the place to go for bleeding-edge versions (though I might tweak it to go onto the NTS feed instead of my personal one).