Closed RudiThoeni closed 11 months ago
I eliminated the case 2 listed here https://github.com/noi-techpark/it.bz.opendatahub.databrowser/issues/117 because it was only present on WebcamInfo Model
@RudiThoeni thanks for the notice.
I took a look at the model, some questions came up:
/v1/WebcamInfo
endpoint, or are there other places that need to be adapted?WebcamInfo
there is a GpsInfo
property that is defined as an array of GpsInfo
objects. At the same time, inside WebcamInfo
there is a GpsPoints
property that is defined as a object with arbitrary keys (language?) and values of type GpsInfo
. What is the difference between those two properties (GpsInfo
and GpsPoints
)?It would be nice if we could schedule a short meeting to discuss the open questions.
To answer your question about Data Browser adaption: yes, of course we can adapt :) The changes required depend on whether they affect only the /v1/WebcamInfo endpoint.
Is there some deadline we need to meet?
The main reason of changing GpsInfo (object) --> GpsInfo (array) was to reduce complexity and remove this one exception used on WebcamInfo only.... see the referred issue (Case 2)......https://github.com/noi-techpark/it.bz.opendatahub.databrowser/issues/117
cheers Rudi
Here some mails between Sergio, You and me last year about this GpsInfo object mismatch.... where we made a quick hack to solve.........
From: Rudolf Thoeni, NOI Sent: Friday, August 12, 2022 11:04 To: Sergio Evola evola.sergio97@gmail.com Cc: Christian Gapp gapp.christian@gmail.com Subject: RE: WebcamInfo file config
Hi Sergio
I have done a quick hack and added an additional field “GpsInfos” which is a list…. (https://api.tourism.testingmachine.eu/v1/WebcamInfo)
I had to use a new dield because otherwise I would break the current api……… but I think on the databrowser the field name is configurable, so you can use the GpsInfo component to visualize?
I will open a Github issue for GPS stuff because here we have some inconsistences in the api and we need to do further investigation on how to solve….
cheers
-- Digital Technologies Rudi Thoeni
T +39 0471 066 673 r.thoeni@noi.bz.it
NOI Techpark Südtirol / Alto Adige A.-Volta-Straße / Via A. Volta, 13A I-39100 Bozen / Bolzano www.noi.bz.it
From: Sergio Evola evola.sergio97@gmail.com Sent: giovedì, 11. agosto 2022 18:00 To: Rudolf Thoeni, NOI r.thoeni@noi.bz.it Subject: Re: WebcamInfo file config
Thank you, Rudi, that would help for the development of the new DataBrowser.
Best, Sergio.
Il giorno gio 11 ago 2022 alle ore 17:56 Rudolf Thoeni, NOI [r.thoeni@noi.bz.it](mailto:r.thoeni@noi.bz.it) ha scritto:
Hi Sergio
Thx for the explanation i will have a look at it tomorrow, maybe I can change it,
cheers
-- Digital Technologies Rudi Thoeni
T +39 0471 066 673 r.thoeni@noi.bz.it
NOI Techpark Südtirol / Alto Adige A.-Volta-Straße / Via A. Volta, 13A I-39100 Bozen / Bolzano www.noi.bz.it
From: Sergio Evola [evola.sergio97@gmail.com](mailto:evola.sergio97@gmail.com) Sent: giovedì, 11. agosto 2022 17:45 To: Rudolf Thoeni, NOI [r.thoeni@noi.bz.it](mailto:r.thoeni@noi.bz.it) Subject: Re: WebcamInfo file config
Hi Rudi,
In the WebcamInfo dataset GpsInfo is not stored into a list as you can see. This causes problems with the component in the databrowser. Is this how it's supposed to be?
ODHActivityPOI:
"GpsInfo": [ { "Gpstype": "position", "Altitude": 1413, "Latitude": 46.5575176279939, "Longitude": 11.7262208461761, "AltitudeUnitofMeasure": "m" } ], WebcamInfo:
"GpsInfo": { "Gpstype": "position", "Altitude": null, "Latitude": 46.682945, "Longitude": 11.122952, "AltitudeUnitofMeasure": null },
Il giorno gio 11 ago 2022 alle ore 17:40 Rudolf Thoeni, NOI [r.thoeni@noi.bz.it](mailto:r.thoeni@noi.bz.it) ha scritto:
Hi
This is a "historical" issue I had to introduce using Postgres...........
GpsInfo is always stored as a list
List
In order to realize Geosorting on Postgres I had to change from a List to a Dictionary so that I can access the right Gps Info via the Dictionary key GpsPoints is a Dictionary Dictionary<key, GpsInfo>
But, in the Data Model the Dictionary GpsPoint has only a GETTER which takes the GpsInfoList and returns it as Dictionary, The GpsPoint List has a SET + GET and the info is stored there....
So the info is identical, and up to the user which he wants to use.....
For the Databrowser I think the GpsInfo field component is enough,
cheers
-- Digital Technologies Rudi Thoeni T +39 0471 066 673 r.thoeni@noi.bz.it
NOI Techpark Südtirol / Alto Adige A.-Volta-Straße / Via A. Volta, 13A I-39100 Bozen / Bolzano www.noi.bz.it
-----Original Message----- From: Christian Gapp [gapp.christian@gmail.com](mailto:gapp.christian@gmail.com) Sent: giovedì, 11. agosto 2022 16:42 To: Sergio Evola [evola.sergio97@gmail.com](mailto:evola.sergio97@gmail.com) Cc: Rudolf Thoeni, NOI [r.thoeni@noi.bz.it](mailto:r.thoeni@noi.bz.it); Stefano Seppi, NOI [s.seppi@noi.bz.it](mailto:s.seppi@noi.bz.it) Subject: Re: WebcamInfo file config
Hi Sergio,
unfortunately there is no component for "GpsPoints", but there is one for the details of "GpsInfo" (https://github.com/noi- techpark/it.bz.opendatahub.databrowser/blob/development/databrowser/src/domai n/cellComponents/components/cells/gpsListCell/GpsListCell.vue).
@Rudi: what's the difference between the two?
@Sergio: could you please open up a GitHub discussion where we can share that and related information and discuss on how to implement such a component for table/detail/quick/edit views?
Thx Christian
On 11.08.22 16:34, Sergio Evola wrote:
Hey Christian, My mistake according to the designs of the list view, the webcams dataset doesn't need a location in the view, instead, it needs GPS. In this case, is there a CellComponent I can use for it?
Ex:
|"GpsPoints": { "position": { "Gpstype": "position", "Altitude": null, "Latitude": 47.0496988, "Longitude": 12.1266379, "AltitudeUnitofMeasure": "m"} },|
Il giorno gio 11 ago 2022 alle ore 16:20 Christian Gapp <gapp.christian@gmail.com mailto:[gapp.christian@gmail.com](mailto:gapp.christian@gmail.com)> ha scritto:
Hi Sergio, that's something like a foreign key relation, which is not resolved yet for the table / detail view. In the edit view that's also a problem, there I implemented the InputReferenceCell (https://github.com/noi-
techpark/it.bz.opendatahub.databrowser/blob/development/databrowser/src/domai n/cellComponents/components/cells/inputReferenceCell/InputReferenceCell.vue
which could be used as template for a new render component (please be aware that the InputReferenceCell itself is not perfect and has some rough edges - feedback is welcome). If you're interested, it would be very helpful if you could take on the task to implement such a component. The best place to start would be to open a discussion on GitHub with a short problem description and a sketch of the solution. If you're not interested that's fine, too - just let me know ;) Thx, Christian On 11.08.22 16:05, Sergio Evola wrote: > Hi Christian, > > I was working on the Webcams config files, and I noticed that the > location is not specified directly in the records; instead it gives the > municipality ID that then should be resolved inside the municipality > dataset. > > Example: > > "WebcamAssignedOn": [ { "Id": "99a8b1d4a8d64303b1b965aa7c20fa60", > "Type": "Municipality", "LastChange": "2021-03-04T09:47:27.3317404" > > } > > In the databrowsers is this already implemented, in a way that I can use > this ID in the listview config file? best regards, Sergio. >
@RudiThoeni thank you for the answers
@sseppi we need to add this to our planning
@RudiThoeni while implementing the changes I saw that VideoItems
is required on the WebcamInfo
endpoint, while it is not required on the ODHActivityPoi
endpoint. Note that the OpenAPI specification does not say that it is required (see definition of WebcamInfo
type on https://api.tourism.testingmachine.eu/swagger/index.html).
The screenshot below shows the error while saving an existing Webcam record.
Steps to reproduce:
1
into the Altitude
fieldShould I handle VideoItems
on the WebcamInfo
endpoint as required or non-required?
Hi @gappc Thx for figuring it out, i forgot to set it explicitely as nullable..... should now be ok, https://github.com/noi-techpark/odh-api-core/commit/e002cdce98cb848fb4cab6b764c9e5807d68ea90
@RudiThoeni thank you for the quick fix, now it works :+1:
Hey @RudiThoeni, I still struggle a bit to get to the bottom of the topic.
Given our discussion in #117 I thought that all GPS related info except GpsPoints
is obsolete. For sure I missed the part where you say "When it comes to Edit, here i have to think more about it..."
To eliminate misunderstandings, here is what I think I understood so far:
GpsPoints
is read-onlyGpsInfo
instead, which should be an array of GpsPoints
objects on all endpointsWebcam
to adhere to this behaviorIf my assumptions are correct, I think we need further adjustments to the endpoints, e.g. Accommodation
has a GpsPoints
property, but it has no GpsInfo
array that could be modified.
Given that there are still some differences in the endpoints, I think we need to:
GpsInfo
is the writable array, GpsPoints
is read-only and contains one (or all?) endpoints by keyGpsPoints
found under the property position
. One outcome of the discussion should be, if we should show / edit all GPS pointsGpstype
== position
What's your opinion on this? Did I miss something?
Hi @gappc
Your assumptions are right, at the moment we have
GpsPoints
is readonly but will be the standard to store GPS Information GpsInfo
Array is the editable Property to store GPS Information (Ex. ODHActivityPoi)Latitude,Longitude,GpsType
(Ex. Accommodation)on Root level of the object Maybe this is a good opportunity to clean up this whole GPS Mess....... and to switch completely to the GpsPoints
Property (Edit and Visualization) and mark all other as obsolete, set it to readonly..... and to ensure that
GpsPoints
PropertyGpsPoints
can contain more GpsPoints, but they have to contain one GpsType = 'position'What you think about it? We need to coordinate this changes between Api / Databrowser in a good way
Maybe we can have a short meeting this week to discuss this?
Hi @RudiThoeni, yes I agree, it would be good if we could agree on one model, the one you mentioned seems reasonable. I'll write you a email to schedule a meeting :+1:
We defined on our meeting:
GpsPoints
will be the Property to read and write.I will write when the field GpsPoints
is set from readonly to writeable. All other fields (flat Latitude,Longitude....... GpsInfo etc... will be set to readonly)
The changes are merged as of commit f3c0bd9cc38e17e1f40dd1662792ccb652d1c92c
@sseppi @RudiThoeni please check (e.g. https://databrowser.opendatahub.testingmachine.eu/dataset/table/tourism/v1/WebcamInfo) and close this issue if it's ok
I had a look and it seems to be fine from my point of view. @RudiThoeni what do you think? Can we close this issue?
@gappc @sseppi looks good, issue can be closed, let me know when the current databrowser version is/will be deployed on prod, because i have also to update data/api on prod at the same time
As mentioned in issue https://github.com/noi-techpark/it.bz.opendatahub.databrowser/issues/435 we will use GpsInfo
as the field where GPS Info is stored
Hi all
With the Webcam Import of different Datasources, I had to make some changes to the WebcamInfo Datamodel.....
Changes:
GpsInfo (object) to GpsInfo (array of objects)
(like on ODHActivityPoi and other Endpoints, eliminated this case that was only here)Added:
Set to readonly (compatibility reasons)
Can this changes be adapted to the Databrowser configured view of webcams?