kopia lustrzana https://github.com/openmaptiles/openmaptiles
ST_PointOnSurface instead of topoint
rodzic
0945c5f04c
commit
153976735f
|
@ -4,7 +4,7 @@ DROP TRIGGER IF EXISTS trigger_refresh ON housenumber.updates;
|
||||||
-- etldoc: osm_housenumber_point -> osm_housenumber_point
|
-- etldoc: osm_housenumber_point -> osm_housenumber_point
|
||||||
CREATE OR REPLACE FUNCTION convert_housenumber_point() RETURNS VOID AS $$
|
CREATE OR REPLACE FUNCTION convert_housenumber_point() RETURNS VOID AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
UPDATE osm_housenumber_point SET geometry=topoint(geometry) WHERE ST_GeometryType(geometry) <> 'ST_Point';
|
UPDATE osm_housenumber_point SET geometry=ST_PointOnSurface(geometry) WHERE ST_GeometryType(geometry) <> 'ST_Point';
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE plpgsql;
|
$$ LANGUAGE plpgsql;
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ DROP TRIGGER IF EXISTS trigger_refresh ON place_island.updates;
|
||||||
-- etldoc: osm_island_polygon -> osm_island_polygon
|
-- etldoc: osm_island_polygon -> osm_island_polygon
|
||||||
CREATE OR REPLACE FUNCTION convert_island_polygon_point() RETURNS VOID AS $$
|
CREATE OR REPLACE FUNCTION convert_island_polygon_point() RETURNS VOID AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
UPDATE osm_island_polygon SET geometry=topoint(geometry) WHERE ST_GeometryType(geometry) <> 'ST_Point';
|
UPDATE osm_island_polygon SET geometry=ST_PointOnSurface(geometry) WHERE ST_GeometryType(geometry) <> 'ST_Point';
|
||||||
ANALYZE osm_island_polygon;
|
ANALYZE osm_island_polygon;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE plpgsql;
|
$$ LANGUAGE plpgsql;
|
||||||
|
|
|
@ -5,7 +5,7 @@ DROP TRIGGER IF EXISTS trigger_refresh ON poi.updates;
|
||||||
|
|
||||||
CREATE OR REPLACE FUNCTION convert_poi_point() RETURNS VOID AS $$
|
CREATE OR REPLACE FUNCTION convert_poi_point() RETURNS VOID AS $$
|
||||||
BEGIN
|
BEGIN
|
||||||
UPDATE osm_poi_polygon SET geometry=topoint(geometry) WHERE ST_GeometryType(geometry) <> 'ST_Point';
|
UPDATE osm_poi_polygon SET geometry=ST_PointOnSurface(geometry) WHERE ST_GeometryType(geometry) <> 'ST_Point';
|
||||||
ANALYZE osm_poi_polygon;
|
ANALYZE osm_poi_polygon;
|
||||||
END;
|
END;
|
||||||
$$ LANGUAGE plpgsql;
|
$$ LANGUAGE plpgsql;
|
||||||
|
|
|
@ -7,7 +7,7 @@ DROP MATERIALIZED VIEW IF EXISTS osm_water_point CASCADE;
|
||||||
|
|
||||||
CREATE MATERIALIZED VIEW osm_water_point AS (
|
CREATE MATERIALIZED VIEW osm_water_point AS (
|
||||||
SELECT
|
SELECT
|
||||||
wp.osm_id, topoint(wp.geometry) AS geometry,
|
wp.osm_id, ST_PointOnSurface(wp.geometry) AS geometry,
|
||||||
wp.name, wp.name_en, ST_Area(wp.geometry) AS area
|
wp.name, wp.name_en, ST_Area(wp.geometry) AS area
|
||||||
FROM osm_water_polygon AS wp
|
FROM osm_water_polygon AS wp
|
||||||
LEFT JOIN lake_centerline ll ON wp.osm_id = ll.osm_id
|
LEFT JOIN lake_centerline ll ON wp.osm_id = ll.osm_id
|
||||||
|
|
Ładowanie…
Reference in New Issue