[QGIS-Developer] Why is .qgz the default format?

Jorge Gustavo Rocha jgr at di.uminho.pt
Mon Jan 21 08:27:28 PST 2019


Hi,

Just 0,20 € for editing the *.qgs file inside the *.qgz.

Windows users:

7zip is able to edit the file in place. By default, it uses Notepad,
which is not very useful. But you con configure a nice editor (notepad++
or another) in the 7zip options. I don't use Windows, but I've launched
one just to check this option and it works.

Linux users (or distributions using vim)

vim can open the *.qgz file and then edit the *.qgs in place. That's
what I do.

You just need to tell vim zip plugin that the *.qgz are also zipped files.

Edit once the ~/.vimrc and add the line:
au BufReadCmd *.qgz call zip#Browse(expand("<amatch>"))

Afterwards, you just need to:
1) vim project.qgz
and it open the project. Hit enter on top of the project.qgs file and
make your changes.

sed (or for some kind of scripting)

Sometimes I need to use sed to do several find/replace. Do do that, I
have a folder /mnt/qgis owned by my user.

To change the project:
1) fuse-zip edicaoavancada.qgz /mnt/qgis

2) Do command line editing...
sed -i "s|<layername>\([^<]\+\)</layername>|<layername>\1
2017</layername>|g" /mnt/qgis/edicaoavancada.qgs

3) recreate the qgz file
fusermount -u /tmp/qgis

This does not solve any of the problems mentioned, but allows me to do
all kind of editing/scripting of top of the zipped project file.

Regards,

Jorge Gustavo

Às 15:19 de 21/01/19, Paolo Cavallini escreveu:
> Sorry I was not clear: I meant that in the list you can find several
> issues deriving from qgz, as already pointed out.
> All the best.
> 
> On 21/01/19 16:12, Régis Haubourg wrote:
>> Hi Paolo,
>> I think you issue list is a bit pessimistic. Looking a issues
>> mentionning qgz in the subject, we find only 3-4 issues:-- 
> Paolo Cavallini - www.faunalia.eu
> QGIS.ORG Chair:
> http://planet.qgis.org/planet/user/28/tag/qgis%20board/
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

J. Gustavo
-- 
Jorge Gustavo Rocha
Departamento de Informática
Universidade do Minho
4710-057 Braga
Tel: +351 253604480
Fax: +351 253604471
Móvel: +351 910333888
skype: nabocudnosor


More information about the QGIS-Developer mailing list