All-in-one Project QGIS Plugin: Unterschied zwischen den Versionen

Aus Geoinformation HSR
Wechseln zu: Navigation, Suche
K
K
 
(11 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 2: Zeile 2:
  
 
Often users ("producers") want to share a QGIS project file including possibly many layers (data sources), a related symbology (style/styling) and some common project settings. On the other hand, users ("consumers") want to get a single data source containing the same data and map layer styling.
 
Often users ("producers") want to share a QGIS project file including possibly many layers (data sources), a related symbology (style/styling) and some common project settings. On the other hand, users ("consumers") want to get a single data source containing the same data and map layer styling.
 +
  
 
== About ==
 
== About ==
Zeile 19: Zeile 20:
 
== Current state and recommendation ==
 
== Current state and recommendation ==
  
Currently one do the following to share a QGIS project file including possibly many layers (data sources), a related symbology (style/styling) and some common project settings.
+
Currently one has to do the following to share a QGIS project file including possibly many layers (data sources) and a related symbology (styling/styles) - of courese given you are legally allowed to do so):
  
Prerequisites:
+
These are the prerequisites:
 
* QGIS 2.x is installed.
 
* QGIS 2.x is installed.
* There is a valid QGIS project with data and symbology one wants to share (and where you are legally allowed to do so, note the copyrights!)
 
* Check following restrictions - if one of them isn't given, this workflow won't work or would have to be modified:
 
** There's no symbol font (fonts need to be installed individually on each installation).
 
** There's no layer which refers to a database - unless target users have access to it too (other user's probably won't have access to this database).
 
** There's no layer which refers to a secured webservice - unless target users have access to it too.
 
** There's no layer which requires a plugin, like e.g. [http://plugins.qgis.org/plugins/quick_map_services/ QuickMapServices Plugin], [[Editable_GeoCSV_QGIS_Plugin GeoCSV]].
 
 
* In QGIS: Check (and eventually set) if "Project settings" have set "Saved paths" to "relative" (to QGIS project file).
 
* In QGIS: Check (and eventually set) if "Project settings" have set "Saved paths" to "relative" (to QGIS project file).
 +
* Following restrictions are checked - if one of them isn't fulfilled, this workflow would have to be modified or won't work: There's ...
 +
** no symbol font (fonts need to be installed individually on each installation).
 +
** no layer which refers to a database - unless target users have access to it too (other user's probably won't have access to this database).
 +
** no layer which refers to a secured webservice - unless target users have access to it too.
 +
