Code Monkey home page Code Monkey logo

Comments (16)

sjib avatar sjib commented on June 23, 2024

Grundsätzlich spricht nichts gegen eine solche Umsetzung in QGEP, in der VSA-DSS INTERLIS Version wird es aber nicht so umgesetzt – es überfordert die Leute schon so, diese Daten überhaupt zu liefern. Man müsste das dann einfach beim Export in die VSA-DSS wieder anders abfüllen (also Name des Datenherrn statt FS).
Falls man z.B. das Ingenieurbüro, das Datenherr ist oder die Gemeinde dann bei Organisation abfüllt muss man einfach gut darauf achten, diese allenfalls mehrfach aufzulisten, in der Funktion als Datenherr – das ist dann allenfalls nicht ganz die gleiche Dienststelle v.a. bei grösseren Gemeinden / Städten. So wie man die Gemeinde sowohl als privaten Eigentümer und als „Gemeinde“ Eigentümer auch schon doppelt erfassen sollte. Siehe diese Überlegungen dazu auf der DSS Webseite (Attributierungshandbuch): http://www.vsa.ch/fileadmin/user_upload/DSS/download/AH_DSS_Eigentuemer_Betreiber_2007_07_02.pdf

Falls du das so willst mit FS für Datenherr / Datenlieferant, schick mir eine Vorlage, wie ich das im SQL Create anpassen soll.

from qgep.

m-kuhn avatar m-kuhn commented on June 23, 2024

While I think the idea is basically good in terms of database structure, what do we gain from it?

QGIS supports a widget type called Unique Values. This widget type is able to suggest values that have previously been used for a certain field. So for the user it is very easy to re-enter the same dataowner, but limited to the same layer/field.

from qgep.

m-kuhn avatar m-kuhn commented on June 23, 2024

Andreas provides an example for Stefan how to implement this.

from qgep.

andreasneumann avatar andreasneumann commented on June 23, 2024

Here is an example how this would be done for one table (sample od_wastewater_structure). It concerns all od_* tables.

ALTER TABLE qgep.od_wastewater_structure ADD COLUMN dataowner integer;
ALTER TABLE qgep.od_wastewater_structure ADD COLUMN provider integer;

ALTER TABLE qgep.od_wastewater_structure ADD CONSTRAINT rel_wastewater_structure_dataowner FOREIGN KEY (dataowner) REFERENCES qgep.od_organisation(obj_id);
ALTER TABLE qgep.od_wastewater_structure ADD CONSTRAINT rel_wastewater_structure_provider FOREIGN KEY (provider) REFERENCES qgep.od_organisation(obj_id);

The constraints can only be added after both tables where created, so better at the end of the SQL.

from qgep.

andreasneumann avatar andreasneumann commented on June 23, 2024

Oliver needs to check whether this is implemented in latest version.

from qgep.

sjib avatar sjib commented on June 23, 2024

Fehlermeldung: Am Schluss wenn du die Constrain für die Fremdschlüssel hinzufügst, wird zweimal fk_dataowner hinzugefüngt. Müssste einmel fk_provider sein. (issue #43)

  • ist nun in der neuesten Version 22.12.2014 korrigiert

from qgep.

m-kuhn avatar m-kuhn commented on June 23, 2024

Waiting for Interlis Import => then update the model to the newest model by @sjib => then import and migrate and verify

from qgep.

m-kuhn avatar m-kuhn commented on June 23, 2024

Currently there are two fields for each

  • dataowner
  • fk_dataowner

Not sure this is what we want?

from qgep.

andreasneumann avatar andreasneumann commented on June 23, 2024

I believe the VSA-DSS model has the dataowner field as varchar/text, but we discussed that we would prefer the fk_dataowner foreign key to the organization table.

So, we should get rid of the dataowner column and add this to an export view, when we will need the text representation instead of the foreign key.

But the export views are not top priority, currently.

from qgep.

sjib avatar sjib commented on June 23, 2024

Discuss in meeting 19.10.2015 (https://github.com/QGEP/QGEP/wiki/Meeting-2015-10-19)

from qgep.

sjib avatar sjib commented on June 23, 2024

Take out dataowner and dataprovider field in datamodel

from qgep.

3nids avatar 3nids commented on June 23, 2024

@sjib what would be the delay for this?

from qgep.

sjib avatar sjib commented on June 23, 2024

In working on the INTERLIS Export / Import we found out, that it is really challenging, when we always have to link the organization table into all the queries when exporting or importing data. So we think it would be helpful to keep the dataowner / provider as a field that we can fill with the current identifier of the related dataset in organization while exporting or importing and delete it, when we have pre- or postprocessed dataowner and provider an created the necessary fs_* (postprocess while importing) or matched the identifier of organization (preprocess in the export process).

Does this disturbs any other development that you are doing?

from qgep.

m-kuhn avatar m-kuhn commented on June 23, 2024

In this case, wouldn't it be preferable to either create the field at the start / end of an import/export process and delete it in the end?
This way the risk of mistaking this for authoritative data when it is out of sync will be reduced.

from qgep.

3nids avatar 3nids commented on June 23, 2024

@sjib sorry not following, what prevents from using views for export and trigger for import?

from qgep.

sjib avatar sjib commented on June 23, 2024

Adapted in https://raw.githubusercontent.com/QGEP/datamodel Release 26.4.2016

from qgep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.