Giter VIP home page Giter VIP logo

Comments (3)

mthh avatar mthh commented on June 20, 2024 1

Some time ago I tried to implement various validity checks for geo-types geometries : https://github.com/mthh/geo-validity-check

I think it implements most of the validity checks of GEOS as well as some other checks.

The non-validity diagnostic messages could greatly be improved, and there is no functionality to attempt to repair the geometries.
Anyway, if that would be useful, feel free to reuse code from this crate to implement an is_valid function directly in geo.

from geo.

andriyDev avatar andriyDev commented on June 20, 2024

For LineString, its requirements are either empty, or 2+ coordinates. This is trivial to check. In addition, if the LineString is closed, it must also not self-intersect. We can check this by using Intersections (inserting all the edges in the line string) and checking that all intersections are vertices of the original line string (it's not clear to me if a line string is allowed to use the same vertex twice, but if it's not then I think we can just check if there are any intersections).

from geo.

dabreegster avatar dabreegster commented on June 20, 2024

Somewhat related to #1120

from geo.

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.