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

Dataimport Sessions: Error: dangling references #896

Open
L-Hofman opened this issue Mar 15, 2024 · 4 comments
Open

Dataimport Sessions: Error: dangling references #896

L-Hofman opened this issue Mar 15, 2024 · 4 comments

Comments

@L-Hofman
Copy link

L-Hofman commented Mar 15, 2024

Hello! I have a question / a problem occuring during the Dataimport Session, which inhibits me from successfully importing a xtf. file.

Issues in first and second validation pass:

....
Info: first validation pass...
Info: Basket Nutzungsplanung_LV95_V1_1.Geobasisdaten(oid BASKET1)...
Info: Basket Nutzungsplanung_LV95_V1_1.TransferMetadaten(oid BASKET2)...
Info: object count 4062
Error: unknown referenced object Nutzungsplanung_Hauptnutzung_V1_1.Hauptnutzung_CH.Hauptnutzung_CH TID ch.admin.are.nutzungsplanung.hauptnutzung_ch.71 referenced from Nutzungsplanung_LV95_V1_1.Geobasisdaten.Typ_Kt TID 5171
....
Info: second validation pass...
.....
Info: validate AREA Nutzungsplanung_LV95_V1_1.Geobasisdaten.Grundnutzung_Zonenflaeche.Geometrie...
Error: failed to transfer data from file to db
Error: dangling references
...replace failed
Mit Fehlern beendet!_

Does anyone konw how to solve it?

Thank you so much!

Model Baker Issue
@signedav
Copy link
Member

Looks like data are missing you require for your data (your data is referencing on it). Maybe https://models.geo.admin.ch/ARE/replaced/Hauptnutzung_CH_V1_1.xml

@signedav
Copy link
Member

The screenshots look good. Is the data open? Can I have a look at the data file?

@L-Hofman
Copy link
Author

Thank you! That did indeed solve the issue.

Now that I edited the data, there is a struggle occuring in the export.
I added a new polygon to a layer. By default this new polygon has no t_ili_id assigned yet, as it is new.
How can I assign it a valid t_ilid_id? All measures i tried (automatically generated / field calculator) did not work and led to this error message:

image

Therefore my question is: how can I generate a valid t_ili_id after adding a new polygon to my layer?

Thank you so much for your help.

@signedav
Copy link
Member

signedav commented Mar 22, 2024

It does not look like your t_ili_tid is wrong but instead that this object is not fulfilling constraint2:

!!@ cmsg="Wenn Rechtsstatus = laufende_Aenderung, dann muss Festsetzungstyp definiert sein";
    MANDATORY CONSTRAINT
       NOT (isEnumSubVal(Rechtsstatus,#laufende_Aenderung)) OR 
         DEFINED(Festsetzungstyp);

Maybe you can validate your data with the Model Baker Data Validator https://opengisch.github.io/QgisModelBaker/user_guide/validation/ so you can easily find your invalid object...

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