export centroid to tokenizer

May come in handy when developping sanitizers for an area smaller
than country size.
This commit is contained in:
Sarah Hoffmann
2022-07-31 22:10:58 +02:00
parent e427712cb0
commit b19c90b9a6
2 changed files with 15 additions and 2 deletions

View File

@@ -16,7 +16,9 @@ CREATE TYPE prepare_update_info AS (
country_code TEXT,
class TEXT,
type TEXT,
linked_place_id BIGINT
linked_place_id BIGINT,
centroid_x float,
centroid_y float
);
-- Retrieve the data needed by the indexer for updating the place.
@@ -71,6 +73,8 @@ BEGIN
result.type := p.type;
result.country_code := p.country_code;
result.rank_address := p.rank_address;
result.centroid_x := ST_X(p.centroid);
result.centroid_y := ST_Y(p.centroid);
-- Names of linked places need to be merged in, so search for a linkable
-- place already here.