This plugin allows QGIS user to upload and download resources to and from Web GIS or NextGIS Web (further both refer as “Web GIS”) directly from QGIS interface.
With NextGIS Connect you can:
Download geodata from Web GIS to desktop GIS;
Upload vector and raster layers from desktop GIS to Web GIS;
Upload whole QGIS projects to Web GIS , including styles, layer hierarchy, etc;
Create WFS service in one click and edit data directly in Web GIS;
Update geodata keeping styles and attributes;
Create resource groups and delete any resources.
If you plan to share large data through NextGIS Connect, you might need to configure QGIS timeouts for network requests. This setting is in the menu section Settings -> Options -> Network -> Timeout for network requests (ms). The recommended value is 300,000, it can be increased if necessary.
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.
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.
8.1.1. Resource Types¶
The following types of resources are available for data exchange and operation:
- 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. QGIS style gets “(qgis)” prefix, MapServer style - “(ms)”
- WFS Service (NGW WFS Service)
- WMS Service (NGW WMS Service)
- Web map (NGW Web Map)
- Resource group (NGW Web Map)
Connect plugin is a part of NextGIS QGIS distributive and ready to go right after installation of desktop app. Plugin is also available through official QGIS repository, so it can be launched in other QGIS compilations. If necessary, you can check/update the version of the module in the menu section Modules -> Manage modules -> NextGIS Connect.
8.3. Set up connection¶
When plugin is installed its icon appears in a toolbar:
Clicking on the icon calls NextGIS Connect panel.
If no connection is set at the moment, corresponding message will be shown.
8.3.1. New Connection¶
To create a connection you need to know an address of a target Web GIS. For instance, if you’ve created your own Web GIS, its address can be found on https://my.nextgis.com/webgis page.
Click on “Settings” button in NextGIS Connect panel.
In pop-up window press on “New” and fill in the fields:
URL – address of a target Web GIS.
Name – connection id, how it will be shown in the list of connections.
If you want to perform actions that need special permission, uncheck box next to As guest and fill in Login and Password fields with your NextGIS ID credentials. For example, unauthorized users usually can’t create or delete resources. These actions are only available for the owner of the Web GIS and users added to its team.
Press “OK”. In the drop-down list of the dialog “Settings” select the connection that becomes active after closing dialogue.
8.3.2. Main Settings¶
Rename forbidden fields – while uploading layer itself or as a part of a project, plugin renames fields forbidden for Web GIS.
Fix incorrect geometries – while uploading layer itself or as a part of a project, plugin transforms geometries into same type.
Abort project import after first layer import failure – plugin wouldn’t keep on uploading project if any layer is failed to be imported into Web GIS.
Open web map automatically on creation – after successful import of a project into Web GIS, web map will be created and automatically opened in browser.
Add WFS layer to QGIS on WFS service creation – after creation of WFS service in Web GIS it will be automatically added to QGIS as a layer.
8.4. Data transfer¶
NextGIS Connect module allows you to share geodata between QGIS and Web GIS in both directions.
8.4.1. From QGIS to Web GIS¶
NextGIS Connect module allows you to import:
Basemaps - only for ‘Mini’ or ‘Premium’ plans
Algorithm for importing each data type is described here.
Vector layer – vector layer with its style will be imported into Web GIS. Style can be added directly on web map.
Raster layer – raster layer with a default style will be created in Web GIS. Style can be added directly on web map.
Current project - All layers for which option “Import selected layer(s)” is available will be added to Web GIS, as well as all groups with retained hierarchy from QGIS Layers Panel. Also 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 a project. Upon project import created web map will be opened automatically if corresponding option is selected in plugin settings.
Imported resources will be added to a group selected in NextGIS Connect panel. If other type of resources but a group is selected, import will be performed to a closest parent group to selected resource. If no resource is selected, import will be performed to the root directory.
8.4.2. 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 service (NGW WFS Service) - WFS layer will be created in QGIS;
QGIS style of a vector layer - GeoJSON vector layer with the style identical to selected one 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;
WFS Connection - you can select the WMS layer from the list to add to QGIS.
The algorithm for Exporting data to QGIS is described here.
8.4.3. Updating data and style¶
When the layer is updated, all data of the target layer including attachments (photos, documents) will be cleared. If you need to save them, use WFS. If the style is updated, the attachments will not be affected.
NextGIS Connect allows you to edit data in QGIS and then return it to the Web. Thus, the data is updated in the Web GIS. This operation is available if a vector layer is selected in the resource tree. Select two vector layers: in resource tree and in QGIS Layer Panel. This operation will remove all features from the layer in Web GIS and upload all features from the local layer into that layer. A similar algorithm works for styles as well.
8.5. Other operations¶
This block of operations is located in the top menu of the NextGIS Connect.
New group will be created in resource group selected via NextGIS Connect panel. If other type of resources but a group is selected, group will be created in a closest parent group to selected resource. If no resource is selected, group will be created in the root directory.
The “update” operation will update the entire Web GIS resource tree to the current state.
Option is available if web map (NGW Web Map) is selected in NextGIS Connect resource tree. Map will be opened in a new tab of default browser.
“Delete” a resource permanently deletes the selected geodata.