- secgeo := ST_Buffer(geometry, diameter);
- INSERT INTO location_area values (place_id, country_code, name, keywords,
- rank_search, rank_address, true, ST_Centroid(geometry), secgeo);
-
- END IF;
-
- INSERT INTO location_point values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
-
- RETURN true;
-
- IF not isarea THEN
- IF rank_search < 26 THEN
- INSERT INTO location_point_26 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 25 THEN
- INSERT INTO location_point_25 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 24 THEN
- INSERT INTO location_point_24 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 23 THEN
- INSERT INTO location_point_23 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 22 THEN
- INSERT INTO location_point_22 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 21 THEN
- INSERT INTO location_point_21 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 20 THEN
- INSERT INTO location_point_20 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 19 THEN
- INSERT INTO location_point_19 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 18 THEN
- INSERT INTO location_point_18 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 17 THEN
- INSERT INTO location_point_17 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 16 THEN
- INSERT INTO location_point_16 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 15 THEN
- INSERT INTO location_point_15 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 14 THEN
- INSERT INTO location_point_14 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 13 THEN
- INSERT INTO location_point_13 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 12 THEN
- INSERT INTO location_point_12 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 11 THEN
- INSERT INTO location_point_11 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 10 THEN
- INSERT INTO location_point_10 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 9 THEN
- INSERT INTO location_point_9 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 8 THEN
- INSERT INTO location_point_8 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 7 THEN
- INSERT INTO location_point_7 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 6 THEN
- INSERT INTO location_point_6 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 5 THEN
- INSERT INTO location_point_5 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 4 THEN
- INSERT INTO location_point_4 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 3 THEN
- INSERT INTO location_point_3 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 2 THEN
- INSERT INTO location_point_2 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- IF rank_search < 1 THEN
- INSERT INTO location_point_1 values (place_id,country_code,name,keywords,rank_search,rank_address,isarea,ST_Centroid(geometry));
- END IF;END IF;END IF;END IF;END IF;END IF;END IF;END IF;END IF;END IF;
- END IF;END IF;END IF;END IF;END IF;END IF;END IF;END IF;END IF;END IF;
- END IF;END IF;END IF;END IF;END IF;END IF;END IF;
- RETURN true;
- END IF;
-
- RETURN false;
-END;
-$$
-LANGUAGE plpgsql;