Gridrank should be int
This commit is contained in:
parent
d9d3b96dc7
commit
ab4413e209
@ -1,10 +1,10 @@
|
|||||||
CREATE OR REPLACE FUNCTION layer_poi(bbox geometry, zoom_level integer, pixel_width numeric)
|
CREATE OR REPLACE FUNCTION layer_poi(bbox geometry, zoom_level integer, pixel_width numeric)
|
||||||
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, class text, subclass text, gridrank bigint) AS $$
|
RETURNS TABLE(osm_id bigint, geometry geometry, name text, name_en text, class text, subclass text, gridrank int) AS $$
|
||||||
SELECT id, geometry, name, NULLIF(name_en, ''), poi_class(subclass) AS class, subclass,
|
SELECT osm_id, geometry, name, NULLIF(name_en, ''), poi_class(subclass) AS class, subclass,
|
||||||
row_number() OVER (
|
row_number() OVER (
|
||||||
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
|
PARTITION BY LabelGrid(geometry, 100 * pixel_width)
|
||||||
ORDER BY poi_class_rank(poi_class(subclass)) ASC, length(name) DESC
|
ORDER BY poi_class_rank(poi_class(subclass)) ASC, length(name) DESC
|
||||||
) AS gridrank
|
)::int AS gridrank
|
||||||
FROM osm_poi_point
|
FROM osm_poi_point
|
||||||
WHERE geometry && bbox
|
WHERE geometry && bbox
|
||||||
AND zoom_level >= 14
|
AND zoom_level >= 14
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user