-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
120 connect damo exporter #178
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Werking nog niet kunnen controleren omdat ik de local_settings even niet heb. Op basis van de code een aantal vragen.
def export_damo_and_hydamo(self): | ||
"""Handle export of DAMO and HyDAMO.""" | ||
file_path = self.dockwidget.SelectPolderFileWidget.filePath() | ||
damo_gpkg_path = os.path.join(self.project.project_folder, "01_source_data", "DAMO.gpkg") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dit zou al in de folderstructuur moeten staan. Dus hier;
self.project.project_folder.source_data.damo
|
||
# Load GeoPackage layers into QGIS | ||
try: | ||
damo_gpkg_path = os.path.join(self.project.project_folder, "01_source_data", "DAMO.gpkg") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tweede keer declaren zelfde variabele?
if file_path: | ||
# DAMO export | ||
gdf_polder = gpd.read_file(file_path) | ||
dict_gdfs_damo = DAMO_exporter(gdf_polder, TABLE_NAMES) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zie review Wouter htt. Lijkt me beter om opslaan per tabel te doen?
Daarnaast lijkt me dit functionaliteit die je in htt wilt hebben en niet in de plugin.
- CreateProjectPushButton : QPushButton | ||
- SchematisationBuilderVerticalSpacer : Spacer | ||
- ProjectTabWidget : QTabWidget | ||
- tab_status_0 : QWidget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Zonder het gezien te hebben, is deze naam beschrijvend genoeg?
|
||
from hhnk_threedi_plugin.hhnk_toolbox_dockwidget import HHNK_toolboxDockWidget | ||
|
||
BASE_FOLDER = r"\\corp.hhnk.nl\data\Hydrologen_data\Data\09.modellen_speeltuin" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dit lijkt niet hier thuis te horen maar in een local_settings of ergens anders?
|
||
def populate_combobox(self): | ||
"""Populate the combobox with folder names from the base folder.""" | ||
if os.path.exists(BASE_FOLDER): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
liefst zoveel mogelijk pathlib.Path gebruiken.
### Stap 0. Een project beginnen of een bestaand project verder oppakken | ||
|
||
|
||
... plaatje UI volgt later na evt wijzigingen adhv sprint review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Todo's graag opnemen met # TODO
self.dockwidget.CreateProjectPlainTextEdit.clear() | ||
QPlainTextEdit.focusInEvent(self.dockwidget.CreateProjectPlainTextEdit, event) | ||
|
||
def load_layers_from_geopackage(self, geopackage_path, group_name): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def on_project_selected(self): | ||
"""Handle project selection from the combo box.""" | ||
selected_folder = self.dockwidget.SelectProjectComboBox.currentText() | ||
full_path = os.path.join(BASE_FOLDER, selected_folder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Path(BASE_FOLDER).joinpath(selected_folder)
selected_folder = self.dockwidget.SelectProjectComboBox.currentText() | ||
full_path = os.path.join(BASE_FOLDER, selected_folder) | ||
self.project = Project(full_path) | ||
self.project_status = self.project.retrieve_project_status() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gelijk aan self.project.project_status
? Ook daar project.status
logischer?
Wat zijn de mogelijke waarden van project_status? Is daar ergens domeintabel van?
Die retrieve_project_status
zoals die nu in htt staat lijkt erop dat een @property
handiger is?
@property
def status(self):
return self._status
Nu werkend voor lagen: duikersifonhevel en hydroobject
GUI voor project beginnen / hervatten en exporteren van DAMO obv van poldergrenzen