Fix stops aggregation in osm_poi_point. (#1480)

This PR fixing the stops aggregations which now returns always `NULL` and wasn't reflected in the tiles.
This commit is contained in:
Tomas Pohanka 2023-01-26 17:57:31 +01:00 committed by GitHub
parent bc9bbd2e67
commit d2c69b0d45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ BEGIN
THEN 1 THEN 1
END END
WHERE WHERE
agg_stop != CASE agg_stop IS DISTINCT FROM CASE
WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway') WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway')
THEN 1 THEN 1
END; END;
@ -70,15 +70,15 @@ BEGIN
agg_stop = ( agg_stop = (
CASE CASE
WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway') WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway')
AND r.rk IS NULL OR r.rk = 1 AND (r.rk IS NULL OR r.rk = 1)
THEN 1 THEN 1
END) END)
FROM osm_poi_stop_rank r FROM osm_poi_stop_rank r
WHERE p.osm_id = r.osm_id AND WHERE p.osm_id = r.osm_id AND
agg_stop != ( agg_stop IS DISTINCT FROM (
CASE CASE
WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway') WHEN p.subclass IN ('bus_stop', 'bus_station', 'tram_stop', 'subway')
AND r.rk IS NULL OR r.rk = 1 AND (r.rk IS NULL OR r.rk = 1)
THEN 1 THEN 1
END); END);