#1047: GEOS Panics on GeometryCollection with 1 MultiPolygon object
------------------------+-------------------------- Reporter: otan | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Keywords: ------------------------+-------------------------- Tested on v3.8.1. The following code will seg fault: {{{ #include <geos_c.h> #include <string> using namespace std; void geos_message_handler(const char *fmt, ...) {} void geos_error_handler(const char *fmt, ...) {} int main() { string aEWKB = "01020000000200000000000000000000000000000000000000000000000000F03F0000000000000000"; string bEWKB = "0107000000010000000106000000010000000103000000010000000500000008690b3a70a9c347540a11d15993eec7e04b9e4d8fd2cb4702907c2929abe847d02aef5652e3cec72c1b57867da3dd47bbf47698d501eac7ccc0d287b380d44708690b3a70a9c347540a11d15993eec7"; initGEOS(&geos_message_handler, &geos_error_handler); auto wkbReader = GEOSWKBReader_create(); auto geomA = GEOSWKBReader_read(wkbReader, reinterpret_cast<const unsigned char*>(aEWKB.data()), aEWKB.length()); auto geomB = GEOSWKBReader_read(wkbReader, reinterpret_cast<const unsigned char*>(bEWKB.data()), bEWKB.length()); GEOSIntersects(geomA, geomB); return 0; } }}} Seems like geometryN does not work and returns NULL: {{{ _ZN4geos9algorithm6locate24SimplePointInAreaLocator20locatePointInPolygonERKNS_4geom10CoordinateEPKNS3_7PolygonE /Users/otan/go/src/github.com/cockroachdb/cockroach/lib/libgeos.dylib:0 pc=0x14218db3 _ZN4geos9geomgraph11EdgeEndStar11getLocationEiRKNS_4geom10CoordinateEPNSt3__16vectorIPNS0_13GeometryGraphENS6_9allocatorIS9_EEEE /Users/otan/go/src/github.com/cockroachdb/cockroach/lib/libgeos.dylib:0 pc=0x1423fce8 _ZN4geos9geomgraph11EdgeEndStar16computeLabellingEPNSt3__16vectorIPNS0_13GeometryGraphENS2_9allocatorIS5_EEEE /Users/otan/go/src/github.com/cockroachdb/cockroach/lib/libgeos.dylib:0 pc=0x1423f936 _ZN4geos9operation6relate14RelateComputer9computeIMEv /Users/otan/go/src/github.com/cockroachdb/cockroach/lib/libgeos.dylib:0 pc=0x142a95a3 _ZN4geos9operation6relate8RelateOp6relateEPKNS_4geom8GeometryES6_ /Users/otan/go/src/github.com/cockroachdb/cockroach/lib/libgeos.dylib:0 pc=0x142ab1f2 _ZNK4geos4geom8Geometry10intersectsEPKS1_ /Users/otan/go/src/github.com/cockroachdb/cockroach/lib/libgeos.dylib:0 pc=0x14220773 GEOSIntersects_r }}} -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1047> 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 |
#1047: GEOS Panics on GeometryCollection with 1 MultiPolygon object
------------------------+--------------------------- Reporter: otan | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Comment (by mdavis): In JTS at least, spatial predicates do not support GEOMETRYCOLLECTIONs as inputs. So this is a case of erroneous input. But should not be allowed to cause a segfault, for sure. -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1047#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
#1047: GEOS Panics on GeometryCollection with 1 MultiPolygon object
------------------------+--------------------------- Reporter: otan | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Comment (by mdavis): As background, the reason general GCs aren't supported for predicstes in general is because of the difficulty of computing some of the more specific predicates over inputs containing overlapping polygons. The `intersects` predicate could be computed correctly, in theory. But this will require a different code path to the other predicates. -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1047#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
#1047: GEOS Panics on GeometryCollection with 1 MultiPolygon object
------------------------+--------------------------- Reporter: otan | Owner: geos-devel@… Type: defect | Status: new Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Comment (by mdavis): See [https://trac.osgeo.org/postgis/ticket/4749 PostGIS 4749] for a proposal to allow predicates to handle GeometryCollections. Most or all of this logic could be implemented in GEOS. -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1047#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
#1047: GEOS Panics on GeometryCollection with 1 MultiPolygon object
------------------------+--------------------------- Reporter: otan | Owner: geos-devel@… Type: defect | Status: closed Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: fixed Keywords: | ------------------------+--------------------------- Changes (by Sandro Santilli <strk@…>): * status: new => closed * resolution: => fixed Comment: In [changeset:"07e60468a9a155c63b06fa1e24db7c113f03004a/git" 07e6046/git]: {{{ #!CommitTicketReference repository="git" revision="07e60468a9a155c63b06fa1e24db7c113f03004a" Fix segfault in SimplePointInAreaLocator caused by casting MultiPolygon to Polygon Closes #1047 References https://github.com/cockroachdb/cockroach/issues/53254 Signed-off-by: Sandro Santilli <[hidden email]> }}} -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1047#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
#1047: GEOS Panics on GeometryCollection with 1 MultiPolygon object
------------------------+--------------------------- Reporter: otan | Owner: geos-devel@… Type: defect | Status: reopened Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: Keywords: | ------------------------+--------------------------- Changes (by strk): * status: closed => reopened * resolution: fixed => Comment: I merged PR https://github.com/libgeos/geos/pull/334 in master (3.9.0) but needs to be backported to all affected branches still -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1047#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
#1047: GEOS Panics on GeometryCollection with 1 MultiPolygon object
------------------------+--------------------------- Reporter: otan | Owner: geos-devel@… Type: defect | Status: closed Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: fixed Keywords: | ------------------------+--------------------------- Changes (by Sandro Santilli <strk@…>): * status: reopened => closed * resolution: => fixed Comment: In [changeset:"dfceb3487c2edcba75dac8a47c0153c6ee585305/git" dfceb34/git]: {{{ #!CommitTicketReference repository="git" revision="dfceb3487c2edcba75dac8a47c0153c6ee585305" Fix segfault in SimplePointInAreaLocator Backport of patch by Oliver Tan Closes #1047 in 3.8 branch (3.8.2dev) References https://github.com/cockroachdb/cockroach/issues/53254 }}} -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1047#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 |
In reply to this post by geos-2
#1047: GEOS Panics on GeometryCollection with 1 MultiPolygon object
------------------------+--------------------------- Reporter: otan | Owner: geos-devel@… Type: defect | Status: closed Priority: major | Milestone: Component: Default | Version: 3.8.0 Severity: Unassigned | Resolution: fixed Keywords: | ------------------------+--------------------------- Comment (by strk): Branch 3.7 (3.7.3) is not affected -- Ticket URL: <https://trac.osgeo.org/geos/ticket/1047#comment:7> 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 |