Skip to content

Commit

Permalink
docs: tweak comment lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Sep 21, 2024
1 parent 9f32901 commit a467a2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions fmtm_splitter/fmtm_algorithm.sql
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,10 @@ CREATE TABLE clusteredbuildings AS (
),

-- Cluster the buildings within each splitpolygon. The second term in the
-- call to the ST_ClusterKMeans function is the number of clusters to create,
-- so we're dividing the number of features by a constant (10 in this case)
-- to get the number of clusters required to get close to the right number
-- of features per cluster.
-- call to the ST_ClusterKMeans function is the number of clusters to
-- create, so we're dividing the number of features by a constant
-- (10 in this case) to get the number of clusters required to get close
-- to the right number of features per cluster.
-- TODO: This should certainly not be a hardcoded, the number of features
-- per cluster should come from a project configuration table
buildingstocluster AS (
Expand Down Expand Up @@ -417,7 +417,8 @@ CREATE TABLE neighboring_polygons AS (
);

-- Step 4: Find the optimal neighboring polygon to avoid,
-- same polygons with the smallest number of buildings merging into multiple neighboring polygons
-- same polygons with the smallest number of buildings merging into
-- multiple neighboring polygons
DROP TABLE IF EXISTS optimal_neighbors;
CREATE TABLE optimal_neighbors AS (
SELECT
Expand Down
2 changes: 1 addition & 1 deletion fmtm_splitter/splitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import geojson
import numpy as np
from geojson import Feature, FeatureCollection, GeoJSON
from osm_rawdata.postgres import PostgresClient
from psycopg2.extensions import connection
from shapely.geometry import Polygon, shape
from shapely.geometry.geo import mapping
Expand All @@ -43,6 +42,7 @@
drop_tables,
insert_geom,
)
from osm_rawdata.postgres import PostgresClient

# Instantiate logger
log = logging.getLogger(__name__)
Expand Down

0 comments on commit a467a2b

Please sign in to comment.