Calcul de répartitions de surfaces

Répartition des surfaces des objets de la table B à l'intérieur des objets de la table A

Version texte
ERROR: function string_to_array(unknown, unknown, unknown, unknown, unknown) does not exist LINE 16: ... ILIKE ANY( string_to_... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts. QUERY: WITH w_globales_a as ( SELECT t_a.objetgeo::text AS objetgeo_a , t_a.gid::text as id_objetgeo_a , ST_area(t_a.geom) as m2_geom_a , geom as geom_a FROM r020_territoire_hydrographie.t_sbvsn_actu t_a WHERE t_a.objetgeo ILIKE ANY( string_to_array('Bassin de la Sèvre Nantaise', ''',''')) -- converti la chaine avec des ',' en array ) , w_globales_b as ( SELECT t_b.nom_dept::text AS objetgeo_b , ST_area(t_b.geom) as m2_geom_b , geom as geom_b , t_b.id_objetgeo::text as id_objetgeo_b FROM r010_administratif_reglementaire.t_departements_bvsn_actu_geofla t_b WHERE t_b.nom_dept ILIKE ANY( string_to_array('MAINE-ET-LOIRE','LOIRE-ATLANTIQUE','VENDEE','DEUX-SEVRES', ''',''')) -- converti la chaine avec des ',' en array ) , w_intersection as ( SELECT t_a.objetgeo AS objetgeo_a , t_b.nom_dept::text AS objetgeo_b , ST_Multi(ST_UNION(ST_Collectionextract( ST_Intersection(t_a.geom, t_b.geom) ,3) ))::geometry(Multipolygon) AS geom_intersection_a_b FROM r020_territoire_hydrographie.t_sbvsn_actu t_a , r010_administratif_reglementaire.t_departements_bvsn_actu_geofla t_b WHERE ST_Intersects(t_a.geom, t_b.geom) AND t_a.objetgeo ILIKE ANY( string_to_array('Bassin de la Sèvre Nantaise', ''',''')) -- converti la chaine avec des ',' en array AND t_b.nom_dept ILIKE ANY( string_to_array('MAINE-ET-LOIRE','LOIRE-ATLANTIQUE','VENDEE','DEUX-SEVRES', ''',''')) -- converti la chaine avec des ',' en array GROUP BY objetgeo_a,objetgeo_b ) SELECT row_number() over () :: bigint as gid , w_intersection.objetgeo_a::text , w_globales_a.id_objetgeo_a::text , w_intersection.objetgeo_b::text , w_globales_b.id_objetgeo_b::text , ((ST_Area (w_intersection.geom_intersection_a_b) /w_globales_a.m2_geom_a )*100.00)::numeric(6,2) AS pc_de_objet_a_qui_intersecte_objet_b , ((ST_Area (w_intersection.geom_intersection_a_b) /w_globales_b.m2_geom_b )*100.00)::numeric(6,2) AS pc_de_objet_b_qui_intersecte_objet_a , ((ST_Area (w_intersection.geom_intersection_a_b))/10000.00):: numeric AS ha_de_intersection_a_b , ((w_globales_a.m2_geom_a)/10000.00) :: numeric AS ha_de_objet_a , ((w_globales_b.m2_geom_b)/10000.00) :: numeric AS ha_de_objet_b , w_globales_a.geom_a , w_globales_b.geom_b , w_intersection.geom_intersection_a_b geometry FROM w_intersection LEFT JOIN w_globales_a ON (w_intersection.objetgeo_a = w_globales_a.objetgeo_a AND w_globales_a.m2_geom_a >0.) LEFT JOIN w_globales_b ON (w_intersection.objetgeo_b = w_globales_b.objetgeo_b AND w_globales_b.m2_geom_b >0.) WHERE ST_Area (w_intersection.geom_intersection_a_b) >0. order by w_intersection.objetgeo_a::text, w_intersection.objetgeo_b::text ; CONTEXT: PL/pgSQL function f_tables_decoupe_surface_de_a_par_b_et_reparti_valeurs_v04_01(name,name,name,name,name,text,name,name,name,name,name,name,text,name,boolean,boolean,boolean,text,text) line 327 at RETURN QUERY