]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 20 Nov 2018 19:26:56 +0000 (20:26 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 20 Nov 2018 19:26:56 +0000 (20:26 +0100)
docs/admin/Faq.md
osm2pgsql
sql/functions.sql
test/bdd/api/search/params.feature
test/bdd/api/search/queries.feature
test/bdd/db/import/placex.feature
test/bdd/osm2pgsql/import/tags.feature

index a0e1cafebc5849f328502a43f661f02b67ece61b..1e874c789bf5b210985a542080ecd41829590fe0 100644 (file)
@@ -71,6 +71,15 @@ and recompile (`cmake .. && make`).
 Reinstall the nominatim functions with `setup.php --create--functions`
 and check for any errors, e.g. a missing `nominatim.so` file.
 
+### I see the error: "ERROR: mmap (remap) failed"
+
+This may be a simple out-of-memory error. Try reducing the memory used
+for `--osm2pgsql-cache`. Also make sure that overcommitting memory is
+allowed: `cat /proc/sys/vm/overcommit_memory` should print 0 or 1.
+
+If you are using a flatnode file, then it may also be that the underlying
+filesystem does not fully support 'mmap'. A notable candidate is virtualbox's
+vboxfs.
 
 ### The website shows: "Could not get word tokens"
 
index 93b73e5f5c3b20e80027ecf272f553d26f49f2e8..433ad388b88d74235e9fc4dd12fa608719b32904 160000 (submodule)
--- a/osm2pgsql
+++ b/osm2pgsql
@@ -1 +1 @@
-Subproject commit 93b73e5f5c3b20e80027ecf272f553d26f49f2e8
+Subproject commit 433ad388b88d74235e9fc4dd12fa608719b32904
index 33a5e6b9709647959b1abe45c988dd9388f45454..f1f473b6460626806b5bc20feb3dee799983b2f3 100644 (file)
@@ -869,20 +869,24 @@ BEGIN
         END IF;
 
     ELSEIF NEW.class = 'place' THEN
-      IF NEW.type in ('continent') THEN
-        NEW.rank_search := 2;
-        NEW.rank_address := NEW.rank_search;
-        NEW.country_code := NULL;
-      ELSEIF NEW.type in ('sea') THEN
+      IF NEW.type in ('continent', 'sea') THEN
         NEW.rank_search := 2;
         NEW.rank_address := 0;
         NEW.country_code := NULL;
       ELSEIF NEW.type in ('country') THEN
         NEW.rank_search := 4;
-        NEW.rank_address := NEW.rank_search;
+        IF ST_GeometryType(NEW.geometry) IN ('ST_Polygon','ST_MultiPolygon') THEN
+            NEW.rank_address := NEW.rank_search;
+        ELSE
+            NEW.rank_address := 0;
+        END IF;
       ELSEIF NEW.type in ('state') THEN
         NEW.rank_search := 8;
-        NEW.rank_address := NEW.rank_search;
+        IF ST_GeometryType(NEW.geometry) IN ('ST_Polygon','ST_MultiPolygon') THEN
+            NEW.rank_address := NEW.rank_search;
+        ELSE
+            NEW.rank_address := 0;
+        END IF;
       ELSEIF NEW.type in ('region') THEN
         NEW.rank_search := 18; -- dropped from previous value of 10
         NEW.rank_address := 0; -- So badly miss-used that better to just drop it!
index feacd5f95586bf3ba1d6b489144c4b4842762f9d..23a8670540359f9cbec9e597e87ad6d5c512cd8b 100644 (file)
@@ -51,7 +51,7 @@ Feature: Search queries
           | en |
         Then results contain
           | display_name |
-          | Plei Ya Rê, Kon Tum province, Vietnam |
+          | Plei Ya Rê, Vietnam |
 
     Scenario: Address details with unknown class types
         When sending json search query "Hundeauslauf, Hamburg" with address
index 832d888468a9bd8027dd4e3f249c47339ee3093f..cf5a00c9c093ebb37be08bc43d9a8b4b726114f4 100644 (file)
@@ -26,7 +26,6 @@ Feature: Search queries
           | suburb        | Eilbek |
           | postcode      | 22089 |
           | city_district | Wandsbek |
-          | state         | Hamburg |
           | country       | Deutschland |
           | country_code  | de |
 
@@ -42,7 +41,6 @@ Feature: Search queries
           | suburb        | Eilbek |
           | postcode      | 22089 |
           | city_district | Wandsbek |
-          | state         | Hamburg |
           | country       | Deutschland |
           | country_code  | de |
 
index 7c5c73e2657cb8096a0f1380d187eb1aa8383a24..08ba9cbd8e46283106b0abcdac7cf793dab3dfe4 100644 (file)
@@ -168,10 +168,10 @@ Feature: Import into placex
           | object | rank_search | rank_address |
           | N1     | 30          | 30 |
           | N11    | 30          | 30 |
-          | N12    | 2           | 2 |
+          | N12    | 2           | 0 |
           | N13    | 2           | 0 |
-          | N14    | 4           | 4 |
-          | N15    | 8           | 8 |
+          | N14    | 4           | 0 |
+          | N15    | 8           | 0 |
           | N16    | 18          | 0 |
           | N17    | 12          | 12 |
           | N18    | 16          | 16 |
@@ -211,6 +211,10 @@ Feature: Import into placex
           | R21 | boundary | administrative | 32    | (3 3, 4 4, 3 4, 3 3) |
           | R22 | boundary | nature_park    | 6     | (0 0, 1 0, 0 1, 0 0) |
           | R23 | boundary | natural_reserve| 10    | (0 0, 1 1, 1 0, 0 0) |
+        And the named places
+          | osm | class | type    | geometry |
+          | R40 | place | country | (1 1, 2 2, 1 2, 1 1) |
+          | R41 | place | state   | (3 3, 4 4, 3 4, 3 3) |
         When importing
         Then placex has no entry for N1
         And placex has no entry for W10
@@ -220,6 +224,8 @@ Feature: Import into placex
           | R21    | 30          | 30 |
           | R22    | 12          | 0 |
           | R23    | 20          | 0 |
+          | R40    | 4           | 4 |
+          | R41    | 8           | 8 |
 
     Scenario: search and address ranks for highways correctly assigned
         Given the scene roads-with-pois
index e25943439bfd738b70f978501ff38420107d67eb..2e44e145ccdaf6a07c3593d2224d62400cd00366 100644 (file)
@@ -51,8 +51,10 @@ Feature: Tag evaluation
          """
          n1 Thighway=yes,operator=Foo,name=null
          n2 Tshop=grocery,operator=Foo
-         n3 Tamenity=hospital,operator=Foo
+         n3 Tamenity=restaurant,operator=Foo
          n4 Ttourism=hotel,operator=Foo
+         n5 Tamenity=hospital,operator=Foo,name=Meme
+         n6 Tamenity=fuel,operator=Foo
          """
         Then place contains
          | object | name |
@@ -60,6 +62,8 @@ Feature: Tag evaluation
          | N2     | 'operator' : 'Foo' |
          | N3     | 'operator' : 'Foo' |
          | N4     | 'operator' : 'Foo' |
+         | N5     | 'name' : 'Meme' |
+         | N6     | 'operator' : 'Foo' |
 
     Scenario Outline: Ignored name tags
         When loading osm data