Images table in gpkg is missing records
Closed this issue · 10 comments
If I use dbeaver to open a gpap file directly, I can see all of the records in the images table. However, if I export to a geopackage, I can only see the first record. See screen clips below.
I have written a python script that exports the notes to html and noticed that I my code was not returning the file names. On investigation it seems like the export geopackage function has an issue. I don't need the image data, but do need the file names.
Version 1.9.1 which is the current iOS version. I am using iOS. Data and photos collected using json forms which I have developed.
Hi @AndrewM- thanks for reporting this.
Would it be possible to get from you one such gpap project that upon geopackage export misses some images. That would help me debug the issue right away.
Hi Moovida, I will collect a new dataset and upload it. I want to be sure that the issue is reproducible.
carparks.zip
Here is a new gpap and exported geopackage file. It seems that all images taken within user-forms fail to export from gpap to geopackage. I deleted the image data table from the gpap file, to bring the size of the zip file down.
Ok, will give it a try with a form with just one image form.
Wow, I just found out that exporting of forms never did work. It was thought more for simple image notes and never upgraded to support forms. I guess this is kind of similar to the export to image folder. But while that one was rather simple to fix, this is a bit more complex, because the images need to be linked to their parent note. I will need to think about how to fix this.
@AndrewM- , I wonder what your usecase is. Will you be able to stitch together the form with its image id?
Because I think it kind of just boils down to that.
Ok, I fixed this by exporting the images of forms also. The ids are correct.
If there are issue feel free to reopen this.
@moovida The use case is printing the forms out as a html document, which can be converted into a pdf by LibreOffice. A test file is attached. Smash is can be used for environmental auditing where the output is a document. In this use case, I can bypass the GIS entirely. If I export the images as files and copy the folder of images to my local hard drive, then I can use the python code to create a web page which shows my field data in document format. I can get file name for images using SQL. The pdf below comes from a version of the script which uses the GPAP file and exported images.
Carparks.pdf
Ah, that is quite cool.
I have pushed a fdroid update, let's see when it is realeased. In case you can always thest the apk on the releases page.