back to the original signature

This commit is contained in:
abelvm 2016-09-02 14:37:52 +02:00
parent 036a33aced
commit b8ce37eb60

View File

@ -1,5 +1,3 @@
DROP FUNCTION IF EXISTS cdb_contour(geometry[],numeric[],numeric,integer,integer,integer,integer);
CREATE OR REPLACE FUNCTION CDB_Contour( CREATE OR REPLACE FUNCTION CDB_Contour(
IN geomin geometry[], IN geomin geometry[],
IN colin numeric[], IN colin numeric[],
@ -7,7 +5,7 @@ CREATE OR REPLACE FUNCTION CDB_Contour(
IN intmethod integer, IN intmethod integer,
IN classmethod integer, IN classmethod integer,
IN steps integer, IN steps integer,
IN resolution integer DEFAULT -90 IN max_time integer DEFAULT -90
) )
RETURNS TABLE( RETURNS TABLE(
the_geom geometry, the_geom geometry,
@ -19,11 +17,14 @@ RETURNS TABLE(
DECLARE DECLARE
cell_count integer; cell_count integer;
tin geometry[]; tin geometry[];
max_time integer; resolution integer;
BEGIN BEGIN
-- calc the optimal number of cells for the current dataset -- nasty trick to override issue #121
resolution := max_time;
max_time := -1 * resolution; max_time := -1 * resolution;
-- calc the optimal number of cells for the current dataset
SELECT SELECT
CASE intmethod CASE intmethod
WHEN 0 THEN round(3.7745903782 * max_time - 9.4399210051 * array_length(geomin,1) - 1350.8778213073) WHEN 0 THEN round(3.7745903782 * max_time - 9.4399210051 * array_length(geomin,1) - 1350.8778213073)