Changes between Initial Version and Version 1 of Ticket #4850


Ignore:
Timestamp:
Feb 14, 2021, 5:50:05 PM (3 years ago)
Author:
robe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4850 – Description

    initial v1  
    2121{{{
    2222-- no weight
    23 SELECT ST_ClusterKMeans(geom, 5) OVER() AS cid, parcel_id, population
     23SELECT ST_ClusterKMeans(ST_Centroid(geom), 5) OVER() AS cid, parcel_id, population
    2424FROM parcels
    2525ORDER BY cid, parcel_id;
    2626
    2727-- yields
    28 
    2928 cid | parcel_id | population
    3029-----+-----------+------------
     
    4443-- with weight by population
    4544
    46 SELECT ST_ClusterKMeans(ST_Force3DM(geom, population), 5) OVER() AS cid, parcel_id, population
     45SELECT ST_ClusterKMeans(ST_Force3DM(ST_Centroid(geom), population), 5) OVER() AS cid, parcel_id, population
    4746FROM parcels
    4847ORDER BY cid, parcel_id;
     
    5958   4 | 005       |          1
    6059(7 rows)
     60
    6161}}}
    6262