Opened 13 months ago

Last modified 4 months ago

#5631 new defect

CG_YMonotonePartition crash

Reported by: robe Owned by: lbartoletti
Priority: blocker Milestone: PostGIS SFCGAL
Component: sfcgal Version: master
Keywords: Cc:

Description (last modified by robe)

 SELECT CG_YMonotonePartition('POLYGON((-8.1111111 60,-8.16875525879031 59.414729033951616
,-8.33947250246614 58.85194970290473,-8.616702263092364 58.333289300941196
,-8.989790756440357 57.878679656440355,-9.444400400941193 57.50559116309236
,-9.963060802904732 57.22836140246614
,-10.525840133951615 57.05764415879031,-11.1111111 57,-11.696382066048384 57.05764415879031
,-12.25916139709527 57.22836140246614,-12.777821799058806 57.50559116309236
,-13.232431443559642 57.878679656440355,-13.605519936907637 58.333289300941196
,-13.88274969753386 58.85194970290473,-14.053466941209692 59.414729033951616,-14.1111111 60
,-14.053466941209692 60.585270966048384,-13.88274969753386 61.14805029709527
,-13.605519936907637 61.666710699058804,-13.232431443559644 62.121320343559645
,-12.777821799058806 62.49440883690764,-12.259161397095271 62.77163859753386
,-11.696382066048386 62.94235584120969,-11.1111111 63,-10.525840133951615 62.94235584120969
,-9.96306080290473 62.77163859753386,-9.444400400941195 62.49440883690764
,-8.989790756440359 62.121320343559645
,-8.616702263092364 61.666710699058804,-8.33947250246614 61.148050297095274
,-8.16875525879031 60.585270966048384,-8.1111111 60))'::geometry)

on

POSTGIS="3.5.0dev 3.4.0rc1-818-g6c2e935b6" 
[EXTENSION] PGSQL="160" GEOS="3.12.1-CAPI-1.18.1" (compiled against GEOS 3.13.0) 
SFCGAL="SFCGAL 1.5.0, CGAL 5.6, BOOST 1.78.0" ...
	PostgreSQL 16.0 on x86_64-w64-mingw32, compiled by gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0, 64-bit

Change History (3)

comment:1 by robe, 13 months ago

Description: modified (diff)

Guess I got to rebuild SFCGAL to get some useful debug trace, just says crashes in SFCGAL library

comment:2 by lbartoletti, 13 months ago

Here, the error lies in the orientation of the polygon. The geometry needs to be simple and in the counter-clockwise direction.

I'm still wondering how to handle the "simple" cases where an ST_ForcePolygonCCW can resolve this issue. There are cases, like visibility (refer to my comment), that should return an error, but for this kind of scenario, should we also return an error or try to send a geometry that is most acceptable for (SF)CGAL?"

in reply to:  2 comment:3 by robe, 4 months ago

Milestone: PostGIS 3.5.0PostGIS SFCGAL

Replying to lbartoletti:

Here, the error lies in the orientation of the polygon. The geometry needs to be simple and in the counter-clockwise direction.

I'm still wondering how to handle the "simple" cases where an ST_ForcePolygonCCW can resolve this issue. There are cases, like visibility (refer to my comment), that should return an error, but for this kind of scenario, should we also return an error or try to send a geometry that is most acceptable for (SF)CGAL?"

Hard call. I think I would lean on returning something most acceptable cause errors in processing are hard to catch. But really depends what we mean by "most acceptable"

Note: See TracTickets for help on using tickets.