[postgis-tickets] [PostGIS] #3341: Serious rounding issues
PostGIS
trac at osgeo.org
Wed Oct 28 06:40:30 PDT 2015
#3341: Serious rounding issues
--------------------------+---------------------------
Reporter: postgispaul | Owner: pramsey
Type: defect | Status: closed
Priority: medium | Milestone: PostGIS 2.1.9
Component: postgis | Version: 2.2.x
Resolution: invalid | Keywords:
--------------------------+---------------------------
Comment (by dbaston):
I was a bit unclear in my earlier comment. Here is some info on the
output of ST_Collect:
{{{
SELECT ST_GeometryType(ST_Collect(geom)), ST_IsValid(ST_Collect(geom))
FROM bugreport WHERE id in (600, 1351);
st_geometrytype | st_isvalid
-----------------------+------------
ST_GeometryCollection | t
(1 row)
}}}
So there is no invalid geometry involved. What I meant to say what the
output of ST_Collect, if it were a MultiPolygon (which it is not), would
be invalid. I think the issue here is how ST_Difference should be
handling GeometryCollections, not how it should be handling invalid
geometries.
The PostGIS docs for ST_Difference say "Do not call with a
GeometryCollection as an argument", without any further elaboration, and
the GEOS headers for Geometry::difference say that it does not support
GeometryCollections. So it seems that either:
* PostGIS should be calling errorIfGeometryCollection(), before passing
this on to GEOS, or
* GEOS should be throwing an exception, which PostGIS should handle and
report an error to the user. PostGIS is already handling errors from GEOS
correctly in this case, so it seems that GEOS is not throwing an
exception.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3341#comment:10>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list