Permalink
Browse files

take non-admin boundaries out of address computation

fixes #90
  • Loading branch information...
1 parent 8675a26 commit 71429b91b40921acc9c4d059b3b8e2d5c53ef07a @lonvia lonvia committed Oct 15, 2013
Showing with 5 additions and 1 deletion.
  1. +5 −1 sql/functions.sql
View
@@ -1123,7 +1123,11 @@ BEGIN
return NULL;
END IF;
NEW.rank_search := NEW.admin_level * 2;
- NEW.rank_address := NEW.rank_search;
+ IF NEW.type = 'administrative' THEN
+ NEW.rank_address := NEW.rank_search;
+ ELSE
+ NEW.rank_address := 0;
+ END IF;
ELSEIF NEW.class = 'landuse' AND ST_GeometryType(NEW.geometry) in ('ST_Polygon','ST_MultiPolygon') THEN
NEW.rank_search := 22;
NEW.rank_address := NEW.rank_search;

0 comments on commit 71429b9

Please sign in to comment.