Skip to main content
Solved

Export layers from a QGIS Project


dataman
Contributor
Forum|alt.badge.img+5

Hello everybody :-)
 

we have a QGIS Project (.qgz) with 2 Layers, which we want as GeoJsons export. If possible uploading them into a FTP Server.

Can we do this using FME? I have searched a bit and I do not find any Readers for QGIS…

 

Thanks in advance!

 

Best answer by hkingsbury

Looking at this page - https://docs.fileformat.com/gis/qgz/

It seems this is just a ‘zip’ file with a sqlite database in it (.qgd). In theory you should be able to open it with an sqlite reader and a path like:

 

c:\temp\file.gqz\*.qgd

 

View original
Did this help you find an answer to your question?

4 replies

hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • Best Answer
  • May 23, 2024

Looking at this page - https://docs.fileformat.com/gis/qgz/

It seems this is just a ‘zip’ file with a sqlite database in it (.qgd). In theory you should be able to open it with an sqlite reader and a path like:

 

c:\temp\file.gqz\*.qgd

 


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • May 26, 2024
hkingsbury wrote:

Looking at this page - https://docs.fileformat.com/gis/qgz/

It seems this is just a ‘zip’ file with a sqlite database in it (.qgd). In theory you should be able to open it with an sqlite reader and a path like:

 

c:\temp\file.gqz\*.qgd

 

It’s a very interesting answer.


dataman
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • May 27, 2024

I have tested it today. Unfortunately I cannot use the sqlite Reader. It does not open the file...


geomancer
Evangelist
Forum|alt.badge.img+47
  • Evangelist
  • May 27, 2024

According to the QGIS documentation:

“The QGS format is an XML format for storing QGIS projects. The QGZ format is a compressed (zip) archive containing a QGS file and a QGD file. The QGD file is the associated sqlite database of the qgis project that contain auxiliary data for the project. If there are no auxiliary data, the QGD file will be empty.”

Usually in my QGZ files the QGD file is not present; presumably the QGD file is optional.

So the information describing the layers is in the QGS file, which is in an XML like structure.

The layer information is in tags named layer-tree-layer.

From here it gets more difficult, as there are many different providers possible for a layer, and the contents of the layer properties are different depending on the relevant provider.

Providers are recognisable by providerKey, which includes 'wms’, 'wfs’, 'vectortile’, 'oracle’, 'postgres’, 'ogr’, 'gdal’, and many more.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings