This reverts commit 1685eaccbd0ab9f8e4b32bcd4f4a20fd502a5d13.
This commit is contained in:
parent
8ba2e18dea
commit
a36db48a3e
@ -12,19 +12,6 @@ CREATE TABLE IF NOT EXISTS housenumber.osm_ids
|
|||||||
-- etldoc: osm_housenumber_point -> osm_housenumber_point
|
-- etldoc: osm_housenumber_point -> osm_housenumber_point
|
||||||
CREATE OR REPLACE FUNCTION convert_housenumber_point(full_update boolean) RETURNS void AS
|
CREATE OR REPLACE FUNCTION convert_housenumber_point(full_update boolean) RETURNS void AS
|
||||||
$$
|
$$
|
||||||
-- Delete housenumber duplicates
|
|
||||||
DELETE FROM osm_housenumber_point
|
|
||||||
WHERE osm_id IN (
|
|
||||||
SELECT pt.osm_id
|
|
||||||
FROM osm_housenumber_point pt
|
|
||||||
INNER JOIN osm_housenumber_point poly
|
|
||||||
ON (ST_GeometryType(poly.geometry) = 'ST_Polygon'
|
|
||||||
AND ST_GeometryType(pt.geometry) = 'ST_Point'
|
|
||||||
AND pt.geometry && poly.geometry
|
|
||||||
AND pt.housenumber = poly.housenumber
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
UPDATE osm_housenumber_point
|
UPDATE osm_housenumber_point
|
||||||
SET geometry =
|
SET geometry =
|
||||||
CASE
|
CASE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user