[Users] No sync geopackage raster layer to QFIELD

Emilio Abad Vidal emilio.abad.vidal at cesga.gal
Mon Feb 10 13:54:44 PST 2020


Hi Mathias: 



Sorry for the delay in response. 


I've been testing the raster load from geopackage, and thank you very much for the information. 
Indeed, the only way I can use rasters in QFIELD is by loading from the windows file browser. This is not a problem, but it has a drawback. 
This raster loading system also does not work when there is more than one raster layer in the same geopackage. 
In any case, the problem is largely solved, as using geopackage is the best option for using rasters in QFIELD. 


Best regards 


Emilio 




----- Mensaje original -----

De: "Matthias Kuhn" <matthias at opengis.ch> 
Para: "Emilio Abad Vidal" <eav at cesga.gal>, users at lists.qfield.org 
Enviados: Martes, 28 de Enero 2020 17:58:38 
Asunto: Re: [Users] No sync geopackage raster layer to QFIELD 


Hi Emilio, 


How did you add your raster file to the QGIS project? 


In the past, I noticed some differences between drag and drop from the explorer to QGIS and using the browser or the add layer dialog. 


Best regards 
Matthias 



On 1/14/20 6:23 PM, Emilio Abad Vidal wrote: 




Hi, I have a problem with exporting raster layers stored in a geopackage, to a QFIELD project. 


I work with version 3.4.12 of QGIS and I have version 3.5.1 of QFIELD Sync installed. 


The process I follow is as follows: 


1º I convert a TIF image into a layer of a geopackage 


gdal_translate --config OGR_SQLITE_SYNCHRONOUS OFF -co APPEND_SUBDATASET=YES -co RASTER_TABLE:foto -co TILE_FORMAT=PNG_JPEG -tr 0.5 0.5 -a_srs EPSG:25829 -of GPKG foto.tif geopackage01.gpkg 


2º I build the pyramids of the image 


gdaladdo --config OGR_SQLITE_SYNCHRONOUS OFF -r AVERAGE geopackage01.gpkg:foto 2 4 8 16 32 64 128 256 


3º I save the QGIS project, and activate the QFIELD Sync plug-in in the project synchronization configuration options. In the layers list, the one within the geopackage, has the option of no action and does not allow it to be included in the project that will be used by QFIELD. 


I think the statements used to create the geopackage are correct, as it does not give any error in QGIS. If I load the original layer in TIF, I can synchronize it without problem. It does not happen to me with a layer only, but it is with any raster that I load from geopackage. 


Can anyone have any idea what can happen? 


Thanks for the attention 


Emilio 




_______________________________________________
Users mailing list Users at lists.qfield.org http://lists.qfield.org/listinfo.cgi/users-qfield.org 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qfield.org/pipermail/users-qfield.org/attachments/20200210/899e29a9/attachment-0002.html>


More information about the Users mailing list