Skip to content
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

Develop Scenario Archive plugin #567

Closed
leendertvanwolfswinkel opened this issue Jul 1, 2021 · 2 comments
Closed

Develop Scenario Archive plugin #567

leendertvanwolfswinkel opened this issue Jul 1, 2021 · 2 comments
Assignees

Comments

@leendertvanwolfswinkel
Copy link
Collaborator

leendertvanwolfswinkel commented Jul 1, 2021

Any simulations older than 7 days are no longer available for download from the 3Di API. Customers with a Lizard subscription should be able to work with their 3Di scenarios stored in Lizard seamlessly. Making this a separate plugin improves maintainability

Features
Minimum Viable Product

  • Search & list available scenario's
  • Add raster results as WMS / WMS-T layers (see https://docs.lizard.net/e_lizardwms.html#di-scenarios).
    • Question, can we force QGIS to use text/plain as default Identify method? See comment below
  • Authentication
    • Logging in should be as easy as possible. Preferably users just provide their username/password in a dialog in QGIS. But probably this is not possible and they will have to generate an API key and copy-paste it into QGIS. If so, to make it as easy as possible for users:
    • Button links to API Key management page https://{organisation_name}.lizard.net/management/personal_api_keys
    • API Key is stored in QGIS password manager

Second iteration

  • Download raw results & logging (see https://demo.lizard.net/api/v4/scenarios/): dialog allows users to choose which files they want to download. Note: also test this for results > 2GB, this has been giving issues in the past.
    • gridadmin.h5
    • results_3di.nc
    • aggregate_results_3di.nc
    • structure_control_actions.nc
    • log.zip
  • Download raster results (https://demo.lizard.net/api/v4/scenarios/)
    • Users should be able to choose the CRS and nodatavalue of the rasters they download. Default nodatavalue must be -9999 and already prepopulated in the UI
    • Rasters that are larger than 1x10^8 pixels should be downloaded in parts and merged locally (e.g. using VRT)
  • Download scenario results to 3Di Models & Simulations directory structure (if available) (see also Create and implement threedi-mi-utils #805)

Additional wishes (not included in estimate)

  • Set raster layer styling (min, max and color ramp; for water depth maps: set the first x mm to transparent) or link to the relevant management page
  • Search and download rasters in Lizard (rasters endpoint)
  • Tool to create 3Di models quickly: Downloading DEM etc from Lizard, create schematisation, upload, etc.
  • Difference rasters: Select two scenarios, post a difference geoblock to Lizard and load the results in QGIS as WMS / TIFF
  • For downloaded rasters, translate their Lizard styling to qml and apply to downloaded raster

This python package (developed by 3Di user @emielverstegen) may be helpful: https://github.com/nens/threedi-scenario-downloader. This python API tutorial shows how to download 3Di rasters: https://demo.lizard.net/media/tutorials/How_to_download_a_maximum_waterdepth_raster_from_a_3Di_scenario_stored_in_the_Scenario_Archive_in_Lizard_.ipynb.

UI sketch:
Private Zenhub Image

@leendertvanwolfswinkel leendertvanwolfswinkel changed the title Develop Lizard Scenario Downloader plugin Develop 3Di Scenario Archive plugin Nov 4, 2021
@nens nens deleted a comment from Jonasvsl Aug 31, 2023
@leendertvanwolfswinkel leendertvanwolfswinkel changed the title Develop 3Di Scenario Archive plugin Develop Scenario Archive plugin Aug 31, 2023
@leendertvanwolfswinkel
Copy link
Collaborator Author

From Lizard dev team:

"We added the info_format text/plain, which QGIS can work with. You will get this as the "Text" option in the dropdown in the "Identify Results" panel. Unfortunately, QGIS chooses the "Feature" option by default (based on application/json), which cannot be read properly. We have not been able to change this, because otherwise we would become backwards incompatible with other existing applications. Perhaps something can be done with the QGIS configuration to change the default, but my QGIS knowledge does not extend far enough for that.
"

@leendertvanwolfswinkel
Copy link
Collaborator Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants