GithubHelp home page GithubHelp logo

Comments (4)

dr-jts avatar dr-jts commented on June 1, 2024

Yes, agreed, this should be warned about in the doc at a minimum.

Better yet would be a check to see if a non-empty input produced an empty output, and throw an exception.

from jts.

wulfsberg avatar wulfsberg commented on June 1, 2024

Or even better, doing some magic fixing :-)
I am in the same boat as everybody else in having a geometry fixer which is "good enough for my purpose, but not good enough as a general solution" (based on polygonizing the noded linestrings and - and this is where it can fall down - guessing holes).

Is there some clever way of leveraging the knowledge that the original input geometry was valid in this case, or do we always end up in the "you can't really say what an invalid geometry should actually be" situation?

from jts.

dr-jts avatar dr-jts commented on June 1, 2024

The use of buffer(0) in the GeometryPrecisionReducer is a hack. It should be possible to always produce a valid precision-reduced geometry. Essentially this requires repolygonizing with knowledge about whether edges are from shells or holes (so that an appropriate decision can be made about building holes and merging hole or shell edges if needed. There is code that already does this in the JTS overlay module, but it's not built in a reusable way.

from jts.

dr-jts avatar dr-jts commented on June 1, 2024

Fixed by #648

from jts.

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.