Skip to content

Commit

Permalink
fix: invalid inclusion of alias to get num_buildings by pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Sujanadh committed Oct 4, 2024
1 parent f1f35cc commit 29c2af2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fmtm_splitter/fmtm_algorithm.sql
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ CREATE TABLE lowfeaturecountpolygons AS (
SELECT *
FROM splitpolygons AS p
-- TODO: feature count should not be hard-coded
WHERE p.numfeatures < p.%(num_buildings)s
WHERE p.numfeatures < %(num_buildings)s
),

-- Find the neighbors of the low-feature-count polygons
Expand Down Expand Up @@ -245,7 +245,7 @@ CREATE TABLE clusteredbuildings AS (
*,
ST_CLUSTERKMEANS(
b.geom,
CAST((b.numfeatures / b.%(num_buildings)s) + 1 AS integer)
CAST((b.numfeatures / %(num_buildings)s) + 1 AS integer)
)
OVER (PARTITION BY b.polyid)
AS cid
Expand Down

0 comments on commit 29c2af2

Please sign in to comment.