[geos-devel] [GEOS] #755: Overlay ops accept GeometryCollections when headers indicate that they don't

GEOS geos-trac at osgeo.org
Thu Nov 19 16:44:38 PST 2015


#755: Overlay ops accept GeometryCollections when headers indicate that they
don't
------------------------+--------------------------
 Reporter:  dbaston     |      Owner:  geos-devel@…
     Type:  defect      |     Status:  new
 Priority:  major       |  Milestone:  3.5.1
Component:  Default     |    Version:  3.5.0
 Severity:  Unassigned  |   Keywords:
------------------------+--------------------------
 Example from Geometry.h:
 {{{
         /**
          * \brief
          * Returns a Geometry representing the points making up this
          * Geometry that do not make up other.
          *
          * @throws util::TopologyException if a robustness error occurs
          * @throws util::IllegalArgumentException if either input is a
          *         non-empty GeometryCollection
          *
          */
 }}}

 Actual behavior (through CAPI):

 {{{
     GEOSGeometry* g1 = GEOSGeomFromWKT("GEOMETRYCOLLECTION (POINT (1 1),
 LINESTRING (2 2, 3 3)) ");
     GEOSGeometry* g2 = GEOSGeomFromWKT("GEOMETRYCOLLECTION (POINT (3 3),
 LINESTRING (1 1, 2 2)) ");

     GEOSGeometry* g3 = GEOSDifference(g2, g1);
     /* No error passed to user, g3 != NULL */

     printf("%s\n", GEOSGeomToWKT(g3));
     /* prints LINESTRING (1.0000000000000000 1.0000000000000000,
 2.0000000000000000 2.0000000000000000) */
 }}}

 Related to [https://trac.osgeo.org/postgis/ticket/3341] and possibly
 [https://trac.osgeo.org/geos/ticket/725]

--
Ticket URL: <https://trac.osgeo.org/geos/ticket/755>
GEOS <http://trac.osgeo.org/geos>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list