[postgis-tickets] [PostGIS] #3256: ST_3DDistance sfcgal garden crash on malformed polygons

PostGIS trac at osgeo.org
Fri Aug 28 06:50:38 PDT 2015


#3256: ST_3DDistance sfcgal garden crash on malformed polygons
---------------------+---------------------------
  Reporter:  robe    |      Owner:  colivier
      Type:  defect  |     Status:  new
  Priority:  high    |  Milestone:  PostGIS 2.2.0
 Component:  sfcgal  |    Version:  trunk
Resolution:          |   Keywords:
---------------------+---------------------------

Comment (by pramsey):

 I get an exception but not a crash,
 {{{
 postgis22=# set postgis.backend = 'sfcgal';
 SET
 postgis22=# SELECT ST_3DDistance('POINT(-11.1111111 40)'::geometry,
 'POLYGON((1 2,1 2,1 2,1 2))'::geometry);
 ERROR:  floating-point exception
 DETAIL:  An invalid floating-point operation was signaled. This probably
 means an out-of-range result or an invalid operation, such as division by
 zero.
 postgis22=# set postgis.backend = 'geos';
 SET
 postgis22=# SELECT ST_3DDistance('POINT(-11.1111111 40)'::geometry,
 'POLYGON((1 2,1 2,1 2,1 2))'::geometry);
 NOTICE:  One or both of the geometries is missing z-value. The unknown
 z-value will be regarded as "any value"
   st_3ddistance
 ------------------
  39.8833174657844
 (1 row)
 }}}

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3256#comment:5>
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