[SCM] PostGIS branch master updated. 3.7.0alpha1-645-g01f2e1a50
git at osgeo.org
git at osgeo.org
Sun Jul 19 08:40:54 PDT 2026
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 01f2e1a504fa9e66a9ea8404e58feb839acf074d (commit)
via 623f2d4bc240ffdc2dceb306a01ea5c9dde1b710 (commit)
via f85d8bddebc9932697600561d82f78e6ff48f306 (commit)
via a9b9a1032abea4c9acbac0caaa6b2f83e9b6d85b (commit)
via 3d0449195b9557ad133395b06b031828557c0e32 (commit)
from e2794c236e2811023c3423f90099ec9f9e59f50b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 01f2e1a504fa9e66a9ea8404e58feb839acf074d
Merge: e2794c236 623f2d4bc
Author: Darafei Praliaskouski <komzpa at gmail.com>
Date: Sun Jul 19 08:40:53 2026 -0700
Merge pull request 'Restore CG_3DBuffer generated figures' (!443) from Komzpa/postgis:fix/cg3dbuffer-visuals into master
Reviewed-on: https://gitea.osgeo.org/postgis/postgis/pulls/443
commit 623f2d4bc240ffdc2dceb306a01ea5c9dde1b710
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Sun Jul 19 19:27:49 2026 +0400
doc: stabilize SFCGAL visual examples
diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml
index fa182faf8..6fda44d50 100644
--- a/doc/reference_sfcgal.xml
+++ b/doc/reference_sfcgal.xml
@@ -640,7 +640,7 @@ FROM (SELECT 'POLYHEDRALSURFACE( ((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),
<refsection>
<title>Examples</title>
<para>Subtract a smaller tetrahedral solid and render the two inputs and the actual remaining solid separately.</para>
- <programlisting language="sql">WITH data AS (
+ <programlisting language="sql" role="documented-output">WITH data AS (
SELECT CG_MakeSolid('POLYHEDRALSURFACE Z (
((0 0 0,0 4 0,4 0 0,0 0 0)),
((0 0 0,4 0 0,0 0 4,0 0 0)),
@@ -884,7 +884,7 @@ FROM data;</programlisting>
<screen role="visual-primary text-primary visual-overlay docbook-qa-ignore-wide-lines">POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0)),((1 1 0,1 1 1,1 0 1,1 0 0,1 1 0)),((0 1 0,0 1 1,1 1 1,1 1 0,0 1 0)),((0 0 1,1 0 1,1 1 1,0 1 1,0 0 1))) | POLYGON Z ((0 0 0,0 0 0.5,0 0.5 0.5,0 0.5 0,0 0 0)) | TIN Z (((0 0 0,0 0 0.5,0 0.5 0.5,0 0 0)),((0 0.5 0,0 0 0,0 0.5 0.5,0 0.5 0)))</screen>
<para>A smaller solid contained by a larger solid remains volumetric after intersection.</para>
- <programlisting language="sql">WITH data AS (
+ <programlisting language="sql" role="documented-output">WITH data AS (
SELECT CG_MakeSolid('POLYHEDRALSURFACE Z (
((0 0 0,0 4 0,4 0 0,0 0 0)),
((0 0 0,4 0 0,0 0 4,0 0 0)),
@@ -2427,13 +2427,13 @@ FROM data;</programlisting>
<screen role="visual-primary geometry-output-precision-0">POINT(100 90) | POLYHEDRALSURFACE Z (((74 133 0,60 115 15,85 130 25,74 133 0)),((57 90 26,75 105 40,60 115 15,57 90 26)),((100 116 43,85 130 25,75 105 40,100 116 43)),((60 115 15,75 105 40,85 130 25,60 115 15)),((74 133 0,85 130 25,100 140 0,74 133 0)),((100 116 43,115 130 25,85 130 25,100 116 43)),((126 133 0,100 140 0,115 130 25,126 133 0)),((85 130 25,115 130 25,100 140 0,85 130 25)),((74 133 0,100 140 0,85 130 -25,74 133 0)),((126 133 0,115 130 -25,100 140 0,126 133 0)),((100 116 -43,85 130 -25,115 130 -25,100 116 -43)),((100 140 0,115 130 -25,85 130 -25,100 140 0)),((74 133 0,85 130 -25,60 115 -15,74 133 0)),((100 116 -43,75 105 -40,85 130 -25,100 116 -43)),((57 90 -26,60 115 -15,75 105 -40,57 90 -26)),((85 130 -25,75 105 -40,60 115 -15,85 130 -25)),((74 133 0,60 115 -15,60 115 15,74 133 0)),((57 90 -26,50 90 0,60 115 -15,57 90 -26)),((57 90 26,60 115 15,50 90 0,57 90 26)),((60 115 -15,50 90 0,60 115 15,60 115 -15)),((12
6 133 0,115 130 25,140 115 15,126 133 0)),((100 116 43,125 105 40,115 130 25,100 116 43)),((143 90 26,140 115 15,125 105 40,143 90 26)),((115 130 25,125 105 40,140 115 15,115 130 25)),((100 116 43,75 105 40,100 90 50,100 116 43)),((57 90 26,75 75 40,75 105 40,57 90 26)),((100 64 43,100 90 50,75 75 40,100 64 43)),((75 105 40,75 75 40,100 90 50,75 105 40)),((57 90 26,50 90 0,60 65 15,57 90 26)),((57 90 -26,60 65 -15,50 90 0,57 90 -26)),((74 47 0,60 65 15,60 65 -15,74 47 0)),((50 90 0,60 65 -15,60 65 15,50 90 0)),((57 90 -26,75 105 -40,75 75 -40,57 90 -26)),((100 116 -43,100 90 -50,75 105 -40,100 116 -43)),((100 64 -43,75 75 -40,100 90 -50,100 64 -43)),((75 105 -40,100 90 -50,75 75 -40,75 105 -40)),((100 116 -43,115 130 -25,125 105 -40,100 116 -43)),((126 133 0,140 115 -15,115 130 -25,126 133 0)),((143 90 -26,125 105 -40,140 115 -15,143 90 -26)),((115 130 -25,140 115 -15,125 105 -40,115 130 -25)),((126 47 0,140 65 15,115 50 25,126 47 0)),((143 90 26,125 75 40,140 65 15,143 90 26)),((10
0 64 43,115 50 25,125 75 40,100 64 43)),((140 65 15,125 75 40,115 50 25,140 65 15)),((126 47 0,115 50 25,100 40 0,126 47 0)),((100 64 43,85 50 25,115 50 25,100 64 43)),((74 47 0,100 40 0,85 50 25,74 47 0)),((115 50 25,85 50 25,100 40 0,115 50 25)),((126 47 0,100 40 0,115 50 -25,126 47 0)),((74 47 0,85 50 -25,100 40 0,74 47 0)),((100 64 -43,115 50 -25,85 50 -25,100 64 -43)),((100 40 0,85 50 -25,115 50 -25,100 40 0)),((126 47 0,115 50 -25,140 65 -15,126 47 0)),((100 64 -43,125 75 -40,115 50 -25,100 64 -43)),((143 90 -26,140 65 -15,125 75 -40,143 90 -26)),((115 50 -25,125 75 -40,140 65 -15,115 50 -25)),((126 47 0,140 65 -15,140 65 15,126 47 0)),((143 90 -26,150 90 0,140 65 -15,143 90 -26)),((143 90 26,140 65 15,150 90 0,143 90 26)),((140 65 -15,150 90 0,140 65 15,140 65 -15)),((100 64 43,125 75 40,100 90 50,100 64 43)),((143 90 26,125 105 40,125 75 40,143 90 26)),((100 116 43,100 90 50,125 105 40,100 116 43)),((125 75 40,125 105 40,100 90 50,125 75 40)),((74 47 0,85 50 25,60 65 15,74 4
7 0)),((100 64 43,75 75 40,85 50 25,100 64 43)),((57 90 26,60 65 15,75 75 40,57 90 26)),((85 50 25,75 75 40,60 65 15,85 50 25)),((100 64 -43,85 50 -25,75 75 -40,100 64 -43)),((74 47 0,60 65 -15,85 50 -25,74 47 0)),((57 90 -26,75 75 -40,60 65 -15,57 90 -26)),((85 50 -25,60 65 -15,75 75 -40,85 50 -25)),((143 90 -26,125 75 -40,125 105 -40,143 90 -26)),((100 64 -43,100 90 -50,125 75 -40,100 64 -43)),((100 116 -43,125 105 -40,100 90 -50,100 116 -43)),((125 75 -40,100 90 -50,125 105 -40,125 75 -40)),((143 90 26,150 90 0,140 115 15,143 90 26)),((143 90 -26,140 115 -15,150 90 0,143 90 -26)),((126 133 0,140 115 15,140 115 -15,126 133 0)),((150 90 0,140 115 -15,140 115 15,150 90 0)))</screen>
<para>A rounded buffer around a line using 32 segments.</para>
- <programlisting language="sql">SELECT
+ <programlisting language="sql" role="documented-output">SELECT
'LINESTRING(50 50,150 150,150 50)'::geometry AS input_geometry,
CG_3DBuffer('LINESTRING(50 50,150 150,150 50)'::geometry, 10, 32, 0) AS buffer;</programlisting>
<screen role="visual-primary geometry-output-precision-0">LINESTRING(50 50,150 150,150 50) | POLYHEDRALSURFACE Z (((40 50 3,40 50 0,40 47 2,40 50 3)),((40 47 2,40 50 0,40 47 -2,40 47 2)),((40 47 -2,40 50 0,40 50 -3,40 47 -2)),((40 50 -3,40 50 0,40 53 -2,40 50 -3)),((40 53 -2,40 50 0,40 53 2,40 53 -2)),((40 53 2,40 50 0,40 50 3,40 53 2)),((40 53 2,40 50 3,41 52 4,40 53 2)),((41 52 4,40 50 3,41 50 5,41 52 4)),((41 50 5,40 50 3,41 48 4,41 50 5)),((41 48 4,40 50 3,40 47 2,41 48 4)),((40 47 2,40 47 -2,41 45 0,40 47 2)),((41 48 4,40 47 2,42 45 3,41 48 4)),((42 45 3,40 47 2,41 45 0,42 45 3)),((41 45 0,40 47 -2,42 45 -3,41 45 0)),((42 45 -3,40 47 -2,41 48 -4,42 45 -3)),((40 47 -2,40 50 -3,41 48 -4,40 47 -2)),((41 48 -4,40 50 -3,41 50 -5,41 48 -4)),((41 50 -5,40 50 -3,41 52 -4,41 50 -5)),((41 52 -4,40 50 -3,40 53 -2,41 52 -4)),((41 55 0,40 53 -2,40 53 2,41 55 0)),((41 52 -4,40 53 -2,42 55 -3,41 52 -4)),((42 55 -3,40 53 -2,41 55 0,42 55 -3)),((41 55 0,40 53 2,42 55 3,41 55 0)),((42 55 3,40 53
2,41 52 4,42 55 3)),((42 55 3,41 52 4,43 54 6,42 55 3)),((43 54 6,41 52 4,43 51 7,43 54 6)),((43 51 7,41 52 4,41 50 5,43 51 7)),((43 51 7,41 50 5,43 49 7,43 51 7)),((41 50 5,41 48 4,43 49 7,41 50 5)),((43 49 7,41 48 4,43 46 6,43 49 7)),((43 46 6,41 48 4,42 45 3,43 46 6)),((42 45 3,41 45 0,43 43 1,42 45 3)),((43 43 1,41 45 0,43 43 -1,43 43 1)),((43 43 -1,41 45 0,42 45 -3,43 43 -1)),((43 46 6,42 45 3,44 43 4,43 46 6)),((44 43 4,42 45 3,43 43 1,44 43 4)),((44 43 -4,42 45 -3,43 46 -6,44 43 -4)),((42 45 -3,41 48 -4,43 46 -6,42 45 -3)),((43 43 -1,42 45 -3,44 43 -4,43 43 -1)),((43 46 -6,41 48 -4,43 49 -7,43 46 -6)),((43 49 -7,41 48 -4,41 50 -5,43 49 -7)),((43 49 -7,41 50 -5,43 51 -7,43 49 -7)),((41 50 -5,41 52 -4,43 51 -7,41 50 -5)),((43 51 -7,41 52 -4,43 54 -6,43 51 -7)),((43 54 -6,41 52 -4,42 55 -3,43 54 -6)),((42 55 -3,41 55 0,43 57 -1,42 55 -3)),((43 57 -1,41 55 0,43 57 1,43 57 -1)),((43 57 1,41 55 0,42 55 3,43 57 1)),((43 54 -6,42 55 -3,44 57 -4,43 54 -6)),((44 57 -4,42 55 -3,43 57 -
1,44 57 -4)),((43 57 1,42 55 3,44 57 4,43 57 1)),((44 57 4,42 55 3,43 54 6,44 57 4)),((43 54 6,46 56 7,44 57 4,43 54 6)),((44 57 4,46 56 7,146 156 7,44 57 4)),((44 57 4,146 156 7,144 157 4,44 57 4)),((46 56 7,43 54 6,45 53 8,46 56 7)),((43 54 6,43 51 7,45 53 8,43 54 6)),((45 53 8,43 51 7,45 50 9,45 53 8)),((43 51 7,43 49 7,45 50 9,43 51 7)),((45 50 9,43 49 7,45 47 8,45 50 9)),((45 47 8,43 49 7,43 46 6,45 47 8)),((45 47 8,43 46 6,46 44 7,45 47 8)),((46 44 7,43 46 6,44 43 4,46 44 7)),((43 43 1,43 43 -1,45 41 0,43 43 1)),((44 43 4,43 43 1,46 41 2,44 43 4)),((46 41 2,43 43 1,45 41 0,46 41 2)),((45 41 0,43 43 -1,46 41 -2,45 41 0)),((46 41 -2,43 43 -1,44 43 -4,46 41 -2)),((46 44 7,44 43 4,47 42 5,46 44 7)),((47 42 5,44 43 4,46 41 2,47 42 5)),((47 42 -5,44 43 -4,46 44 -7,47 42 -5)),((44 43 -4,43 46 -6,46 44 -7,44 43 -4)),((46 41 -2,44 43 -4,47 42 -5,46 41 -2)),((46 44 -7,43 46 -6,45 47 -8,46 44 -7)),((43 46 -6,43 49 -7,45 47 -8,43 46 -6)),((45 47 -8,43 49 -7,45 50 -9,45 47 -8)),((45 50 -9,
43 49 -7,43 51 -7,45 50 -9)),((45 50 -9,43 51 -7,45 53 -8,45 50 -9)),((45 53 -8,43 51 -7,43 54 -6,45 53 -8)),((45 53 -8,43 54 -6,46 56 -7,45 53 -8)),((43 54 -6,44 57 -4,46 56 -7,43 54 -6)),((46 56 -7,44 57 -4,144 157 -4,46 56 -7)),((46 56 -7,144 157 -4,146 156 -7,46 56 -7)),((43 57 -1,43 57 1,143 157 -1,43 57 -1)),((143 157 -1,43 57 1,143 157 1,143 157 -1)),((43 57 -1,143 157 -1,44 57 -4,43 57 -1)),((44 57 -4,143 157 -1,144 157 -4,44 57 -4)),((43 57 1,44 57 4,143 157 1,43 57 1)),((143 157 1,44 57 4,144 157 4,143 157 1)),((146 159 2,143 157 1,144 157 4,146 159 2)),((146 159 2,144 157 4,147 158 5,146 159 2)),((147 158 5,144 157 4,146 156 7,147 158 5)),((46 56 7,45 53 8,145 153 8,46 56 7)),((146 156 7,46 56 7,145 153 8,146 156 7)),((147 158 5,146 156 7,149 157 7,147 158 5)),((149 157 7,146 156 7,148 154 9,149 157 7)),((146 156 7,145 153 8,148 154 9,146 156 7)),((145 153 8,45 53 8,48 54 9,145 153 8)),((148 154 9,145 153 8,48 54 9,148 154 9)),((48 54 9,45 53 8,47 52 10,48 54 9)),((45 53
8,45 50 9,47 52 10,45 53 8)),((47 52 10,45 50 9,47 48 10,47 52 10)),((47 48 10,45 50 9,45 47 8,47 48 10)),((47 48 10,45 47 8,48 46 9,47 48 10)),((48 46 9,45 47 8,46 44 7,48 46 9)),((48 46 9,46 44 7,49 43 7,48 46 9)),((49 43 7,46 44 7,47 42 5,49 43 7)),((46 41 2,45 41 0,47 40 0,46 41 2)),((47 40 0,45 41 0,46 41 -2,47 40 0)),((47 42 5,46 41 2,48 40 3,47 42 5)),((48 40 3,46 41 2,47 40 0,48 40 3)),((48 40 -3,46 41 -2,47 42 -5,48 40 -3)),((47 40 0,46 41 -2,48 40 -3,47 40 0)),((49 43 7,47 42 5,50 41 5,49 43 7)),((50 41 5,47 42 5,48 40 3,50 41 5)),((50 41 -5,47 42 -5,49 43 -7,50 41 -5)),((47 42 -5,46 44 -7,49 43 -7,47 42 -5)),((48 40 -3,47 42 -5,50 41 -5,48 40 -3)),((49 43 -7,46 44 -7,48 46 -9,49 43 -7)),((46 44 -7,45 47 -8,48 46 -9,46 44 -7)),((48 46 -9,45 47 -8,47 48 -10,48 46 -9)),((45 47 -8,45 50 -9,47 48 -10,45 47 -8)),((47 48 -10,45 50 -9,47 52 -10,47 48 -10)),((47 52 -10,45 50 -9,45 53 -8,47 52 -10)),((47 52 -10,45 53 -8,48 54 -9,47 52 -10)),((45 53 -8,145 153 -8,48 54 -9,45 53 -8))
,((48 54 -9,145 153 -8,148 154 -9,48 54 -9)),((45 53 -8,46 56 -7,145 153 -8,45 53 -8)),((145 153 -8,46 56 -7,146 156 -7,145 153 -8)),((148 154 -9,145 153 -8,146 156 -7,148 154 -9)),((148 154 -9,146 156 -7,149 157 -7,148 154 -9)),((149 157 -7,146 156 -7,147 158 -5,149 157 -7)),((146 156 -7,144 157 -4,147 158 -5,146 156 -7)),((147 158 -5,144 157 -4,146 159 -2,147 158 -5)),((144 157 -4,143 157 -1,146 159 -2,144 157 -4)),((146 159 -2,143 157 -1,145 159 0,146 159 -2)),((145 159 0,143 157 -1,143 157 1,145 159 0)),((145 159 0,143 157 1,146 159 2,145 159 0)),((147 160 0,145 159 0,146 159 2,147 160 0)),((147 160 0,146 159 2,148 160 3,147 160 0)),((148 160 3,146 159 2,147 158 5,148 160 3)),((148 160 3,147 158 5,150 159 5,148 160 3)),((150 159 5,147 158 5,149 157 7,150 159 5)),((150 159 5,149 157 7,151 157 7,150 159 5)),((151 157 7,149 157 7,150 155 9,151 157 7)),((149 157 7,148 154 9,150 155 9,149 157 7)),((48 54 9,47 52 10,147 152 10,48 54 9)),((148 154 9,48 54 9,147 152 10,148 154 9)),((150
155 9,148 154 9,150 153 10,150 155 9)),((148 154 9,147 152 10,150 153 10,148 154 9)),((147 152 10,47 52 10,50 50 10,147 152 10)),((150 150 10,147 152 10,50 50 10,150 150 10)),((47 52 10,47 48 10,50 50 10,47 52 10)),((50 50 10,47 48 10,50 47 10,50 50 10)),((50 47 10,47 48 10,48 46 9,50 47 10)),((50 47 10,48 46 9,50 45 9,50 47 10)),((50 45 9,48 46 9,49 43 7,50 45 9)),((50 45 9,49 43 7,51 43 7,50 45 9)),((51 43 7,49 43 7,50 41 5,51 43 7)),((48 40 3,47 40 0,50 40 0,48 40 3)),((50 40 0,47 40 0,48 40 -3,50 40 0)),((50 41 5,48 40 3,52 40 3,50 41 5)),((52 40 3,48 40 3,50 40 0,52 40 3)),((50 40 0,48 40 -3,52 40 -3,50 40 0)),((52 40 -3,48 40 -3,50 41 -5,52 40 -3)),((51 43 7,50 41 5,53 42 5,51 43 7)),((53 42 5,50 41 5,52 40 3,53 42 5)),((52 40 -3,50 41 -5,53 42 -5,52 40 -3)),((53 42 -5,50 41 -5,51 43 -7,53 42 -5)),((50 41 -5,49 43 -7,51 43 -7,50 41 -5)),((51 43 -7,49 43 -7,50 45 -9,51 43 -7)),((49 43 -7,48 46 -9,50 45 -9,49 43 -7)),((50 45 -9,48 46 -9,50 47 -10,50 45 -9)),((48 46 -9,47 48 -10
,50 47 -10,48 46 -9)),((50 47 -10,47 48 -10,50 50 -10,50 47 -10)),((50 50 -10,47 48 -10,47 52 -10,50 50 -10)),((47 52 -10,147 152 -10,50 50 -10,47 52 -10)),((50 50 -10,147 152 -10,150 150 -10,50 50 -10)),((47 52 -10,48 54 -9,147 152 -10,47 52 -10)),((147 152 -10,48 54 -9,148 154 -9,147 152 -10)),((150 153 -10,147 152 -10,148 154 -9,150 153 -10)),((150 153 -10,148 154 -9,150 155 -9,150 153 -10)),((150 155 -9,148 154 -9,149 157 -7,150 155 -9)),((150 155 -9,149 157 -7,151 157 -7,150 155 -9)),((151 157 -7,149 157 -7,150 159 -5,151 157 -7)),((149 157 -7,147 158 -5,150 159 -5,149 157 -7)),((150 159 -5,147 158 -5,148 160 -3,150 159 -5)),((147 158 -5,146 159 -2,148 160 -3,147 158 -5)),((148 160 -3,146 159 -2,147 160 0,148 160 -3)),((146 159 -2,145 159 0,147 160 0,146 159 -2)),((148 160 -3,147 160 0,150 160 0,148 160 -3)),((150 160 0,147 160 0,148 160 3,150 160 0)),((150 160 0,148 160 3,152 160 3,150 160 0)),((152 160 3,148 160 3,150 159 5,152 160 3)),((152 160 3,150 159 5,153 158 5,152 160
3)),((153 158 5,150 159 5,151 157 7,153 158 5)),((153 158 5,151 157 7,154 156 7,153 158 5)),((154 156 7,151 157 7,152 154 9,154 156 7)),((151 157 7,150 155 9,152 154 9,151 157 7)),((150 155 9,150 153 10,152 154 9,150 155 9)),((150 153 10,147 152 10,150 150 10,150 153 10)),((152 154 9,150 153 10,153 152 10,152 154 9)),((150 153 10,150 150 10,153 152 10,150 153 10)),((150 150 10,150 50 10,153 48 10,150 150 10)),((153 152 10,150 150 10,153 48 10,153 152 10)),((147 143 10,147 48 10,150 50 10,147 143 10)),((150 150 10,147 143 10,150 50 10,150 150 10)),((150 150 10,50 50 10,53 48 10,150 150 10)),((147 143 10,150 150 10,53 48 10,147 143 10)),((50 50 10,50 47 10,53 48 10,50 50 10)),((53 48 10,50 47 10,52 46 9,53 48 10)),((50 47 10,50 45 9,52 46 9,50 47 10)),((52 46 9,50 45 9,51 43 7,52 46 9)),((52 46 9,51 43 7,54 44 7,52 46 9)),((54 44 7,51 43 7,53 42 5,54 44 7)),((52 40 3,50 40 0,53 40 0,52 40 3)),((53 40 0,50 40 0,52 40 -3,53 40 0)),((53 42 5,52 40 3,54 41 2,53 42 5)),((54 41 2,52 40 3,53
40 0,54 41 2)),((53 40 0,52 40 -3,54 41 -2,53 40 0)),((54 41 -2,52 40 -3,53 42 -5,54 41 -2)),((54 44 7,53 42 5,56 43 4,54 44 7)),((56 43 4,53 42 5,54 41 2,56 43 4)),((54 41 -2,53 42 -5,56 43 -4,54 41 -2)),((56 43 -4,53 42 -5,54 44 -7,56 43 -4)),((53 42 -5,51 43 -7,54 44 -7,53 42 -5)),((54 44 -7,51 43 -7,52 46 -9,54 44 -7)),((51 43 -7,50 45 -9,52 46 -9,51 43 -7)),((52 46 -9,50 45 -9,50 47 -10,52 46 -9)),((52 46 -9,50 47 -10,53 48 -10,52 46 -9)),((53 48 -10,50 47 -10,50 50 -10,53 48 -10)),((50 50 -10,150 150 -10,53 48 -10,50 50 -10)),((53 48 -10,150 150 -10,147 143 -10,53 48 -10)),((147 48 -10,147 143 -10,150 50 -10,147 48 -10)),((150 50 -10,147 143 -10,150 150 -10,150 50 -10)),((150 50 -10,150 150 -10,153 48 -10,150 50 -10)),((153 48 -10,150 150 -10,153 152 -10,153 48 -10)),((153 152 -10,150 150 -10,150 153 -10,153 152 -10)),((150 150 -10,147 152 -10,150 153 -10,150 150 -10)),((153 152 -10,150 153 -10,152 154 -9,153 152 -10)),((152 154 -9,150 153 -10,150 155 -9,152 154 -9)),((152 15
4 -9,150 155 -9,151 157 -7,152 154 -9)),((152 154 -9,151 157 -7,154 156 -7,152 154 -9)),((154 156 -7,151 157 -7,153 158 -5,154 156 -7)),((151 157 -7,150 159 -5,153 158 -5,151 157 -7)),((153 158 -5,150 159 -5,152 160 -3,153 158 -5)),((150 159 -5,148 160 -3,152 160 -3,150 159 -5)),((152 160 -3,148 160 -3,150 160 0,152 160 -3)),((152 160 -3,150 160 0,153 160 0,152 160 -3)),((153 160 0,150 160 0,152 160 3,153 160 0)),((153 160 0,152 160 3,154 159 2,153 160 0)),((154 159 2,152 160 3,153 158 5,154 159 2)),((154 159 2,153 158 5,156 157 4,154 159 2)),((156 157 4,153 158 5,154 156 7,156 157 4)),((156 157 4,154 156 7,157 154 6,156 157 4)),((157 154 6,154 156 7,155 153 8,157 154 6)),((154 156 7,152 154 9,155 153 8,154 156 7)),((155 153 8,152 154 9,153 152 10,155 153 8)),((155 153 8,153 152 10,155 150 9,155 153 8)),((153 152 10,153 48 10,155 50 9,153 152 10)),((155 150 9,153 152 10,155 50 9,155 150 9)),((150 50 10,150 47 10,153 48 10,150 50 10)),((155 50 9,153 48 10,155 47 8,155 50 9)),((153 48
10,152 46 9,155 47 8,153 48 10)),((153 48 10,150 47 10,152 46 9,153 48 10)),((150 50 10,147 48 10,150 47 10,150 50 10)),((145 138 9,145 50 9,147 48 10,145 138 9)),((145 138 9,145 138 9,147 48 10,145 138 9)),((147 143 10,145 138 9,147 48 10,147 143 10)),((53 48 10,52 46 9,145 138 9,53 48 10)),((147 143 10,53 48 10,145 138 9,147 143 10)),((147 48 10,145 50 9,145 47 8,147 48 10)),((150 47 10,147 48 10,148 46 9,150 47 10)),((147 48 10,145 47 8,148 46 9,147 48 10)),((145 138 9,52 46 9,55 47 8,145 138 9)),((145 138 9,145 138 9,55 47 8,145 138 9)),((144 136 8,145 138 9,55 47 8,144 136 8)),((55 47 8,52 46 9,54 44 7,55 47 8)),((55 47 8,54 44 7,143 133 7,55 47 8)),((144 136 8,55 47 8,143 133 7,144 136 8)),((143 133 7,54 44 7,56 43 4,143 133 7)),((143 133 7,143 133 7,56 43 4,143 133 7)),((141 128 4,141 130 5,56 43 4,141 128 4)),((141 130 5,143 133 7,56 43 4,141 130 5)),((54 41 2,53 40 0,55 41 0,54 41 2)),((55 41 0,53 40 0,54 41 -2,55 41 0)),((56 43 4,54 41 2,57 43 1,56 43 4)),((57 43 1,54 41
2,55 41 0,57 43 1)),((55 41 0,54 41 -2,57 43 -1,55 41 0)),((57 43 -1,54 41 -2,56 43 -4,57 43 -1)),((141 128 4,56 43 4,57 43 1,141 128 4)),((140 127 3,141 128 4,57 43 1,140 127 3)),((140 126 1,140 127 3,57 43 1,140 126 1)),((57 43 -1,56 43 -4,141 128 -4,57 43 -1)),((140 126 -1,57 43 -1,140 127 -3,140 126 -1)),((140 127 -3,57 43 -1,141 128 -4,140 127 -3)),((56 43 -4,54 44 -7,143 133 -7,56 43 -4)),((141 130 -5,56 43 -4,143 133 -7,141 130 -5)),((143 133 -7,56 43 -4,143 133 -7,143 133 -7)),((141 128 -4,56 43 -4,141 130 -5,141 128 -4)),((54 44 -7,55 47 -8,143 133 -7,54 44 -7)),((143 133 -7,55 47 -8,144 136 -8,143 133 -7)),((54 44 -7,52 46 -9,55 47 -8,54 44 -7)),((52 46 -9,145 138 -9,55 47 -8,52 46 -9)),((55 47 -8,145 138 -9,145 138 -9,55 47 -8)),((55 47 -8,145 138 -9,144 136 -8,55 47 -8)),((52 46 -9,53 48 -10,145 138 -9,52 46 -9)),((145 138 -9,53 48 -10,147 143 -10,145 138 -9)),((145 50 -9,145 138 -9,147 48 -10,145 50 -9)),((147 48 -10,145 138 -9,145 138 -9,147 48 -10)),((147 48 -10,145 1
38 -9,147 143 -10,147 48 -10)),((150 47 -10,147 48 -10,150 50 -10,150 47 -10)),((153 48 -10,150 47 -10,150 50 -10,153 48 -10)),((145 47 -8,145 50 -9,147 48 -10,145 47 -8)),((148 46 -9,145 47 -8,147 48 -10,148 46 -9)),((148 46 -9,147 48 -10,150 47 -10,148 46 -9)),((155 47 -8,153 48 -10,155 50 -9,155 47 -8)),((153 48 -10,153 152 -10,155 50 -9,153 48 -10)),((155 50 -9,153 152 -10,155 150 -9,155 50 -9)),((152 46 -9,150 47 -10,153 48 -10,152 46 -9)),((155 47 -8,152 46 -9,153 48 -10,155 47 -8)),((155 150 -9,153 152 -10,155 153 -8,155 150 -9)),((153 152 -10,152 154 -9,155 153 -8,153 152 -10)),((155 153 -8,152 154 -9,154 156 -7,155 153 -8)),((155 153 -8,154 156 -7,157 154 -6,155 153 -8)),((157 154 -6,154 156 -7,156 157 -4,157 154 -6)),((154 156 -7,153 158 -5,156 157 -4,154 156 -7)),((156 157 -4,153 158 -5,154 159 -2,156 157 -4)),((153 158 -5,152 160 -3,154 159 -2,153 158 -5)),((154 159 -2,152 160 -3,153 160 0,154 159 -2)),((154 159 -2,153 160 0,155 159 0,154 159 -2)),((155 159 0,153 160 0,1
54 159 2,155 159 0)),((155 159 0,154 159 2,157 157 1,155 159 0)),((157 157 1,154 159 2,156 157 4,157 157 1)),((157 157 1,156 157 4,158 155 3,157 157 1)),((158 155 3,156 157 4,157 154 6,158 155 3)),((158 155 3,157 154 6,159 152 4,158 155 3)),((159 152 4,157 154 6,157 151 7,159 152 4)),((157 154 6,155 153 8,157 151 7,157 154 6)),((157 151 7,155 153 8,155 150 9,157 151 7)),((155 150 9,155 50 9,157 49 7,155 150 9)),((157 151 7,155 150 9,157 49 7,157 151 7)),((155 50 9,155 47 8,157 49 7,155 50 9)),((150 47 10,150 45 9,152 46 9,150 47 10)),((150 47 10,148 46 9,150 45 9,150 47 10)),((157 49 7,155 47 8,157 46 6,157 49 7)),((155 47 8,154 44 7,157 46 6,155 47 8)),((155 47 8,152 46 9,154 44 7,155 47 8)),((152 46 9,151 43 7,154 44 7,152 46 9)),((152 46 9,150 45 9,151 43 7,152 46 9)),((143 133 7,143 49 7,145 50 9,143 133 7)),((143 133 7,143 133 7,145 50 9,143 133 7)),((145 138 9,144 136 8,145 50 9,145 138 9)),((144 136 8,143 133 7,145 50 9,144 136 8)),((145 50 9,143 49 7,145 47 8,145 50 9)),((14
5 47 8,143 49 7,143 46 6,145 47 8)),((148 46 9,145 47 8,146 44 7,148 46 9)),((145 47 8,143 46 6,146 44 7,145 47 8)),((150 45 9,148 46 9,149 43 7,150 45 9)),((148 46 9,146 44 7,149 43 7,148 46 9)),((141 50 5,143 49 7,141 130 5,141 50 5)),((141 130 5,143 49 7,143 133 7,141 130 5)),((140 50 3,141 50 5,140 127 3,140 50 3)),((141 128 4,141 50 5,141 130 5,141 128 4)),((140 127 3,141 50 5,141 128 4,140 127 3)),((57 43 1,55 41 0,57 43 -1,57 43 1)),((57 43 1,57 43 -1,140 126 -1,57 43 1)),((140 126 1,57 43 1,140 126 0,140 126 1)),((140 126 0,57 43 1,140 126 -1,140 126 0)),((140 50 0,140 50 3,140 126 0,140 50 0)),((140 126 1,140 50 3,140 127 3,140 126 1)),((140 126 0,140 50 3,140 126 1,140 126 0)),((140 50 0,140 126 0,140 50 -3,140 50 0)),((140 50 -3,140 126 0,140 126 -1,140 50 -3)),((140 50 -3,140 126 -1,140 127 -3,140 50 -3)),((140 50 -3,140 127 -3,141 50 -5,140 50 -3)),((141 50 -5,140 127 -3,141 128 -4,141 50 -5)),((141 50 -5,141 128 -4,141 130 -5,141 50 -5)),((141 50 -5,141 130 -5,143 49 -
7,141 50 -5)),((143 49 -7,141 130 -5,143 133 -7,143 49 -7)),((143 49 -7,143 133 -7,145 50 -9,143 49 -7)),((145 50 -9,143 133 -7,143 133 -7,145 50 -9)),((145 50 -9,143 133 -7,144 136 -8,145 50 -9)),((144 136 -8,145 138 -9,145 50 -9,144 136 -8)),((145 47 -8,143 49 -7,145 50 -9,145 47 -8)),((150 45 -9,148 46 -9,150 47 -10,150 45 -9)),((152 46 -9,150 45 -9,150 47 -10,152 46 -9)),((143 46 -6,143 49 -7,145 47 -8,143 46 -6)),((146 44 -7,143 46 -6,145 47 -8,146 44 -7)),((146 44 -7,145 47 -8,148 46 -9,146 44 -7)),((149 43 -7,146 44 -7,148 46 -9,149 43 -7)),((149 43 -7,148 46 -9,150 45 -9,149 43 -7)),((157 46 -6,155 47 -8,157 49 -7,157 46 -6)),((157 49 -7,155 47 -8,155 50 -9,157 49 -7)),((154 44 -7,152 46 -9,155 47 -8,154 44 -7)),((157 46 -6,154 44 -7,155 47 -8,157 46 -6)),((155 50 -9,155 150 -9,157 49 -7,155 50 -9)),((157 49 -7,155 150 -9,157 151 -7,157 49 -7)),((155 150 -9,155 153 -8,157 151 -7,155 150 -9)),((151 43 -7,150 45 -9,152 46 -9,151 43 -7)),((154 44 -7,151 43 -7,152 46 -9,154 44 -
7)),((157 151 -7,155 153 -8,157 154 -6,157 151 -7)),((157 151 -7,157 154 -6,159 152 -4,157 151 -7)),((159 152 -4,157 154 -6,158 155 -3,159 152 -4)),((157 154 -6,156 157 -4,158 155 -3,157 154 -6)),((158 155 -3,156 157 -4,157 157 -1,158 155 -3)),((156 157 -4,154 159 -2,157 157 -1,156 157 -4)),((157 157 -1,154 159 -2,155 159 0,157 157 -1)),((157 157 -1,155 159 0,157 157 1,157 157 -1)),((159 155 0,157 157 -1,157 157 1,159 155 0)),((159 155 0,157 157 1,158 155 3,159 155 0)),((159 155 0,158 155 3,160 153 2,159 155 0)),((160 153 2,158 155 3,159 152 4,160 153 2)),((160 153 2,159 152 4,160 150 3,160 153 2)),((159 152 4,159 150 5,160 150 3,159 152 4)),((159 152 4,157 151 7,159 150 5,159 152 4)),((157 151 7,157 49 7,159 50 5,157 151 7)),((159 150 5,157 151 7,159 50 5,159 150 5)),((159 50 5,157 49 7,159 48 4,159 50 5)),((157 49 7,157 46 6,159 48 4,157 49 7)),((150 45 9,149 43 7,151 43 7,150 45 9)),((159 48 4,157 46 6,158 45 3,159 48 4)),((157 46 6,156 43 4,158 45 3,157 46 6)),((157 46 6,154 44
7,156 43 4,157 46 6)),((154 44 7,153 42 5,156 43 4,154 44 7)),((154 44 7,151 43 7,153 42 5,154 44 7)),((151 43 7,149 43 7,150 41 5,151 43 7)),((151 43 7,150 41 5,153 42 5,151 43 7)),((141 50 5,141 48 4,143 49 7,141 50 5)),((143 49 7,141 48 4,143 46 6,143 49 7)),((143 46 6,141 48 4,142 45 3,143 46 6)),((146 44 7,143 46 6,144 43 4,146 44 7)),((143 46 6,142 45 3,144 43 4,143 46 6)),((149 43 7,146 44 7,147 42 5,149 43 7)),((146 44 7,144 43 4,147 42 5,146 44 7)),((149 43 7,147 42 5,150 41 5,149 43 7)),((141 50 5,140 50 3,141 48 4,141 50 5)),((140 50 3,140 50 0,140 47 2,140 50 3)),((141 48 4,140 50 3,140 47 2,141 48 4)),((140 47 2,140 50 0,140 47 -2,140 47 2)),((140 47 -2,140 50 0,140 50 -3,140 47 -2)),((141 48 -4,140 50 -3,141 50 -5,141 48 -4)),((140 47 -2,140 50 -3,141 48 -4,140 47 -2)),((143 49 -7,141 48 -4,141 50 -5,143 49 -7)),((143 46 -6,141 48 -4,143 49 -7,143 46 -6)),((151 43 -7,149 43 -7,150 45 -9,151 43 -7)),((142 45 -3,141 48 -4,143 46 -6,142 45 -3)),((144 43 -4,142 45 -3,143 4
6 -6,144 43 -4)),((144 43 -4,143 46 -6,146 44 -7,144 43 -4)),((147 42 -5,144 43 -4,146 44 -7,147 42 -5)),((147 42 -5,146 44 -7,149 43 -7,147 42 -5)),((150 41 -5,149 43 -7,151 43 -7,150 41 -5)),((150 41 -5,147 42 -5,149 43 -7,150 41 -5)),((158 45 -3,157 46 -6,159 48 -4,158 45 -3)),((159 48 -4,157 46 -6,157 49 -7,159 48 -4)),((156 43 -4,154 44 -7,157 46 -6,156 43 -4)),((158 45 -3,156 43 -4,157 46 -6,158 45 -3)),((159 48 -4,157 49 -7,159 50 -5,159 48 -4)),((159 50 -5,157 49 -7,157 151 -7,159 50 -5)),((159 150 -5,159 50 -5,157 151 -7,159 150 -5)),((153 42 -5,151 43 -7,154 44 -7,153 42 -5)),((156 43 -4,153 42 -5,154 44 -7,156 43 -4)),((159 150 -5,157 151 -7,159 152 -4,159 150 -5)),((153 42 -5,150 41 -5,151 43 -7,153 42 -5)),((160 150 -3,159 150 -5,159 152 -4,160 150 -3)),((160 150 -3,159 152 -4,160 153 -2,160 150 -3)),((159 152 -4,158 155 -3,160 153 -2,159 152 -4)),((160 153 -2,158 155 -3,159 155 0,160 153 -2)),((158 155 -3,157 157 -1,159 155 0,158 155 -3)),((160 153 -2,159 155 0,160 153
2,160 153 -2)),((160 150 0,160 153 -2,160 153 2,160 150 0)),((160 150 0,160 153 2,160 150 3,160 150 0)),((159 150 5,159 50 5,160 50 3,159 150 5)),((160 150 3,159 150 5,160 50 3,160 150 3)),((160 150 3,160 50 3,160 50 0,160 150 3)),((160 150 0,160 150 3,160 50 0,160 150 0)),((160 50 3,159 50 5,159 48 4,160 50 3)),((160 50 3,159 48 4,160 47 2,160 50 3)),((159 48 4,158 45 3,160 47 2,159 48 4)),((160 47 2,158 45 3,159 45 0,160 47 2)),((158 45 3,157 43 1,159 45 0,158 45 3)),((158 45 3,156 43 4,157 43 1,158 45 3)),((156 43 4,154 41 2,157 43 1,156 43 4)),((156 43 4,153 42 5,154 41 2,156 43 4)),((153 42 5,152 40 3,154 41 2,153 42 5)),((153 42 5,150 41 5,152 40 3,153 42 5)),((150 41 5,147 42 5,148 40 3,150 41 5)),((150 41 5,148 40 3,152 40 3,150 41 5)),((141 48 4,140 47 2,142 45 3,141 48 4)),((142 45 3,140 47 2,141 45 0,142 45 3)),((144 43 4,142 45 3,143 43 1,144 43 4)),((142 45 3,141 45 0,143 43 1,142 45 3)),((147 42 5,144 43 4,146 41 2,147 42 5)),((144 43 4,143 43 1,146 41 2,144 43 4)),((
147 42 5,146 41 2,148 40 3,147 42 5)),((140 47 2,140 47 -2,141 45 0,140 47 2)),((141 45 0,140 47 -2,142 45 -3,141 45 0)),((142 45 -3,140 47 -2,141 48 -4,142 45 -3)),((143 43 -1,141 45 0,142 45 -3,143 43 -1)),((143 43 -1,142 45 -3,144 43 -4,143 43 -1)),((146 41 -2,143 43 -1,144 43 -4,146 41 -2)),((146 41 -2,144 43 -4,147 42 -5,146 41 -2)),((148 40 -3,146 41 -2,147 42 -5,148 40 -3)),((148 40 -3,147 42 -5,150 41 -5,148 40 -3)),((152 40 -3,150 41 -5,153 42 -5,152 40 -3)),((152 40 -3,148 40 -3,150 41 -5,152 40 -3)),((159 45 0,158 45 -3,160 47 -2,159 45 0)),((160 47 -2,158 45 -3,159 48 -4,160 47 -2)),((157 43 -1,156 43 -4,158 45 -3,157 43 -1)),((159 45 0,157 43 -1,158 45 -3,159 45 0)),((160 47 -2,159 48 -4,160 50 -3,160 47 -2)),((159 48 -4,159 50 -5,160 50 -3,159 48 -4)),((154 41 -2,153 42 -5,156 43 -4,154 41 -2)),((157 43 -1,154 41 -2,156 43 -4,157 43 -1)),((160 50 -3,159 50 -5,159 150 -5,160 50 -3)),((160 150 -3,160 50 -3,159 150 -5,160 150 -3)),((154 41 -2,152 40 -3,153 42 -5,154 41 -2
)),((160 50 0,160 50 -3,160 150 -3,160 50 0)),((160 150 0,160 50 0,160 150 -3,160 150 0)),((160 150 -3,160 153 -2,160 150 0,160 150 -3)),((160 50 3,160 47 2,160 50 0,160 50 3)),((160 50 0,160 47 -2,160 50 -3,160 50 0)),((160 47 2,160 47 -2,160 50 0,160 47 2)),((160 47 2,159 45 0,160 47 -2,160 47 2)),((157 43 1,157 43 -1,159 45 0,157 43 1)),((157 43 1,155 41 0,157 43 -1,157 43 1)),((157 43 1,154 41 2,155 41 0,157 43 1)),((154 41 2,153 40 0,155 41 0,154 41 2)),((154 41 2,152 40 3,153 40 0,154 41 2)),((152 40 3,148 40 3,150 40 0,152 40 3)),((152 40 3,150 40 0,153 40 0,152 40 3)),((148 40 3,146 41 2,147 40 0,148 40 3)),((148 40 3,147 40 0,150 40 0,148 40 3)),((143 43 1,141 45 0,143 43 -1,143 43 1)),((143 43 1,143 43 -1,145 41 0,143 43 1)),((146 41 2,143 43 1,145 41 0,146 41 2)),((146 41 2,145 41 0,147 40 0,146 41 2)),((145 41 0,143 43 -1,146 41 -2,145 41 0)),((147 40 0,145 41 0,146 41 -2,147 40 0)),((147 40 0,146 41 -2,148 40 -3,147 40 0)),((150 40 0,148 40 -3,152 40 -3,150 40 0)),((150
40 0,147 40 0,148 40 -3,150 40 0)),((153 40 0,152 40 -3,154 41 -2,153 40 0)),((153 40 0,150 40 0,152 40 -3,153 40 0)),((155 41 0,154 41 -2,157 43 -1,155 41 0)),((155 41 0,153 40 0,154 41 -2,155 41 0)))</screen>
<para>A square buffer around the same line using 32 segments.</para>
- <programlisting language="sql">SELECT
+ <programlisting language="sql" role="documented-output">SELECT
'LINESTRING(50 50,150 150,150 50)'::geometry AS input_geometry,
CG_3DBuffer('LINESTRING(50 50,150 150,150 50)'::geometry, 10, 32, 2) AS buffer;</programlisting>
<screen role="visual-primary geometry-output-precision-0">LINESTRING(50 50,150 150,150 50) | POLYHEDRALSURFACE Z (((50 36 0,50 36 -2,140 126 -2,140 126 0,50 36 0)),((140 126 -2,50 36 -2,49 36 -4,141 128 -4,140 126 -2)),((141 128 -4,49 36 -4,49 37 -6,142 130 -6,141 128 -4)),((142 130 -6,49 37 -6,48 38 -7,143 133 -7,142 130 -6)),((143 133 -7,48 38 -7,47 39 -8,144 137 -8,143 133 -7)),((144 137 -8,47 39 -8,46 40 -9,146 141 -9,144 137 -8)),((146 141 -9,46 40 -9,44 42 -10,148 145 -10,146 141 -9)),((148 145 -10,44 42 -10,43 43 -10,150 150 -10,148 145 -10)),((150 150 -10,43 43 -10,42 44 -10,152 155 -10,150 150 -10)),((152 155 -10,42 44 -10,40 46 -9,154 159 -9,152 155 -10)),((154 159 -9,40 46 -9,39 47 -8,156 163 -8,154 159 -9)),((156 163 -8,39 47 -8,38 48 -7,157 167 -7,156 163 -8)),((157 167 -7,38 48 -7,37 49 -6,158 170 -6,157 167 -7)),((158 170 -6,37 49 -6,36 49 -4,159 172 -4,158 170 -6)),((159 172 -4,36 49 -4,36 50 -2,160 174 -2,159 172 -4)),((160 174 -2,36 50 -2,36 50 -1e-15,160 174 -1e-1
5,160 174 -2)),((160 174 -1e-15,36 50 -1e-15,36 50 2,160 174 2,160 174 -1e-15)),((160 174 2,36 50 2,36 49 4,159 172 4,160 174 2)),((159 172 4,36 49 4,37 49 6,158 170 6,159 172 4)),((158 170 6,37 49 6,38 48 7,157 167 7,158 170 6)),((157 167 7,38 48 7,39 47 8,156 163 8,157 167 7)),((156 163 8,39 47 8,40 46 9,154 159 9,156 163 8)),((154 159 9,40 46 9,42 44 10,152 155 10,154 159 9)),((152 155 10,42 44 10,43 43 10,150 150 10,152 155 10)),((150 150 10,43 43 10,44 42 10,148 145 10,150 150 10)),((148 145 10,44 42 10,46 40 9,146 141 9,148 145 10)),((146 141 9,46 40 9,47 39 8,144 137 8,146 141 9)),((144 137 8,47 39 8,48 38 7,143 133 7,144 137 8)),((143 133 7,48 38 7,49 37 6,142 130 6,143 133 7)),((142 130 6,49 37 6,49 36 4,141 128 4,142 130 6)),((141 128 4,49 36 4,50 36 2,140 126 2,141 128 4)),((50 36 0,140 126 0,140 126 2,50 36 2,50 36 0)),((140 126 0,140 126 -2,140 40 -2,140 40 0,140 126 0)),((140 40 -2,140 126 -2,141 128 -4,141 40 -4,140 40 -2)),((141 40 -4,141 128 -4,142 130 -6,142 40 -6,
141 40 -4)),((142 40 -6,142 130 -6,143 133 -7,143 40 -7,142 40 -6)),((143 40 -7,143 133 -7,144 137 -8,144 40 -8,143 40 -7)),((144 40 -8,144 137 -8,146 141 -9,146 40 -9,144 40 -8)),((146 40 -9,146 141 -9,148 145 -10,148 40 -10,146 40 -9)),((148 40 -10,148 145 -10,150 150 -10,150 40 -10,148 40 -10)),((150 40 -10,150 150 -10,152 155 -10,152 40 -10,150 40 -10)),((152 40 -10,152 155 -10,154 159 -9,154 40 -9,152 40 -10)),((154 40 -9,154 159 -9,156 163 -8,156 40 -8,154 40 -9)),((156 40 -8,156 163 -8,157 167 -7,157 40 -7,156 40 -8)),((157 40 -7,157 167 -7,158 170 -6,158 40 -6,157 40 -7)),((158 40 -6,158 170 -6,159 172 -4,159 40 -4,158 40 -6)),((159 40 -4,159 172 -4,160 174 -2,160 40 -2,159 40 -4)),((160 40 -2,160 174 -2,160 174 -1e-15,160 40 -1e-15,160 40 -2)),((160 40 -1e-15,160 174 -1e-15,160 174 2,160 40 2,160 40 -1e-15)),((160 40 2,160 174 2,159 172 4,159 40 4,160 40 2)),((159 40 4,159 172 4,158 170 6,158 40 6,159 40 4)),((158 40 6,158 170 6,157 167 7,157 40 7,158 40 6)),((157 40 7,157
167 7,156 163 8,156 40 8,157 40 7)),((156 40 8,156 163 8,154 159 9,154 40 9,156 40 8)),((154 40 9,154 159 9,152 155 10,152 40 10,154 40 9)),((152 40 10,152 155 10,150 150 10,150 40 10,152 40 10)),((150 40 10,150 150 10,148 145 10,148 40 10,150 40 10)),((148 40 10,148 145 10,146 141 9,146 40 9,148 40 10)),((146 40 9,146 141 9,144 137 8,144 40 8,146 40 9)),((144 40 8,144 137 8,143 133 7,143 40 7,144 40 8)),((143 40 7,143 133 7,142 130 6,142 40 6,143 40 7)),((142 40 6,142 130 6,141 128 4,141 40 4,142 40 6)),((141 40 4,141 128 4,140 126 2,140 40 2,141 40 4)),((140 126 0,140 40 0,140 40 2,140 126 2,140 126 0)),((50 36 -2,50 36 0,50 36 2,49 36 4,49 37 6,48 38 7,47 39 8,46 40 9,44 42 10,43 43 10,42 44 10,40 46 9,39 47 8,38 48 7,37 49 6,36 49 4,36 50 2,36 50 -1e-15,36 50 -2,36 49 -4,37 49 -6,38 48 -7,39 47 -8,40 46 -9,42 44 -10,43 43 -10,44 42 -10,46 40 -9,47 39 -8,48 38 -7,49 37 -6,49 36 -4,50 36 -2)),((140 40 0,140 40 -2,141 40 -4,142 40 -6,143 40 -7,144 40 -8,146 40 -9,148 40 -10,150 40
-10,152 40 -10,154 40 -9,156 40 -8,157 40 -7,158 40 -6,159 40 -4,160 40 -2,160 40 -1e-15,160 40 2,159 40 4,158 40 6,157 40 7,156 40 8,154 40 9,152 40 10,150 40 10,148 40 10,146 40 9,144 40 8,143 40 7,142 40 6,141 40 4,140 40 2,140 40 0)))</screen>
diff --git a/utils/postgis_exampletest.py b/utils/postgis_exampletest.py
index 5ac9913b0..700f51b00 100755
--- a/utils/postgis_exampletest.py
+++ b/utils/postgis_exampletest.py
@@ -479,17 +479,11 @@ class ExampleTester:
ST_Normalize canonicalizes polygon orientation and component order, but
its ring-start choice is based on XY. A 3D face may therefore retain
different (but equivalent) cyclic starts when two vertices share XY
- and differ only in Z. Rotate each normalized ring using rounded point
- coordinate keys, then sort the normalized areal components.
+ and differ only in Z. Rotate each normalized ring using the same
+ precision-aware point formatter used by documented WKT output, then
+ sort the normalized areal components.
"""
- tolerance = format(VALUE_TOLERANCE, ".17g")
- point_key = (
- "concat_ws(' ', "
- f"round((CASE WHEN abs(ST_X(point.geom)) < {tolerance} THEN 0 ELSE ST_X(point.geom) END)::numeric, {digits}), "
- f"round((CASE WHEN abs(ST_Y(point.geom)) < {tolerance} THEN 0 ELSE ST_Y(point.geom) END)::numeric, {digits}), "
- f"round((CASE WHEN abs(ST_Z(point.geom)) < {tolerance} THEN 0 ELSE ST_Z(point.geom) END)::numeric, {digits}), "
- f"round((CASE WHEN abs(ST_M(point.geom)) < {tolerance} THEN 0 ELSE ST_M(point.geom) END)::numeric, {digits}))"
- )
+ point_key = f"ST_AsEWKT(point.geom, {digits})"
return (
"(SELECT jsonb_agg(face_key ORDER BY face_key) FROM (SELECT "
"face_path, jsonb_agg(ring_key ORDER BY ring_path) AS face_key "
@@ -669,7 +663,13 @@ class ExampleTester:
return [
"geometry" if any(
column < len(row)
- and self.hexwkb_geometry(row[column], allow_bytea_prefix=False) is not None
+ and (
+ self.hexwkb_geometry(row[column], allow_bytea_prefix=False) is not None
+ or (
+ isinstance(row[column], str)
+ and WKT_VALUE_RE.match(row[column])
+ )
+ )
for row in expected
) else ""
for column in range(width)
diff --git a/utils/test_postgis_exampletest.py b/utils/test_postgis_exampletest.py
index 399e33c1b..fd3724809 100644
--- a/utils/test_postgis_exampletest.py
+++ b/utils/test_postgis_exampletest.py
@@ -501,8 +501,7 @@ SELECT 'POINT(1 2)', $$LINESTRING(0 0,1 1)$$,
expected_wkt_digits=0,
)
self.assertEqual(2, query.count("jsonb_agg(face_key ORDER BY face_key)"))
- self.assertIn("round((CASE WHEN abs(ST_Z(point.geom))", query)
- self.assertIn("::numeric, 0)", query)
+ self.assertEqual(2, query.count("ST_AsEWKT(point.geom, 0)"))
self.assertNotIn("ST_HausdorffDistance", query)
def test_psql_environment_sets_default_query_timeout(self):
@@ -710,7 +709,7 @@ class ExampleTestComparisonTest(unittest.TestCase):
self.assertEqual(2, query.count("jsonb_agg(face_key ORDER BY face_key)"))
self.assertEqual(2, query.count("ST_Dump("))
self.assertIn("ST_Normalize", query)
- self.assertNotIn("ST_AsEWKT", query)
+ self.assertEqual(2, query.count("ST_AsEWKT(point.geom, 12)"))
self.assertNotIn("ST_GeomFromEWKT(ST_AsEWKT", query)
self.assertNotIn("refentry", query.lower())
@@ -722,14 +721,12 @@ class ExampleTestComparisonTest(unittest.TestCase):
self.assertIn("ST_AsEWKT(ST_Normalize(expected))", query)
self.assertNotIn("actual_components AS", query)
- def test_areal_comparison_uses_rounded_coordinate_keys(self):
+ def test_areal_comparison_uses_documented_wkt_coordinate_keys(self):
query = self.tester.geometry_comparison_query(
"00", expected_wkt="POLYGON Z EMPTY", actual_type="POLYGON",
)
self.assertEqual(2, query.count("generate_subscripts(points, 1)"))
- self.assertEqual(2, query.count("concat_ws(' ',"))
- self.assertIn("round((CASE WHEN abs(ST_X(point.geom))", query)
- self.assertIn("round((CASE WHEN abs(ST_Z(point.geom))", query)
+ self.assertEqual(2, query.count("ST_AsEWKT(point.geom, 0)"))
self.assertIn("points[rotation:array_length(points, 1)]", query)
self.assertIn("IS NOT DISTINCT FROM", query)
self.assertNotIn("regexp_replace", query)
@@ -919,6 +916,15 @@ class ExampleTestComparisonTest(unittest.TestCase):
self.assertTrue(self.tester.expected_has_geometry_text([["POLYGON EMPTY"]]))
self.assertFalse(self.tester.expected_has_geometry_text([["not geometry"]]))
+ def test_documented_visual_types_detect_readable_wkt_columns(self):
+ self.assertEqual(
+ ["geometry", ""],
+ self.tester.documented_visual_types([
+ ["POINT(1 2)", "label"],
+ ["SRID=4326;POLYGON EMPTY", "still text"],
+ ]),
+ )
+
class ExampleTestRunnerTest(unittest.TestCase):
def make_runner(self, actual_rows):
@@ -998,38 +1004,64 @@ class ExampleTestRunnerTest(unittest.TestCase):
self.assertEqual(["second:2", ("visuals", ["second-visual"])], calls)
def test_visual_only_renders_typed_documented_output_at_any_job_count(self):
- hexwkb = "010300000000000000"
- for jobs in (1, 2):
- with self.subTest(jobs=jobs):
- tester = self.make_runner({"SELECT 1": [[hexwkb]]})
- example = tester.examples()[0]
- example.update({
- "expected": [[hexwkb]],
- "documented_only": True,
- "expected_headers": ["documented_geom"],
- "visual_id": "documented-visual",
- "visual_kind": "explicit",
- "visual_preferred": True,
- })
- tester.examples = lambda: [example]
- calls = []
- tester.run_one_example = lambda database, selected: self.fail(
- "documented output was executed"
- )
- tester.render_visual_example = lambda database, selected, actual: calls.append(
- (selected["visual_id"], actual)
- ) or {"id": selected["visual_id"], "source": selected["label"], "svg": "<svg/>\n"}
- tester.publish_visual_examples = lambda render_dir, visuals: calls.append(
- (render_dir, [visual["id"] for visual in visuals])
- )
+ for expected in (
+ [["010300000000000000"]],
+ [["POLYGON EMPTY"]],
+ ):
+ for jobs in (1, 2):
+ with self.subTest(expected=expected, jobs=jobs):
+ tester = self.make_runner({"SELECT 1": expected})
+ example = tester.examples()[0]
+ example.update({
+ "expected": expected,
+ "documented_only": True,
+ "expected_headers": ["documented_geom"],
+ "visual_id": "documented-visual",
+ "visual_kind": "explicit",
+ "visual_preferred": True,
+ })
+ tester.examples = lambda: [example]
+ calls = []
+ tester.run_one_example = lambda database, selected: self.fail(
+ "documented output was executed"
+ )
+ tester.render_visual_example = lambda database, selected, actual: calls.append(
+ (selected["visual_id"], actual)
+ ) or {"id": selected["visual_id"], "source": selected["label"], "svg": "<svg/>\n"}
+ tester.publish_visual_examples = lambda render_dir, visuals: calls.append(
+ (render_dir, [visual["id"] for visual in visuals])
+ )
- tester.run_examples("exampletest", render_dir="visuals", visual_only=True, jobs=jobs)
+ tester.run_examples("exampletest", render_dir="visuals", visual_only=True, jobs=jobs)
- self.assertEqual("documented-visual", calls[0][0])
- self.assertEqual(example["expected"], calls[0][1])
- self.assertEqual(["documented_geom"], calls[0][1].headers)
- self.assertEqual(["geometry"], calls[0][1].types)
- self.assertEqual(("visuals", ["documented-visual"]), calls[1])
+ self.assertEqual("documented-visual", calls[0][0])
+ self.assertEqual(example["expected"], calls[0][1])
+ self.assertEqual(["documented_geom"], calls[0][1].headers)
+ self.assertEqual(["geometry"], calls[0][1].types)
+ self.assertEqual(("visuals", ["documented-visual"]), calls[1])
+
+ def test_visual_only_preserves_documented_scalar_output_types(self):
+ tester = self.make_runner({"SELECT 1": [["label", "POINT(1 2)"]]})
+ example = tester.examples()[0]
+ example.update({
+ "expected": [["label", "POINT(1 2)"]],
+ "documented_only": True,
+ "expected_headers": ["caption", "documented_geom"],
+ "visual_id": "documented-visual",
+ "visual_kind": "explicit",
+ "visual_preferred": True,
+ })
+ tester.examples = lambda: [example]
+ calls = []
+ tester.run_one_example = lambda database, selected: self.fail(
+ "documented output was executed"
+ )
+ tester.render_visual_example = lambda database, selected, actual: calls.append(actual)
+ tester.publish_visual_examples = lambda render_dir, visuals: None
+
+ tester.run_examples("exampletest", render_dir="visuals", visual_only=True)
+
+ self.assertEqual(["", "geometry"], calls[0].types)
def test_native_geometry_output_is_described_when_input_uses_serializer(self):
hexwkb = "010200000002000000000000000000F03F0000000000000040" \
commit f85d8bddebc9932697600561d82f78e6ff48f306
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Sun Jul 19 18:01:44 2026 +0400
utils: canonicalize rounded surface comparisons
diff --git a/utils/postgis_exampletest.py b/utils/postgis_exampletest.py
index e9c3b0283..5ac9913b0 100755
--- a/utils/postgis_exampletest.py
+++ b/utils/postgis_exampletest.py
@@ -564,6 +564,15 @@ class ExampleTester:
if expected_hex is None else VALUE_DECIMAL_DIGITS
)
+ if actual_type in UNORDERED_AREAL_TYPES + UNORDERED_SURFACE_TYPES:
+ return preamble + (
+ "SELECT " + metadata +
+ "AND " + self.areal_canonical_key_sql("actual", documented_digits) +
+ " IS NOT DISTINCT FROM " +
+ self.areal_canonical_key_sql("expected", documented_digits) + " "
+ "FROM canonical"
+ )
+
if expected_hex is None and (
expected_wkt_digits is not None or 0 < documented_digits < VALUE_DECIMAL_DIGITS
):
@@ -590,15 +599,6 @@ class ExampleTester:
"FROM canonical"
)
- if actual_type in UNORDERED_AREAL_TYPES + UNORDERED_SURFACE_TYPES:
- return preamble + (
- "SELECT " + metadata +
- "AND " + self.areal_canonical_key_sql("actual", documented_digits) +
- " IS NOT DISTINCT FROM " +
- self.areal_canonical_key_sql("expected", documented_digits) + " "
- "FROM canonical"
- )
-
if actual_type == "GEOMETRYCOLLECTION":
surface_types = "('POLYHEDRALSURFACE', 'TIN')"
return preamble + (
diff --git a/utils/test_postgis_exampletest.py b/utils/test_postgis_exampletest.py
index b2a679eb5..399e33c1b 100644
--- a/utils/test_postgis_exampletest.py
+++ b/utils/test_postgis_exampletest.py
@@ -492,6 +492,19 @@ SELECT 'POINT(1 2)', $$LINESTRING(0 0,1 1)$$,
)
self.assertIn("ST_HausdorffDistance(actual, expected) <= 9.9999999999999995e-07", query)
+ def test_surface_output_precision_preserves_canonical_face_comparison(self):
+ tester = ExampleTester.__new__(ExampleTester)
+ query = tester.geometry_comparison_query(
+ "00",
+ expected_wkt="POLYHEDRALSURFACE Z EMPTY",
+ actual_type="POLYHEDRALSURFACE",
+ expected_wkt_digits=0,
+ )
+ self.assertEqual(2, query.count("jsonb_agg(face_key ORDER BY face_key)"))
+ self.assertIn("round((CASE WHEN abs(ST_Z(point.geom))", query)
+ self.assertIn("::numeric, 0)", query)
+ self.assertNotIn("ST_HausdorffDistance", query)
+
def test_psql_environment_sets_default_query_timeout(self):
tester = ExampleTester.__new__(ExampleTester)
with mock.patch.dict(os.environ, {}, clear=True):
commit a9b9a1032abea4c9acbac0caaa6b2f83e9b6d85b
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Sun Jul 19 17:16:03 2026 +0400
ci: refresh Debbie release-docs dependencies
diff --git a/ci/debbie/postgis_make_dist.sh b/ci/debbie/postgis_make_dist.sh
index f3d75311a..d656dfba8 100644
--- a/ci/debbie/postgis_make_dist.sh
+++ b/ci/debbie/postgis_make_dist.sh
@@ -2,22 +2,23 @@
set -e
## begin variables passed in by jenkins
-export PG_VER=14
+export PG_VER=18
# export PGPORT=8442
export OS_BUILD=64
# export POSTGIS_MAJOR_VERSION=2
# export POSTGIS_MINOR_VERSION=2
# export POSTGIS_MICRO_VERSION=0dev
export PROJECTS=/var/lib/jenkins/workspace
-export GEOS_VER=3.10
-export GDAL_VER=3.4
-export WEB_DIR=/var/www/postgis_stuff
+export GEOS_VER=3.14
+export GDAL_VER=3.13
+export WEB_DIR=${WEB_DIR:-/var/www/postgis_stuff}
+export PGPATH=${PROJECTS}/pg/rel/pg${PG_VER}w${OS_BUILD}
export PATH="${PGPATH}/bin:$PATH"
export LD_LIBRARY_PATH="${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/lib:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/lib:${PGPATH}/lib"
-POSTGIS_MAJOR_VERSION=`grep ^POSTGIS_MAJOR_VERSION Version.config | cut -d= -f2`
-POSTGIS_MINOR_VERSION=`grep ^POSTGIS_MINOR_VERSION Version.config | cut -d= -f2`
-POSTGIS_MICRO_VERSION=`grep ^POSTGIS_MICRO_VERSION Version.config | cut -d= -f2`
+POSTGIS_MAJOR_VERSION=$(awk -F= '$1 == "POSTGIS_MAJOR_VERSION" { print $2 }' Version.config)
+POSTGIS_MINOR_VERSION=$(awk -F= '$1 == "POSTGIS_MINOR_VERSION" { print $2 }' Version.config)
+POSTGIS_MICRO_VERSION=$(awk -F= '$1 == "POSTGIS_MICRO_VERSION" { print $2 }' Version.config)
#export CONFIGURE_ARGS="--with-pgconfig=${PROJECTS}/pg/rel/pg${PG_VER}w${OS_BUILD}/bin/pg_config --with-geosconfig=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/bin/geos-config --with-gdalconfig=${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/bin/gdal-config --prefix=${PROJECTS}/pg/rel/pg${PG_VER}w${OS_BUILD}"
@@ -30,9 +31,10 @@ export newoutdir="postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${PO
#export newoutdir="postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.0"
sh make_dist.sh
-export package=${newoutdir}.tar.gz
-echo "The package name is $package"
+package=${newoutdir}.tar.gz
+export package
+echo "The package name is ${package}"
-cp $package $WEB_DIR
-cp ${package}.md5 $WEB_DIR
+cp "${package}" "${WEB_DIR}"
+cp "${package}.md5" "${WEB_DIR}"
bash ci/debbie/postgis_release_docs.sh
diff --git a/ci/debbie/postgis_release_docs.sh b/ci/debbie/postgis_release_docs.sh
index 414d5f316..91fe4579a 100644
--- a/ci/debbie/postgis_release_docs.sh
+++ b/ci/debbie/postgis_release_docs.sh
@@ -1,19 +1,96 @@
#!/usr/bin/env bash
-set -e
+set -euo pipefail
-export PG_VER=14
+export PG_VER=18
# export PGPORT=8442
export OS_BUILD=64
#this is passed in via postgis_make_dist.sh via jenkins
#export reference=
export PROJECTS=/var/lib/jenkins/workspace
-export GEOS_VER=3.10
-export GDAL_VER=3.4
-export WEB_DIR=/var/www/postgis_stuff
+export GEOS_VER=3.14
+export GDAL_VER=3.13
+export PROJ_VER=9.8.1
+export SFCGAL_VER=2.3.0
+export CGAL_VER=6.2
+export WEB_DIR=${WEB_DIR:-/var/www/postgis_stuff}
export PGPATH=${PROJECTS}/pg/rel/pg${PG_VER}w${OS_BUILD}
-export PATH="${PGPATH}/bin:$PATH"
-export LD_LIBRARY_PATH="${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/lib:${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/lib:${PGPATH}/lib"
+export GEOSPATH=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}
+export GDALPATH=${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}
+export PROJPATH=${PROJECTS}/proj/rel-${PROJ_VER}w${OS_BUILD}
+export SFCGALPATH=${PROJECTS}/sfcgal/rel-sfcgal-${SFCGAL_VER}w${OS_BUILD}
+export CGALPATH=${PROJECTS}/sfcgal/rel-cgal-${CGAL_VER}w${OS_BUILD}
+export PATH="${PGPATH}/bin:${GEOSPATH}/bin:${GDALPATH}/bin:${PROJPATH}/bin:${SFCGALPATH}/bin:$PATH"
+export LD_LIBRARY_PATH="${SFCGALPATH}/lib:${PROJPATH}/lib:${GDALPATH}/lib:${GEOSPATH}/lib:${PGPATH}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}"
+export PKG_CONFIG_PATH="${SFCGALPATH}/lib/pkgconfig:${PROJPATH}/lib/pkgconfig:${GDALPATH}/lib/pkgconfig:${GEOSPATH}/lib/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}"
+export PROJ_DATA=${PROJPATH}/share/proj
+export GDAL_DATA=${GDALPATH}/share/gdal
+
+PG_CONFIG=${PGPATH}/bin/pg_config
+GEOS_CONFIG=${GEOSPATH}/bin/geos-config
+GDAL_CONFIG=${GDALPATH}/bin/gdal-config
+SFCGAL_CONFIG=${SFCGALPATH}/bin/sfcgal-config
+
+require_executable()
+{
+ if ! test -x "$1"; then
+ echo "Required release-docs dependency is missing: $1" >&2
+ exit 1
+ fi
+}
+
+require_minimum_version()
+{
+ dependency=$1
+ actual=$2
+ minimum=$3
+ numeric_actual=$(printf '%s\n' "${actual}" | sed 's/[^0-9.].*$//')
+ if test -z "${numeric_actual}"; then
+ echo "Could not parse ${dependency} version from: ${actual}" >&2
+ exit 1
+ fi
+ if ! dpkg --compare-versions "${numeric_actual}" ge "${minimum}"; then
+ echo "${dependency} ${actual} is older than required ${minimum}" >&2
+ exit 1
+ fi
+ printf '%-12s %s (minimum %s)\n' "${dependency}:" "${actual}" "${minimum}"
+}
+
+for dependency_tool in \
+ "${PG_CONFIG}" \
+ "${GEOS_CONFIG}" \
+ "${GDAL_CONFIG}" \
+ "${PROJPATH}/bin/projinfo" \
+ "${SFCGAL_CONFIG}"
+do
+ require_executable "${dependency_tool}"
+done
+test -r "${CGALPATH}/include/CGAL/version.h" || {
+ echo "Required CGAL version header is missing under ${CGALPATH}" >&2
+ exit 1
+}
+
+pg_version=$("${PG_CONFIG}" --version | awk '{print $2}')
+geos_version=$("${GEOS_CONFIG}" --version)
+gdal_version=$("${GDAL_CONFIG}" --version)
+proj_version=$(PKG_CONFIG_PATH="${PROJPATH}/lib/pkgconfig" pkg-config --modversion proj)
+sfcgal_version=$("${SFCGAL_CONFIG}" --version)
+cgal_version=$(awk '/^#define CGAL_VERSION / { print $3; exit }' "${CGALPATH}/include/CGAL/version.h")
+
+echo "Release documentation dependency contract:"
+require_minimum_version PostgreSQL "${pg_version}" 18.4
+require_minimum_version GEOS "${geos_version}" 3.14.1
+require_minimum_version GDAL "${gdal_version}" 3.13.1
+require_minimum_version PROJ "${proj_version}" 9.8.1
+require_minimum_version SFCGAL "${sfcgal_version}" 2.3.0
+require_minimum_version CGAL "${cgal_version}" 6.2
+
+release_docs_lock=${RELEASE_DOCS_LOCK:-/tmp/postgis-release-docs.lock}
+exec 9>"${release_docs_lock}"
+if ! flock -n 9; then
+ echo "Another release documentation build holds ${release_docs_lock}" >&2
+ exit 1
+fi
LOCALIZED_HTML_JOBS=${LOCALIZED_HTML_JOBS:-$(nproc)}
case "${LOCALIZED_HTML_JOBS}" in
@@ -60,7 +137,9 @@ start_release_docs_pg()
PGUSER=$(id -un)
export PGUSER
release_docs_pgopts="-F -h '' -k ${PGHOST} -p ${PGPORT}"
- release_docs_pgopts="${release_docs_pgopts} -c synchronous_commit=off -c full_page_writes=off"
+ release_docs_pgopts="${release_docs_pgopts} -c fsync=off -c synchronous_commit=off"
+ release_docs_pgopts="${release_docs_pgopts} -c full_page_writes=off -c wal_level=minimal"
+ release_docs_pgopts="${release_docs_pgopts} -c max_wal_senders=0 -c autovacuum=off"
"${PGPATH}/bin/pg_ctl" \
-D "${release_docs_pgdata}" \
-l "${release_docs_tmpdir}/postgresql.log" \
@@ -74,16 +153,16 @@ trap cleanup_release_docs_pg EXIT
-POSTGIS_MAJOR_VERSION=`grep ^POSTGIS_MAJOR_VERSION Version.config | cut -d= -f2`
-POSTGIS_MINOR_VERSION=`grep ^POSTGIS_MINOR_VERSION Version.config | cut -d= -f2`
-POSTGIS_MICRO_VERSION=`grep ^POSTGIS_MICRO_VERSION Version.config | cut -d= -f2`
+POSTGIS_MAJOR_VERSION=$(awk -F= '$1 == "POSTGIS_MAJOR_VERSION" { print $2 }' Version.config)
+POSTGIS_MINOR_VERSION=$(awk -F= '$1 == "POSTGIS_MINOR_VERSION" { print $2 }' Version.config)
+POSTGIS_MICRO_VERSION=$(awk -F= '$1 == "POSTGIS_MICRO_VERSION" { print $2 }' Version.config)
# TODO: take base as env variable ?
-HTML_DIR=/var/www/postgis_docs/manual-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}
-STUFF_DIR=/var/www/postgis_stuff/
+HTML_DIR=${HTML_DIR:-/var/www/postgis_docs/manual-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}}
+STUFF_DIR=${STUFF_DIR:-/var/www/postgis_stuff}
-echo $PATH
+echo "$PATH"
#sh autogen.sh
@@ -94,13 +173,16 @@ fi
# --with-gdalconfig=${PROJECTS}/gdal/rel-${GDAL_VER}w${OS_BUILD}/bin/gdal-config
# --without-raster
-CPPFLAGS="-I${PGPATH}/include" \
-LDFLAGS="-L${PGPATH}/lib" ./configure \
- --with-pgconfig=${PGPATH}/bin/pg_config \
- --with-geosconfig=${PROJECTS}/geos/rel-${GEOS_VER}w${OS_BUILD}/bin/geos-config \
- --without-raster --without-protobuf \
- --htmldir ${HTML_DIR} \
- --docdir ${STUFF_DIR}
+CPPFLAGS="-I${PGPATH}/include" \
+LDFLAGS="-L${SFCGALPATH}/lib -L${PROJPATH}/lib -L${GDALPATH}/lib -L${GEOSPATH}/lib -L${PGPATH}/lib" ./configure \
+ --with-pgconfig=${PG_CONFIG} \
+ --with-geosconfig=${GEOS_CONFIG} \
+ --with-gdalconfig=${GDAL_CONFIG} \
+ --with-projdir=${PROJPATH} \
+ --with-sfcgal=${SFCGAL_CONFIG} \
+ --with-raster \
+ --htmldir "${HTML_DIR}" \
+ --docdir "${STUFF_DIR}"
make clean
# The rendered manual now builds visual examples through a temporary PostGIS
@@ -113,7 +195,8 @@ if test -f utils/repo_revision.pl; then
echo "Generating postgis_revision.h"
perl utils/repo_revision.pl
fi
-export VREV="`cat postgis_revision.h | awk '{print $3}'`"
+VREV=$(awk '{print $3}' postgis_revision.h)
+export VREV
echo "VREV is ${VREV}"
make -C regress visual-examples
cd doc
@@ -126,8 +209,9 @@ echo "Micro: $POSTGIS_MICRO_VERSION"
# TODO: provide support for an env variable to do this ?
if [[ "$POSTGIS_MICRO_VERSION" == *"dev"* ]]; then
cp postgis.xml postgis.xml.orig #we for dev will inject stuff into file, so backup original
- export GIT_TIMESTAMP=`git log -1 --pretty=format:%ct`
- export GIT_TIMESTAMP="`date -d @$GIT_TIMESTAMP`" #convert to UTC date
+ GIT_TIMESTAMP=$(git log -1 --pretty=format:%ct)
+ GIT_TIMESTAMP=$(date -d @"${GIT_TIMESTAMP}") #convert to UTC date
+ export GIT_TIMESTAMP
echo "GIT_TIMESTAMP: ${GIT_TIMESTAMP}"
export part_old="</title>"
export part_new="</title><subtitle>DEV ($GIT_TIMESTAMP rev. $VREV)</subtitle>"
@@ -140,7 +224,7 @@ make -j"${LOCALIZED_HTML_JOBS}" html-localized # TODO: do we really want this to
package="doc-html-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}.tar.gz"
tar -czf "$package" --exclude='static' --exclude='wkt' --exclude '*.o' html
-cp $package ${STUFF_DIR}
+cp "${package}" "${STUFF_DIR}"
# Install all html
make html-assets-install
@@ -154,18 +238,16 @@ make cheatsheet-install-localized
# Strip out the "postgis-" suffix
# from chunked html directories, backing
# up any previous target directory
-for f in $(
- find ${HTML_DIR} -type d \
- -maxdepth 1 -mindepth 1 \
- -name 'postgis-*'
-); do
- nf=$(echo $f| sed 's/postgis-//');
- if test -e $nf; then
- rm -rf $nf.old
- mv -v $nf $nf.old
+while IFS= read -r f; do
+ nf=${f/postgis-/}
+ if test -e "${nf}"; then
+ rm -rf -- "${nf}.old"
+ mv -v "${nf}" "${nf}.old"
fi
- mv -v $f $nf;
-done
+ mv -v "${f}" "${nf}"
+done < <(
+ find "${HTML_DIR}" -maxdepth 1 -mindepth 1 -type d -name 'postgis-*'
+)
# Build and install pdf and epub
@@ -195,10 +277,11 @@ if [[ "$POSTGIS_MICRO_VERSION" == *"dev"* ]]; then
# rename the files without the micro if it's a development branch
# to avoid proliferation of these packages
- for f in ${STUFF_DIR}/*-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}-*
+ for f in "${STUFF_DIR}"/*-"${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}"-*
do
- newname=$(echo "$f" | sed "s/\.${POSTGIS_MICRO_VERSION}//");
- mv -v $f $newname
+ test -e "${f}" || continue
+ newname=${f/.${POSTGIS_MICRO_VERSION}/}
+ mv -v "${f}" "${newname}"
done
# restore the backedup xml file
commit 3d0449195b9557ad133395b06b031828557c0e32
Author: Darafei Praliaskouski <me at komzpa.net>
Date: Sun Jul 19 17:16:03 2026 +0400
doc: restore CG_3DBuffer generated figures
diff --git a/utils/postgis_exampletest.py b/utils/postgis_exampletest.py
index 5a581b10e..e9c3b0283 100755
--- a/utils/postgis_exampletest.py
+++ b/utils/postgis_exampletest.py
@@ -58,8 +58,9 @@ FUNCTION_CAPABILITY_REQUIREMENTS = (
("geos", (3, 13, 0), re.compile(r"\bST_ClusterRelateWin\s*\(", re.I)),
("geos", (3, 14, 0), re.compile(r"\bST_CoverageClean\s*\(", re.I)),
("geos", (3, 15, 0), re.compile(r"\bST_CoverageEdges\s*\(", re.I)),
+ ("sfcgal", (2, 0, 0), re.compile(r"\bCG_3DBuffer\s*\(", re.I)),
("sfcgal", (2, 1, 0), re.compile(
- r"\bCG_(?:3DAlphaWrapping|3DBuffer|3DDifference|3DUnion|AlphaShape|"
+ r"\bCG_(?:3DAlphaWrapping|3DDifference|3DUnion|AlphaShape|"
r"ApproximateMedialAxis|ConstrainedDelaunayTriangles|"
r"ExtrudeStraightSkeleton|OptimalAlphaShape|Simplify|"
r"StraightSkeletonPartition|Volume)\s*\(",
diff --git a/utils/test_postgis_exampletest.py b/utils/test_postgis_exampletest.py
index d8271b7b1..b2a679eb5 100644
--- a/utils/test_postgis_exampletest.py
+++ b/utils/test_postgis_exampletest.py
@@ -450,6 +450,19 @@ SELECT 'POINT(1 2)', $$LINESTRING(0 0,1 1)$$,
self.assertEqual((2, 3, 0), requirements["sfcgal"])
self.assertEqual((6, 0, 0), requirements["cgal"])
+ def test_cg_3dbuffer_requires_sfcgal_2_0(self):
+ tester = ExampleTester.__new__(ExampleTester)
+
+ requirements = tester.inferred_capability_requirements(
+ "SELECT CG_3DBuffer('POINT EMPTY'::geometry, 1, 8, 0)"
+ )
+
+ self.assertEqual([{
+ "name": "sfcgal",
+ "minimum": (2, 0, 0),
+ "role": "auto-requires-sfcgal-2.0.0",
+ }], requirements)
+
def test_legacy_2d_wkt_output_compares_against_2d_projection(self):
tester = ExampleTester.__new__(ExampleTester)
query = tester.geometry_comparison_query(
-----------------------------------------------------------------------
Summary of changes:
ci/debbie/postgis_make_dist.sh | 24 +++---
ci/debbie/postgis_release_docs.sh | 161 +++++++++++++++++++++++++++++---------
doc/reference_sfcgal.xml | 8 +-
utils/postgis_exampletest.py | 43 +++++-----
utils/test_postgis_exampletest.py | 128 +++++++++++++++++++++---------
5 files changed, 254 insertions(+), 110 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list