Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 22, 2024
1 parent a20a152 commit 2bbb72f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fmtm_splitter/fmtm_algorithm.sql
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ CREATE TABLE clusteredbuildings AS (
*,
ST_CLUSTERKMEANS(
b.geom,
CAST((b.numfeatures / %(num_buildings)s) + 1 AS integer)
CAST((b.numfeatures / b.%(num_buildings)s) + 1 AS integer)
)
OVER (PARTITION BY b.polyid)
AS cid
Expand Down Expand Up @@ -377,7 +377,7 @@ CREATE TABLE taskpolygons AS (
FROM taskpolygonsnoindex AS tpni
);

ALTER TABLE taskpolygons ADD PRIMARY KEY(taskid);
ALTER TABLE taskpolygons ADD PRIMARY KEY (taskid);
SELECT POPULATE_GEOMETRY_COLUMNS('public.taskpolygons'::regclass);
CREATE INDEX taskpolygons_idx
ON taskpolygons
Expand Down Expand Up @@ -457,10 +457,10 @@ FROM (
'properties', JSONB_BUILD_OBJECT(
'building_count', (
SELECT COUNT(b.id)
FROM buildings b
WHERE ST_Contains(t.geom, b.geom)
FROM buildings AS b
WHERE ST_CONTAINS(t.geom, b.geom)
)
)
) AS feature
FROM taskpolygons t
) AS features;
FROM taskpolygons AS t
) AS features;

0 comments on commit 2bbb72f

Please sign in to comment.