-
Notifications
You must be signed in to change notification settings - Fork 5
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
Tab file not configured #272
Comments
May be we need some code here. Also it does not automatically show images / videos I have imported via INTERLIS into the class file. |
We have a view vw_file that has an additional _url attribut that takes puts together absolute and relative path
If I create a file entry manually the identifier gets also a path, depending on what settings the form for the file has either identifier = filename xxx.jpg (second example) or a filename with a relative path (first example). Maybe we have to change the vw_file._url so it contains the full path and filename: C:\Daten\QGEP\inspectiondata\20210120\fotos\1.045-1.040_0001.jpg and use _url to display and select a document. And then use some fonctionality to split that full path again into
Question: Do we really need to link different classes to file? Does this not only makes the tab complicated? What about all other classes (maybe not needed so often?) @urskaufmann @Kay-Korrodi @taetscher what do you think? Any other ideas or experiences? |
I would +1 the answer from @Kay-Korrodi - having access to a full path is nice, but only if there are no conflicts with restrictions in string length. Capping attributes that contain URLs at a certain length to me does not seem very useful when connecting data from different sources, where the user might not always be able to control the lenght of URLs (it may also be that I am missing something basic here. If so, please let me know). Using two attributes and combining base-path and filename - while possible - to me seems unnecessarily cumbersome. If I understand your question about linking files to different classes correctly (whether or not a file should be linkable to every other class in the datamodel) I would suggest implementing that as modeled in VSA-KEK, which in the latest .ili states that
In the KEK 2020.1 .ili there are, however, also length restrictions for filepaths:
and
I assume KEK was modelled at a time when hosting large datasets of inspection data on cloud-servers was not a thing, so maybe URL length restrictions should be discussed with the next iteration of the KEK datamodel. In essence, I would suggest following the .ili definitions as closely as possible in order to be able to guarantee that valid exports of data in a TEKSI WW database are possible without complex data manipulation.
From another project I have code that should do what you described here. I'll paste it below, maybe it's useful CREATE OR REPLACE FUNCTION dokumente_kataster.populate_docname_from_url()
RETURNS "trigger" AS
$BODY$
DECLARE
BEGIN
NEW.docname := reverse(split_part(reverse(reverse(split_part(reverse(NEW.doc_url), '\', 1))), '/', 1));
RETURN NEW;
END
$BODY$
LANGUAGE 'plpgsql' VOLATILE; |
Good Morning boys of gis |
In the new project file the tab "file" seems not be configured:
This looked much better on qgep and in the presentation of Zermatt (see slide 9)
The text was updated successfully, but these errors were encountered: