#1022: Buffering a specific closed linestring erroneously produces polygon without
hole. ------------------------+-------------------------- Reporter: uclaros | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Keywords: ------------------------+-------------------------- Applying a buffer of 1m on the following linestring {{{ LineString (278601.0234000000054948 4295292.71929999999701977, 278598.71919999999227002 4295290.49340000003576279, 278589.06283691781572998 4295303.48101469129323959, 278605.49300000001676381 4295297.03689999971538782, 278601.0234000000054948 4295292.71929999999701977) }}} produces a polygon without a hole, only outer ring. If any of the three almost-aligned nodes is moved, the expected result is returned: a polygon with a hole (one outer ring, one inner ring). Found on QGIS and confirmed on shapely with geos 3.8.0 -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1022> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/geos-devel |
#1022: Buffering a specific closed linestring erroneously produces polygon without
hole. ------------------------+--------------------------- Reporter: uclaros | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Changes (by jgrocha): * Attachment "Buffer from geometry postgis 3.1.png" added. Buffer wit hthe missing hole in the polygon -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1022> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/geos-devel |
In reply to this post by geos-2
#1022: Buffering a specific closed linestring erroneously produces polygon without
hole. ------------------------+--------------------------- Reporter: uclaros | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Comment (by jgrocha): Confirmed using Postgis with GEOS 3.8.0-CAPI-1.13.1 SQL to reproduce the bug: {{{ CREATE TABLE public.tpoly ( id serial NOT NULL, geom geometry(POLYGON, 3857) not null, CONSTRAINT tpoly_pkey PRIMARY KEY (id) ); CREATE TABLE public.tline ( id serial NOT NULL, geom geometry(LINESTRING, 3857) not null, CONSTRAINT tline_pkey PRIMARY KEY (id) ); insert into public.tline (geom) values (ST_GeomFromText('LineString (278601.0234000000054948 4295292.71929999999701977, 278598.71919999999227002 4295290.49340000003576279, 278589.06283691781572998 4295303.48101469129323959, 278605.49300000001676381 4295297.03689999971538782, 278601.0234000000054948 4295292.71929999999701977)',3857)); insert into public.tpoly (geom) select st_buffer(geom,1, 'quad_segs=0') from public.tline where id = 1; }}} The resulting buffer is attached. -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1022#comment:1> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/geos-devel |
In reply to this post by geos-2
#1022: Buffering a specific closed linestring erroneously produces polygon without
hole. ------------------------+--------------------------- Reporter: uclaros | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Comment (by Mike Taves): Confirmed, with same behavior with JTS 1.14. And for the record, the input geometry is valid and simple. The test can be simplified using a default buffer (without parameters). What makes this bug interesting is that it is depends on the buffer distance, since most other values produce the expected result. And it's not just 1.0. Here is a simple shapely example that checks 50 buffer distances between 0.1 and 2.0 {{{ import numpy as np from shapely import wkt g = wkt.loads('LineString (278601.0234000000054948 4295292.71929999999701977, 278598.71919999999227002 4295290.49340000003576279, 278589.06283691781572998 4295303.48101469129323959, 278605.49300000001676381 4295297.03689999971538782, 278601.0234000000054948 4295292.71929999999701977)') for b in np.linspace(0.1, 2.0, num=50): if len(g.buffer(b).interiors) == 0: print(b) }}} shows these buffer distances {{{ 0.6428571428571428 0.9918367346938776 1.263265306122449 1.379591836734694 }}} so 8% failure rate. -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1022#comment:2> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/geos-devel |
In reply to this post by geos-2
#1022: Buffering a specific closed linestring erroneously produces polygon without
hole. ------------------------+--------------------------- Reporter: uclaros | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Comment (by mdavis): Logged as [https://github.com/locationtech/jts/issues/523 JTS 523] -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1022#comment:3> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/geos-devel |
In reply to this post by geos-2
#1022: Buffering a specific closed linestring erroneously produces polygon without
hole. ------------------------+--------------------------- Reporter: uclaros | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Comment (by mdavis): Fixed in JTS by [https://github.com/locationtech/jts/pull/525 PR 525] -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1022#comment:4> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/geos-devel |
In reply to this post by geos-2
#1022: Buffering a specific closed linestring erroneously produces polygon without
hole. ------------------------+--------------------------- Reporter: uclaros | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Comment (by Paul Ramsey <pramsey@…>): In [changeset:"061656eab5cf856565a18de0ed7977d3eac7fafe/git" 061656e/git]: {{{ #!CommitTicketReference repository="git" revision="061656eab5cf856565a18de0ed7977d3eac7fafe" Buffering a specific closed linestring erroneously produces polygon without hole. References #1022 }}} -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1022#comment:5> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/geos-devel |
In reply to this post by geos-2
#1022: Buffering a specific closed linestring erroneously produces polygon without
hole. ------------------------+--------------------------- Reporter: uclaros | Owner: geos-devel@… Type: defect | Status: closed Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: fixed Keywords: | ------------------------+--------------------------- Changes (by Paul Ramsey <pramsey@…>): * status: new => closed * resolution: => fixed Comment: In [changeset:"56b19e08c94a0095ebabaf5b827d59939953d956/git" 56b19e0/git]: {{{ #!CommitTicketReference repository="git" revision="56b19e08c94a0095ebabaf5b827d59939953d956" Buffering a specific closed linestring erroneously produces polygon without hole. Closes #1022 }}} -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1022#comment:6> GEOS <http://trac.osgeo.org/geos> GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS). _______________________________________________ geos-devel mailing list [hidden email] https://lists.osgeo.org/mailman/listinfo/geos-devel |
Free forum by Nabble | Edit this page |