use SP-GIST index for building index where available

Point-in-polygon queries are much faster with a SP-GIST geometry
index, so use that for the index used to check if a housenumber
is inside a building.

Only available with Postgis 3. There is an automatic fallback to
GIST for Postgis 2.
This commit is contained in:
Sarah Hoffmann
2021-10-10 14:17:03 +02:00
parent 4b007ae740
commit 3649487f5e
3 changed files with 6 additions and 4 deletions

View File

@@ -227,7 +227,7 @@ def osm2pgsql_options(temp_db):
main_data='', main_index=''))
@pytest.fixture
def sql_preprocessor(temp_db_conn, tmp_path, table_factory):
def sql_preprocessor(temp_db_conn, tmp_path, table_factory, temp_db_with_extensions):
table_factory('country_name', 'partition INT', ((0, ), (1, ), (2, )))
cfg = Configuration(None, SRC_DIR.resolve() / 'settings')
cfg.set_libdirs(module='.', osm2pgsql='.', php=SRC_DIR / 'lib-php',