- IF ST_GeometryType(geometry) in ('ST_Polygon','ST_MultiPolygon') THEN
- FOR secgeo IN select split_geometry(geometry) AS geom LOOP
- PERFORM insertLocationAreaLarge(partition, place_id, country_code, keywords, rank_search, rank_address, false, postcode, centroid, secgeo);
- END LOOP;
-
- ELSEIF ST_GeometryType(geometry) = 'ST_Point' THEN
- secgeo := place_node_fuzzy_area(geometry, rank_search);
- PERFORM insertLocationAreaLarge(partition, place_id, country_code, keywords, rank_search, rank_address, true, postcode, centroid, secgeo);
+ IF ST_Dimension(geometry) = 2 THEN
+ RETURN insertLocationAreaLarge(partition, place_id, country_code, keywords,
+ rank_search, rank_address, false, postcode,
+ centroid, geometry);
+ END IF;