** no layer which requires a plugin, like e.g. [http://plugins.qgis.org/plugins/quick_map_services/ QuickMapServices Plugin], [[Editable_GeoCSV_QGIS_Plugin GeoCSV]].
  
A. Preliminary work for each QGIS project:
+
Goal is to have everything in a '''"project directory"''' including QGIS project file (.qgs), all datasets and symbology - and then to zip and share it:
* In OS (file manager): Make sure and eventually create there is a single '''"project directory"''' which will contain everything to be shared.
+
* In OS (file manager): Make sure and eventually create there is a single "project directory" which will contain everything to be shared.
 
* In OS (file manager): Make sure (eventually copy or move), data, SVG files and color ramps are in the "project directory" (probably you want to have a subdirectories for data/, symbology/ etc.).
 
* In OS (file manager): Make sure (eventually copy or move), data, SVG files and color ramps are in the "project directory" (probably you want to have a subdirectories for data/, symbology/ etc.).
 
B. Then do the following:
 
 
* In QGIS: Save QGIS project (.qgs) to "project directory".
 
* In QGIS: Save QGIS project (.qgs) to "project directory".
 
* In OS (text editor): Check file paths.
 
* In OS (text editor): Check file paths.
Zeile 43: Zeile 41:
 
Recommendations:
 
Recommendations:
 
* Dont use symbol fonts; prefer SVG markers.
 
* Dont use symbol fonts; prefer SVG markers.
* tbd.  
+
* tbd.
  
 
== Problem Statement ==
 
== Problem Statement ==
  
 
Main use cases are:
 
Main use cases are:
* Producers users want to '''share a QGIS project''' including possibly many layers (data sources), a related symbology (style/styling) and some common settings.  
+
* Producers want to '''share a complete QGIS project''' including possibly many layers (data sources), a related symbology (style/styling) and some common settings.  
* Consumer users want to get a single data source which contains the same data and map layer styling.  
+
* Consumers (end users) want to get a single data source which contains the same data and map layer styling.  
  
 
In addition to the main use case, data and symbology currently is handled in QGIS as if there was a one-to-one relationship, meaning one dataset attached to one QGIS instance: A dataset is styled with one symbology using a user-specific project file where symbology files can be anywhere. But in fact, one dataset can be styled with different symbologies - and one symbology can style different datasets of same schema.
 
In addition to the main use case, data and symbology currently is handled in QGIS as if there was a one-to-one relationship, meaning one dataset attached to one QGIS instance: A dataset is styled with one symbology using a user-specific project file where symbology files can be anywhere. But in fact, one dataset can be styled with different symbologies - and one symbology can style different datasets of same schema.
  
 
Related use cases:  
 
Related use cases:  
* Users ("producers") want to '''share a QGIS symbology''' which is common to several datasources of same schema. Other users ("consumers") get a new dataset (corresponding to this schema) and want to attach a common QGIS symbology to it.
+
* Users (designers, cartographers) want to '''share a single QGIS style (.qml), QGIS symbols (.xml) and SVG markers'''. For sharing and downloading these, there's a GSoC project (see [https://wiki.osgeo.org/wiki/QGIS_Sharing_Repository wiki.osgeo.org] and [https://github.com/akbargumbira/qgis_symbology_sharing @akbargumbira github]) which implements a web application to allow users use them in QGIS. End users
* There is a proposal to put all data and related styling info into a single specific [[GeoPackage]] file.
+
* Users ("style producers") want to '''share a complete QGIS symbology''' which is common to several data sources of same schema. Other users ("consumers") get a new dataset (corresponding to this schema) and want to attach a common QGIS symbology to it.
* For sharing and downloading QGIS styles (.qml), QGIS symbols definitions (.xml) and SVG markers there's a GSoC project'' (see [https://wiki.osgeo.org/wiki/QGIS_Sharing_Repository wiki.osgeo.org] and [https://github.com/akbargumbira/qgis_symbology_sharing @akbargumbira github]) which implements a web application to allow users use them in QGIS.
 
  
 
Issues:
 
Issues:
Zeile 73: Zeile 70:
 
** A styling default changed after in a new QGIS version.
 
** A styling default changed after in a new QGIS version.
  
== Solution ==
+
== Proposals ==
  
An obvious approach for a QGIS project and data publisher is to put everything - including data, styles and project settings - into one file.  
+
An obvious approach for a QGIS project and data publisher is to put everything - including data, styles and project settings - into one zip file as described above.
  
When copying/moving project files to other people, it is necessary to manually collect all required files and update the project file. This is complicated. and it getos even more complicated when working with databases and secured webservices and with style files on different places
+
This project proposes to generate a temporary file space and directory and put's all data into ot. See also [http://hub.qgis.org/wiki/quantum-gis/Google_Summer_of_Code_2012#All-in-one-Projects Martin Dobias' GSoC 2012-Proposal]. It's related to the proprietary [[ArcGIS#Layer_Package_and_Map_Package | ArcGIS Layer and ArcGIS Map Packages]] and the standardized [[GeoPackage]].
  
