]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 8 Oct 2014 18:36:40 +0000 (20:36 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 8 Oct 2014 18:36:40 +0000 (20:36 +0200)
sql/functions.sql
sql/indices.src.sql
tests/features/db/import/placex.feature

index 72e52130c9baf76a67a80ba6b3b192ae04bea7e8..4aef74d1d28089f63a96fcc0dcaac6bc607d4351 100644 (file)
@@ -1112,7 +1112,11 @@ BEGIN
       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;
+      IF NEW.type in ('residential', 'farm', 'farmyard', 'industrial', 'commercial', 'allotments', 'retail') THEN
+        NEW.rank_address := NEW.rank_search;
+      ELSE
+        NEW.rank_address := 0;
+      END IF;
     ELSEIF NEW.class = 'natural' and NEW.type in ('peak','volcano','mountain_range') THEN
       NEW.rank_search := 18;
       NEW.rank_address := 0;
index 37d53a052f936aece5fcc3e8a8e092cd01d09aa1..4685ae2f7d5ac3b71f6e653932a099f661ddf425 100644 (file)
@@ -28,3 +28,6 @@ CREATE INDEX idx_location_property_-partition-_centroid ON location_property_-pa
 -- end
 
 CREATE UNIQUE INDEX idx_place_osm_unique on place using btree(osm_id,osm_type,class,type);
+
+
+CREATE INDEX idx_gb_postcode_postcode ON gb_postcode USING BTREE (postcode);
index a429202a3cf45484f8849a61592e257ea2c03f5e..caa0d17571d4ddc1be754b2ead49f8b5779017ec 100644 (file)
@@ -319,6 +319,7 @@ Feature: Import into placex
           | osm_type | osm_id | class   | type        | geometry
           | W        | 4      | landuse | residential | poly-area:0.1
           | R        | 2      | landuse | residential | poly-area:0.05
+          | R        | 3      | landuse | forrest     | poly-area:0.5
         When importing
         Then table placex has no entry for N1
         And table placex has no entry for W1
@@ -331,6 +332,7 @@ Feature: Import into placex
           | W2     | 30          | 30
           | W4     | 22          | 22
           | R2     | 22          | 22
+          | R3     | 22          | 0
 
     Scenario: rank and inclusion of naturals
        Given the place nodes