Code Monkey home page Code Monkey logo

Comments (7)

FObermaier avatar FObermaier commented on June 18, 2024

I suppose it has to deal with the way numbers are parsed. Maybe that can be changed using a different NumberFormatInfo in FloatToken.

Anyhow the DiscreteHausdorffDistance between the geometries is less than 1E-9 which raises the question if it is worth to deal with it.

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

FloatToken now uses a formatter like String.Format(GetNumberFormatInfo(), "{0:R}", (Double) obj)) that, as far as I know (not much, actually) is maximum precision available.
So, to me, probably our code is correct.

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

That is for output, don't know if there is a way to control parsing

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

eheheh, right! I'll check

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

I played around a bit more and it seems that the problem is not in the WKTReader, not in the WKBWriter, not in the ToHex function. It is beyond our control:

The number 6232756.00054126 is internally treated as 6232756.0005412595 with the bytes
0x3_5_DE0800ADC65741. Java treats that number as 0x3_6_DE0800ADC65741.

from nettopologysuite.

DGuidi avatar DGuidi commented on June 18, 2024

@FObermaier only to know, how you found this information? :)

from nettopologysuite.

FObermaier avatar FObermaier commented on June 18, 2024

I tried :), it was the only number that was different

from nettopologysuite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.