See also [http://hub.qgis.org/wiki/quantum-gis/Google_Summer_of_Code_2012#All-in-one-Projects Martin Dobias' GSoC 2012-Proposal]. It's related to the proprietary [[ArcGIS#Layer_Package_and_Map_Package | ArcGIS Layer and ArcGIS Map Packages]] and the standardized [[GeoPackage]].
+
Then there are following plugins - all most probably not maintained any more:
 +
* "relocator" QGIS Plugin - Relocates all your project data to a specific local directory. Version 0.9 2015-05-08 with minimal QGIS v2.0.0. Autor Riccardo Klinger, Geolicious. [http://plugins.qgis.org/plugins/relocator/ plugins.qgis.org], [https://github.com/Geolicious/relocator github] 
 +
* "QConsolidate" QGIS Plugin - Consolidate QGIS project into one directory. Version 0.2.1 2014-01-29 with minimal QGIS v2.0.0. Autor Alexander Bruy. [http://plugins.qgis.org/plugins/qconsolidate/ plugins.qgis.org] [https://github.com/alexbruy/qconsolidate github]
 +
* There is another proposal to put all data and related styling info into a single [[GeoPackage]] file instead of zipping it.
  
 
== Discussion ==
 
== Discussion ==

Aktuelle Version vom 19. Juni 2016, 20:20 Uhr

This is a software project containing a (potential) plugin about sharing and using a QGIS project file including data layers and symbology (styles).

Often users ("producers") want to share a QGIS project file including possibly many layers (data sources), a related symbology (style/styling) and some common project settings. On the other hand, users ("consumers") want to get a single data source containing the same data and map layer styling.


About

  • A project by Geometa Lab HSR
  • Project Lead: Stefan Keller
  • Author/Developer: Tobias Schmitz and Rafael Krucker from Geometa Lab HSR
  • Project status: Still in development (nothing published yet)

Project Weblinks:

See also QGIS, QGIS-Materialien

Current state and recommendation

Currently one has to do the following to share a QGIS project file including possibly many layers (data sources) and a related symbology (styling/styles) - of courese given you are legally allowed to do so):

These are the prerequisites:

  • QGIS 2.x is installed.
  • In QGIS: Check (and eventually set) if "Project settings" have set "Saved paths" to "relative" (to QGIS project file).
  • Following restrictions are checked - if one of them isn't fulfilled, this workflow would have to be modified or won't work: There's ...
    • no symbol font (fonts need to be installed individually on each installation).
    • no layer which refers to a database - unless target users have access to it too (other user's probably won't have access to this database).
    • no layer which refers to a secured webservice - unless target users have access to it too.
    • no layer which requires a plugin, like e.g. QuickMapServices Plugin, Editable_GeoCSV_QGIS_Plugin GeoCSV.

Goal is to have everything in a "project directory" including QGIS project file (.qgs), all datasets and symbology - and then to zip and share it:

  • In OS (file manager): Make sure and eventually create there is a single "project directory" which will contain everything to be shared.
  • In OS (file manager): Make sure (eventually copy or move), data, SVG files and color ramps are in the "project directory" (probably you want to have a subdirectories for data/, symbology/ etc.).
  • In QGIS: Save QGIS project (.qgs) to "project directory".
  • In OS (text editor): Check file paths.
  • In OS (zip generator): Produce a single .zip file (a compressed package).
  • Deliver this .zip file

Recommendations:

  • Dont use symbol fonts; prefer SVG markers.
  • tbd.

Problem Statement

Main use cases are:

  • Producers want to share a complete QGIS project including possibly many layers (data sources), a related symbology (style/styling) and some common settings.
  • Consumers (end users) want to get a single data source which contains the same data and map layer styling.

In addition to the main use case, data and symbology currently is handled in QGIS as if there was a one-to-one relationship, meaning one dataset attached to one QGIS instance: A dataset is styled with one symbology using a user-specific project file where symbology files can be anywhere. But in fact, one dataset can be styled with different symbologies - and one symbology can style different datasets of same schema.

Related use cases:

  • Users (designers, cartographers) want to share a single QGIS style (.qml), QGIS symbols (.xml) and SVG markers. For sharing and downloading these, there's a GSoC project (see wiki.osgeo.org and @akbargumbira github) which implements a web application to allow users use them in QGIS. End users
  • Users ("style producers") want to share a complete QGIS symbology which is common to several data sources of same schema. Other users ("consumers") get a new dataset (corresponding to this schema) and want to attach a common QGIS symbology to it.

Issues:

  • Data:
    • A map layer source is stored in local files somewhere in a directory.
    • A map layer source is a local or remote database (with credentials).
    • A map layer source is a remote web service which requires credentials.
    • A map layer is a temporary (in-memory) data layer.
  • Styling:
    • SVG files are stored somewhere locally or remote.
    • Color Ramps are stored somewhere locally or remote.
    • Required symbol fonts are installed locally.
  • Others:
    • While some functionality allows to manage changed data paths or styles of a single layer, it's tedious to manage them when there are dozens layers.
    • A plugin enables or changes a Layer source functionality. There are data resources which require plugins, which are eventually not installed. See e.g. Editable_GeoCSV_QGIS_Plugin GeoCSV.
    • A styling default changed after in a new QGIS version.

Proposals

An obvious approach for a QGIS project and data publisher is to put everything - including data, styles and project settings - into one zip file as described above.

This project proposes to generate a temporary file space and directory and put's all data into ot. See also Martin Dobias' GSoC 2012-Proposal. It's related to the proprietary ArcGIS Layer and ArcGIS Map Packages and the standardized GeoPackage.

Then there are following plugins - all most probably not maintained any more:

  • "relocator" QGIS Plugin - Relocates all your project data to a specific local directory. Version 0.9 2015-05-08 with minimal QGIS v2.0.0. Autor Riccardo Klinger, Geolicious. plugins.qgis.org, github
  • "QConsolidate" QGIS Plugin - Consolidate QGIS project into one directory. Version 0.2.1 2014-01-29 with minimal QGIS v2.0.0. Autor Alexander Bruy. plugins.qgis.org github
  • There is another proposal to put all data and related styling info into a single GeoPackage file instead of zipping it.

Discussion

The user must be able to specify what should be inside the project:

  1. link everything (no zipping, just plain XML as before)
  2. include everything (put all files into zip),
  3. hybrid (put some resources into zip, keep something as a link, e.g. put symbol SVGs into ZIP but keep original links to layers)

Internally the all-in-one projects could work in a fashion similar to ODT from LibreOffice or KMZ from Google Earth: All files required by the projects would be identified and put into a ZIP file (together with the project XML file).