adding not null filter for geom on kmeans
This commit is contained in:
parent
7f3b23f67a
commit
9d3de5a8ef
@ -5,6 +5,7 @@ def kmeans(query, no_clusters, no_init=20):
|
||||
data = plpy.execute('''select array_agg(cartodb_id order by cartodb_id) as ids,
|
||||
array_agg(ST_X(the_geom) order by cartodb_id) xs,
|
||||
array_agg(ST_Y(the_geom) order by cartodb_id) ys from ({query}) a
|
||||
where the_geom is not null
|
||||
'''.format(query=query))
|
||||
|
||||
xs = data[0]['xs']
|
||||
|
Loading…
Reference in New Issue
Block a user