fixing bugs and adding contours to the payload
This commit is contained in:
parent
e59befae82
commit
874b5318ff
@ -1,17 +1,3 @@
|
||||
CREATE OR REPLACE FUNCTION
|
||||
CDB_Contours (
|
||||
subquery TEXT,
|
||||
grid_size NUMERIC DEFAULT 100,
|
||||
bandwidth NUMERIC DEFAULT 0.0001,
|
||||
levels NUMERIC[] DEFAULT null
|
||||
)
|
||||
RETURNS table (level Numeric, geom text )
|
||||
AS $$
|
||||
RETURN QUERY
|
||||
select level, ST_GeomFromText(geom_text, 4326) as geom from _CDB_Contours(subquery,grid_size,bandwidth,levels);
|
||||
RETURN;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION
|
||||
_CDB_Contours (
|
||||
@ -26,3 +12,19 @@ AS $$
|
||||
# TODO: use named parameters or a dictionary
|
||||
return cdb_generate_contours(subquery, grid_size, bandwidth, levels)
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
|
||||
CREATE OR REPLACE FUNCTION
|
||||
CDB_Contours (
|
||||
subquery TEXT,
|
||||
grid_size NUMERIC DEFAULT 100,
|
||||
bandwidth NUMERIC DEFAULT 0.0001,
|
||||
levels NUMERIC[] DEFAULT null
|
||||
)
|
||||
RETURNS table (level Numeric, geom text )
|
||||
AS $$
|
||||
BEGIN
|
||||
RETURN QUERY
|
||||
select l as level, ST_GeomFromText(geom_text, 4326) as geom from _CDB_Contours(subquery,grid_size,bandwidth,levels);
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
@ -1,2 +1,3 @@
|
||||
import random_seeds
|
||||
import clustering
|
||||
import contours
|
||||
|
Loading…
Reference in New Issue
Block a user