Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GeometryFixer class #704

Merged
merged 12 commits into from
Apr 8, 2021
Merged

Conversation

dr-jts
Copy link
Contributor

@dr-jts dr-jts commented Apr 6, 2021

Adds the class GeometryFixer to support repairing invalid geometry into valid geometry.

See the requirements specification in #652.

dr-jts added 12 commits March 29, 2021 10:29
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
Signed-off-by: Martin Davis <[email protected]>
@dr-jts dr-jts self-assigned this Apr 6, 2021
@dr-jts dr-jts merged commit 2e4fef2 into locationtech:master Apr 8, 2021
@dr-jts dr-jts deleted the add-geometry-fixer branch April 8, 2021 20:19
strk pushed a commit to libgeos/geos that referenced this pull request Apr 23, 2021
Add GeometryFixer class, and associated changes.
Expose in CAPI via GEOSMakeValidWithParams() which
takes a parameters object GEOSMakeValidParams*.
Default remains same but can be easily switched in
GEOSMakeValid().
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Oct 21, 2021
Packaging changes:

  Use cmake instead of the now-deleted autotools, introducing a
  regression in "make test" where the installed version is tested
  instead of the build tree version.

Upstream changes:

Changes in 3.10.0
2021-10-20

- New things:

  - CAPI: GEOSDistanceWithin, GEOSPreparedDistanceWithin
          (#1124, Sandro Santilli)
  - Output WKT using positional precision with the ryu
    library (#868, Paul Ramsey)
  - geosop CLI for GEOS (Martin Davis)
  - Full doxygen of the C-API (Paul Ramsey)
  - GeometryFixer class for validity enforcement (Martin Davis, Paul Ramsey)
  - CAPI: GEOSDensify (Brendan Ward)
  - CAPI: GEOSCoordSeq_copyFromArrays, GEOSCoordSeq_copyFromBuffer,
          GEOSCoordSeq_copyToArrays, GEOSCoordSeq_copyToBuffer (Daniel Baston)
  - CAPI: GEOSMakeValidWithParams new validity enforcement approach from
          locationtech/jts#704, uses GeometryFixer
          (Paul Ramsey, Martin Davis)
  - CAPI: GEOSWKBWriter_getFlavor, GEOSWKBWriter_setFlavor support
          outputting ISO or Extended WKB flavors (#466, Paul Ramsey)
  - CAPI: GEOSConstrainedDelaunayTriangulation, builds a constrained
          triangulation of an input Polygon or MultiPolygon,
          returning a GeometryCollection(Polygon) of the triangles.

- Fixes/Improvements:
  - Preserve ordering of lines in overlay results (Martin Davis)
  - Check for invalid geometry before fixing polygonal result in Densifier
    and DPSimplifier (Martin Davis)
  - Fix overlay handling of flat interior lines (JTS-685, Martin Davis)
  - Fix IsValidOp to correctly report invalid nested MultiPolygons (#1112, Martin Davis)
  - Fix BufferOp to avoid artifacts in certain polygon buffers (#1101, Martin Davis)
  - Fix IsValidOp to correctly report certain kinds of invalid LinearRings (Martin Davis)
  - Improve STRtree performance through TemplateSTRtree implementation (Daniel Baston)
  - Fix DiscreteFrechetDistance to use initial points of input lines (#1128, Martin Davis)

- Changes:
  - Autoconf build system is dropped in favour of CMake
    See README.md and INSTALL.md for examples of usage
  - Libtool is no longer used for in favour of CMake
    Therefor libgeos.la is no longer built/installed
  - #1094, #1090: Drop inlines.cpp to address duplicate symbols on many platforms
    (Regina Obe)
  - GH475: Do not return NaN from GEOSProjectNormalized_r (Paul Ramsey)
  - GH442: BufferOp now returns unique_ptr<Geometry> result (Paul Ramsey)
@hirenkp2000
Copy link

Using GeometryFixer, how can one achieve method=linework algorithm as supported by ST_MakeValid? It seems GeometryFixer defaults to method=structure algorithm.
Is there a way to specify which algorithm to be invoked? Or any other alternate way in JTS to achieve method=linework

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants