Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#977 closed defect (wontfix)

Delaunay Triangulation adds additional area to the original geometry.

Reported by: basiliscos Owned by: strk
Priority: major Milestone:
Component: Core Version: 3.7.0
Severity: Significant Keywords:
Cc:

Description

Hello.

There is a Polygon with the hole in it. After the triangulation the resulting hole is consumed, and included into the triangles, while it shouldn't .

This can be seen by the area example below:

SELECT ST_Area(ST_GeomFromText('POLYGON ((4199500.0000000000000000 7399500.0000000000000000, 4199500.0000000000000000 7401500.0000000000000000, 4201500.0000000000000000 7401500.0000000000000000, 4201500.0000000000000000 7399500.0000000000000000, 4199500.0000000000000000 7399500.0000000000000000), (4200490.0000000000000000 7400489.0000000000000000, 4200510.0000000000000000 7400489.0000000000000000, 4200510.1950903218239546 7400489.0192147195339203, 4200510.3826834326609969 7400489.0761204678565264, 4200510.5555702326819301 7400489.1685303878039122,
 4200510.7071067811921239 7400489.2928932188078761, 4200510.8314696121960878 7400489.4444297673180699, 4200510.9238795321434736 7400489.6173165673390031, 4200510.9807852804660797 7400489.8049096781760454, 4200511.0000000000000000 7400490.0000000000000000, 4200511.0000000000000000 7400510.0000000000000000, 4200510.9807852804660797 7400510.1950903218239546, 4200510.92387953214347
36 7400510.3826834326609969, 4200510.8314696121960878 7400510.5555702326819301, 4200510.7071067811921239 7400510.7071067811921239, 4200510.5555702326819301 7400510.8314696121960878, 4200510.
3826834326609969 7400510.9238795321434736, 4200510.1950903218239546 7400510.9807852804660797, 4200510.0000000000000000 7400511.0000000000000000, 4200490.0000000000000000 7400511.000000000000
0000, 4200489.8049096781760454 7400510.9807852804660797, 4200489.6173165673390031 7400510.9238795321434736, 4200489.4444297673180699 7400510.8314696121960878, 4200489.2928932188078761 740051
0.7071067811921239, 4200489.1685303878039122 7400510.5555702326819301, 4200489.0761204678565264 7400510.3826834326609969, 4200489.0192147195339203 7400510.1950903218239546, 4200489.000000000
0000000 7400510.0000000000000000, 4200489.0000000000000000 7400490.0000000000000000, 4200489.0192147195339203 7400489.8049096781760454, 4200489.0761204678565264 7400489.6173165673390031, 420
0489.1685303878039122 7400489.4444297673180699, 4200489.2928932188078761 7400489.2928932188078761, 4200489.4444297673180699 7400489.1685303878039122, 4200489.6173165673390031 7400489.0761204
678565264, 4200489.8049096781760454 7400489.0192147195339203, 4200490.0000000000000000 7400489.0000000000000000))')) as area;
       area       
------------------
 3999516.87855485

SELECT ST_Area(ST_DelaunayTriangles(ST_GeomFromText('POLYGON ((4199500.0000000000000000 7399500.0000000000000000, 4199500.0000000000000000 7401500.0000000000000000, 4201500.
0000000000000000 7401500.0000000000000000, 4201500.0000000000000000 7399500.0000000000000000, 4199500.0000000000000000 7399500.0000000000000000), (4200490.0000000000000000 7400489.0000000000
000000, 4200510.0000000000000000 7400489.0000000000000000, 4200510.1950903218239546 7400489.0192147195339203, 4200510.3826834326609969 7400489.0761204678565264, 4200510.5555702326819301 7400
489.1685303878039122, 4200510.7071067811921239 7400489.2928932188078761, 4200510.8314696121960878 7400489.4444297673180699, 4200510.9238795321434736 7400489.6173165673390031, 4200510.9807852
804660797 7400489.8049096781760454, 4200511.0000000000000000 7400490.0000000000000000, 4200511.0000000000000000 7400510.0000000000000000, 4200510.9807852804660797 7400510.1950903218239546, 4
200510.9238795321434736 7400510.3826834326609969, 4200510.8314696121960878 7400510.5555702326819301, 4200510.7071067811921239 7400510.7071067811921239, 4200510.5555702326819301 7400510.83146
96121960878, 4200510.3826834326609969 7400510.9238795321434736, 4200510.1950903218239546 7400510.9807852804660797, 4200510.0000000000000000 7400511.0000000000000000, 4200490.0000000000000000 7400511.0000000000000000, 4200489.8049096781760454 7400510.9807852804660797, 4200489.6173165673390031 7400510.9238795321434736, 4200489.4444297673180699 7400510.8314696121960878, 4200489.29
28932188078761 7400510.7071067811921239, 4200489.1685303878039122 7400510.5555702326819301, 4200489.0761204678565264 7400510.3826834326609969, 4200489.0192147195339203 7400510.19509032182395
46, 4200489.0000000000000000 7400510.0000000000000000, 4200489.0000000000000000 7400490.0000000000000000, 4200489.0192147195339203 7400489.8049096781760454, 4200489.0761204678565264 7400489.
6173165673390031, 4200489.1685303878039122 7400489.4444297673180699, 4200489.2928932188078761 7400489.2928932188078761, 4200489.4444297673180699 7400489.1685303878039122, 4200489.61731656733
90031 7400489.0761204678565264, 4200489.8049096781760454 7400489.0192147195339203, 4200490.0000000000000000 7400489.0000000000000000))'))) as area;
  area   
---------
 4000000


Change History (3)

comment:1 by basiliscos, 5 years ago

Version: 3.6.23.7.0

comment:2 by komzpa, 5 years ago

Resolution: wontfix
Status: newclosed

Hello,

Delaunay triangulation in GEOS relies on points and is not constrained. It is also a property of Delaunay triangulation to have the area increased to a full convex hull.

If you want holes removed from your triangulation, a thing you want is called Tesselation and can be found in SFCGAL part of PostGIS: https://postgis.net/docs/ST_Tesselate.html

comment:3 by strk, 5 years ago

The manual page still talks about an "SFCGAL backend". Is that still a thing in PostGIS-3.0 or did that change name (no more called "backend"?)

Note: See TracTickets for help on using tickets.