1 /* This function use H3C AND AS4_CONVERT
2 * by G.Landais (CDS) 7/9/2012
6 CREATE OR REPLACE FUNCTION h3c_box_to_poly_csys(double precision, double precision, double precision, double precision, varchar, varchar)
7 RETURNS double precision[]
9 SELECT Array[(as4_convert((h3c_box_to_poly($1,$2,$3,$4))[1],(h3c_box_to_poly($1,$2,$3,$4))[2],$5,$6))[1],
10 (as4_convert((h3c_box_to_poly($1,$2,$3,$4))[1],(h3c_box_to_poly($1,$2,$3,$4))[2],$5,$6))[2],
11 (as4_convert((h3c_box_to_poly($1,$2,$3,$4))[3],(h3c_box_to_poly($1,$2,$3,$4))[4],$5,$6))[1],
12 (as4_convert((h3c_box_to_poly($1,$2,$3,$4))[3],(h3c_box_to_poly($1,$2,$3,$4))[4],$5,$6))[2],
13 (as4_convert((h3c_box_to_poly($1,$2,$3,$4))[5],(h3c_box_to_poly($1,$2,$3,$4))[6],$5,$6))[1],
14 (as4_convert((h3c_box_to_poly($1,$2,$3,$4))[5],(h3c_box_to_poly($1,$2,$3,$4))[6],$5,$6))[2],
15 (as4_convert((h3c_box_to_poly($1,$2,$3,$4))[7],(h3c_box_to_poly($1,$2,$3,$4))[8],$5,$6))[1],
16 (as4_convert((h3c_box_to_poly($1,$2,$3,$4))[7],(h3c_box_to_poly($1,$2,$3,$4))[8],$5,$6))[2]]
17 ' LANGUAGE SQL IMMUTABLE;