diff --git a/modelbaker/db_factory/gpkg_layer_uri.py b/modelbaker/db_factory/gpkg_layer_uri.py index 3077236..858309a 100644 --- a/modelbaker/db_factory/gpkg_layer_uri.py +++ b/modelbaker/db_factory/gpkg_layer_uri.py @@ -34,4 +34,8 @@ def get_data_source_uri(self, record: dict) -> str: data_source_uri = "{uri}|layername={table}".format( uri=self.uri, table=record["tablename"] ) + if record["geometry_column"]: + data_source_uri = "{} ({})".format( + data_source_uri, record["geometry_column"] + ) return data_source_uri diff --git a/modelbaker/iliwrapper/ili2dbconfig.py b/modelbaker/iliwrapper/ili2dbconfig.py index 2dde42e..dc1ffa8 100644 --- a/modelbaker/iliwrapper/ili2dbconfig.py +++ b/modelbaker/iliwrapper/ili2dbconfig.py @@ -20,6 +20,7 @@ from qgis.core import QgsNetworkAccessManager from qgis.PyQt.QtNetwork import QNetworkProxy +from .globals import DbIliMode from .ili2dbutils import get_all_modeldir_in_path @@ -298,6 +299,9 @@ def to_ili2db_args(self, extra_args=[], with_action=True): elif self.db_ili_version is None or self.db_ili_version > 3: self.append_args(args, ["--createBasketCol=False"]) + if self.tool == DbIliMode.gpkg: + self.append_args(args, ["--gpkgMultiGeomPerTable"], True) + self.append_args(args, ["--defaultSrsAuth", self.srs_auth]) self.append_args(args, ["--defaultSrsCode", "{}".format(self.srs_code)])