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

ili2gpkg --validate checks date wrong #538

Open
signedav opened this issue Apr 4, 2024 · 0 comments
Open

ili2gpkg --validate checks date wrong #538

signedav opened this issue Apr 4, 2024 · 0 comments

Comments

@signedav
Copy link

signedav commented Apr 4, 2024

ili2gpkg handle the date differently to ilivalidator.

I have:

  • A model with an INTERLIS.XMLDate attribute
  • An (invalid) XTF with two entries: '2024-03-08' and '09.03.2024'

I validate with ilivalidator:

Error: line 6: Gebaeudeinventar_V1.Gebaeude.Gebaeude: tid _503befcd-7ae5-4d6f-b60d-2dabb8c3c407: invalid format of date value <09.03.2024> in attribute Datum_Heizung
Info: second validation pass...

as expected...

Now I do the following:

  • I create the schema --sqlColsAsText
  • I import the data (again, it finds the error above - which is why I select --disableValdiation) and now have both entries in the gpkg
  • I validate with ili2gpkg-5.0.1.jar --validate and find an error. But for the other attribute:
    Error: line 0: Gebaeudeinventar_V1.Gebaeude.Gebaeude: tid _503befcd-7ae5-4d6f-b60d-2dabb8c3c406: invalid format of date value <2024-03-08 00:00:00.000Z> in attribute Datum_Heizung
    
  • I change the field to 08.03.2024 and the validation is successful
  • After export, however, the check then shows two errors (as expected)

The model:

INTERLIS 2.3;
MODEL Gebaeudeinventar_V1 (de)
AT "mailto:signedav@localhost"
VERSION "2023-01-19" =
  TOPIC Gebaeude = 
    CLASS Gebaeude =
        Datum_Heizung : INTERLIS.XMLDate;
    END Gebaeude;
  END Gebaeude;
END Gebaeudeinventar_V1.

The XTF:

<?xml version="1.0" encoding="UTF-8"?><TRANSFER xmlns="http://www.interlis.ch/INTERLIS2.3">
<HEADERSECTION SENDER="ili2gpkg-5.0.1-447c03f22b8f346a44ada86c553d10110872fd40" VERSION="2.3"><MODELS><MODEL NAME="Gebaeudeinventar_V1" VERSION="2023-01-19" URI="mailto:signedav@localhost"></MODEL></MODELS></HEADERSECTION>
<DATASECTION>
<Gebaeudeinventar_V1.Gebaeude BID="_656c0f6f-7028-46e5-837c-3cbf447746a6">
<Gebaeudeinventar_V1.Gebaeude.Gebaeude TID="_503befcd-7ae5-4d6f-b60d-2dabb8c3c406"><Datum_Heizung>2024-03-08</Datum_Heizung></Gebaeudeinventar_V1.Gebaeude.Gebaeude>
<Gebaeudeinventar_V1.Gebaeude.Gebaeude TID="_503befcd-7ae5-4d6f-b60d-2dabb8c3c407"><Datum_Heizung>09.03.2024</Datum_Heizung></Gebaeudeinventar_V1.Gebaeude.Gebaeude>
</Gebaeudeinventar_V1.Gebaeude>
</DATASECTION>
</TRANSFER>

The ili2gpkg Log:

2024-03-01 10:10:03,296 INFO    Run: java -jar /home/dave/.local/share/QGIS/QGIS3/profiles/mjpnl/python/plugins/QgisModelBaker/libs/modelbaker/iliwrapper/bin/ili2gpkg-5.0.1/ili2gpkg-5.0.1.jar --validate --dbfile /home/dave/dev/opengisch/teaching-and-talks/teaching-interlis-webinar/data/test/datum2.gpkg --models Gebaeudeinventar_V1 --exportTid --xtflog /tmp/home_dave_dev_opengisch_teaching_and_talks_teaching_interlis_webinar_data_test_datum2_gpkg.xtf --models Gebaeudeinventar_V1 --iliMetaAttrs NULL
2024-03-01 10:10:03,431 ERROR   Info: dburl <jdbc:sqlite:/home/dave/dev/opengisch/teaching-and-talks/teaching-interlis-webinar/data/test/datum2.gpkg>
2024-03-01 10:10:03,432 ERROR   Info: dbusr <>
2024-03-01 10:10:03,609 ERROR   Info: ili2gpkg-5.0.1-447c03f22b8f346a44ada86c553d10110872fd40
2024-03-01 10:10:03,621 ERROR   Info: ili2c-5.3.3-be3aa7eaac016c8301424dd1bf027d9ef39f86c8
2024-03-01 10:10:03,622 ERROR   Info: iox-ili-1.21.18-11c92f590bbe67df7af2051dad58b246996d14eb
2024-03-01 10:10:03,622 ERROR   Info: java.version 18.0.2-ea
2024-03-01 10:10:03,622 ERROR   Info: user.name <dave>
2024-03-01 10:10:03,622 ERROR   Info: maxMemory 4005888 KB
2024-03-01 10:10:03,625 ERROR   Info: currentTime 2024-03-01 10:10:03
2024-03-01 10:10:03,630 ERROR   Info: dburl <jdbc:sqlite:/home/dave/dev/opengisch/teaching-and-talks/teaching-interlis-webinar/data/test/datum2.gpkg>
2024-03-01 10:10:03,630 ERROR   Info: dbusr <>
2024-03-01 10:10:03,632 ERROR   Info: databaseProduct <SQLite>
2024-03-01 10:10:03,632 ERROR   Info: databaseVersion <3.43.0>
2024-03-01 10:10:03,632 ERROR   Info: driverName <SQLite JDBC>
2024-03-01 10:10:03,632 ERROR   Info: driverVersion <3.43.0.0>
2024-03-01 10:10:03,632 ERROR   Info: max active DB statements <0>
2024-03-01 10:10:03,641 ERROR   Info: compile models...
2024-03-01 10:10:03,642 ERROR   Info: lookup model <Gebaeudeinventar_V1> in repository <jdbc:sqlite:/home/dave/dev/opengisch/teaching-and-talks/teaching-interlis-webinar/data/test/datum2.gpkg/>
2024-03-01 10:10:03,643 ERROR   Info: ilifile </home/dave/.ilicache/jdbc&003asqlite&003a/home/dave/dev/opengisch/teaching-and-talks/teaching-interlis-webinar/data/test/datum2.gpkg/datum.ili>
2024-03-01 10:10:03,701 ERROR   Info: process data...
2024-03-01 10:10:03,727 ERROR   Info: assume unknown external objects
2024-03-01 10:10:03,736 ERROR   Info: first validation pass...
2024-03-01 10:10:03,739 ERROR   Info: Gebaeudeinventar_V1.Gebaeude BID <_656c0f6f-7028-46e5-837c-3cbf447746a6>...
2024-03-01 10:10:03,739 ERROR   Info: Gebaeudeinventar_V1.Gebaeude.Gebaeude...
2024-03-01 10:10:03,742 ERROR   Error: line 0: Gebaeudeinventar_V1.Gebaeude.Gebaeude: tid _503befcd-7ae5-4d6f-b60d-2dabb8c3c406: invalid format of date value <2024-03-08 00:00:00.000Z> in attribute Datum_Heizung
2024-03-01 10:10:03,745 ERROR   Info: second validation pass...
2024-03-01 10:10:03,746 ERROR   ...validate failed
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

1 participant