Places index: also drop localities, isolated dwellings and kindless objects
Measured on France (5.3M rows): place=locality ~10% (mostly cadastral names of fields and woods), isolated_dwelling ~5%, objects with a name but none of the recognized kind keys ~4% (bus route relations etc.). Schema version 3, so rake places:index rebuilds existing indexes.
This commit is contained in:
1 parent
f3dd37dd4e
commit
e2461f794c
3 files changed
+18
-9
No files matched your search
+4
-1
@@ -20,6 +20,9 @@ class PlacesTest < Minitest::Test
|
||||
feature("Point", [18.0, 48.0], "highway" => "crossing"), # no name -> skipped
|
||||
feature("Polygon", [[[17.0, 48.0], [17.01, 48.0], [17.01, 48.01], [17.0, 48.0]]], "name" => "Bytovka Lidl", "building" => "yes"),
|
||||
feature("Polygon", [[[17.0, 48.0], [17.01, 48.0], [17.01, 48.01], [17.0, 48.0]]], "name" => "Družstvo", "landuse" => "farmland"),
|
||||
feature("Point", [17.3, 48.3], "name" => "Pod Družstvom", "place" => "locality"),
|
||||
feature("Point", [17.3, 48.31], "name" => "Samota Družstevná", "place" => "isolated_dwelling"),
|
||||
feature("LineString", [[17.0, 48.0], [17.5, 48.5]], "name" => "Bus 31 Družstvo", "type" => "route"),
|
||||
feature("Polygon", [[[17.2, 48.1], [17.21, 48.1], [17.21, 48.11], [17.2, 48.1]]],
|
||||
"name" => "Lidl Petržalka", "brand" => "Lidl", "shop" => "supermarket", "building" => "retail"),
|
||||
feature("Point", [17.15, 48.15], "name" => "McDonald's", "amenity" => "fast_food", "brand" => "McDonald's"),
|
||||
@@ -63,7 +66,7 @@ class PlacesTest < Minitest::Test
|
||||
|
||||
def test_buildings_and_land_use_are_dropped_but_a_shop_in_a_building_is_kept
|
||||
assert_empty search("bytovka")
|
||||
assert_empty search("druzstvo")
|
||||
assert_empty search("druzstv") # landuse, locality, isolated dwelling, no kind at all
|
||||
assert_equal [["Lidl Petržalka", "supermarket"]], search("lidl").map { |r| r.values_at(:name, :kind) }
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user