Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ Fixes:
against every cell: for Deggendorf and Koeln in one database that
took 29 minutes before linking began. Each building's cell is now
computed from its coordinates; the batches are unchanged.
- Feature extraction works on PostgreSQL 18. There every batch holding
a flat roof or ground surface failed with division by zero in
surface_dimensions, so no building was extracted. PostgreSQL 16 and
17 were not affected. A database created by an earlier release gets
the fixed function on its next -reset-city2tabula.

## v0.11.4 (2026-10-20)

Expand Down
4 changes: 3 additions & 1 deletion sql/functions/01_surface_area_corrected_geom.sql
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ CREATE FUNCTION {city2tabula_schema}.surface_dimensions(
WITH axes AS (
SELECT -ny / h AS ux, nx / h AS uy,
-nz * nx / h AS vx, -nz * ny / h AS vy, h AS vz
FROM (SELECT sqrt(nx * nx + ny * ny) AS h) s
-- NULLIF because PostgreSQL 18 computes the axes of a flat face (h = 0)
-- before the WHERE below discards it, and raises division by zero.
FROM (SELECT NULLIF(sqrt(nx * nx + ny * ny), 0) AS h) s
WHERE ABS(nz) <= 0.985
),
projected AS (
Expand Down
Loading