Cleaned up more code from landmark that wasn't used. Experimenting with power generator:source stuff
This commit is contained in:
@@ -24,32 +24,6 @@ $$ LANGUAGE plpgsql;
|
||||
|
||||
SELECT update_osm_lm_point();
|
||||
|
||||
CREATE OR REPLACE FUNCTION update_osm_lm_point_agg() RETURNS void AS
|
||||
$$
|
||||
BEGIN
|
||||
UPDATE osm_lm_point p
|
||||
SET agg_stop = CASE
|
||||
WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway')
|
||||
THEN 1
|
||||
END;
|
||||
|
||||
UPDATE osm_lm_point p
|
||||
SET agg_stop = (
|
||||
CASE
|
||||
WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway')
|
||||
AND r.rk IS NULL OR r.rk = 1
|
||||
THEN 1
|
||||
END)
|
||||
FROM osm_lm_stop_rank r
|
||||
WHERE p.osm_id = r.osm_id;
|
||||
|
||||
END;
|
||||
$$ LANGUAGE plpgsql;
|
||||
|
||||
ALTER TABLE osm_lm_point
|
||||
ADD COLUMN IF NOT EXISTS agg_stop integer DEFAULT NULL;
|
||||
SELECT update_osm_lm_point_agg();
|
||||
|
||||
-- Handle updates
|
||||
|
||||
CREATE SCHEMA IF NOT EXISTS lm_point;
|
||||
@@ -75,7 +49,6 @@ BEGIN
|
||||
PERFORM update_osm_lm_point();
|
||||
REFRESH MATERIALIZED VIEW osm_lm_stop_centroid;
|
||||
REFRESH MATERIALIZED VIEW osm_lm_stop_rank;
|
||||
PERFORM update_osm_lm_point_agg();
|
||||
-- noinspection SqlWithoutWhere
|
||||
DELETE FROM lm_point.updates;
|
||||
RETURN NULL;
|
||||
|
||||
Reference in New Issue
Block a user