From trac at osgeo.org Mon Nov 2 16:09:10 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 03 Nov 2026 00:09:10 -0000 Subject: [PostGIS] #5941: Support GDT_Float16 Pixel Type In-Reply-To: <049.84e741e2cf8e7d1662f253308d20e0d6@osgeo.org> References: <049.84e741e2cf8e7d1662f253308d20e0d6@osgeo.org> Message-ID: <064.3c65c0e643ad38b92d0bbf534a1ec233@osgeo.org> #5941: Support GDT_Float16 Pixel Type --------------------------+--------------------------- Reporter: pramsey | Owner: pramsey Type: enhancement | Status: reopened Priority: high | Milestone: PostGIS 3.7.1 Component: raster | Version: master Resolution: | Keywords: --------------------------+--------------------------- Changes (by robe): * milestone: PostGIS 3.7.0 => PostGIS 3.7.1 * resolution: fixed => * status: closed => reopened -- Ticket URL: 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. From trac at osgeo.org Mon Nov 2 16:10:09 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 03 Nov 2026 00:10:09 -0000 Subject: [PostGIS] #5941: Support GDT_Float16 Pixel Type In-Reply-To: <049.84e741e2cf8e7d1662f253308d20e0d6@osgeo.org> References: <049.84e741e2cf8e7d1662f253308d20e0d6@osgeo.org> Message-ID: <064.3190c2b107d4c00faf27af629ade5204@osgeo.org> #5941: Support GDT_Float16 Pixel Type --------------------------+--------------------------- Reporter: pramsey | Owner: pramsey Type: enhancement | Status: reopened Priority: high | Milestone: PostGIS 3.7.1 Component: raster | Version: master Resolution: | Keywords: --------------------------+--------------------------- Comment (by robe): This was reported on matrix/irc #postgis channel {{{ OS/Version Information: OS Ubuntu 24.04.5 Postgis version: 3.7.0 GDAL: 3.13 $: raster2pgsql RELEASE: 3.7.0 GDAL_VERSION=31303 (1fdbb1c) Issue: It looks like raster2pgsql still cannot ingest rasters with the "float16" data type. This was supposedly fixed in https://trac.osgeo.org/postgis/ticket/5941. Reproduction Steps: # Convert any Float32 or Float62 raster into float 16 using gdal_translate gdal_translate -ot float16 out.tif out2.tif Input file size is 2345, 1597 0...10...20...30...40...50...60...70...80...90...100 - done. $ raster2pgsql out2.tif Processing 1/1: out2.tif ERROR: rt_pixtype_size: Unknown pixeltype 13 ERROR: rt_raster_from_gdal_dataset: Unknown pixel type for GDAL band }}} -- Ticket URL: 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. From trac at osgeo.org Tue Nov 3 02:58:36 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 03 Nov 2026 10:58:36 -0000 Subject: [PostGIS] #6154: Missing ST_SetPoint support for Curves Message-ID: <047.d81e9df26cea7676a5c3c1941cde5d62@osgeo.org> #6154: Missing ST_SetPoint support for Curves -------------------------+--------------------------- Reporter: cymed | Owner: pramsey Type: enhancement | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: postgis | Version: 3.6.x Keywords: ST_SetPoint | -------------------------+--------------------------- ST_SetPoint currently supports replacing a point in a LINESTRING, but it does not support curved line geometries such as CIRCULARSTRING and COMPOUNDCURVE. The current workaround is typically similar to ST_ForceCurve(ST_SetPoint(ST_CurveToLine(geom),point_index,new_point)) which is not lossless Please consider extending ST_SetPoint so that it can replace any indexed point in these geometry types while preserving their curved components. -- Ticket URL: 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. From trac at osgeo.org Tue Nov 3 07:20:27 2026 From: trac at osgeo.org (PostGIS) Date: Tue, 03 Nov 2026 15:20:27 -0000 Subject: [PostGIS] #6152: ST_ShortestLine incorrect for LineString/CircularString In-Reply-To: <049.f1b4a23fa167719e59fa4eeffb948b71@osgeo.org> References: <049.f1b4a23fa167719e59fa4eeffb948b71@osgeo.org> Message-ID: <064.d2373d20dcb27d8869ade2a1fa8a2a9a@osgeo.org> #6152: ST_ShortestLine incorrect for LineString/CircularString ----------------------+--------------------------- Reporter: dbaston | Owner: pramsey Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.6.5 Component: postgis | Version: 3.6.x Resolution: | Keywords: ----------------------+--------------------------- Comment (by dbaston): Resolution in GEOS implementation, which is very similar to PostGIS: https://github.com/libgeos/geos/pull/1577 -- Ticket URL: 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. From trac at osgeo.org Wed Nov 4 06:37:19 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Nov 2026 14:37:19 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge Message-ID: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> #6155: Slow getClosestEdge -------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Keywords: | -------------------------------+--------------------------- When I run analyze I found this issue {{{ -[ RECORD 8 ]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> calls | 3396 total_ms | 2531886.37 mean_ms | 745.55 substring | SELECT edge_id,start_node,end_node,left_face,right_face,geom FROM "arstat_2026_overlay_slow_185_185".edge_data ORDER BY geom <-> $1 ASC, edge_id ASC LIMIT 1 }}} So I did a simple test with a query like this below {{{ explain analyze SELECT edge_id,start_node,end_node,left_face,right_face,geom FROM "arstat_2026_overlay_slow_185_185".edge_data ORDER BY geom <-> ST_PointOnSurface('0103000020A210000001000000050000006E784AD6CAC426408E3A076D0D6F4F406E784AD6CAC42640C06269229DA54F4082B482DAFFD22840C06269229DA54F4082B482DAFFD228408E3A076D0D6F4F406E784AD6CAC426408E3A076D0D6F4F40') ASC LIMIT 1 [more] - > ; QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=280127.65..280127.76 rows=1 width=159) (actual time=334.671..369.921 rows=1 loops=1) -> Gather Merge (cost=280127.65..368475.68 rows=757216 width=159) (actual time=332.114..367.362 rows=1 loops=1) Workers Planned: 2 Workers Launched: 2 -> Sort (cost=279127.62..280074.14 rows=378608 width=159) (actual time=305.781..305.782 rows=1 loops=3) Sort Key: ((geom <-> '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry)), edge_id Sort Method: top-N heapsort Memory: 27kB Worker 0: Sort Method: top-N heapsort Memory: 25kB Worker 1: Sort Method: top-N heapsort Memory: 26kB -> Parallel Seq Scan on edge_data (cost=0.00..277234.58 rows=378608 width=159) (actual time=2.612..240.422 rows=303150 loops=3) Planning Time: 0.165 ms JIT: Functions: 7 Options: Inlining false, Optimization false, Expressions true, Deforming true Timing: Generation 0.825 ms, Inlining 0.000 ms, Optimization 0.664 ms, Emission 9.579 ms, Total 11.069 ms Execution Time: 370.278 ms (16 rows) }}} We here that no indexes are used her. So then I tried to remove order by edge_id and then we got a speed up by 1600 times for the same query. {{{ explain analyze SELECT edge_id,start_node,end_node,left_face,right_face,geom FROM "arstat_2026_overlay_slow_185_185".edge_data ORDER BY geom <-> ST_PointOnSurface('0103000020A210000001000000050000006E784AD6CAC426408E3A076D0D6F4F406E784AD6CAC42640C06269229DA54F4082B482DAFFD22840C06269229DA54F4082B482DAFFD228408E3A076D0D6F4F406E784AD6CAC426408E3A076D0D6F4F40') ASC LIMIT 1 [more] - > ; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=0.41..1.16 rows=1 width=159) (actual time=0.196..0.197 rows=1 loops=1) -> Index Scan using edge_gist on edge_data (cost=0.41..677985.46 rows=908660 width=159) (actual time=0.195..0.195 rows=1 loops=1) Order By: (geom <-> '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry) Planning Time: 0.152 ms Execution Time: 0.220 ms (5 rows) }}} I have now tested attached patch on latest Postgis. The Postgis Topology testes are running through . When running with this patch for a topology job, the time for adding lines crossing cells borders goes down from '1 hour, 43 minutes, 37.24 seconds' to '24 minutes, 0.85 seconds' -- Ticket URL: 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. From trac at osgeo.org Wed Nov 4 06:37:34 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Nov 2026 14:37:34 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.540bec4bc38fef32308cf679d59ff4d0@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: | Keywords: --------------------------------+--------------------------- Changes (by Lars Aksel Opsahl): * Attachment "0001-Removed-ORDER-BY-edge_id-speeding-up-the-query-by- se.patch" added. patch -- Ticket URL: 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. From trac at osgeo.org Wed Nov 4 07:33:21 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Nov 2026 15:33:21 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.30931ba2a6e80c95a0e553ce608c70eb@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: | Keywords: --------------------------------+--------------------------- Description changed by Lars Aksel Opsahl: Old description: > When I run analyze I found this issue > > {{{ > -[ RECORD 8 > ]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> > calls | 3396 > total_ms | 2531886.37 > mean_ms | 745.55 > substring | SELECT edge_id,start_node,end_node,left_face,right_face,geom > FROM "arstat_2026_overlay_slow_185_185".edge_data ORDER BY geom <-> $1 > ASC, edge_id ASC LIMIT 1 > > }}} > > So I did a simple test with a query like this below > > {{{ > explain analyze SELECT > edge_id,start_node,end_node,left_face,right_face,geom > FROM "arstat_2026_overlay_slow_185_185".edge_data > ORDER BY geom <-> > ST_PointOnSurface('0103000020A210000001000000050000006E784AD6CAC426408E3A076D0D6F4F406E784AD6CAC42640C06269229DA54F4082B482DAFFD22840C06269229DA54F4082B482DAFFD228408E3A076D0D6F4F406E784AD6CAC426408E3A076D0D6F4F40') > ASC LIMIT 1 > [more] - > ; > QUERY > PLAN > ------------------------------------------------------------------------------------------------------------------------------------------------- > Limit (cost=280127.65..280127.76 rows=1 width=159) (actual > time=334.671..369.921 rows=1 loops=1) > -> Gather Merge (cost=280127.65..368475.68 rows=757216 width=159) > (actual time=332.114..367.362 rows=1 loops=1) > Workers Planned: 2 > Workers Launched: 2 > -> Sort (cost=279127.62..280074.14 rows=378608 width=159) > (actual time=305.781..305.782 rows=1 loops=3) > Sort Key: ((geom <-> > '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry)), edge_id > Sort Method: top-N heapsort Memory: 27kB > Worker 0: Sort Method: top-N heapsort Memory: 25kB > Worker 1: Sort Method: top-N heapsort Memory: 26kB > -> Parallel Seq Scan on edge_data (cost=0.00..277234.58 > rows=378608 width=159) (actual time=2.612..240.422 rows=303150 loops=3) > Planning Time: 0.165 ms > JIT: > Functions: 7 > Options: Inlining false, Optimization false, Expressions true, > Deforming true > Timing: Generation 0.825 ms, Inlining 0.000 ms, Optimization 0.664 ms, > Emission 9.579 ms, Total 11.069 ms > Execution Time: 370.278 ms > (16 rows) > > }}} > > We here that no indexes are used her. So then I tried to remove order by > edge_id and then we got a speed up by 1600 times for the same query. > > {{{ > explain analyze SELECT > edge_id,start_node,end_node,left_face,right_face,geom > FROM "arstat_2026_overlay_slow_185_185".edge_data > ORDER BY geom <-> > ST_PointOnSurface('0103000020A210000001000000050000006E784AD6CAC426408E3A076D0D6F4F406E784AD6CAC42640C06269229DA54F4082B482DAFFD22840C06269229DA54F4082B482DAFFD228408E3A076D0D6F4F406E784AD6CAC426408E3A076D0D6F4F40') > ASC LIMIT 1 > [more] - > ; > QUERY PLAN > --------------------------------------------------------------------------------------------------------------------------------------- > Limit (cost=0.41..1.16 rows=1 width=159) (actual time=0.196..0.197 > rows=1 loops=1) > -> Index Scan using edge_gist on edge_data (cost=0.41..677985.46 > rows=908660 width=159) (actual time=0.195..0.195 rows=1 loops=1) > Order By: (geom <-> > '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry) > Planning Time: 0.152 ms > Execution Time: 0.220 ms > (5 rows) > > }}} > > I have now tested attached patch on latest Postgis. The Postgis Topology > testes are running through . > > When running with this patch for a topology job, the time for adding > lines crossing cells borders goes down from '1 hour, 43 minutes, 37.24 > seconds' to '24 minutes, 0.85 seconds' New description: When I run analyze I found this issue {{{ -[ RECORD 8 ]--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> calls | 3396 total_ms | 2531886.37 mean_ms | 745.55 substring | SELECT edge_id,start_node,end_node,left_face,right_face,geom FROM "arstat_2026_overlay_slow_185_185".edge_data ORDER BY geom <-> $1 ASC, edge_id ASC LIMIT 1 }}} So I did a simple test with a query like this below {{{ explain analyze SELECT edge_id,start_node,end_node,left_face,right_face,geom FROM "arstat_2026_overlay_slow_185_185".edge_data ORDER BY geom <-> ST_PointOnSurface('0103000020A210000001000000050000006E784AD6CAC426408E3A076D0D6F4F406E784AD6CAC42640C06269229DA54F4082B482DAFFD22840C06269229DA54F4082B482DAFFD228408E3A076D0D6F4F406E784AD6CAC426408E3A076D0D6F4F40') ASC, edge_id ASC LIMIT 1 QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=280127.65..280127.76 rows=1 width=159) (actual time=334.671..369.921 rows=1 loops=1) -> Gather Merge (cost=280127.65..368475.68 rows=757216 width=159) (actual time=332.114..367.362 rows=1 loops=1) Workers Planned: 2 Workers Launched: 2 -> Sort (cost=279127.62..280074.14 rows=378608 width=159) (actual time=305.781..305.782 rows=1 loops=3) Sort Key: ((geom <-> '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry)), edge_id Sort Method: top-N heapsort Memory: 27kB Worker 0: Sort Method: top-N heapsort Memory: 25kB Worker 1: Sort Method: top-N heapsort Memory: 26kB -> Parallel Seq Scan on edge_data (cost=0.00..277234.58 rows=378608 width=159) (actual time=2.612..240.422 rows=303150 loops=3) Planning Time: 0.165 ms JIT: Functions: 7 Options: Inlining false, Optimization false, Expressions true, Deforming true Timing: Generation 0.825 ms, Inlining 0.000 ms, Optimization 0.664 ms, Emission 9.579 ms, Total 11.069 ms Execution Time: 370.278 ms (16 rows) }}} We here that no indexes are used her. So then I tried to remove order by edge_id and then we got a speed up by 1600 times for the same query. {{{ explain analyze SELECT edge_id,start_node,end_node,left_face,right_face,geom FROM "arstat_2026_overlay_slow_185_185".edge_data ORDER BY geom <-> ST_PointOnSurface('0103000020A210000001000000050000006E784AD6CAC426408E3A076D0D6F4F406E784AD6CAC42640C06269229DA54F4082B482DAFFD22840C06269229DA54F4082B482DAFFD228408E3A076D0D6F4F406E784AD6CAC426408E3A076D0D6F4F40') ASC LIMIT 1 [more] - > ; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=0.41..1.16 rows=1 width=159) (actual time=0.196..0.197 rows=1 loops=1) -> Index Scan using edge_gist on edge_data (cost=0.41..677985.46 rows=908660 width=159) (actual time=0.195..0.195 rows=1 loops=1) Order By: (geom <-> '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry) Planning Time: 0.152 ms Execution Time: 0.220 ms (5 rows) }}} I have now tested attached patch on latest Postgis. The Postgis Topology testes are running through . When running with this patch for a topology job, the time for adding lines crossing cells borders goes down from '1 hour, 43 minutes, 37.24 seconds' to '24 minutes, 0.85 seconds' -- -- Ticket URL: 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. From trac at osgeo.org Wed Nov 4 07:37:15 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Nov 2026 15:37:15 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.23f7acee1d775e77bc08338a2c78adb4@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: | Keywords: --------------------------------+--------------------------- Comment (by Lars Aksel Opsahl): Tested on {{{ POSTGIS="3.8.0dev 3.7.0rc3-7-g358ee9659" [EXTENSION] PGSQL="160" GEOS="3.16.0dev-CAPI-1.22.0" (compiled against GEOS 3.15.0) PROJ="8.2.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db" (compiled against PROJ 8.2.1) LIBXML="2.9.13" LIBJSON="0.15" LIBPROTOBUF="1.3.3" WAGYU="0.5.0 (Internal)" TOPOLOGY PostgreSQL 16.13 (Ubuntu 16.13-1.pgdg22.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0, 64-bit }}} -- Ticket URL: 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. From trac at osgeo.org Wed Nov 4 08:04:16 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Nov 2026 16:04:16 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.0b735312bc2c15e8211c9ab510bd9e97@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: | Keywords: --------------------------------+--------------------------- Comment (by strk): The patch is fine, we don't need the edge_id sort if not for predictability of results in case of equidistant edges (mostly for testcases). When I try locally (PostgreSQL 17.11) I don't get a Gather Merge but this: {{{ Limit (cost=1.29..2.46 rows=1 width=12) -> Incremental Sort (cost=1.29..4869.27 rows=4150 width=12) Sort Key: ((edge_data.geom <-> '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry)), edge_data.edge_id Presorted Key: ((edge_data.geom <-> '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry)) -> Index Scan using edge_gist on edge_data (cost=0.15..4682.52 rows=4150 width=12) Order By: (geom <-> '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry) }}} Why that Gather Merge expects over 750k rows while only getting 1 instead I dunno. Did you run analyze before that query ? What version of PostgreSQL are you running this on ? -- Ticket URL: 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. From trac at osgeo.org Wed Nov 4 08:19:06 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Nov 2026 16:19:06 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.70d44298886e2fc7db472874e8debcbe@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: | Keywords: --------------------------------+--------------------------- Comment (by Lars Aksel Opsahl): Yes, I do run analyze -- Ticket URL: 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. From trac at osgeo.org Wed Nov 4 08:21:08 2026 From: trac at osgeo.org (PostGIS) Date: Wed, 04 Nov 2026 16:21:08 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.b7ba19c8c8b96fcb3cc40d558db03587@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: | Keywords: --------------------------------+--------------------------- Comment (by Lars Aksel Opsahl): This from from ?@GrayShade work very well {{{ explain analyze SELECT * FROM ( SELECT edge_id, geom FROM "arstat_2026_overlay_slow_185_185".edge_data ORDER BY geom <-> ST_PointOnSurface('0103000020A210000001000000050000006E784AD6CAC426408E3A076D0D6F4F406E784AD6CAC42640C06269229DA54F4082B482DAFFD22840C06269229DA54F4082B482DAFFD228408E3A076D0D6F4F406E784AD6CAC426408E3A076D0D6F4F40') ASC FETCH FIRST 1 ROW WITH TIES ) AS nearest ORDER BY edge_id LIMIT 1; QUERY PLAN --------------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=1.19..1.20 rows=1 width=134) (actual time=0.272..0.273 rows=1 loops=1) -> Sort (cost=1.19..1.20 rows=1 width=134) (actual time=0.271..0.272 rows=1 loops=1) Sort Key: nearest.edge_id Sort Method: quicksort Memory: 26kB -> Subquery Scan on nearest (cost=0.41..1.18 rows=1 width=134) (actual time=0.255..0.267 rows=1 loops=1) -> Limit (cost=0.41..1.17 rows=1 width=142) (actual time=0.255..0.266 rows=1 loops=1) -> Index Scan using edge_gist on edge_data (cost=0.41..693101.85 rows=907361 width=142) (actual time=0.254..0.264 rows=2 loops=1) Order By: (geom <-> '0101000020A210000078966658E5CB2740A74EB847558A4F40'::geometry) Planning Time: 0.148 ms Execution Time: 0.330 ms (10 rows) }}} -- Ticket URL: 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. From git at osgeo.org Wed Nov 4 10:27:09 2026 From: git at osgeo.org (git at osgeo.org) Date: Wed, 4 Nov 2026 10:27:09 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.7.0rc3-8-g625d3e521 Message-ID: <20261104182709.2F56D147960@trac.osgeo.org> 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 625d3e52118717383edff7b3b94026e706ae4e98 (commit) from 358ee965988ba72ecd47601205c99b9e91cc037e (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 ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: topology/postgis_topology.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Wed Nov 4 20:25:13 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Nov 2026 04:25:13 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.a0f181d50c28f619af9213bc41b03602@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: | Keywords: --------------------------------+--------------------------- Comment (by Lars Aksel Opsahl): Fixed in https://gitea.osgeo.org/postgis/postgis/pulls/810 -- Ticket URL: 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. From trac at osgeo.org Thu Nov 5 02:07:10 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Nov 2026 10:07:10 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.ecf852cc10c13e12f1eacce6e1247025@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: lnicola Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: | Keywords: --------------------------------+--------------------------- Changes (by lnicola): * owner: strk => lnicola -- Ticket URL: 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. From trac at osgeo.org Thu Nov 5 02:07:17 2026 From: trac at osgeo.org (PostGIS) Date: Thu, 05 Nov 2026 10:07:17 -0000 Subject: [PostGIS] #6155: Slow getClosestEdge In-Reply-To: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> References: <050.6d00023c6e8629d20ebf6fadcccc254e@osgeo.org> Message-ID: <065.4680470db27db706910094b2223ed8d8@osgeo.org> #6155: Slow getClosestEdge --------------------------------+--------------------------- Reporter: Lars Aksel Opsahl | Owner: lnicola Type: defect | Status: closed Priority: medium | Milestone: PostGIS 3.7.1 Component: topology | Version: 3.6.x Resolution: fixed | Keywords: --------------------------------+--------------------------- Changes (by lnicola): * resolution: => fixed * status: new => closed -- Ticket URL: 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. From git at osgeo.org Thu Nov 5 06:28:43 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 5 Nov 2026 06:28:43 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.7.0rc3-9-ge55a99bab Message-ID: <20261105142843.520801A4061@trac.osgeo.org> 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 e55a99babec9ebca6048974840cc5fce979ef14c (commit) from 625d3e52118717383edff7b3b94026e706ae4e98 (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 e55a99babec9ebca6048974840cc5fce979ef14c Author: Regina Obe Date: Thu Nov 5 09:27:24 2026 -0500 Don't run contributor credits check on pull requests We may not always accept a pull request and it gives false errors when the pull request author doesn't add their name diff --git a/.woodpecker/contributor-credits.yml b/.woodpecker/contributor-credits.yml index 486fe394f..78d677101 100644 --- a/.woodpecker/contributor-credits.yml +++ b/.woodpecker/contributor-credits.yml @@ -1,7 +1,7 @@ labels: platform: linux/amd64 when: - event: [push, pull_request, tag] + event: [push, tag] clone: - name: git ----------------------------------------------------------------------- Summary of changes: .woodpecker/contributor-credits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- PostGIS From git at osgeo.org Thu Nov 5 06:30:23 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 5 Nov 2026 06:30:23 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.7 updated. 3.7.0-2-g814dca10b Message-ID: <20261105143023.C6C341A4460@trac.osgeo.org> 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, stable-3.7 has been updated via 814dca10b883ef3f9072ac18821aec1ed976ef5a (commit) from bff848d30590073a40b7a7443b1f2dad24cc2dbc (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 814dca10b883ef3f9072ac18821aec1ed976ef5a Author: Regina Obe Date: Thu Nov 5 09:27:24 2026 -0500 Don't run contributor credits check on pull requests We may not always accept a pull request and it gives false errors when the pull request author doesn't add their name diff --git a/.woodpecker/contributor-credits.yml b/.woodpecker/contributor-credits.yml index 486fe394f..78d677101 100644 --- a/.woodpecker/contributor-credits.yml +++ b/.woodpecker/contributor-credits.yml @@ -1,7 +1,7 @@ labels: platform: linux/amd64 when: - event: [push, pull_request, tag] + event: [push, tag] clone: - name: git ----------------------------------------------------------------------- Summary of changes: .woodpecker/contributor-credits.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- PostGIS From git at osgeo.org Tue Nov 10 01:26:34 2026 From: git at osgeo.org (git at osgeo.org) Date: Tue, 10 Nov 2026 01:26:34 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.7.0rc3-11-gc87677a62 Message-ID: <20261110092635.03A8D13A19A@trac.osgeo.org> 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 c87677a620f814978f9eb3dced943c2b1241d149 (commit) via 75d0d3d44cf85d8b02a40f5d326e173a47a1547b (commit) from e55a99babec9ebca6048974840cc5fce979ef14c (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 c87677a620f814978f9eb3dced943c2b1241d149 Author: Regina Obe Date: Tue Nov 10 04:18:21 2026 -0500 No longer supporting 32-bit debian since debian dropped support for 32-bit - Remove berrie (which was our 32-bit tester from ci matrix) - Remove from ci-images-runners.md - Change test_ci_status.py template to not use hard-code berrie instead prefer generic term syntethic worker for the template name diff --git a/doc/development/testing/ci-images-runners.md b/doc/development/testing/ci-images-runners.md index 1dc0a577f..faaa6ed31 100644 --- a/doc/development/testing/ci-images-runners.md +++ b/doc/development/testing/ci-images-runners.md @@ -39,7 +39,7 @@ without identifying a source defect. | -------------- | ----- | -------------- | | Woodie agents | , branch `woodie-3` | OSGeo Woodpecker agent startup scripts and deployment notes | | Jenkins buildbot hosts | | Linux, Debian, FreeBSD, Raspberry Pi, and Windows worker setup notes | -| In-tree Jenkins scripts | `ci/debbie/`, `ci/winnie/`, `ci/bessie/`, `ci/berrie*` | Commands run by PostGIS Jenkins jobs and worker labels | +| In-tree Jenkins scripts | `ci/debbie/`, `ci/winnie/`, `ci/bessie/`, `ci/berrie64/` | Commands run by PostGIS Jenkins jobs and worker labels | Woodpecker pull-request jobs run on Woodie agents. Agent capacity, Docker socket access, `binfmt_misc` handlers, DNS, and registry access are runner @@ -51,8 +51,7 @@ Jenkins worker setup lives outside this repository in `postgis/postgis-buildbots`. That repository still contains historical setup notes as well as active worker notes, so use the maintained inventory in `utils/docs/ci_status/config.json` and the live Jenkins job labels before -reviving an old platform. Current 32-bit coverage is the Berrie Raspberry Pi -worker, which is 32-bit ARM. The old `bessie32` FreeBSD worker is not part of +reviving an old platform. The old `bessie32` FreeBSD worker is not part of the maintained CI inventory; do not rebuild 32-bit FreeBSD coverage from the old badge table without fresh maintainer approval and a live worker readback. @@ -65,8 +64,7 @@ Use the owning workflow or worker label for architecture claims: cover the branches where those files exist. * Woodpecker jobs currently declare `platform: linux/amd64` unless the workflow says otherwise. -* Jenkins `berrie` is the maintained 32-bit ARM surface, and `berrie64` is the - Raspberry Pi 64-bit surface. +* Jenkins `berrie64` is the Raspberry Pi 64-bit surface. * Jenkins `bessie` is the maintained FreeBSD surface; `bessie32` is retired from the maintained inventory. diff --git a/doc/development/testing/ci.md b/doc/development/testing/ci.md index 95e6ac98b..5f6142987 100644 --- a/doc/development/testing/ci.md +++ b/doc/development/testing/ci.md @@ -29,7 +29,7 @@ service that owns the behavior: | Woodpecker pull-request and branch pipelines | `.woodpecker/*.yml`, with pipeline status published by Woodie at | | Debbie build, docs, and release jobs | `ci/debbie/`, the Debbie Jenkins jobs, and release-process notes | | Winnie Windows jobs | `ci/winnie/` and the Winnie Jenkins jobs | -| Bessie and Berrie/Berrie64 jobs | `ci/bessie/`, `ci/berrie*`, and the corresponding Jenkins worker labels | +| Bessie and Berrie64 jobs | `ci/bessie/`, `ci/berrie64/`, and the corresponding Jenkins worker labels | | Docker build images used by GitHub Actions | `postgis/postgis-build-env` image tags referenced from `.github/workflows/ci.yml` | | Docker build images used by Woodpecker | `repo.osgeo.org/postgis/build-test:*` image tags referenced from `.woodpecker/*.yml` | | Woodpecker MinGW Wine job | `.woodpecker/mingw-wine.yml` and `ci/woodie/postgis_mingw_wine.sh` | @@ -95,7 +95,7 @@ only overlap part of its defect class. | Debbie Linux regression classes | Jenkins Debbie and Woodpecker | Mostly covered by Woodpecker's Linux regression and expensive QA workflows. Debbie still remains useful for its exact Jenkins host, dependency, and release-job environment. | | Make Dist | Jenkins Debbie | In flight in . Until that lands, Woodpecker does not check source distribution tarballs. | | FreeBSD and Bessie | GitHub Actions FreeBSD and Jenkins Bessie | In flight in . YAML running on a Linux container is not FreeBSD parity; this needs a FreeBSD VM or agent surface. | -| 32-bit ARM and extra portability tiers | Jenkins Berrie | Covered by `.woodpecker/portability.yml` from , with hostile type-default coverage proposed in . Plain armhf emulation is useful for pointer-width and alignment assumptions, but the valuable tier is the hostile configuration with explicit type, signedness, alignment, and sanitizer probes. | +| 32-bit ARM and extra portability tiers | Woodpecker portability | Covered by `.woodpecker/portability.yml` from , with hostile type-default coverage proposed in . Plain armhf emulation is useful for pointer-width and alignment assumptions, but the valuable tier is the hostile configuration with explicit type, signedness, alignment, and sanitizer probes. | | 64-bit ARM | Jenkins Berrie64 | Partly covered by the `arm64-berrie64-qemu` child in `.woodpecker/portability.yml` on amd64 agents through QEMU arm64 emulation. This is build, ABI, CUnit, install, and focused regression coverage, not Berrie64 parity. | | CodeQL | GitHub Actions | In flight as Woodpecker configuration carried separately. Woodpecker can build a CodeQL database and produce SARIF, but GitHub remains authoritative for code-scanning upload, annotations, and alert management unless Woodie artifact retention and SARIF consumption are also configured. | | macOS | GitHub Actions macOS | Not coverable by Woodpecker YAML on Linux. See [macOS coverage options](macos-coverage-options.md) for the actual choices, costs, licensing boundary, and current recommendation. | @@ -162,7 +162,7 @@ Darwin coverage. Treat 32-bit and 64-bit ARM as separate defect classes. The 32-bit lane is most useful when it is hostile: explicit `char` signedness, enum-width, alignment, -and sanitizer settings catch assumptions that amd64 and a plain Berrie rerun do +and sanitizer settings catch assumptions that amd64 and a plain 32-bit rerun do not falsify. The 64-bit lane should be native. Berrie64's value is 64-bit ARM execution plus diff --git a/utils/docs/ci_status/config.json b/utils/docs/ci_status/config.json index 9d4713c3f..6804c5f9d 100644 --- a/utils/docs/ci_status/config.json +++ b/utils/docs/ci_status/config.json @@ -153,13 +153,6 @@ "job_url": "https://debbie.postgis.net/view/PostGIS/job/PostGIS_Worker_Run/label=bessie/", "branch_parameter": "reference" }, - { - "name": "Jenkins / Berrie", - "provider": "jenkins", - "required": true, - "job_url": "https://debbie.postgis.net/view/PostGIS/job/PostGIS_Worker_Run/label=berrie/", - "branch_parameter": "reference" - }, { "name": "Jenkins / Berrie64", "provider": "jenkins", diff --git a/utils/docs/tests/test_ci_status.py b/utils/docs/tests/test_ci_status.py index 4469dbb6f..f2b78ecda 100644 --- a/utils/docs/tests/test_ci_status.py +++ b/utils/docs/tests/test_ci_status.py @@ -959,10 +959,10 @@ class CIStatusTest(unittest.TestCase): def test_jenkins_queue_prefers_current_branch_revision(self): check_config = { - "name": "Jenkins / Berrie", + "name": "Jenkins / Synthetic worker", "provider": "jenkins", "required": True, - "job_url": "https://ci.example.test/job/PostGIS_Worker_Run/label=berrie/", + "job_url": "https://ci.example.test/job/PostGIS_Worker_Run/label=synthetic/", "branch_parameter": "reference", } branch = { @@ -1004,7 +1004,7 @@ class CIStatusTest(unittest.TestCase): result = CI_STATUS.jenkins_queued_check( check_config, branch, - "https://ci.example.test/job/PostGIS_Worker_Run/label=berrie/", + "https://ci.example.test/job/PostGIS_Worker_Run/label=synthetic/", timeout=5, ) commit 75d0d3d44cf85d8b02a40f5d326e173a47a1547b Author: Regina Obe Date: Tue Nov 10 04:17:47 2026 -0500 Fix copy paste error in dev version diff --git a/doc/development/compatibility/data/matrix.json b/doc/development/compatibility/data/matrix.json index c1c9fc83d..06dcc50f7 100644 --- a/doc/development/compatibility/data/matrix.json +++ b/doc/development/compatibility/data/matrix.json @@ -867,7 +867,7 @@ { "minor": "3.8", "branch": "master", - "latest": "3.7.0dev", + "latest": "3.8.0dev", "status": "supported", "release_stage": "development", "first_release_date": "2026-10-30", ----------------------------------------------------------------------- Summary of changes: doc/development/compatibility/data/matrix.json | 2 +- doc/development/testing/ci-images-runners.md | 8 +++----- doc/development/testing/ci.md | 6 +++--- utils/docs/ci_status/config.json | 7 ------- utils/docs/tests/test_ci_status.py | 6 +++--- 5 files changed, 10 insertions(+), 19 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Thu Nov 12 01:26:43 2026 From: git at osgeo.org (git at osgeo.org) Date: Thu, 12 Nov 2026 01:26:43 -0800 (PST) Subject: [SCM] postgis.net branch website updated. clarity-final-266-g346670d Message-ID: <20261112092643.88A401C3BD7@trac.osgeo.org> 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.net". The branch, website has been updated via 346670dab4ec5feac981b4c0ba0ecf3f00a4597b (commit) from c1e2f541f13b3c5d857f983ce5896399eb29d303 (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 346670dab4ec5feac981b4c0ba0ecf3f00a4597b Author: Regina Obe Date: Thu Nov 12 04:26:28 2026 -0500 Announce release of PostGIS Bundle for windows 3.7.0 diff --git a/content/documentation/getting_started/install_windows/released_versions.md b/content/documentation/getting_started/install_windows/released_versions.md index 00ed37e..d1e4cba 100644 --- a/content/documentation/getting_started/install_windows/released_versions.md +++ b/content/documentation/getting_started/install_windows/released_versions.md @@ -1,33 +1,32 @@ --- title: Latest Released Version -date: 2026-03-16 +date: 2026-11-12 weight: 10 geekdocHidden: true geekdocHiddenTocTree: false --- -PostGIS 3.6.2 was released Feb 6th, 2026. Windows PostGIS Bundle 3.6.2 installers for PostgreSQL 14-18 was released Mar 16th, 2026. +PostGIS 3.7.0 was released Oct 30th, 2026. Windows PostGIS Bundle 3.7.0 installers for PostgreSQL 18-19 was released Nov 11th, 2026. +Installers for 15-17 are on the way -Binaries for versions of PostgreSQL 13-18 (64-bit) available in `Unreleased PostGIS Versions` and [OSGeo downloads][5]). Installers for 14-18(64-bit) available on [OSGeo downloads][5] and application stackbuilder. +Binaries for versions of PostgreSQL 14-19 (64-bit) available in `Unreleased PostGIS Versions`. Installers for 18-19(64-bit) available on [OSGeo downloads][5] and application stackbuilder. -Note: This is the first release that includes pgSphere +PostGIS 3.7.0 bundle includes: -PostGIS 3.6.2 bundle includes: - - * PostGIS 3.6.2 with MVT support, with raster, [GEOS](https://libgeos.org/posts/2025-08-21-geos-3-14-released/) 3.14.1, [PROJ](https://proj.org/download.html#past-releases) 8.2.1, [SFCGAL](http://sfcgal.org) support (2.2.0), address_standardizer, topology + * PostGIS 3.7.0 with MVT support, with raster, [GEOS](https://github.com/libgeos/geos/blob/3.15.0/NEWS.md) 3.15.0, [PROJ](https://proj.org/download.html#past-releases) 9.8.1, [SFCGAL](http://sfcgal.org) support (2.2.0), address_standardizer, topology * PostGIS Tiger geocoder extension - Tiger 2025 - * pgRouting 4.0 [pgRouting 4.0.1](https://docs.pgrouting.org/4.0/en/index.html) + * pgRouting 4.0 [pgRouting 4.0.2](https://docs.pgrouting.org/4.0/en/index.html) * Commandline raster loader (raster2pgsql), shapefile import/export (shp2pgsql,pgsql2shp) * Commandline [osm2pgrouting 3.0.0](https://github.com/pgRouting/osm2pgrouting/tree/v3.0.0) for loading data from .osm files into pgRouting routable format * [ogrfdw 1.1.7](https://github.com/pramsey/pgsql-ogr-fdw/releases/tag/v1.1.7) - spatial foreign data wrapper for reading both spatial (spatial columns become postgis geometry) and non-spatial data. [IMPORT FOREIGN SCHEMA](http://www.postgresonline.com/journal/archives/359-Import-Foreign-Schema-for-ogr_fdw-for-PostgreSQL-9.5.html) support - * [GDAL 3.9.2](https://gdal.org/download.html#current-releases) with OpenJPEG 2.5.20 (JPEG 2000), ODBC, Curl, SQLite3 (for GeoPackage and OSM support), excel (XLS) (via FreeXL 1.0.6), libreoffice, XLSX spreadsheet (via expat), Arrow 13.0 for Arrow, Parquet, and GeoParquet support (used by both PostGIS raster and ogrfdw) + * [GDAL 3.13.1](https://gdal.org/download.html#current-releases) with OpenJPEG 2.5.20 (JPEG 2000), ODBC, Curl, SQLite3 (for GeoPackage and OSM support), excel (XLS) (via FreeXL 1.0.6), libreoffice, XLSX spreadsheet (via expat), Arrow 13.0 for Arrow, Parquet, and GeoParquet support (used by both PostGIS raster and ogrfdw) * [pgpointcloud](https://github.com/pgpointcloud/pointcloud) 1.2.5 for querying LIDAR point cloud and in/out functions to convert to PostGIS geometry - * [h3-pg](https://github.com/zachasme/h3-pg) 4.1.4 + * [h3-pg](https://github.com/postgis/h3-pg) 4.5.0 for using Uber h3 api and converting h3 index representations to postgis geometry/geography/raster (raster support is new in this release). - * [MobilityDB](https://mobilitydb.com) [v1.3.0rc1](https://github.com/MobilityDB/MobilityDB/releases/tag/v1.3.0rc1) + * [MobilityDB](https://mobilitydb.com) [v1.3.0](https://github.com/MobilityDB/MobilityDB/releases/tag/v1.3.0) for managing trajectories. Includes many temporal spatial and non-spatial types and functions and operators for them. Refer to [Enabling PostGIS Extensions: MobilityDb](../enabling_postgis/#mobilitydb) for guidance. * [pgSphere](https://github.com/postgrespro/pgsphere)[1.5.2](https://github.com/postgrespro/pgsphere/releases/tag/1.5.2) for spherical geometries. (NEW in this release) ----------------------------------------------------------------------- Summary of changes: .../install_windows/released_versions.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) hooks/post-receive -- postgis.net From trac at osgeo.org Fri Nov 13 06:10:50 2026 From: trac at osgeo.org (PostGIS) Date: Fri, 13 Nov 2026 14:10:50 -0000 Subject: [PostGIS] #6154: Missing ST_SetPoint support for Curves In-Reply-To: <047.d81e9df26cea7676a5c3c1941cde5d62@osgeo.org> References: <047.d81e9df26cea7676a5c3c1941cde5d62@osgeo.org> Message-ID: <062.a51be50fc08023f615eac87a8a75aeca@osgeo.org> #6154: Missing ST_SetPoint support for Curves --------------------------+--------------------------- Reporter: cymed | Owner: pramsey Type: enhancement | Status: new Priority: medium | Milestone: PostGIS 3.8.0 Component: postgis | Version: 3.6.x Resolution: | Keywords: ST_SetPoint --------------------------+--------------------------- Changes (by robe): * milestone: PostGIS 3.7.1 => PostGIS 3.8.0 -- Ticket URL: 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. From git at osgeo.org Sat Nov 14 02:16:59 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 14 Nov 2026 02:16:59 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.7.0rc3-14-gd6ec8333c Message-ID: <20261114101659.AB2B319A0C7@trac.osgeo.org> 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 d6ec8333c914a8bbd9aa44d03e43beae23c052d7 (commit) via d4fde9a32150658a01e3c5f1ad4429c2ab0ae16e (commit) via 2bc7c7d3051225d5f6963659797ba6b4e6d514e9 (commit) from c87677a620f814978f9eb3dced943c2b1241d149 (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 d6ec8333c914a8bbd9aa44d03e43beae23c052d7 Merge: c87677a62 d4fde9a32 Author: Darafei Praliaskouski Date: Sat Nov 14 13:08:57 2026 +0400 Remove pointer addresses from error and notice messages Preserve Andrew Kroh's contribution and credit it in NEWS. Closes https://gitea.osgeo.org/postgis/postgis/pulls/811 diff --cc NEWS index b9ed897d6,b9ed897d6..26b8eb3eb --- a/NEWS +++ b/NEWS @@@ -1,3 -1,3 +1,12 @@@ ++PostGIS 3.8.0dev ++2026/xx/xx ++ ++* Enhancements * ++ ++ - GT-811, Remove pointer addresses from error and notice messages ++ (Andrew Kroh) ++ ++ PostGIS 3.7.0rc3 2026/10/20 commit d4fde9a32150658a01e3c5f1ad4429c2ab0ae16e Author: Andrew Kroh Date: Fri Nov 13 11:30:25 2026 -0500 Add Andrew Kroh to the contributor credits diff --git a/doc/credits.xml b/doc/credits.xml index 70e15cebc..120923a38 100644 --- a/doc/credits.xml +++ b/doc/credits.xml @@ -265,6 +265,7 @@ Andreas Schild Andrew Gierth Andrew Harvey + Andrew Kroh Anne Ghisla Antoine Bajolet Ariel Mashraki commit 2bc7c7d3051225d5f6963659797ba6b4e6d514e9 Author: Andrew Kroh Date: Fri Nov 13 11:30:25 2026 -0500 Remove pointer values from error and notice messages Some lwerror(), lwnotice(), and elog(ERROR) messages in liblwgeom, libpgcommon, and postgis print a pointer value with %p. The value is different in each process, and a reader of the message cannot use it without a debugger. Remove the pointer values from the message text. The other words of each message do not change. Messages at DEBUG level keep their pointer values. diff --git a/liblwgeom/lwcollection.c b/liblwgeom/lwcollection.c index 1c2db7cfe..11073682c 100644 --- a/liblwgeom/lwcollection.c +++ b/liblwgeom/lwcollection.c @@ -221,7 +221,7 @@ LWCOLLECTION* lwcollection_add_lwgeom(LWCOLLECTION *col, const LWGEOM *geom) { if (col->geoms[i] == geom) { - lwerror("%s [%d] found duplicate geometry in collection %p == %p", __FILE__, __LINE__, col->geoms[i], geom); + lwerror("%s [%d] found duplicate geometry in collection", __FILE__, __LINE__); return col; } } diff --git a/liblwgeom/lwgeom.c b/liblwgeom/lwgeom.c index 4d3b272b1..b9ba2be8e 100644 --- a/liblwgeom/lwgeom.c +++ b/liblwgeom/lwgeom.c @@ -731,7 +731,7 @@ lwgeom_to_ewkt(const LWGEOM *lwgeom) if ( ! wkt ) { - lwerror("Error writing geom %p to WKT", (void *)lwgeom); + lwerror("Error writing geometry to WKT"); } return wkt; diff --git a/liblwgeom/lwgeom_wrapx.c b/liblwgeom/lwgeom_wrapx.c index 9ebeda8dc..c6cbe89f8 100644 --- a/liblwgeom/lwgeom_wrapx.c +++ b/liblwgeom/lwgeom_wrapx.c @@ -142,7 +142,7 @@ lwcollection_wrapx(const LWCOLLECTION* lwcoll_in, double cutx, double amount) lwnotice("Error wrapping geometry, cleaning up"); for (j = 0; j < i; j++) { - lwnotice("cleaning geometry %d (%p)", j, (void *) wrap_geoms[j]); + lwnotice("cleaning geometry %d", j); lwgeom_free(wrap_geoms[j]); } lwfree(wrap_geoms); diff --git a/liblwgeom/lwin_twkb.c b/liblwgeom/lwin_twkb.c index dc5ebd6ec..7bab5437e 100644 --- a/liblwgeom/lwin_twkb.c +++ b/liblwgeom/lwin_twkb.c @@ -441,7 +441,7 @@ static LWCOLLECTION* lwmultipoint_from_twkb_state(twkb_parse_state *s) geom = lwpoint_as_lwgeom(lwpoint_from_twkb_state(s)); if ( lwcollection_add_lwgeom(col, geom) == NULL ) { - lwerror("Unable to add geometry (%p) to collection (%p)", (void *) geom, (void *) col); + lwerror("Unable to add geometry to collection"); return NULL; } } @@ -486,7 +486,7 @@ static LWCOLLECTION* lwmultiline_from_twkb_state(twkb_parse_state *s) geom = lwline_as_lwgeom(lwline_from_twkb_state(s)); if ( lwcollection_add_lwgeom(col, geom) == NULL ) { - lwerror("Unable to add geometry (%p) to collection (%p)", (void *) geom, (void *) col); + lwerror("Unable to add geometry to collection"); return NULL; } } @@ -530,7 +530,7 @@ static LWCOLLECTION* lwmultipoly_from_twkb_state(twkb_parse_state *s) geom = lwpoly_as_lwgeom(lwpoly_from_twkb_state(s)); if ( lwcollection_add_lwgeom(col, geom) == NULL ) { - lwerror("Unable to add geometry (%p) to collection (%p)", (void *) geom, (void *) col); + lwerror("Unable to add geometry to collection"); return NULL; } } diff --git a/liblwgeom/lwin_wkb.c b/liblwgeom/lwin_wkb.c index 02a7ad90d..bbe8bc87d 100644 --- a/liblwgeom/lwin_wkb.c +++ b/liblwgeom/lwin_wkb.c @@ -760,7 +760,7 @@ static LWCURVEPOLY* lwcurvepoly_from_wkb_state(wkb_parse_state *s) { lwgeom_free(geom); lwgeom_free((LWGEOM *)cp); - lwerror("Unable to add geometry (%p) to curvepoly (%p)", (void *) geom, (void *) cp); + lwerror("Unable to add geometry to curvepoly"); return NULL; } } @@ -835,7 +835,7 @@ static LWCOLLECTION* lwcollection_from_wkb_state(wkb_parse_state *s) { lwgeom_free(geom); lwgeom_free((LWGEOM *)col); - lwerror("Unable to add geometry (%p) to collection (%p)", (void *) geom, (void *) col); + lwerror("Unable to add geometry to collection"); s->check = prev_check; s->depth = start_depth; return NULL; diff --git a/libpgcommon/lwgeom_pg.c b/libpgcommon/lwgeom_pg.c index d2e2fd061..c53d5eeba 100644 --- a/libpgcommon/lwgeom_pg.c +++ b/libpgcommon/lwgeom_pg.c @@ -603,7 +603,7 @@ CallerFInfoFunctionCall3(PGFunction func, FmgrInfo *flinfo, Oid collation, Datum /* Check for null result, since caller is clearly not expecting one */ if (fcinfo->isnull) - elog(ERROR, "function %p returned NULL", (void *)&func); + elog(ERROR, "function returned NULL"); return result; } diff --git a/libpgcommon/lwgeom_transform.c b/libpgcommon/lwgeom_transform.c index 305bebaa1..39a63fb4b 100644 --- a/libpgcommon/lwgeom_transform.c +++ b/libpgcommon/lwgeom_transform.c @@ -111,7 +111,7 @@ GetPROJSRSCache(void) cache = MemoryContextAllocZero(context, sizeof(PROJSRSCache)); if (!cache) - elog(ERROR, "Unable to allocate space for PROJSRSCache in context %p", (void *)context); + elog(ERROR, "Unable to allocate space for PROJSRSCache"); cache->PROJSRSCacheCount = 0; cache->PROJSRSCacheContext = context; diff --git a/postgis/lwgeom_geos_prepared.c b/postgis/lwgeom_geos_prepared.c index 79dafad7e..fbe636251 100644 --- a/postgis/lwgeom_geos_prepared.c +++ b/postgis/lwgeom_geos_prepared.c @@ -106,7 +106,8 @@ PreparedCacheDelete(void *ptr) pghe = GetPrepGeomHashEntry(context); if (!pghe) - elog(ERROR, "PreparedCacheDelete: Trying to delete non-existent hash entry object with MemoryContext key (%p)", (void *)context); + elog(ERROR, + "PreparedCacheDelete: Trying to delete non-existent hash entry object with MemoryContext key"); POSTGIS_DEBUGF(3, "deleting geom object (%p) and prepared geom object (%p) with MemoryContext key (%p)", pghe->geom, pghe->prepared_geom, context); @@ -167,7 +168,7 @@ AddPrepGeomHashEntry(PrepGeomHashEntry pghe) } else { - elog(ERROR, "AddPrepGeomHashEntry: This memory context is already in use! (%p)", (void *)pghe.context); + elog(ERROR, "AddPrepGeomHashEntry: This memory context is already in use!"); } } @@ -201,7 +202,9 @@ DeletePrepGeomHashEntry(MemoryContext mcxt) if (!he) { - elog(ERROR, "DeletePrepGeomHashEntry: There was an error removing the geometry object from this MemoryContext (%p)", (void *)mcxt); + elog( + ERROR, + "DeletePrepGeomHashEntry: There was an error removing the geometry object from this MemoryContext"); } he->prepared_geom = NULL; @@ -280,7 +283,7 @@ PrepGeomCacheBuilder(const LWGEOM *lwgeom, GeomCache *cache) pghe = GetPrepGeomHashEntry(prepcache->context_callback); if ( ! pghe ) { - lwpgerror("PrepGeomCacheBuilder failed to find hash entry for context %p", (void *)prepcache->context_callback); + lwpgerror("PrepGeomCacheBuilder failed to find hash entry for context"); return LW_FAILURE; } @@ -316,7 +319,7 @@ PrepGeomCacheCleaner(GeomCache *cache) pghe = GetPrepGeomHashEntry(prepcache->context_callback); if ( ! pghe ) { - lwpgerror("PrepGeomCacheCleaner failed to find hash entry for context %p", prepcache->context_callback); + lwpgerror("PrepGeomCacheCleaner failed to find hash entry for context"); return LW_FAILURE; } pghe->geom = 0; ----------------------------------------------------------------------- Summary of changes: NEWS | 9 +++++++++ doc/credits.xml | 1 + liblwgeom/lwcollection.c | 2 +- liblwgeom/lwgeom.c | 2 +- liblwgeom/lwgeom_wrapx.c | 2 +- liblwgeom/lwin_twkb.c | 6 +++--- liblwgeom/lwin_wkb.c | 4 ++-- libpgcommon/lwgeom_pg.c | 2 +- libpgcommon/lwgeom_transform.c | 2 +- postgis/lwgeom_geos_prepared.c | 13 ++++++++----- 10 files changed, 28 insertions(+), 15 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Sat Nov 14 03:34:28 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 14 Nov 2026 03:34:28 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.7.0rc3-15-gbf2ddefb6 Message-ID: <20261114113428.4CE5719C598@trac.osgeo.org> 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 bf2ddefb6e9c574c21d8056097684436cea49dd0 (commit) from d6ec8333c914a8bbd9aa44d03e43beae23c052d7 (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 bf2ddefb6e9c574c21d8056097684436cea49dd0 Author: Darafei Praliaskouski Date: Sat Jun 20 20:22:57 2026 +0400 Document RETURNS TABLE columns in manual Closes #1558 Closes https://gitea.osgeo.org/postgis/postgis/pulls/419 Closes https://github.com/postgis/postgis/pull/1060 diff --git a/NEWS b/NEWS index 26b8eb3eb..87861a5dd 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ PostGIS 3.8.0dev - GT-811, Remove pointer addresses from error and notice messages (Andrew Kroh) + - #1558, GT-419, Document RETURNS TABLE signatures with returned columns + (Darafei Praliaskouski) PostGIS 3.7.0rc3 diff --git a/doc/extras_topology.xml b/doc/extras_topology.xml index f67cb9eef..3352204d0 100644 --- a/doc/extras_topology.xml +++ b/doc/extras_topology.xml @@ -706,7 +706,7 @@ SELECT topology.FixCorruptTopoGeometryColumn(schema_name, table_name, feature_co - setof record Populate_Topology_Layer + table(schema_name text, table_name text, feature_column text) Populate_Topology_Layer @@ -1104,7 +1104,7 @@ face without edges | 1 | - setof record ValidateTopologyRelation + table(error text, layer_id int, topogeo_id bigint, element_id bigint) ValidateTopologyRelation varchar toponame @@ -3348,7 +3348,7 @@ and is thus usable to build edge ring linking. - setof record FindVertexSegmentPairsBelowDistance + table(seg_edge bigint, segno int, vert_edge bigint, vertno int, vert_geom geometry) FindVertexSegmentPairsBelowDistance varchar atopology float8 tolerance diff --git a/doc/reference_raster.xml b/doc/reference_raster.xml index b95d865e3..50c58d698 100644 --- a/doc/reference_raster.xml +++ b/doc/reference_raster.xml @@ -3741,12 +3741,12 @@ FROM dummy_rast; - (1) record ST_BandMetaData + table(pixeltype text, nodatavalue double precision, isoutdb boolean, path text, outdbbandnum integer, filesize bigint, filetimestamp bigint) ST_BandMetaData raster rast integer band=1 - (2) record ST_BandMetaData + table(bandnum integer, pixeltype text, nodatavalue double precision, isoutdb boolean, path text, outdbbandnum integer, filesize bigint, filetimestamp bigint) ST_BandMetaData raster rast integer[] band @@ -4338,7 +4338,7 @@ WHERE rid=2; - setof record ST_PixelAsPolygons + table(geom geometry, val double precision, x integer, y integer) ST_PixelAsPolygons raster rast integer band=1 boolean exclude_nodata_value=TRUE @@ -4466,7 +4466,7 @@ ORDER BY x, y; - setof record ST_PixelAsPoints + table(geom geometry, val double precision, x integer, y integer) ST_PixelAsPoints raster rast integer band=1 boolean exclude_nodata_value=TRUE @@ -4604,7 +4604,7 @@ ORDER BY y, x; - setof record ST_PixelAsCentroids + table(geom geometry, val double precision, x integer, y integer) ST_PixelAsCentroids raster rast integer band=1 boolean exclude_nodata_value=TRUE @@ -5902,7 +5902,7 @@ ORDER BY y; - setof record ST_DumpValues + table(nband integer, valarray double precision[][]) ST_DumpValues raster rast @@ -5999,7 +5999,7 @@ FROM foo; - setof record ST_PixelOfValue + table(val double precision, x integer, y integer) ST_PixelOfValue raster rast @@ -6014,7 +6014,7 @@ FROM foo; - setof record ST_PixelOfValue + table(val double precision, x integer, y integer) ST_PixelOfValue raster rast @@ -6026,7 +6026,7 @@ FROM foo; - setof record ST_PixelOfValue + table(x integer, y integer) ST_PixelOfValue raster rast @@ -6041,7 +6041,7 @@ FROM foo; - setof record ST_PixelOfValue + table(x integer, y integer) ST_PixelOfValue raster rast @@ -13726,7 +13726,7 @@ FROM foo; - setof record ST_Contour + table(geom geometry, id integer, value float8) ST_Contour raster rast integer bandnumber=1 double precision level_interval=100.0 diff --git a/doc/reference_srs.xml b/doc/reference_srs.xml index 8e119d87e..9c7704e56 100644 --- a/doc/reference_srs.xml +++ b/doc/reference_srs.xml @@ -511,7 +511,7 @@ FROM data; - setof record postgis_srs + table(auth_name text, auth_srid text, srname text, srtext text, proj4text text, point_sw geometry, point_ne geometry) postgis_srs text auth_name text auth_srid @@ -560,7 +560,7 @@ point_ne | POINT(-114.08 60.01) - setof record postgis_srs_all + table(auth_name text, auth_srid text, srname text, srtext text, proj4text text, point_sw geometry, point_ne geometry) postgis_srs_all @@ -615,7 +615,7 @@ point_ne | POINT(-114.08 60.01) - setof record postgis_srs_search + table(auth_name text, auth_srid text, srname text, srtext text, proj4text text, point_sw geometry, point_ne geometry) postgis_srs_search geometry bounds text auth_name=EPSG ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ doc/extras_topology.xml | 6 +++--- doc/reference_raster.xml | 22 +++++++++++----------- doc/reference_srs.xml | 6 +++--- 4 files changed, 19 insertions(+), 17 deletions(-) hooks/post-receive -- PostGIS From trac at osgeo.org Sat Nov 14 03:34:30 2026 From: trac at osgeo.org (PostGIS) Date: Sat, 14 Nov 2026 11:34:30 -0000 Subject: [PostGIS] #1558: Have documentation be able to handle RETURNS TABLE In-Reply-To: <046.72649a17b9a484aa4a00eabeb1918302@osgeo.org> References: <046.72649a17b9a484aa4a00eabeb1918302@osgeo.org> Message-ID: <061.42ea8046218c9712328603a62b6aa062@osgeo.org> #1558: Have documentation be able to handle RETURNS TABLE ----------------------------+----------------------------- Reporter: robe | Owner: robe Type: enhancement | Status: closed Priority: low | Milestone: PostGIS Fund Me Component: documentation | Version: master Resolution: fixed | Keywords: ----------------------------+----------------------------- Changes (by Darafei Praliaskouski ): * resolution: => fixed * status: new => closed Comment: In [changeset:"bf2ddefb6e9c574c21d8056097684436cea49dd0/git" bf2ddef/git]: {{{#!CommitTicketReference repository="git" revision="bf2ddefb6e9c574c21d8056097684436cea49dd0" Document RETURNS TABLE columns in manual Closes #1558 Closes https://gitea.osgeo.org/postgis/postgis/pulls/419 Closes https://github.com/postgis/postgis/pull/1060 }}} -- Ticket URL: 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. From git at osgeo.org Sat Nov 14 18:11:23 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 14 Nov 2026 18:11:23 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.7.0rc3-17-gfde3f7fa5 Message-ID: <20261115021123.2C66D1B90A3@trac.osgeo.org> 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 fde3f7fa570d8aa1b48190dc6896e9a3527b0326 (commit) via 109336ade5a9335a06618699526a300d8ebe92b6 (commit) from bf2ddefb6e9c574c21d8056097684436cea49dd0 (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 fde3f7fa570d8aa1b48190dc6896e9a3527b0326 Author: Darafei Praliaskouski Date: Sun Nov 15 04:44:27 2026 +0400 ci: enable PGDG packages for the CodeQL runner GitHub runner images preinstall PostgreSQL and libpq from PGDG, then remove its APT source. Enable that repository before adding development headers so APT can match the installed client and library versions. diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 5cb93d298..e8d451737 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -72,6 +72,8 @@ jobs: - name: Install dependencies if: steps.changed-surface.outputs.skip != 'true' run: | + # Match the PGDG PostgreSQL packages preinstalled on GitHub runners. + sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y sudo apt-get update sudo apt-get install -y g++ autoconf automake libgeos-dev libproj-dev libgdal-dev libjson-c-dev libsfcgal-dev gettext libxml2-dev postgresql-server-dev-18 postgresql-client-18 libprotobuf-c-dev libprotoc-dev protobuf-c-compiler clang commit 109336ade5a9335a06618699526a300d8ebe92b6 Author: Darafei Praliaskouski Date: Sun Nov 15 04:41:20 2026 +0400 ci: update CodeQL and FreeBSD to current dependencies Build CodeQL on Ubuntu 26.04 with its PostgreSQL 18 packages instead of requesting PostgreSQL 16 packages that are no longer available there. Use the distribution's clang package and CodeQL Action v4 with the existing manual build. Use PostgreSQL 18 on FreeBSD to match the client pulled in by GDAL. Mixing PG17 and PG18 makes pkg drop the server during conflict resolution, leaving the job without the PostgreSQL service needed for regression tests. diff --git a/.github/workflows/ci-freebsd.yml b/.github/workflows/ci-freebsd.yml index f0c31836d..8aefac69e 100644 --- a/.github/workflows/ci-freebsd.yml +++ b/.github/workflows/ci-freebsd.yml @@ -66,10 +66,11 @@ jobs: /etc/pkg/FreeBSD.conf ASSUME_ALWAYS_YES=yes pkg bootstrap -f env IGNORE_OSVERSION=yes pkg update -f + # Match the PostgreSQL client pulled in by the GDAL package. env IGNORE_OSVERSION=yes pkg install -y \ autoconf automake bison ccache-static cunit docbook \ gdal geos gmake iconv json-c libtool libxml2 libxslt \ - pkgconf postgresql17-contrib postgresql17-server \ + pkgconf postgresql18-contrib postgresql18-server \ proj protobuf-c sfcgal projsync --system-directory --source-id us_noaa projsync --system-directory --source-id ch_swisstopo diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d6792c403..5cb93d298 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -19,7 +19,8 @@ jobs: # - https://gh.io/supported-runners-and-hardware-resources # - https://gh.io/using-larger-runners # Consider using larger runners for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} + # Keep the runner aligned with the PostgreSQL package major below. + runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-26.04' }} timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} permissions: actions: read @@ -57,9 +58,10 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL if: steps.changed-surface.outputs.skip != 'true' - uses: github/codeql-action/init at v3 + uses: github/codeql-action/init at v4 with: languages: ${{ matrix.language }} + build-mode: manual # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. @@ -71,7 +73,7 @@ jobs: if: steps.changed-surface.outputs.skip != 'true' run: | sudo apt-get update - sudo apt-get install -y g++ autoconf automake libgeos-dev libproj-dev libgdal-dev libjson-c-dev libsfcgal-dev gettext libxml2-dev postgresql-server-dev-16 postgresql-client-16 libprotobuf-c-dev libprotoc-dev protobuf-c-compiler clang-19 + sudo apt-get install -y g++ autoconf automake libgeos-dev libproj-dev libgdal-dev libjson-c-dev libsfcgal-dev gettext libxml2-dev postgresql-server-dev-18 postgresql-client-18 libprotobuf-c-dev libprotoc-dev protobuf-c-compiler clang - name: Build if: steps.changed-surface.outputs.skip != 'true' @@ -82,6 +84,6 @@ jobs: - name: Perform CodeQL Analysis if: steps.changed-surface.outputs.skip != 'true' - uses: github/codeql-action/analyze at v3 + uses: github/codeql-action/analyze at v4 with: category: "/language:${{matrix.language}}" ----------------------------------------------------------------------- Summary of changes: .github/workflows/ci-freebsd.yml | 3 ++- .github/workflows/codeql.yml | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Sat Nov 14 23:40:36 2026 From: git at osgeo.org (git at osgeo.org) Date: Sat, 14 Nov 2026 23:40:36 -0800 (PST) Subject: [SCM] PostGIS branch master updated. 3.7.0rc3-22-gee8fcf7f2 Message-ID: <20261115074036.E1B0F1C5C12@trac.osgeo.org> 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 ee8fcf7f2505fae42c2a505987cdcc6c17ef57ba (commit) via 8068073a3fc6455cbc2a98a1fee31efcd935c592 (commit) via c6aa14f35f2dfc5731c2375ba077937fc90f6fe0 (commit) via 346c6bef644a4e6f4a682d674aad985f36dab631 (commit) via 51a9c367f5670bcd1e927ee735114be4bd8d5bc2 (commit) from fde3f7fa570d8aa1b48190dc6896e9a3527b0326 (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 ee8fcf7f2505fae42c2a505987cdcc6c17ef57ba Merge: fde3f7fa5 8068073a3 Author: Darafei Praliaskouski Date: Sun Nov 15 09:04:29 2026 +0400 Add SFCGAL validity and simplicity predicates Expose validity and detail checks for 2D and 3D geometries, with simplicity predicates on SFCGAL 2.3 and newer. Register the new APIs for PostGIS 3.8.0 and document their behavior. Closes #4363 Closes https://github.com/postgis/postgis/pull/1070 diff --cc NEWS index 87861a5dd,3cd3e2220..916a9c4b2 --- a/NEWS +++ b/NEWS @@@ -1,253 -1,5 +1,259 @@@ -PostGIS 3.7.0rc1 +PostGIS 3.8.0dev 2026/xx/xx + ++* New Features * ++ ++ - #4363, GH-1070, [sfcgal] Add CG_IsValid, CG_IsValidDetail, and SFCGAL 2.3+ ++ CG_IsSimple and CG_IsSimpleDetail predicates ++ (Darafei Praliaskouski) ++ +* Enhancements * + + - GT-811, Remove pointer addresses from error and notice messages + (Andrew Kroh) + - #1558, GT-419, Document RETURNS TABLE signatures with returned columns + (Darafei Praliaskouski) + + +PostGIS 3.7.0rc3 +2026/10/20 + +This version requires GEOS 3.10+, PostgreSQL 14-19beta3, Proj 6.1+, and libgmp. +To take advantage of all postgis extension features, GEOS 3.15+ is needed. +To take advantage of all postgis_sfcgal extension features SFCGAL 2.3+ is needed. +Python 3 is a new requirement to build the documentation. + +Visual examples in the docs are off by default. To build docs with them, +configure with `--with-visual-examples` and make sure you have a running +PostgreSQL instance; they are then generated automatically when building +the docs (or explicitly with `make -C regress visual-examples`). + + +* Breaking Changes * + + - #5688, [topology] topology building functions now interpret tolerance 0 + (old default) to really mean 0 and want -1 (new default) to mean + "use topology precision" (Sandro Santilli) + - #6024, Remove support for PostgreSQL 12 and 13 (Regina Obe) + - #6040, ST_GeoHash round trip through ST_GeomFromGeoHash (Paul Ramsey) + - #6053, [address_standardizer] Extension removed and moved to + https://github.com/postgis/address_standardizer (Paul Ramsey) + - #6052, [tiger_geocoder] Extension removed and moved to + https://git.osgeo.org/postgis/postgis_tiger_geocoder (Regina Obe) + - #6079, Remove support for GEOS < 3.10 (Sandro Santilli) + - #1793, Remove ST_MemCollect aggregate (Darafei Praliaskouski) + - GH-848, CG_AlphaShape now returns a MultiPolygon (Jean Felder) + - [docs] Python 3 and an SVG rasterizer (rsvg-convert preferred, + GraphicsMagick or ImageMagick supported) now required for doc + dynamic image rendering (Darafei Praliaskouski) + +* New Features * + + - #6132, ST_IsSimpleDetail (Sandro Santilli) + - #1124, #2935, #3033, #4658, #4659, [loader] Rework loader arguments: + shp2pgsql can create UNLOGGED tables and choose the feature id column + name, shp2pgsql --drop-table can emit DROP TABLE before prepare + output, raster2pgsql/shp2pgsql expose loader actions as long options, + both loaders accept long aliases for existing options, and + --if-not-exists makes creation actions idempotent + (Darafei Praliaskouski) + - #4208, Add single-geometry variants of ST_MaxDistance and ST_LongestLine + (Darafei Praliaskouski) + - [topology] FindVertexSegmentPairsBelowDistance function (Sandro Santilli) + - ST_CoverageEdges, returns MultiLinestring of distinct shared edges in + polygonal coverage (Paul Ramsey) + - ST_MinimumSpanningTree, window function to calculate MST (Paul Ramsey) + - #5993, [topology] Add max_edges parameter to TopoGeo_AddLinestring + (Sandro Santilli) + - #6001, support MultiLineString in ST_MakeLine (Paul Ramsey) + - #2858, ST_MMin and ST_MMax (Paul Ramsey) + - #5941, [raster] Support GDT_Float16 pixel type (Darafei Praliaskouski) + - #5992, Optimize GiST index for repeated edge subdivision in topology (Darafei Praliaskouski) + - #5702, Allow the compiler to detect the parallelism -flto=auto (Darafei Praliaskouski) + - #4798, ST_AsGeoJSON warns about duplicate property keys (Darafei Praliaskouski) + - #4222, [raster] ST_DumpAsPolygons honours PostgreSQL interrupts (Darafei Praliaskouski) + - #5889, [topology] Include representative locations in topology build errors (Darafei Praliaskouski) + - #2614, Use GEOSPreparedDistance and caching to accelerate ST_DWithin (Paul Ramsey) + - GH-839, ST_Multi support for TIN and surfaces (Lo?c Bartoletti) + - #4398, Add ST_CatmullSmoothing smoothes but retains original vertices (Paul Ramsey) + - #4560, ST_3DInterpolatePoint for M interpolation from XYZ inputs (Paul Ramsey) + - #1291, ST_MakePolygon support for curved rings (Darafei Praliaskouski) + - GT-270, Add NURBSCurve (Lo?c Bartoletti) + - #2863, Add ST_XSize, ST_YSize, ST_ZSize, and ST_MSize dimension helpers + (Darafei Praliaskouski) + - GH-870, CG_ApproximateMedialAxis: Add an overload to project the medial + axis to the boundary. (Lo?c Bartoletti) + - GH-871, Add CG_PolygonRepair (Lo?c Bartoletti) + - GH-872, SFCGAL roof generation algorithms (Lo?c Bartoletti) + - GT-806, #6124 --with-visual-examples opt-in + configure switch to build dynamic images (Regina Obe) + +* Enhancements * + + - #6140, #6138, #6129, [topology] improve topology building and checking + robustness (Sandro Santilli) + - #2045, pgsql2shp query dumps no longer require temporary table + privileges (Darafei Praliaskouski) + - #1577, [loader] Report unsupported .zip archive input before trying + to open shapefile sidecar files (Darafei Praliaskouski) + - #3158, Move geometry and geography typmod bit helpers out of the + public liblwgeom header (Darafei Praliaskouski) + - #3776, [raster] Keep distinct 32-bit integer pixel values separate in + ST_DumpAsPolygons (Darafei Praliaskouski) + - #4678, [raster] Move st_sum4ma neighborhood callback to C + (Darafei Praliaskouski) + - #2116, [raster] Add ST_Value nearest-neighbor boundary options + (Darafei Praliaskouski) + - #2804, #4315, [raster] Support two-argument ST_MapAlgebra callbacks + and pass callback call data as actual arguments (Darafei Praliaskouski) + - #6062, [topology] Stop using recursive snapping, for improved robustness (Sandro Santilli) + - #6065, Improved winding order computation robustness for rings having collapsed elements + (Sandro Santilli) + - #2137, [raster] Reuse matching source raster overviews in raster2pgsql -l + (Darafei Praliaskouski) + - #4749, Use point-in-polygon predicate fast paths for point-only + GeometryCollections (Darafei Praliaskouski) + - #2807, [raster] Preserve missing NODATA values in ST_MapAlgebra outputs + (Darafei Praliaskouski) + - #2832, [raster] Avoid padding single-tile raster2pgsql overviews + when padding is not requested (Darafei Praliaskouski) + - #2623, Generate a pgsql2shp GID field when exporting geometry-only + shapefiles (Darafei Praliaskouski) + - #2850, Preserve pgsql2shp numeric precision and scale in DBF metadata + (Darafei Praliaskouski) + - Build PostgreSQL extension modules with `-fno-semantic-interposition` when + available so LTO can optimize same-DSO calls to exported PostGIS + entry points directly instead of routing through the module PLT; in + a local PostgreSQL 18 `pgbench` microbenchmark over 100k four-point + groups this reduced `ST_Collect` aggregate latency by about 4% + (Darafei Praliaskouski) + - #5973, Install PostGIS utilities under `pg_config --bindir` by default + and document `pg_config`-derived install paths more accurately + (Darafei Praliaskouski) + - #2808, Clarify postgis_full_version() output when installed component + scripts are newer than core scripts (Darafei Praliaskouski) + - #2838, Emit valid X3D Coordinate nodes for 2D polygon output + (Darafei Praliaskouski) + - GH-899, [raster] Honor PostgreSQL interrupts in long-running GDAL + progress callbacks (Darafei Praliaskouski) + - #6073, #6074, Stabilize geography LRS endpoint interpolation and pole + centroid regressions on 32-bit systems (Darafei Praliaskouski) + - #2583, Preserve Z/ZM dimensional qualifiers in ST_AsEWKT output for TIN + (Darafei Praliaskouski) + - #4616, Detect pgsql2shp query keywords case-insensitively + (Darafei Praliaskouski) + - #1986, ST_GeomFromGML support for GML ArcString and curved polygon rings + (Darafei Praliaskouski) + - #4749, Use point-in-polygon predicate fast paths for point-only + GeometryCollections, including ST_Disjoint (Darafei Praliaskouski) + - #3676, Mark geometry and geography btree comparison support functions + as leakproof (Darafei Praliaskouski) + - GH-875, Allow ST_OrderingEquals joins to use hash and merge join plans + (Darafei Praliaskouski) + - #1168, [raster] Support curved geometry inputs in ST_AsRaster + (Darafei Praliaskouski) + - #1416, ST_AsX3D outputs NURBSCURVE as X3D NurbsCurve + and linearizes other curve geometries + (Darafei Praliaskouski) + - #3705, ST_AsX3D outputs valid coordinate nodes for 2D multi-geometries + and GeometryCollections (Darafei Praliaskouski) + - GT-484, Use column-level SELECT privileges for metadata views + (Arthur Bazin) + - #1408, #2386, #2557, #2805, #2898, #3743, #4323, #4332, #4385, #5109, + #5532, #5593, #5638, #5645, #5950, #6022, #6082, GH-1161, GT-584, + Numerous doc enhancements (Darafei Praliaskouski) + +* Bug Fixes * + + - [raster] Make postgis.enable_outdb_rasters=off enforce offline-band + metadata and pixel-read restrictions after upgrade + (reported by Sarath Kumar, IITM Pravartak Security Team; + fixed by Darafei Praliaskouski) + - GH-1175, Guard missing operands before reading node tags in + spatial selectivity estimation (Maksim Korotkov) + + - #6118, Reject empty geometry type modifiers without an out-of-bounds read + (Egor Ivkov) + - Fix WKB and TWKB parser resource exhaustion on malformed input + (Darafei Praliaskouski) + - #6038, Avoid stale relation lookups in geometry_columns after topology + objects are dropped (Darafei Praliaskouski) + - #5487, Improve error detail for repeated upgrades after an incomplete + deprecated-function cleanup (Darafei Praliaskouski) + - #5975, Initialize skipped union-find cluster ids deterministically + (Darafei Praliaskouski) + - #5904, [topology] Avoid MinGW format warnings when logging topology ids + (Darafei Praliaskouski) + - GH-888, [sfcgal] Avoid stale detoasted geometry access in + CG_Visibility empty-input handling for SFCGAL < 2.2 + (Darafei Praliaskouski) + - #3179, Mark truncated libpgcommon PostgreSQL messages instead of silently + dropping the tail (Darafei Praliaskouski) + - #6003, Avoid size_t formats in liblwgeom logging/error wrappers for + MinGW builds (Darafei Praliaskouski) + - GH-886, ST_ClusterRelateWin validates NULL relate matrices before + detoasting them (Darafei Praliaskouski) + - GH-889, ST_Relate pattern inversion avoids out-of-bounds access on + short DE-9IM patterns (Darafei Praliaskouski) + - GH-890, Avoid GIDX BRIN summary merges across mismatched dimensions + (Darafei Praliaskouski) + - #5959, Prevent histogram target overflow when analysing massive tables (Darafei Praliaskouski) + - #6080, Avoid out-of-bounds hex WKB lookup for high-bit input bytes + (Darafei Praliaskouski) + - #4828, geometry_columns handles NOT VALID SRID checks without errors (Darafei Praliaskouski) + - #6048, [raster] ST_Clip no longer crashes when clipping sparse band + selections (Darafei Praliaskouski) + - GH-894, [raster] Fix Float16 import, mixed nodata warping, + band replacement cleanup, GDAL credential redaction, and Python + GDAL compatibility (Darafei Praliaskouski) + + +PostGIS 3.7.0rc1 +2026/08/24 +This version requires GEOS 3.10+, PostgreSQL 14-19beta2, Proj 6.1+, libgmp. +To take advantage of all features postgis extension features, GEOS 3.15+ is needed. +To take advantage of all postgis_sfcgal extension features SFCGAL 2.3+ is needed. + +These are only changes since 3.7.0beta2. + +* Bug Fixes * + + - GH-1172, GH-1173, GH-1174, guard lwgeom_wrapx and raster OOM cleanup paths + against NULL dereferences (Maksim Korotkov, Postgres Pro) + - Codex security scan, guard the recursive NURBSCURVE bounding box + against non-finite control points to stop a backend CPU denial + of service reachable from WKT input (Darafei Praliaskouski) + - GT-755, OSSFuzz 547330051, stream NURBSCURVE bounding box Bezier extraction + to avoid repeated full-array knot insertion on large valid curves + (Darafei Praliaskouski) + - Fix geometry input parsing to stop malformed SRID prefixes before the + end of the input string + (Dennis Tighe, Google) + - OSSFuzz 545658571, compare GSERIALIZED bytea fuzzer SRIDs after + normalizing out-of-range values (Darafei Praliaskouski) + - OSSFuzz 5607611131822080, keep GSERIALIZED bytea fuzzer allocations + consistent with hostile varlena size headers (Darafei Praliaskouski) + - #6111, Skip NEWS unit tests outside Git worktrees, fixing source + package documentation checks without git (Bas Couwenberg) + - #6112, Document GMP and current build dependency requirements in + README.postgis (Darafei Praliaskouski) + - OSSFuzz 544800490, reject malformed GSERIALIZED polygon rings before + deserializing geometry data (Darafei Praliaskouski) + - OSSFuzz 544936363, keep GSERIALIZED LWGEOM fuzzer bbox + comparisons aligned with serialized bbox flags (Darafei Praliaskouski) + - Reject truncated GSERIALIZED NURBS vector payloads before validating vector + contents (Darafei Praliaskouski) + - Include detected NURBS coordinate extrema in curve bounding boxes + (Darafei Praliaskouski) + - OSSFuzz 6152109301760000, reject overlong encoded polyline coordinate + varints (Darafei Praliaskouski) + - OSSFuzz 4743900859006976, reject encoded polyline coordinate deltas + that overflow accumulated int32 coordinates (Darafei Praliaskouski) + + + +PostGIS 3.7.0beta2 +2026/08/09 This version requires GEOS 3.10+, PostgreSQL 14-19beta2, Proj 6.1+, libgmp. To take advantage of all features postgis extension features, GEOS 3.15+ is needed. To take advantage of all postgis_sfcgal extension features SFCGAL 2.3+ is needed. diff --cc doc/reference_sfcgal.xml index 9b61927f2,24a2a2fc7..eb7dbc62c --- a/doc/reference_sfcgal.xml +++ b/doc/reference_sfcgal.xml @@@ -169,6 -169,182 +169,182 @@@ FROM data; + + + CG_IsValid + + Tests whether a geometry is valid according to SFCGAL + + + + + + boolean CG_IsValid + geometry geom + + + + + + Description + + Returns true if the input geometry is valid according to SFCGAL. + This differs from , which checks OGC validity through GEOS. + - Availability: 3.7.0 ++ Availability: 3.8.0 + &sfcgal_required; + &Z_support; + &P_support; + &T_support; + + + + Examples + + SELECT CG_IsValid('LINESTRING Z (0 0 0,0 0 1)'::geometry); + t + + + + See Also + + , , , + + + + + + + CG_IsValidDetail + + Returns a valid_detail row stating whether a geometry is valid according to SFCGAL, and if not a reason and a location. + + + + + + valid_detail CG_IsValidDetail + geometry geom + + + + + + Description + + Returns a valid_detail row with a boolean validity flag, a reason for invalidity, and the invalidity location when SFCGAL reports one. + This differs from , which checks OGC validity through GEOS. + - Availability: 3.7.0 ++ Availability: 3.8.0 + &sfcgal_required; + &Z_support; + &P_support; + &T_support; + + + + Examples + + SELECT valid, reason, ST_AsText(location) AS location + FROM CG_IsValidDetail('POLYGON((0 0,2 2,2 0,0 2,0 0))'::geometry); + f | ring 0 self intersects | + + + + See Also + + , , + + + + + + + CG_IsSimple + + Tests whether a geometry is simple according to SFCGAL + + + + + + boolean CG_IsSimple + geometry geom + + + + + + Description + + Returns true if the input geometry is simple according to SFCGAL. + This differs from , which checks simplicity through liblwgeom. + - Availability: 3.7.0 - requires SFCGAL >= 2.3.0. ++ Availability: 3.8.0 - requires SFCGAL >= 2.3.0. + &sfcgal_required; + &Z_support; + &P_support; + &T_support; + + + + Examples + + SELECT CG_IsSimple('LINESTRING(0 0,2 2,2 0,0 2)'::geometry); + f + + + + See Also + + , , + + + + + + + CG_IsSimpleDetail + + Returns a reason when a geometry is not simple according to SFCGAL + + + + + + text CG_IsSimpleDetail + geometry geom + + + + + + Description + + Returns SFCGAL's reason when the input geometry is not simple. Returns NULL for simple geometries. + - Availability: 3.7.0 - requires SFCGAL >= 2.3.0. ++ Availability: 3.8.0 - requires SFCGAL >= 2.3.0. + &sfcgal_required; + &Z_support; + &P_support; + &T_support; + + + + Examples + + SELECT CG_IsSimpleDetail('LINESTRING(0 0,2 2,2 0,0 2)'::geometry); + linestring self intersects + + + + See Also + + , , + + + + CG_IsSolid diff --cc sfcgal/sfcgal.sql.in index cfec2cefc,4fcabea06..d1e54f615 --- a/sfcgal/sfcgal.sql.in +++ b/sfcgal/sfcgal.sql.in @@@ -334,6 -334,36 +334,36 @@@ CREATE OR REPLACE FUNCTION CG_IsPlanar( LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE COST 100; --- Availability: 3.7.0 ++-- Availability: 3.8.0 + CREATE OR REPLACE FUNCTION CG_IsValid(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME','CG_IsValid' + LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE + COST 100; + --- Availability: 3.7.0 ++-- Availability: 3.8.0 + CREATE OR REPLACE FUNCTION CG_IsValidDetail(geometry) + RETURNS valid_detail + AS 'MODULE_PATHNAME','CG_IsValidDetail' + LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE + COST 100; + --- Availability: 3.7.0 - requires SFCGAL >= 2.3.0 ++-- Availability: 3.8.0 - requires SFCGAL >= 2.3.0 + #if POSTGIS_SFCGAL_VERSION >= 20300 + CREATE OR REPLACE FUNCTION CG_IsSimple(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME','CG_IsSimple' + LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE + COST 100; + --- Availability: 3.7.0 - requires SFCGAL >= 2.3.0 ++-- Availability: 3.8.0 - requires SFCGAL >= 2.3.0 + CREATE OR REPLACE FUNCTION CG_IsSimpleDetail(geometry) + RETURNS text + AS 'MODULE_PATHNAME','CG_IsSimpleDetail' + LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE + COST 100; + #endif + -- Availability: 2.2.0 -- Deprecation in 3.5.0 CREATE OR REPLACE FUNCTION ST_IsPlanar(geometry) commit 8068073a3fc6455cbc2a98a1fee31efcd935c592 Author: Darafei Praliaskouski Date: Sun Jul 26 21:39:12 2026 +0400 Move NEWS entries to 3.7.0rc1 diff --git a/NEWS b/NEWS index f6c9590ea..3cd3e2220 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,10 @@ These are only changes since 3.7.0beta1. - Add Woodpecker linux/arm64 build and regression coverage under QEMU to match the Jenkins Berrie64 platform (Darafei Praliaskouski) + - #4363, [sfcgal] Add CG_IsValid, CG_IsValidDetail, and SFCGAL 2.3+ + CG_IsSimple and CG_IsSimpleDetail checks + (Darafei Praliaskouski) + PostGIS 3.7.0beta1 2026/07/20 @@ -91,11 +95,6 @@ These are only changes since 3.7.0alpha1. * Enhancements * * New Features * - - #4363, [sfcgal] Add CG_IsValid, CG_IsValidDetail, and SFCGAL 2.3+ - CG_IsSimple and CG_IsSimpleDetail checks - (Darafei Praliaskouski) - - - #1986, ST_GeomFromGML support for GML ArcString and curved polygon rings (Darafei Praliaskouski) commit c6aa14f35f2dfc5731c2375ba077937fc90f6fe0 Author: Darafei Praliaskouski Date: Sat Jul 18 19:43:54 2026 +0400 doc: separate example output from SQL diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml index 85519f200..24a2a2fc7 100644 --- a/doc/reference_sfcgal.xml +++ b/doc/reference_sfcgal.xml @@ -201,10 +201,8 @@ FROM data; Examples - SELECT CG_IsValid('LINESTRING Z (0 0 0,0 0 1)'::geometry); - cg_isvalid --------------- - t + SELECT CG_IsValid('LINESTRING Z (0 0 0,0 0 1)'::geometry); + t @@ -248,10 +246,8 @@ FROM data; Examples SELECT valid, reason, ST_AsText(location) AS location -FROM CG_IsValidDetail('POLYGON((0 0,2 2,2 0,0 2,0 0))'::geometry); - valid | reason | location --------+------------------------+---------- - f | ring 0 self intersects | +FROM CG_IsValidDetail('POLYGON((0 0,2 2,2 0,0 2,0 0))'::geometry); + f | ring 0 self intersects | @@ -294,10 +290,8 @@ FROM CG_IsValidDetail('POLYGON((0 0,2 2,2 0,0 2,0 0))'::geometry); Examples - SELECT CG_IsSimple('LINESTRING(0 0,2 2,2 0,0 2)'::geometry); - cg_issimple -------------- - f + SELECT CG_IsSimple('LINESTRING(0 0,2 2,2 0,0 2)'::geometry); + f @@ -339,10 +333,8 @@ FROM CG_IsValidDetail('POLYGON((0 0,2 2,2 0,0 2,0 0))'::geometry); Examples - SELECT CG_IsSimpleDetail('LINESTRING(0 0,2 2,2 0,0 2)'::geometry); - cg_issimpledetail ---------------------------- - linestring self intersects + SELECT CG_IsSimpleDetail('LINESTRING(0 0,2 2,2 0,0 2)'::geometry); + linestring self intersects commit 346c6bef644a4e6f4a682d674aad985f36dab631 Author: Darafei Praliaskouski Date: Mon Jul 6 17:46:51 2026 +0400 NEWS: move entry to 3.7.0beta1 Closes #4363 diff --git a/NEWS b/NEWS index 2c89075ec..f6c9590ea 100644 --- a/NEWS +++ b/NEWS @@ -89,6 +89,12 @@ These are only changes since 3.7.0alpha1. (Bas Couwenberg) * Enhancements * +* New Features * + + - #4363, [sfcgal] Add CG_IsValid, CG_IsValidDetail, and SFCGAL 2.3+ + CG_IsSimple and CG_IsSimpleDetail checks + (Darafei Praliaskouski) + - #1986, ST_GeomFromGML support for GML ArcString and curved polygon rings (Darafei Praliaskouski) @@ -162,9 +168,6 @@ To take advantage of all postgis_sfcgal extension features SFCGAL 2.3+ is needed - GH-839, ST_Multi support for TIN and surfaces (Lo?c Bartoletti) - #4398, Add ST_CatmullSmoothing smoothes but retains original vertices (Paul Ramsey) - #4560, ST_3DInterpolatePoint for M interpolation from XYZ inputs (Paul Ramsey) - - #4363, [sfcgal] Add CG_IsValid, CG_IsValidDetail, and SFCGAL 2.3+ - CG_IsSimple and CG_IsSimpleDetail checks - (Darafei Praliaskouski) - #1291, ST_MakePolygon support for curved rings (Darafei Praliaskouski) - GT-270, Add NURBSCurve (Lo?c Bartoletti) - #2863, Add ST_XSize, ST_YSize, ST_ZSize, and ST_MSize dimension helpers commit 51a9c367f5670bcd1e927ee735114be4bd8d5bc2 Author: Darafei Praliaskouski Date: Sun Jun 21 00:18:07 2026 +0400 Add SFCGAL validity predicate Expose SFCGAL validity checks as CG_IsValid, backed by sfcgal_geometry_is_valid. Avoid adding an ST_3DIsValid alias only to deprecate it, since the SFCGAL predicate applies to both 2D and 3D inputs. Closes #4363 diff --git a/NEWS b/NEWS index 1443dee89..2c89075ec 100644 --- a/NEWS +++ b/NEWS @@ -162,6 +162,9 @@ To take advantage of all postgis_sfcgal extension features SFCGAL 2.3+ is needed - GH-839, ST_Multi support for TIN and surfaces (Lo?c Bartoletti) - #4398, Add ST_CatmullSmoothing smoothes but retains original vertices (Paul Ramsey) - #4560, ST_3DInterpolatePoint for M interpolation from XYZ inputs (Paul Ramsey) + - #4363, [sfcgal] Add CG_IsValid, CG_IsValidDetail, and SFCGAL 2.3+ + CG_IsSimple and CG_IsSimpleDetail checks + (Darafei Praliaskouski) - #1291, ST_MakePolygon support for curved rings (Darafei Praliaskouski) - GT-270, Add NURBSCurve (Lo?c Bartoletti) - #2863, Add ST_XSize, ST_YSize, ST_ZSize, and ST_MSize dimension helpers diff --git a/doc/Makefile.in b/doc/Makefile.in index 7353f9a51..ad5ad80c2 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -43,6 +43,7 @@ htmldir = @htmldir@ POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@ POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@ POSTGIS_MICRO_VERSION=@POSTGIS_MICRO_VERSION@ +POSTGIS_SFCGAL_VERSION=@POSTGIS_SFCGAL_VERSION@ DOCSUFFIX=-en @@ -93,6 +94,9 @@ XSLTPROC_CUSTOM_VARS = \ --stringparam postgis_version $(POSTGIS_MAJOR_VERSION).$(POSTGIS_MINOR_VERSION) \ --stringparam postgis_language $(patsubst -%,%,$(DOCSUFFIX))/ +XSLTPROC_COMMENT_VARS = \ + --stringparam postgis_sfcgal_version $(POSTGIS_SFCGAL_VERSION) + XSLTPROC_COMMONOPTS= \ $(XSLTPROC_PATH_OPT) \ --param section.autolabel 1 \ @@ -432,7 +436,7 @@ $(TAG_GENERATED_SOURCES): xsl/node_by_xpath.xsl xsl-config.xml | Makefile endif $(GENERATED_COMMENT_FILES): %.sql: xsl/%.sql.xsl postgis-out.xml xsl/common_utils.xsl xsl/common_comments.xsl - $(XSLTPROC) --novalid $(XSLTPROCFLAGS) $(XSLTPROC_PATH_OPT) -o $@ $< postgis-out.xml + $(XSLTPROC) --novalid $(XSLTPROCFLAGS) $(XSLTPROC_PATH_OPT) $(XSLTPROC_COMMENT_VARS) -o $@ $< postgis-out.xml $(GENERATED_CHEATSHEET_FILES): $(html_builddir)/%$(DOCSUFFIX).html: xsl/%.html.xsl postgis-out.xml xsl/common_cheatsheet.xsl xsl/common_utils.xsl $(XSLTPROC) --novalid $(XSLTPROCFLAGS) $(XSLTPROC_PATH_OPT) $(XSLTPROC_CUSTOM_VARS) -o $@ $< postgis-out.xml diff --git a/doc/reference_sfcgal.xml b/doc/reference_sfcgal.xml index 9b61927f2..85519f200 100644 --- a/doc/reference_sfcgal.xml +++ b/doc/reference_sfcgal.xml @@ -169,6 +169,190 @@ FROM data; + + + CG_IsValid + + Tests whether a geometry is valid according to SFCGAL + + + + + + boolean CG_IsValid + geometry geom + + + + + + Description + + Returns true if the input geometry is valid according to SFCGAL. + This differs from , which checks OGC validity through GEOS. + + Availability: 3.7.0 + &sfcgal_required; + &Z_support; + &P_support; + &T_support; + + + + Examples + + SELECT CG_IsValid('LINESTRING Z (0 0 0,0 0 1)'::geometry); + cg_isvalid +-------------- + t + + + + See Also + + , , , + + + + + + + CG_IsValidDetail + + Returns a valid_detail row stating whether a geometry is valid according to SFCGAL, and if not a reason and a location. + + + + + + valid_detail CG_IsValidDetail + geometry geom + + + + + + Description + + Returns a valid_detail row with a boolean validity flag, a reason for invalidity, and the invalidity location when SFCGAL reports one. + This differs from , which checks OGC validity through GEOS. + + Availability: 3.7.0 + &sfcgal_required; + &Z_support; + &P_support; + &T_support; + + + + Examples + + SELECT valid, reason, ST_AsText(location) AS location +FROM CG_IsValidDetail('POLYGON((0 0,2 2,2 0,0 2,0 0))'::geometry); + valid | reason | location +-------+------------------------+---------- + f | ring 0 self intersects | + + + + See Also + + , , + + + + + + + CG_IsSimple + + Tests whether a geometry is simple according to SFCGAL + + + + + + boolean CG_IsSimple + geometry geom + + + + + + Description + + Returns true if the input geometry is simple according to SFCGAL. + This differs from , which checks simplicity through liblwgeom. + + Availability: 3.7.0 - requires SFCGAL >= 2.3.0. + &sfcgal_required; + &Z_support; + &P_support; + &T_support; + + + + Examples + + SELECT CG_IsSimple('LINESTRING(0 0,2 2,2 0,0 2)'::geometry); + cg_issimple +------------- + f + + + + See Also + + , , + + + + + + + CG_IsSimpleDetail + + Returns a reason when a geometry is not simple according to SFCGAL + + + + + + text CG_IsSimpleDetail + geometry geom + + + + + + Description + + Returns SFCGAL's reason when the input geometry is not simple. Returns NULL for simple geometries. + + Availability: 3.7.0 - requires SFCGAL >= 2.3.0. + &sfcgal_required; + &Z_support; + &P_support; + &T_support; + + + + Examples + + SELECT CG_IsSimpleDetail('LINESTRING(0 0,2 2,2 0,0 2)'::geometry); + cg_issimpledetail +--------------------------- + linestring self intersects + + + + See Also + + , , + + + + CG_IsSolid diff --git a/doc/xsl/sfcgal_comments.sql.xsl b/doc/xsl/sfcgal_comments.sql.xsl index e7032a7ad..aedccafd6 100644 --- a/doc/xsl/sfcgal_comments.sql.xsl +++ b/doc/xsl/sfcgal_comments.sql.xsl @@ -2,6 +2,7 @@ @@ -26,6 +28,15 @@ '' + + + @@ -45,6 +56,7 @@ COMMENT ON geometry, ) IS ' '; + diff --git a/postgis/uninstall_sfcgal.sql.in b/postgis/uninstall_sfcgal.sql.in index 4ec220cc9..ebd6f037c 100644 --- a/postgis/uninstall_sfcgal.sql.in +++ b/postgis/uninstall_sfcgal.sql.in @@ -20,6 +20,11 @@ DROP FUNCTION IF EXISTS postgis_sfcgal_full_version(); DROP FUNCTION IF EXISTS ST_3DIntersection(geom1 geometry, geom2 geometry); +DROP FUNCTION IF EXISTS CG_IsValid(geometry); +DROP FUNCTION IF EXISTS CG_IsValidDetail(geometry); +DROP FUNCTION IF EXISTS CG_IsSimple(geometry); +DROP FUNCTION IF EXISTS CG_IsSimpleDetail(geometry); + DROP FUNCTION IF EXISTS ST_Tesselate(geometry); DROP FUNCTION IF EXISTS ST_3DArea(geometry); diff --git a/sfcgal/lwgeom_sfcgal.c b/sfcgal/lwgeom_sfcgal.c index 11a581e7d..10befc825 100644 --- a/sfcgal/lwgeom_sfcgal.c +++ b/sfcgal/lwgeom_sfcgal.c @@ -26,7 +26,9 @@ #include "SFCGAL/capi/sfcgal_c.h" #include "postgres.h" +#include "access/htup_details.h" #include "fmgr.h" +#include "funcapi.h" #include "libpq/pqsignal.h" #include "utils/builtins.h" #include "utils/elog.h" @@ -73,6 +75,12 @@ Datum sfcgal_volume(PG_FUNCTION_ARGS); Datum sfcgal_extrude(PG_FUNCTION_ARGS); Datum sfcgal_straight_skeleton(PG_FUNCTION_ARGS); Datum sfcgal_approximate_medial_axis(PG_FUNCTION_ARGS); +Datum CG_IsValid(PG_FUNCTION_ARGS); +Datum CG_IsValidDetail(PG_FUNCTION_ARGS); +#if POSTGIS_SFCGAL_VERSION >= 20300 +Datum CG_IsSimple(PG_FUNCTION_ARGS); +Datum CG_IsSimpleDetail(PG_FUNCTION_ARGS); +#endif Datum sfcgal_is_planar(PG_FUNCTION_ARGS); Datum sfcgal_orientation(PG_FUNCTION_ARGS); Datum sfcgal_force_lhr(PG_FUNCTION_ARGS); @@ -276,6 +284,147 @@ sfcgal_is_planar(PG_FUNCTION_ARGS) PG_RETURN_BOOL(result); } +PG_FUNCTION_INFO_V1(CG_IsValid); +Datum +CG_IsValid(PG_FUNCTION_ARGS) +{ + GSERIALIZED *input; + sfcgal_geometry_t *geom; + int result; + + sfcgal_postgis_init(); + + input = PG_GETARG_GSERIALIZED_P(0); + geom = POSTGIS2SFCGALGeometry(input); + + result = sfcgal_geometry_is_valid(geom); + sfcgal_geometry_delete(geom); + + PG_FREE_IF_COPY(input, 0); + + PG_RETURN_BOOL(result); +} + +static void +sfcgal_detail_reason_free(char *reason) +{ + /* + * SFCGAL's detail APIs return reason strings allocated by the C++ + * validity/simplicity layer, not by the C API buffer helper. Releasing + * these with lwfree() or sfcgal_free_buffer() corrupts memory with + * SFCGAL 2.3, even after sfcgal_set_alloc_handlers(). + */ + free(reason); +} + +PG_FUNCTION_INFO_V1(CG_IsValidDetail); +Datum +CG_IsValidDetail(PG_FUNCTION_ARGS) +{ + GSERIALIZED *input; + GSERIALIZED *location = NULL; + sfcgal_geometry_t *geom; + sfcgal_geometry_t *invalidity_location = NULL; + char *invalidity_reason = NULL; + Datum values[3]; + bool nulls[3] = {false, true, true}; + int result; + HeapTuple tuple; + TupleDesc tupdesc; + + sfcgal_postgis_init(); + + input = PG_GETARG_GSERIALIZED_P(0); + geom = POSTGIS2SFCGALGeometry(input); + + result = sfcgal_geometry_is_valid_detail(geom, &invalidity_reason, &invalidity_location); + sfcgal_geometry_delete(geom); + + if (invalidity_reason) + { + values[1] = CStringGetTextDatum(invalidity_reason); + nulls[1] = false; + sfcgal_detail_reason_free(invalidity_reason); + } + + if (invalidity_location) + { + location = SFCGALGeometry2POSTGIS( + invalidity_location, FLAGS_GET_Z(input->gflags), gserialized_get_srid(input)); + sfcgal_geometry_delete(invalidity_location); + values[2] = PointerGetDatum(location); + nulls[2] = false; + } + + PG_FREE_IF_COPY(input, 0); + + if (get_call_result_type(fcinfo, NULL, &tupdesc) != TYPEFUNC_COMPOSITE) + ereport(ERROR, + (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("function returning record called in context that cannot accept type record"))); + BlessTupleDesc(tupdesc); + + values[0] = BoolGetDatum(result); + tuple = heap_form_tuple(tupdesc, values, nulls); + + PG_RETURN_DATUM(HeapTupleGetDatum(tuple)); +} + +#if POSTGIS_SFCGAL_VERSION >= 20300 +PG_FUNCTION_INFO_V1(CG_IsSimple); +Datum +CG_IsSimple(PG_FUNCTION_ARGS) +{ + GSERIALIZED *input; + sfcgal_geometry_t *geom; + int result; + + sfcgal_postgis_init(); + + input = PG_GETARG_GSERIALIZED_P(0); + geom = POSTGIS2SFCGALGeometry(input); + + result = sfcgal_geometry_is_simple(geom); + sfcgal_geometry_delete(geom); + + PG_FREE_IF_COPY(input, 0); + + PG_RETURN_BOOL(result); +} + +PG_FUNCTION_INFO_V1(CG_IsSimpleDetail); +Datum +CG_IsSimpleDetail(PG_FUNCTION_ARGS) +{ + GSERIALIZED *input; + sfcgal_geometry_t *geom; + char *complexity_reason = NULL; + int result; + text *text_result; + + sfcgal_postgis_init(); + + input = PG_GETARG_GSERIALIZED_P(0); + geom = POSTGIS2SFCGALGeometry(input); + + result = sfcgal_geometry_is_simple_detail(geom, &complexity_reason); + sfcgal_geometry_delete(geom); + + PG_FREE_IF_COPY(input, 0); + + if (result || !complexity_reason) + { + if (complexity_reason) + sfcgal_detail_reason_free(complexity_reason); + PG_RETURN_NULL(); + } + + text_result = cstring_to_text(complexity_reason); + sfcgal_detail_reason_free(complexity_reason); + PG_RETURN_TEXT_P(text_result); +} +#endif + PG_FUNCTION_INFO_V1(sfcgal_orientation); Datum sfcgal_orientation(PG_FUNCTION_ARGS) diff --git a/sfcgal/regress/is_simple.sql b/sfcgal/regress/is_simple.sql new file mode 100644 index 000000000..1ac3860c4 --- /dev/null +++ b/sfcgal/regress/is_simple.sql @@ -0,0 +1,4 @@ +SELECT 'CG_IsSimple.simple_line', CG_IsSimple('LINESTRING(0 0,1 1)'); +SELECT 'CG_IsSimple.crossing_line', CG_IsSimple('LINESTRING(0 0,2 2,2 0,0 2)'); +SELECT 'CG_IsSimpleDetail.simple_line', CG_IsSimpleDetail('LINESTRING(0 0,1 1)') IS NULL; +SELECT 'CG_IsSimpleDetail.crossing_line', CG_IsSimpleDetail('LINESTRING(0 0,2 2,2 0,0 2)') IS NOT NULL; diff --git a/sfcgal/regress/is_simple_expected b/sfcgal/regress/is_simple_expected new file mode 100644 index 000000000..3c2d7b407 --- /dev/null +++ b/sfcgal/regress/is_simple_expected @@ -0,0 +1,4 @@ +CG_IsSimple.simple_line|t +CG_IsSimple.crossing_line|f +CG_IsSimpleDetail.simple_line|t +CG_IsSimpleDetail.crossing_line|t diff --git a/sfcgal/regress/regress_sfcgal.sql b/sfcgal/regress/regress_sfcgal.sql index bc9e61a11..e32ae4ed5 100644 --- a/sfcgal/regress/regress_sfcgal.sql +++ b/sfcgal/regress/regress_sfcgal.sql @@ -9,6 +9,13 @@ SELECT 'postgis_sfcgal_version', count(*) FROM (SELECT postgis_sfcgal_version()) SELECT 'postgis_sfcgal_noop', ST_NPoints(postgis_sfcgal_noop(ST_Buffer('POINT(0 0)', 5))); SELECT 'CG_Tesselate', ST_AsText(CG_Tesselate('GEOMETRYCOLLECTION(POINT(4 4),POLYGON((0 0,1 0,1 1,0 1,0 0)))')); SELECT 'CG_3DArea', CG_3DArea('POLYGON((0 0 0,1 0 0,1 1 0,0 1 0,0 0 0))'); +SELECT 'CG_IsValid.2d_polygon', CG_IsValid('POLYGON((0 0,1 0,1 1,0 0))'); +SELECT 'CG_IsValid.invalid_polygon', CG_IsValid('POLYGON((0 0,2 2,2 0,0 2,0 0))'); +SELECT 'CG_IsValid.3d_vertical_line', CG_IsValid('LINESTRING Z (0 0 0,0 0 1)'); +SELECT 'CG_IsValid.polyhedralsurface', CG_IsValid('POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))'); +SELECT 'CG_IsValid.solid', CG_IsValid(CG_MakeSolid('POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))')); +SELECT 'CG_IsValidDetail.valid_polygon', valid, reason IS NULL, location IS NULL FROM CG_IsValidDetail('POLYGON((0 0,1 0,1 1,0 0))'); +SELECT 'CG_IsValidDetail.invalid_polygon', valid, reason IS NOT NULL, location IS NULL FROM CG_IsValidDetail('POLYGON((0 0,2 2,2 0,0 2,0 0))'); SELECT 'CG_Extrude_point', ST_AsText(CG_Extrude('POINT(0 0)', 1, 0, 0)); SELECT 'CG_Extrude_line', ST_AsText(CG_Extrude(CG_Extrude('POINT(0 0)', 1, 0, 0), 0, 1, 0)); -- In the first SFCGAL versions, the extruded face was wrongly oriented diff --git a/sfcgal/regress/regress_sfcgal_expected b/sfcgal/regress/regress_sfcgal_expected index ea9616bb2..4ad54a8f0 100644 --- a/sfcgal/regress/regress_sfcgal_expected +++ b/sfcgal/regress/regress_sfcgal_expected @@ -2,6 +2,13 @@ postgis_sfcgal_version|1 postgis_sfcgal_noop|33 CG_Tesselate|GEOMETRYCOLLECTION(POINT(4 4),TIN(((0 1,1 0,1 1,0 1)),((0 1,0 0,1 0,0 1)))) CG_3DArea|1 +CG_IsValid.2d_polygon|t +CG_IsValid.invalid_polygon|f +CG_IsValid.3d_vertical_line|t +CG_IsValid.polyhedralsurface|t +CG_IsValid.solid|t +CG_IsValidDetail.valid_polygon|t|t|t +CG_IsValidDetail.invalid_polygon|f|t|t CG_Extrude_point|LINESTRING Z (0 0 0,1 0 0) CG_Extrude_line|POLYHEDRALSURFACE Z (((0 0 0,1 0 0,1 1 0,0 1 0,0 0 0))) CG_Extrude_surface|POLYHEDRALSURFACE Z (((1 1 0,1 0 0,0 1 0,1 1 0)),((0 1 1,1 0 1,1 1 1,0 1 1)),((1 0 0,0 0 0,0 1 0,1 0 0)),((0 1 1,0 0 1,1 0 1,0 1 1)),((1 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 0,0 0 1,0 1 1,0 1 0)),((0 0 0,1 0 0,1 0 1,0 0 1,0 0 0))) diff --git a/sfcgal/regress/tests.mk.in b/sfcgal/regress/tests.mk.in index c1c39d069..dbffae324 100644 --- a/sfcgal/regress/tests.mk.in +++ b/sfcgal/regress/tests.mk.in @@ -50,6 +50,7 @@ ifeq ($(shell expr "$(POSTGIS_SFCGAL_VERSION)" ">=" 20300),1) $(top_srcdir)/sfcgal/regress/alphashape_components.sql \ $(top_srcdir)/sfcgal/regress/roofgeneration.sql \ $(top_srcdir)/sfcgal/regress/approximatemedialaxis_projected.sql \ + $(top_srcdir)/sfcgal/regress/is_simple.sql \ $(top_srcdir)/sfcgal/regress/nurbs.sql ifeq ($(shell expr "$(POSTGIS_CGAL_VERSION)" ">=" 600),1) TESTS += $(top_srcdir)/sfcgal/regress/polygonrepair.sql diff --git a/sfcgal/sfcgal.sql.in b/sfcgal/sfcgal.sql.in index cfec2cefc..4fcabea06 100644 --- a/sfcgal/sfcgal.sql.in +++ b/sfcgal/sfcgal.sql.in @@ -334,6 +334,36 @@ CREATE OR REPLACE FUNCTION CG_IsPlanar(geometry) LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE COST 100; +-- Availability: 3.7.0 +CREATE OR REPLACE FUNCTION CG_IsValid(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME','CG_IsValid' + LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE + COST 100; + +-- Availability: 3.7.0 +CREATE OR REPLACE FUNCTION CG_IsValidDetail(geometry) + RETURNS valid_detail + AS 'MODULE_PATHNAME','CG_IsValidDetail' + LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE + COST 100; + +-- Availability: 3.7.0 - requires SFCGAL >= 2.3.0 +#if POSTGIS_SFCGAL_VERSION >= 20300 +CREATE OR REPLACE FUNCTION CG_IsSimple(geometry) + RETURNS boolean + AS 'MODULE_PATHNAME','CG_IsSimple' + LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE + COST 100; + +-- Availability: 3.7.0 - requires SFCGAL >= 2.3.0 +CREATE OR REPLACE FUNCTION CG_IsSimpleDetail(geometry) + RETURNS text + AS 'MODULE_PATHNAME','CG_IsSimpleDetail' + LANGUAGE 'c' IMMUTABLE STRICT PARALLEL SAFE + COST 100; +#endif + -- Availability: 2.2.0 -- Deprecation in 3.5.0 CREATE OR REPLACE FUNCTION ST_IsPlanar(geometry) ----------------------------------------------------------------------- Summary of changes: NEWS | 6 ++ doc/Makefile.in | 6 +- doc/reference_sfcgal.xml | 176 +++++++++++++++++++++++++++++++++ doc/xsl/sfcgal_comments.sql.xsl | 12 +++ postgis/uninstall_sfcgal.sql.in | 5 + sfcgal/lwgeom_sfcgal.c | 149 ++++++++++++++++++++++++++++ sfcgal/regress/is_simple.sql | 4 + sfcgal/regress/is_simple_expected | 4 + sfcgal/regress/regress_sfcgal.sql | 7 ++ sfcgal/regress/regress_sfcgal_expected | 7 ++ sfcgal/regress/tests.mk.in | 1 + sfcgal/sfcgal.sql.in | 30 ++++++ 12 files changed, 406 insertions(+), 1 deletion(-) create mode 100644 sfcgal/regress/is_simple.sql create mode 100644 sfcgal/regress/is_simple_expected hooks/post-receive -- PostGIS From trac at osgeo.org Sat Nov 14 23:40:39 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 07:40:39 -0000 Subject: [PostGIS] #4363: Create ST_3dIsValid function In-Reply-To: <052.692819328f6ebf82a1727fbe2a02a2e3@osgeo.org> References: <052.692819328f6ebf82a1727fbe2a02a2e3@osgeo.org> Message-ID: <067.a342305817a7c489e8a587a8b8ed0573@osgeo.org> #4363: Create ST_3dIsValid function --------------------------+--------------------------------- Reporter: johnpowell | Owner: pramsey Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS Fund Me Component: postgis | Version: master Resolution: fixed | Keywords: isvalid, 3d, sfcgal --------------------------+--------------------------------- Changes (by Darafei Praliaskouski ): * resolution: => fixed * status: new => closed Comment: In [changeset:"51a9c367f5670bcd1e927ee735114be4bd8d5bc2/git" 51a9c36/git]: {{{#!CommitTicketReference repository="git" revision="51a9c367f5670bcd1e927ee735114be4bd8d5bc2" Add SFCGAL validity predicate Expose SFCGAL validity checks as CG_IsValid, backed by sfcgal_geometry_is_valid. Avoid adding an ST_3DIsValid alias only to deprecate it, since the SFCGAL predicate applies to both 2D and 3D inputs. Closes #4363 }}} -- Ticket URL: 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. From trac at osgeo.org Sat Nov 14 23:40:39 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 07:40:39 -0000 Subject: [PostGIS] #4363: Create ST_3dIsValid function In-Reply-To: <052.692819328f6ebf82a1727fbe2a02a2e3@osgeo.org> References: <052.692819328f6ebf82a1727fbe2a02a2e3@osgeo.org> Message-ID: <067.5d40dfcafb84defe5a208f3ee9913363@osgeo.org> #4363: Create ST_3dIsValid function --------------------------+--------------------------------- Reporter: johnpowell | Owner: pramsey Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS Fund Me Component: postgis | Version: master Resolution: fixed | Keywords: isvalid, 3d, sfcgal --------------------------+--------------------------------- Comment (by Darafei Praliaskouski ): In [changeset:"346c6bef644a4e6f4a682d674aad985f36dab631/git" 346c6be/git]: {{{#!CommitTicketReference repository="git" revision="346c6bef644a4e6f4a682d674aad985f36dab631" NEWS: move entry to 3.7.0beta1 Closes #4363 }}} -- Ticket URL: 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. From trac at osgeo.org Sat Nov 14 23:40:40 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 07:40:40 -0000 Subject: [PostGIS] #4363: Create ST_3dIsValid function In-Reply-To: <052.692819328f6ebf82a1727fbe2a02a2e3@osgeo.org> References: <052.692819328f6ebf82a1727fbe2a02a2e3@osgeo.org> Message-ID: <067.b44ccc6c391b066c307edda258a41947@osgeo.org> #4363: Create ST_3dIsValid function --------------------------+--------------------------------- Reporter: johnpowell | Owner: pramsey Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS Fund Me Component: postgis | Version: master Resolution: fixed | Keywords: isvalid, 3d, sfcgal --------------------------+--------------------------------- Comment (by Darafei Praliaskouski ): In [changeset:"ee8fcf7f2505fae42c2a505987cdcc6c17ef57ba/git" ee8fcf7/git]: {{{#!CommitTicketReference repository="git" revision="ee8fcf7f2505fae42c2a505987cdcc6c17ef57ba" Add SFCGAL validity and simplicity predicates Expose validity and detail checks for 2D and 3D geometries, with simplicity predicates on SFCGAL 2.3 and newer. Register the new APIs for PostGIS 3.8.0 and document their behavior. Closes #4363 Closes https://github.com/postgis/postgis/pull/1070 }}} -- Ticket URL: 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. From trac at osgeo.org Sun Nov 15 01:54:55 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 09:54:55 -0000 Subject: [PostGIS] #2299: revise raster garden test to handle new types In-Reply-To: <046.b6031f105fc116f231d319a0ee15be8a@osgeo.org> References: <046.b6031f105fc116f231d319a0ee15be8a@osgeo.org> Message-ID: <061.32acf0b8b9ff8dcc598741ef25700e6f@osgeo.org> #2299: revise raster garden test to handle new types --------------------------+----------------------------- Reporter: robe | Owner: robe Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS Fund Me Component: raster | Version: 2.0.x Resolution: fixed | Keywords: --------------------------+----------------------------- Changes (by Darafei Praliaskouski ): * resolution: => fixed * status: new => closed Comment: In [changeset:"00d8311983d2e6e4c3234594705289d7ef47bae3/git" 00d8311/git]: {{{#!CommitTicketReference repository="git" revision="00d8311983d2e6e4c3234594705289d7ef47bae3" Fix raster garden SQL placeholder generation Closes #2299 }}} -- Ticket URL: 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. From trac at osgeo.org Sun Nov 15 01:54:55 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 09:54:55 -0000 Subject: [PostGIS] #2299: revise raster garden test to handle new types In-Reply-To: <046.b6031f105fc116f231d319a0ee15be8a@osgeo.org> References: <046.b6031f105fc116f231d319a0ee15be8a@osgeo.org> Message-ID: <061.8f39799339e9a745784d7467bb04d619@osgeo.org> #2299: revise raster garden test to handle new types --------------------------+----------------------------- Reporter: robe | Owner: robe Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS Fund Me Component: raster | Version: 2.0.x Resolution: fixed | Keywords: --------------------------+----------------------------- Comment (by Darafei Praliaskouski ): In [changeset:"9985d1517a1874f06bec7171b8ed4cd6c948ce26/git" 9985d151/git]: {{{#!CommitTicketReference repository="git" revision="9985d1517a1874f06bec7171b8ed4cd6c948ce26" garden: keep raster out-db fixtures runnable Use a compact single-row source for the generated ST_CreateOverview case, and copy the existing test TIFF to a server-readable temp path before raster garden SQL generation so ST_AddBand out-db overloads receive a real file. References #2299 }}} -- Ticket URL: 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. From trac at osgeo.org Sun Nov 15 01:54:56 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 09:54:56 -0000 Subject: [PostGIS] #3836: Parallel support for ST_CountAgg, ST_SummaryStatsAgg In-Reply-To: <049.7c8df7d4a01ea990597bf810a0f5b72c@osgeo.org> References: <049.7c8df7d4a01ea990597bf810a0f5b72c@osgeo.org> Message-ID: <064.abfca9d2a9ca1f808ab3322eef2f1680@osgeo.org> #3836: Parallel support for ST_CountAgg, ST_SummaryStatsAgg --------------------------+----------------------------- Reporter: pramsey | Owner: pramsey Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS Fund Me Component: postgis | Version: master Resolution: fixed | Keywords: --------------------------+----------------------------- Changes (by Darafei Praliaskouski ): * resolution: => fixed * status: assigned => closed Comment: In [changeset:"694b98b7b5489cfee51b6ac925b227cba9cbea3d/git" 694b98b7/git]: {{{#!CommitTicketReference repository="git" revision="694b98b7b5489cfee51b6ac925b227cba9cbea3d" Add parallel raster aggregate support Add combine functions for raster ST_CountAgg and ST_SummaryStatsAgg, plus serialize/deserialize support for the internal summary-stats state. Preserve Welford variance state when merging partial aggregates and cover the parallel plan path in raster regression tests. Closes #3836 }}} -- Ticket URL: 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. From trac at osgeo.org Sun Nov 15 01:54:56 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 09:54:56 -0000 Subject: [PostGIS] #3836: Parallel support for ST_CountAgg, ST_SummaryStatsAgg In-Reply-To: <049.7c8df7d4a01ea990597bf810a0f5b72c@osgeo.org> References: <049.7c8df7d4a01ea990597bf810a0f5b72c@osgeo.org> Message-ID: <064.dedde30c4b266df7656c8bf0200368ac@osgeo.org> #3836: Parallel support for ST_CountAgg, ST_SummaryStatsAgg --------------------------+----------------------------- Reporter: pramsey | Owner: pramsey Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS Fund Me Component: postgis | Version: master Resolution: fixed | Keywords: --------------------------+----------------------------- Comment (by Darafei Praliaskouski ): In [changeset:"51f7175e736124e9b648e5098b20689878c2c3ef/git" 51f7175/git]: {{{#!CommitTicketReference repository="git" revision="51f7175e736124e9b648e5098b20689878c2c3ef" NEWS: target entry to 3.7.0beta1 Closes #3836 }}} -- Ticket URL: 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. From trac at osgeo.org Sun Nov 15 01:54:56 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 09:54:56 -0000 Subject: [PostGIS] #5796: Build without pgxs In-Reply-To: <046.c4e23769ad38cdf2c3c17b7064b87b78@osgeo.org> References: <046.c4e23769ad38cdf2c3c17b7064b87b78@osgeo.org> Message-ID: <061.990726ea35ae182e3f67f3a65351e1aa@osgeo.org> #5796: Build without pgxs ---------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: build | Version: master Resolution: | Keywords: ---------------------+--------------------------- Comment (by Darafei Praliaskouski ): In [changeset:"1711c305b13dab8a0838d60df7d28439eeeec0b3/git" 1711c30/git]: {{{#!CommitTicketReference repository="git" revision="1711c305b13dab8a0838d60df7d28439eeeec0b3" build: avoid PGXS for extension SQL bundles Move the generated SQL extension bundle install, uninstall, and clean rules into a local shared fragment instead of including PostgreSQL PGXS only for those data-file targets. This is a partial step toward removing remaining PGXS dependencies; compiled module Makefiles and configure-time PGXS probing still require a separate build-system replacement. References #5796 }}} -- Ticket URL: 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. From trac at osgeo.org Sun Nov 15 01:54:56 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 09:54:56 -0000 Subject: [PostGIS] #5796: Build without pgxs In-Reply-To: <046.c4e23769ad38cdf2c3c17b7064b87b78@osgeo.org> References: <046.c4e23769ad38cdf2c3c17b7064b87b78@osgeo.org> Message-ID: <061.c429188549e098ea4a1559a24dbb9c0e@osgeo.org> #5796: Build without pgxs ---------------------+--------------------------- Reporter: robe | Owner: strk Type: defect | Status: new Priority: medium | Milestone: PostGIS 3.7.1 Component: build | Version: master Resolution: | Keywords: ---------------------+--------------------------- Comment (by Darafei Praliaskouski ): In [changeset:"5432bf32b88bb154b8b3d7a638ee8f84270b05f5/git" 5432bf3/git]: {{{#!CommitTicketReference repository="git" revision="5432bf32b88bb154b8b3d7a638ee8f84270b05f5" build: provide no-PGXS installcheck target References #5796 }}} -- Ticket URL: 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. From trac at osgeo.org Sun Nov 15 01:54:57 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 09:54:57 -0000 Subject: [PostGIS] #6145: ST_AsMVTGeom: skip wagyu for polygons that stay simple in the tile In-Reply-To: <057.7b46772941110060206b5d4ab21b0d9f@osgeo.org> References: <057.7b46772941110060206b5d4ab21b0d9f@osgeo.org> Message-ID: <072.02c1d2ab4ef16b304c909173ecc0bef1@osgeo.org> #6145: ST_AsMVTGeom: skip wagyu for polygons that stay simple in the tile ------------------------------+--------------------------- Reporter: johncarmack1984 | Owner: pramsey Type: enhancement | Status: closed Priority: medium | Milestone: PostGIS 3.8.0 Component: postgis | Version: 3.6.x Resolution: fixed | Keywords: mvt ------------------------------+--------------------------- Changes (by John Carmack ): * resolution: => fixed * status: new => closed Comment: In [changeset:"6e93142a89140e1d01cd7cb1a5546011d73c8337/git" 6e93142/git]: {{{#!CommitTicketReference repository="git" revision="6e93142a89140e1d01cd7cb1a5546011d73c8337" Skip wagyu in ST_AsMVTGeom for polygons that stay simple in the tile ST_AsMVTGeom sent every polygon through wagyu, including the single rings inside the tile that wagyu hands back unchanged apart from their orientation, collinear vertices and start vertex: rings that are still simple after the snap to the tile grid and whose edges stay clear of every other vertex's pixel. mvt_clip_and_validate now finds those rings first, with exact int64 tests, and writes them the way wagyu would. Everything else goes to wagyu as before, and the output is the same byte for byte. Closes #6145 }}} -- Ticket URL: 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. From git at osgeo.org Sun Nov 15 01:54:57 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 15 Nov 2026 01:54:57 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.6 updated. 3.6.4-156-gb3cd6ff2c Message-ID: <20261115095457.C967A426D3@trac.osgeo.org> 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, stable-3.6 has been updated via b3cd6ff2cedb2b17b11407c64b532946bf472619 (commit) via 5d9f0f30edb001c8c3d94af148113fa39342aa05 (commit) via 536718423a3ee58564455f53e99b3c048c13525f (commit) from 82b51ba31c5303c600d9bb6272ed4e94c6843115 (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 b3cd6ff2cedb2b17b11407c64b532946bf472619 Author: Darafei Praliaskouski Date: Sun Nov 15 13:07:24 2026 +0400 Correct column-list comment spelling diff --git a/loader/shp2pgsql-core.h b/loader/shp2pgsql-core.h index 905f92253..748d4773a 100644 --- a/loader/shp2pgsql-core.h +++ b/loader/shp2pgsql-core.h @@ -192,7 +192,7 @@ typedef struct shp_loader_state /* Pointer to an array of PostgreSQL field types */ char **pgfieldtypes; - /* String containing colume name list in the form "col1, col2, col3 ... , colN" */ + /* String containing column name list in the form "col1, col2, col3 ... , colN" */ char *col_names; /* String containing the PostGIS geometry type, e.g. POINT, POLYGON etc. */ commit 5d9f0f30edb001c8c3d94af148113fa39342aa05 Author: Darafei Praliaskouski Date: Sun Nov 8 10:31:53 2026 +0400 News entry for GH-1178 diff --git a/NEWS b/NEWS index 6f085e24b..1923c6d5c 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ PostGIS 3.6.5dev * Fixes * +- GH-1178, Avoid NULL dereferences when column-map allocation fails and make + partial column-map cleanup safe (Maksim Korotkov) - GT-779, [raster] Make postgis.enable_outdb_rasters=off enforce offline-band metadata and pixel-read restrictions after upgrade (reported by Sarath Kumar, IITM Pravartak Security Team; commit 536718423a3ee58564455f53e99b3c048c13525f Author: Maksim Korotkov Date: Mon Sep 7 18:06:41 2026 +0300 loader: check column map allocations and fix cleanup Check the return of malloc/calloc in colmap_read and bail out with an error instead of dereferencing NULL on the pgfieldnames/dbffieldnames array and per-field string allocations. The column map arrays are now calloc'd so unused slots are NULL-initialized. Rework colmap_clean to be safe on partial state: early-return on NULL, free the field-name arrays unconditionally (free(NULL) is valid), and reset the map via colmap_init so the map is reusable and a subsequent ShpLoaderDestroy colmap_clean call stays safe. The calloc-failure path resets map->size first so the cleanup loop doesn't index a half-allocated array. Signed-off-by: Maksim Korotkov Closes https://github.com/postgis/postgis/pull/1178 for PostGIS 3.6 (cherry picked from commit 6a9387914570bcdcf6a4a4b4557a17a9c6abeb28) diff --git a/loader/shpcommon.c b/loader/shpcommon.c index a27d45dc4..0c82089f3 100644 --- a/loader/shpcommon.c +++ b/loader/shpcommon.c @@ -171,18 +171,21 @@ void colmap_clean(colmap *map) { int i; - if (map != NULL){ - if (map->size) + if (map == NULL) + { + return; + } + if (map->size) + { + for (i = 0; i < map->size; i++) { - for (i = 0; i < map->size; i++) - { - if (map->pgfieldnames[i]) free(map->pgfieldnames[i]); - if (map->dbffieldnames[i]) free(map->dbffieldnames[i]); - } - free(map->pgfieldnames); - free(map->dbffieldnames); + free(map->pgfieldnames[i]); + free(map->dbffieldnames[i]); } } + free(map->pgfieldnames); + free(map->dbffieldnames); + colmap_init(map); } const char * @@ -232,13 +235,30 @@ colmap_read(const char *filename, colmap *map, char *errbuf, size_t errbuflen) return 0; } + /* Release any prior contents and reset the map so this call is safe to + * reuse on the same struct (and so ++map->size below starts from zero) */ + colmap_clean(map); + /* First count how many columns we have... */ while (fgets(linebuffer, 1024, fptr) != NULL) ++map->size; + if (!map->size) + { + fclose(fptr); + return 1; + } /* Now we know the final size, allocate the arrays and load the data */ fseek(fptr, 0, SEEK_SET); - map->pgfieldnames = (char **)malloc(sizeof(char *) * map->size); - map->dbffieldnames = (char **)malloc(sizeof(char *) * map->size); + map->pgfieldnames = (char **)calloc(map->size, sizeof(char *)); + map->dbffieldnames = (char **)calloc(map->size, sizeof(char *)); + if (!map->pgfieldnames || !map->dbffieldnames) + { + map->size = 0; + colmap_clean(map); + fclose(fptr); + snprintf(errbuf, errbuflen, _("ERROR: Unable to allocate memory for column map file %s"), filename); + return 0; + } /* Read in a line at a time... */ curmapsize = 0; @@ -251,6 +271,13 @@ colmap_read(const char *filename, colmap *map, char *errbuf, size_t errbuflen) /* Allocate memory and copy the string ensuring it is terminated */ map->pgfieldnames[curmapsize] = malloc(fieldnamesize + 1); + if (!map->pgfieldnames[curmapsize]) + { + colmap_clean(map); + fclose(fptr); + snprintf(errbuf, errbuflen, _("ERROR: Unable to allocate memory for column map file %s"), filename); + return 0; + } strncpy(map->pgfieldnames[curmapsize], tmpstr, fieldnamesize); map->pgfieldnames[curmapsize][fieldnamesize] = '\0'; @@ -263,6 +290,13 @@ colmap_read(const char *filename, colmap *map, char *errbuf, size_t errbuflen) /* Allocate memory and copy the string ensuring it is terminated */ map->dbffieldnames[curmapsize] = malloc(fieldnamesize + 1); + if (!map->dbffieldnames[curmapsize]) + { + colmap_clean(map); + fclose(fptr); + snprintf(errbuf, errbuflen, _("ERROR: Unable to allocate memory for column map file %s"), filename); + return 0; + } strncpy(map->dbffieldnames[curmapsize], tmpstr, fieldnamesize); map->dbffieldnames[curmapsize][fieldnamesize] = '\0'; ----------------------------------------------------------------------- Summary of changes: NEWS | 2 ++ loader/shp2pgsql-core.h | 2 +- loader/shpcommon.c | 56 +++++++++++++++++++++++++++++++++++++++---------- 3 files changed, 48 insertions(+), 12 deletions(-) hooks/post-receive -- PostGIS From git at osgeo.org Sun Nov 15 01:55:00 2026 From: git at osgeo.org (git at osgeo.org) Date: Sun, 15 Nov 2026 01:55:00 -0800 (PST) Subject: [SCM] PostGIS branch stable-3.7 updated. 3.7.0-3-gccd4cdd34 Message-ID: <20261115095500.483C24276A@trac.osgeo.org> 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, stable-3.7 has been updated via ccd4cdd3477f540961146a19f544f60861ced6f2 (commit) from 814dca10b883ef3f9072ac18821aec1ed976ef5a (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 ccd4cdd3477f540961146a19f544f60861ced6f2 Author: Darafei Praliaskouski Date: Sun Nov 15 12:58:52 2026 +0400 News entry for GH-1178 diff --git a/NEWS b/NEWS index 7f0e83a44..ad5aca1b5 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +PostGIS 3.7.1dev +2026/xx/xx + +* Bug Fixes * + + - GH-1178, Avoid NULL dereferences when column-map allocation fails and make + partial column-map cleanup safe (Maksim Korotkov) + + PostGIS 3.7.0 2026/10/29 ----------------------------------------------------------------------- Summary of changes: NEWS | 9 +++++++++ 1 file changed, 9 insertions(+) hooks/post-receive -- PostGIS From trac at osgeo.org Sun Nov 15 10:59:08 2026 From: trac at osgeo.org (PostGIS) Date: Sun, 15 Nov 2026 18:59:08 -0000 Subject: [PostGIS] #6156: ST_AsMVT: pack tiles without protobuf-c's generic packer Message-ID: <057.266ec9beeb5cf40eaa567c9f2026d7fa@osgeo.org> #6156: ST_AsMVT: pack tiles without protobuf-c's generic packer -----------------------------+--------------------------- Reporter: johncarmack1984 | Owner: pramsey Type: enhancement | Status: new Priority: medium | Milestone: PostGIS 3.8.0 Component: postgis | Version: 3.6.x Keywords: mvt | -----------------------------+--------------------------- ST_AsMVT packs the finished tile with `vector_tile__tile__pack`, which walks protobuf-c's field descriptors for every feature and value twice, once to size the tile and once to write it. That packing is 11% of the instructions in a Berlin z14 roads tile and 14% in a points tile. GH-1192 writes the tile directly, in the same bytes. ||= =||= Before =||= After =||= Ratio =|| || Berlin z14 points tile, tiles/s, 8 clients || 154 || 165 || 1.07 || || Berlin z14 roads tile, tiles/s, 4 clients || 633 || 661 || 1.04 || || Packing a 100,000-point tile, instructions || 140.5M || 42.0M || 3.3x fewer || 94,047 Berlin building tiles and 17 tiles across five layers come out byte for byte the same as master. This is for 3.8. Pull request: https://github.com/postgis/postgis/pull/1192 -- Ticket URL: 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.