distance to bbox, not to feature

This commit is contained in:
Darafei Praliaskouski 2012-11-06 17:25:53 +03:00
parent acc89e2f34
commit 65036aa8f7

View file

@ -237,9 +237,9 @@ if options.renderer == "mapnik":
# a = "replace(" + a + ", '"+ i+ j + "', '"+ i+ k + "')"
elif locale == "be":
columnmap["name"] = ("""COALESCE("name:be",
(select kot__nab from (select "name:be" as kot__nab, name as kot__name, way as kot__way from %sline) z where kot__name = name and kot__nab is not null order by st_distance(way, kot__way) limit 1),
(select kot__nab from (select "name:be" as kot__nab, name as kot__name, way as kot__way from %spoint) z where kot__name = name and kot__nab is not null order by st_distance(way, kot__way) limit 1),
(select kot__nab from (select "name:be" as kot__nab, name as kot__name, way as kot__way from %spolygon) z where kot__name = name and kot__nab is not null order by st_distance(way, kot__way) limit 1),
(select kot__nab from (select "name:be" as kot__nab, name as kot__name from %sline) z where kot__name = name and kot__nab is not null order by st_distance(way, !bbox!) limit 1),
(select kot__nab from (select "name:be" as kot__nab, name as kot__name from %spoint) z where kot__name = name and kot__nab is not null order by st_distance(way, !bbox!) limit 1),
(select kot__nab from (select "name:be" as kot__nab, name as kot__name from %spolygon) z where kot__name = name and kot__nab is not null order by st_distance(way, !bbox!) limit 1),
"name:ru",
"int_name",
"name:en",