9.6. Data transfer
NextGIS Connect module allows you to share geodata between QGIS and Web GIS in both directions. See below for the specifics.
9.6.1. Resource types
The following types of resources are available for data exchange and operation:
- Vector layer (NGW Vector Layer), which can be: - Point vector layer (NGW Vector Layer); - Multipoint vector layer (NGW Vector Layer); - Line vector layer (NGW Vector Layer); - Multiline vector layer (NGW Vector Layer); - Polygon vector layer (NGW Vector Layer); - Multipolygon vector layer (NGW Vector Layer);
- Vector layer style.
- WFS Service (NGW WFS Service)
- WMS Service (NGW WMS Service)
- TMS Layer
- PostGIS Layer
- WFS Layer
- Raster layer (NGW Raster Layer)
- Basemap
- Web Map (NGW Web Map)
- Resource group
9.6.2. From QGIS to Web GIS
With NextGIS Connect you can upload to Web GIS:
Vector data
Raster data
Basemaps
Layer groups
Entire QGIS project
Connect plugin also allows to publish vector data using standard protocols WFS, WMS and OGC.
See detailed step-by-step instructions for various data types here.
Alternatively you can upload data to Web GIS from the Layers panel. In the context menu select it as one of the ways to export a layer, a group of layers or the entire project.
Vector layer – vector layer with its style will be imported into Web GIS. You can later add this style to a Web Map.
Raster layer – raster layer with a default style will be created in Web GIS. Style can be added directly to Web Map.
Upload all - All layers for which the import option is available will be added to Web GIS, as well as all groups, retaining the hierarchy from QGIS Layers Panel. Also a Web Map will be created and all imported layers will be added to it retaining hierarchy and visibility of QGIS Layers Panel. While importing a project you need to specify the name of the new resource group which will be created in Web GIS. This group will hold all resources imported along with the project. When the process is complete, the Web Map will be opened automatically if corresponding option is selected in plugin settings.
Update layer style - Web GIS will update the style of the layer to match the style of the selected layer in QGIS.
Add new style to layer - Web GIS will add to the layer a new style, similar to the selected layer in QGIS.
If a layer has multiple styles, they will all be uploaded. Their names will be kept. If the style name is “default”, the layer’s name will be used instead.
Imported resources will be added to the group selected in NextGIS Connect panel.
If other type of resource but a group is selected, import will be performed to the closest parent group to selected resource.
If no resource is selected, import will be performed to the Main resource group (the root directory).
Warning
Photos made via NextGIS Collector/Mobile apps and uploaded to Web GIS as attachments to layers wouldn’t be available in desktop NextGIS QGIS after downloading these layers through NextGIS Connect plugin.
9.6.2.1. How to keep attachments
To keep the photos intact while modifying the style, perform the following steps:
Add the layer’s style from Web GIS to QGIS using NextGIS Connect.
Modify the style.
Update the style using NextGIS Connect.
9.6.3. From Web GIS to QGIS
Option is available if one of the following resources is selected in NextGIS Web resource tree:
Vector layer (NGW Vector Layer) - GeoJSON vector layer will be created in QGIS;
WFS Layer - a WFS layer will be created in QGIS;
WFS service (NGW WFS Service) - WFS layer will be created in QGIS;
WMS Layer - the selected WMS layer will be added to QGIS;
WMS Service - a WMS layer will be created in QGIS, the data source for which the selected WMS Service will be;
WMS Connection - you can select the WMS layer from the list to add to QGIS;
TMS Layer ;
TMS Connection ;
PostGIS Layeer ;
QGIS Vector Layer style - if it’s a style of a vector layer, a GeoJSON vector layer with the identical style will be created in QGIS; if it’s a style of a WFS layer, a WFS with that style will be created;
Raster layer (NGW Raster layer) - a GeoTIFF raster layer will be created in QGIS;
Basemap ;
Web Map - a QGIS project will be created containing layers, styles and basemaps. A mutually exclusive group will be created for all the basemap layers.
Demo Project - a QGIS project will be created, containing layers, styles and basemaps;
Resource group - the group and resources inside it will be added to the QGIS project.
For layers with multiple styles:
If you select a layer with multiple styles in the Connect window, all the styles will be added, but you need to chose current style in a dialog window.
If you select a style in the Connect window, all the styles of the layer will be added, with the selected style chosen as current style.
If you select a resource group containing layers with multiple styles, all the styles will be added. The style used as current will be the one with the same name as the layer or the first in alphabetical order. No dialog will be displayed.
If you add WFS/OGCF, the style with the same name as the layer or the first in alphabetical order will be chosen.
See how to work with multi-style layers in our video:
Watch on youtube.
Detailed instructions for adding various data types to QGIS here.
Vector layers added from Web GIS can be edited in QGIS right away.
9.6.5. Duplicate resource
With NG Connect you can copy an existing Web GIS layer. This option is available for Vector and Raster layers.
To make a copy of a layer, select it in the Connect panel, then in the context menu click Duplicate resource.
In the pop-up window confirm copying.
Copy will be created in the same group. The layer’s style will also be duplicated.
9.6.6. Delete resource
With NextGIS Connect you can quickly create and delete any resource in your Web GIS.
In the NextGIS Connect panel select the resource you wish to delete;
In the context menu select Delete;
If the resource is deleted successfully, it disappears from the Web GIS layer tree.
9.6.7. Create resource group
In the top menu of the NextGIS Connect plugin you’ll find a “Create group” button.
A new group will be created:
If a resource group is selected in the Connect panel - in that group;
If other type of resources but a group is selected - in the closest parent group
If no resource is selected - in the main resource group.
9.6.8. Refresh
In the top menu of the NextGIS Connect plugin you’ll find a “Create group” button.
The “refresh” operation will update the entire Web GIS resource tree to the current state.
9.6.9. Open Web Map in browser
In the top menu of the NextGIS Connect plugin you’ll find a “Create group” button.
Option is available if a Web Map ( NGW Web Map) is selected in NextGIS Connect resource tree. The Web Map will be opened in a new tab of default browser.
Context menu also allows to open the Web GIS page of any resource in browser.