6.3.1. NextGIS Connect

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:

  1. Download geodata from Web GIS to desktop GIS.

  2. Upload vector and raster layers from desktop GIS to Web GIS.

  3. Upload whole QGIS projects to Web GIS , including styles, layer hierarchy, etc.

  4. Create WFS service in one click and edit data directly in Web GIS.

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. Here is a guide how to change layer’s style and not to lose attached photos:

  1. Download target layer into NextGIS QGIS via Connect.

  2. Change style of the layer (colour, line width, etc.)

  3. Click on Update style through selecting Style of the target resource in right panel.

After these steps old style of the target layer will be deleted from Web GIS and the new style will be uploaded; all attachments remain untouched.

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.

When plugin is installed its icon appears in a toolbar:

../../_images/logo.png

Clicking on the icon calls NextGIS Connect panel.

../../_images/panel.png

If no connection is set at the moment, corresponding message will be shown.

../../_images/panel_no_connections.png

6.3.1.1. Create a 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.

../../_images/my_nextgis.png

Click on “Settings” button in NextGIS Connect panel.

../../_images/call_settings.png

In pop-up window press on “New” and fill in the fields:

  1. URL – address of a target Web GIS.

  2. 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. For example, unauthorized users usually can’t create or delete resources.

../../_images/connection_settings.png

Press “OK”. In “Settings” window from the drop-down list select a connection you want to activate.

6.3.1.2. Main Settings

../../_images/settings.png
  1. Rename forbidden fields – while uploading layer itself or as a part of a project, plugin renames fields forbidden for Web GIS.

  2. Fix incorrect geometries – while uploading layer itself or as a part of a project, plugin transforms geometries into same type.

  3. 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.

  4. 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.

  5. 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.

6.3.1.3. Resource Types

  • resource_vector_point - Point vector layer (NGW Vector Layer)

  • resource_vector_mpoint - Multipoint vector layer (NGW Vector Layer)

  • resource_vector_line - Line vector layer (NGW Vector Layer)

  • resource_vector_line - Multiline vector layer (NGW Vector Layer)

  • resource_vector_polygon - Polygon vector layer (NGW Vector Layer)

  • resource_vector_mpolygon - Multipolygon vector layer (NGW Vector Layer)

  • resource_style - Vector layer style. QGIS style gets “(qgis)” prefix, MapServer style - “(ms)”

  • resource_wfs - WFS Service (NGW WFS Service)

  • resource_wms - WMS Service (NGW WMS Service)

  • resource_webmap - Web map (NGW Web Map)

  • resource_group - Resource group (NGW Web Map)

6.3.1.4. Available Operations

Add to QGIS

../../_images/add_to_qgis.png

Option is available if one of the following resources is selected in NextGIS Web resource tree:

  • Vector layer (NGW Vector Layer) resource_vector - GeoJSON vector layer will be created in QGIS.

  • WFS service (NGW WFS Service) resource_wfs - WFS layer will be created in QGIS.

  • QGIS style of a vector layer resource_style - GeoJSON vector layer with the style identical to selected one will be created in QGIS.

Add to Web GIS

../../_images/add_to_ngw.png

Option “Import selected layer(s)” is available if one of the following resources is selected in QGIS Layers Panel:

  • 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.

Option “Import/Update style” is available when vector layer is selected in QGIS Layers Panel. Select two vector layers: in resource tree and in QGIS Layer Panel. This operation copies style from the layer in QGIS and assigns it to the selected layer in Web GIS resource tree.

Option “Import current project” is always available. 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.

Create new resource group

../../_images/create_group.png

Option is available to everyone. 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.

Refresh resource tree

../../_images/reload.png

Option updates all resource tree.

Open map in browser

../../_images/open_webmap.png

Option is available if web map (NGW Web Map) resource_webmap is selected in NextGIS Connect resource tree. Map will be opened in a new tab of default browser.

Overwrite selected layer

Option is available for vector layer in NextGIS Connect resource tree. Select two vector layers: in resource tree and in QGIS Layer Panel. This operation deletes all objects from resource tree layer and uploads to it objects from local QGIS layer.

6.3.1.5. Context Menu

Context menu may differ depending on resource type.

../../_images/context_menu.png

Common options:

  • Open in WebGIS – open page with selected resource in Web GIS;

  • Rename – rename resource;

  • Delete – delete resource.

Variable options – depend on resource type:

  • Add to QGIS – option is described above;

  • Create Web Map – available for resources: Vector layer, Vector layer style, Raster layer;

  • Download as QML – available only for QGIS vector layer style.