MetOffice / qgis-plugin-edr

GNU General Public License v3.0
3 stars 1 forks source link

Don't send datetime when LINESTRING with time included. maybe for Trajectory or corridor - grey out that part of the GUI, #21

Closed MattWardle closed 2 months ago

MattWardle commented 2 months ago

"datetime" not required for trajectory or corridor - when trajectory or corridor selected as query pattern, suggest disabling temporal extent dialogue.

JanCaha commented 2 months ago

If we do that then user will not be able to construct some valid queries according to the spec https://docs.ogc.org/is/19-086r6/19-086r6.html#_e6b32ddf-d053-46ad-b5fd-c4daec62f4bb.

The thing is that user can specify datetime in three ways:

If we block it in the main window, the user will not be able to to do second version. We may need to gray it out in the main window and add it as part of the Trajectory/Corridor window for user to set the single value and to allow him to not set it at all.

But I believe that this needs some more thinking and clearer definition of how it should be handled.

MattWardle commented 2 months ago

Good point Jan! Yes, let's talk about this tomorrow.

m-burgoyne commented 2 months ago

Could it not be solved by checking the WKT string generated by the coordinate definition dialog?

LINESTRINGM - disable the time selection fields on the main dialog LINESTRINGZ - disable the vertical selection field on the main dialog LINESTRINGZM - disable the time and vertical selection fields on the main dialog

JanCaha commented 2 months ago

This would work. But we would be missing the part that user does not want to set either time or Z dimension.

m-burgoyne commented 2 months ago

I think that is a slightly different problem as it will still produce a valid query and could be solved by following a consistent approach to populating the default values (which the UI does at the moment).

saberraz commented 2 months ago

If we have temporal values in the Linestring, we should disable temporal extent in the main window. Same with Z, if we have the Z in Linestring, we need to disable the vertical extent should be disabled.

Gugym commented 2 months ago

In the meeting we came up with these scenarios to address this: Scenario: LINESTRINGM - disable the time selection fields on the main dialog Given I have an EDR trajectory query And I have clicked on the button Set Spatial Extent When I enter a LINESTRINGM Then the main temporal extent selection fields in the ui shall be disabled

Scenario: LINESTRINGZ - disable the vertical selection field on the main dialog Given I have an EDR trajectory query And I have clicked on the button Set Spatial Extent When I enter a LINESTRINGZ Then the main vertical extent selection fields in the ui shall be disabled

Scenario: LINESTRINGZM - disable the time and vertical selection fields on the main dialog Given I have an EDR trajectory query And I have clicked on the button Set Spatial Extent When I enter a LINESTRINGZM Then the main temporal and vertical extents selection fields in the ui shall be disabled

Another issue seems to be editing the WKT field when the user can only change a single character at a time. This scenario would be how we expect that to behave: Given I have an EDR trajectory query And I have clicked on the button Set Spatial Extent And I have selected an existing WKT geometry When I want to edit the Geometry WKT Then I can make multiple edits to the WKT And I will not have to keep going back into the dialogue after each single character is entered

MattWardle commented 2 months ago

Hi Jan, I can't see that this is fixed? Still sends datetime with LINESTRINGM: image

e.g. https://redacted/v4/mo-global/os45/edr/collections/mo-global-zeroisotherm/instances/20240430T120000Z/trajectory?crs=CRS:84&f=CoverageJSON&parameter-name=pressure&**datetime=2024-04-30T12:00:00Z/2024-05-07T12:00:00Z**&z=&coords=**LINESTRINGM** (-3.51327776263088332 50.68829091817624999 1714647634357, -3.02789070332005172 51.28484567251948789 1714658440363, -2.23432138412932657 51.66396246475850518 1714669244650, -0.10786379095806597 51.50598035978200784 1714680049771)

Gugym commented 2 months ago

Re-opened with Matt's comment.

JanCaha commented 2 months ago

@MattWardle Are you sure, you are on plugin version 0.13.3? Because it seems to be working without issue for me.

Time specified Screenshot from 2024-05-03 12-14-10

Z specified Screenshot from 2024-05-03 12-14-45

Both T and Z specified Screenshot from 2024-05-03 12-15-03

MattWardle commented 2 months ago

Hi Jan, yes i have the latest plugin installed. Oddly it only seems to work properly for that IBL URL. For labs, it also leaves Temporal Extent as an option: image

MattWardle commented 2 months ago

image

MattWardle commented 2 months ago

And now it's broken for IBL as well :-/ Hmm:

LINESTRINGZM (-3.51327776263088332 50.68829091817624999 700 1714777200000, -3.02789070332005172 51.28484567251948789 700 1714798841843, -2.23432138412932657 51.66396246475850518 700 1714820452568, -0.10786379095806597 51.50598035978200784 700 1714842000466)

image

JanCaha commented 2 months ago

@MattWardle ok, I found the issue. It only works partially ... will be fixed in the next version. Right now it is a bit randomly turning off Z and T dimension, but not properly.