samcragg / sharpkml

SharpKML is an implementation of the Open Geospatial Consortium (OGC) KML 2.2 standard developed in C#, able to read/write both KML files and KMZ files.
MIT License
158 stars 51 forks source link

Coordinate Parsing Fails when >= MaxSignificandDigits #14

Closed thenadz closed 5 years ago

thenadz commented 5 years ago

For example, parsing "-101.037559997352005,33.397169999458697" results in a point with the values "-10.1037559997352005,33.397169999458697".

I'm working on understanding the parsing logic -- if I get there before someone familiar with the codebase does I'll put in a PR. I suspect this was introduced with the recent changes to coordinate parsing logic, though I haven't confirmed whether the issue was still present prior to those changes yet.

EDIT: Confirmed this was introduced in 4.0

samcragg commented 5 years ago

Thanks for reporting this and sorry for breaking things.

I've reproduced the bug in a unit test so will get a fix out over the next couple of days.

samcragg commented 5 years ago

That should be fixed now in 4.0.1 (it's just been uploaded to NuGet so give it an hour)

Thanks for reporting and feel free to open the issue again if its still not working.

thenadz commented 5 years ago

Thanks! That did the trick.