Skip to content

Commit

Permalink
Merge pull request #180 from QGEP/prepareForBaskets
Browse files Browse the repository at this point in the history
Prepare for baskets
  • Loading branch information
ponceta authored Nov 20, 2024
2 parents 7372cb2 + e8fc43f commit 31b29d5
Show file tree
Hide file tree
Showing 9 changed files with 1,350 additions and 1,709 deletions.
20 changes: 14 additions & 6 deletions qgepqwat2ili/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@
from .qgep.model_qgep import Base as BaseQgep
from .qgepdss.export import qgep_export as qgepdss_export
from .qgepdss.import_ import qgep_import as qgepdss_import

# 4.4.2023
from .qgepsia405.export import qgep_export as qgepsia405_export

# 5.4.2023
from .qgepsia405.import_ import qgep_import as qgepsia405_import
from .qwat.export import qwat_export
from .qwat.import_ import qwat_import
Expand Down Expand Up @@ -210,6 +206,7 @@ def main(args):
ILI_MODEL,
make_log_path(log_path, "ilicreate"),
recreate_schema=args.recreate_schema,
create_basket_col=False,
)
# add model dependency
if args.export_sia405:
Expand Down Expand Up @@ -288,6 +285,7 @@ def main(args):
ILI_MODEL,
make_log_path(log_path, "ilicreate"),
recreate_schema=args.recreate_schema,
create_basket_col=False,
)
utils.ili2db.import_xtf_data(
SCHEMA, args.path, make_log_path(log_path, "iliimport")
Expand All @@ -302,6 +300,7 @@ def main(args):
ABWASSER_SIA405_ILI_MODEL,
make_log_path(log_path, "ilicreate"),
recreate_schema=args.recreate_schema,
create_basket_col=False,
)
utils.ili2db.import_xtf_data(
ABWASSER_SIA405_SCHEMA, args.path, make_log_path(log_path, "iliimport")
Expand All @@ -322,6 +321,7 @@ def main(args):
ABWASSER_DSS_ILI_MODEL,
make_log_path(log_path, "ilicreate"),
recreate_schema=args.recreate_schema,
create_basket_col=True,
)
utils.ili2db.import_xtf_data(
ABWASSER_DSS_SCHEMA, args.path, make_log_path(log_path, "iliimport")
Expand Down Expand Up @@ -349,6 +349,7 @@ def main(args):
ILI_MODEL,
make_log_path(log_path, "ilicreate"),
recreate_schema=args.recreate_schema,
create_basket_col=False,
)
qwat_export(include_hydraulics=args.include_hydraulics)
utils.ili2db.export_xtf_data(
Expand Down Expand Up @@ -388,6 +389,7 @@ def main(args):
ILI_MODEL,
make_log_path(log_path, "ilicreate"),
recreate_schema=args.recreate_schema,
create_basket_col=False,
)
utils.ili2db.import_xtf_data(SCHEMA, args.path, make_log_path(log_path, "iliimport"))
qwat_import()
Expand All @@ -400,7 +402,10 @@ def main(args):
config.PGSERVICE = config.QGEP_DEFAULT_PGSERVICE
# to do add model dependency
utils.ili2db.create_ili_schema(
config.ABWASSER_SCHEMA, config.ABWASSER_ILI_MODEL, recreate_schema=True
config.ABWASSER_SCHEMA,
config.ABWASSER_ILI_MODEL,
recreate_schema=True,
create_basket_col=False,
)
QGEPMAPPING = get_qgep_mapping()
utils.templates.generate_template(
Expand All @@ -411,7 +416,10 @@ def main(args):
if config.PGSERVICE is None:
config.PGSERVICE = config.QWAT_DEFAULT_PGSERVICE
utils.ili2db.create_ili_schema(
config.WASSER_SCHEMA, config.WASSER_ILI_MODEL, recreate_schema=True
config.WASSER_SCHEMA,
config.WASSER_ILI_MODEL,
recreate_schema=True,
create_basket_col=False,
)
QWATMAPPING = get_qwat_mapping()
utils.templates.generate_template("qwat", "wasser", BaseQwat, BaseWasser, QWATMAPPING)
Expand Down
7 changes: 5 additions & 2 deletions qgepqwat2ili/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
JAVA = r"java"

# 12.7.2022 Anpassung auf 4.61 damit auch VSA-DSS kompatibel siehe https://github.com/claeis/ili2db/issues/374
# ILI2PG = os.path.join(BASE, "bin", "ili2pg-4.5.0-bindist", "ili2pg-4.5.0.jar")
ILI2PG = os.path.join(BASE, "bin", "ili2pg-4.6.1-bindist", "ili2pg-4.6.1.jar")
# ILI2PG = os.path.join(BASE, "bin", "ili2pg-4.8.0-bindist", "ili2pg-4.8.0.jar")
ILIVALIDATOR = os.path.join(BASE, "bin", "ilivalidator-1.11.9", "ilivalidator-1.11.9.jar")
ILI_FOLDER = os.path.join(BASE, "ili")
DATA_FOLDER = os.path.join(BASE, "data")
Expand Down Expand Up @@ -51,3 +49,8 @@
# WASSER_ILI_MODEL = os.path.join(ILI_FOLDER, "SIA405_Wasser_2015_2_d-20181005.ili")
WASSER_ILI_MODEL = os.path.join(ILI_FOLDER, "SIA405_Wasser_2015_2_d-20181005-WITHOUT_VIEWS.ili")
WASSER_ILI_MODEL_NAME = "SIA405_WASSER_2015_LV95"

TOPIC_NAME_SIA405_ADMINISTRATION = "SIA405_Base_Abwasser_LV95.Administration"
TOPIC_NAME_SIA405_ABWASSER = "SIA405_ABWASSER_2015.SIA405_Abwasser"
TOPIC_NAME_DSS = "DSS_2015.Siedlungsentwaesserung"
TOPIC_NAME_KEK = "VSA_KEK_2019_LV95.KEK"
3 changes: 3 additions & 0 deletions qgepqwat2ili/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,20 +593,23 @@ def action_do_export():
config.ABWASSER_ILI_MODEL,
log_path,
recreate_schema=True,
create_basket_col=False,
)
elif emodel == "SIA405_ABWASSER_2015_LV95":
create_ili_schema(
config.ABWASSER_SIA405_SCHEMA,
config.ABWASSER_SIA405_ILI_MODEL,
log_path,
recreate_schema=True,
create_basket_col=False,
)
elif emodel == "DSS_2015_LV95":
create_ili_schema(
config.ABWASSER_DSS_SCHEMA,
config.ABWASSER_DSS_ILI_MODEL,
log_path,
recreate_schema=True,
create_basket_col=False,
)

# to do 27.3.2023 else instead of except? discuss with OD
Expand Down
Loading

0 comments on commit 31b29d5

Please sign in to comment.