9.7. Create resources and transfer data
NextGIS Connect plugin enables a fast upload of raster and vector data and entire QGIS projects to Web GIS. You’ll be able to publish your maps and geodata online very quick and easy.
With this plugin you can also download data from Web GIS to QGIS to edit it.
9.7.1. Uploading vector data
Important
You can avoid data format limitations when uploading vector data to Web GIS through NextGIS Connect by switching on options “Rename forbidden fields” and “Fix incorrect geometries” in Settings dialog.
In QGIS create from scratch or upload from ESRI Shape, GeoJSON or CSV files vector layers. Tailor their styles; * In NextGIS Connect panel select Resource group to which you want to upload your data (or create a new one using Create resource group button); * In QGIS Layers panel select the vector layer which you want to upload to Web GIS; * Press Add to Web GIS button on NextGIS Connect control panel and click Upload selected or choose NextGIS Connect –> Upload selected in layer context menu; * If data is uploaded successfully you’ll see in the relevant Resource group a new Vector layer with QGIS style tailored by you.
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.
9.7.2. Upload raster data
Add raster layers to QGIS from GeoTIFF files;
In NextGIS Connect panel select Resource group to which you want to upload your data;
In QGIS Layers panel select a raster layer which you want to upload to Web GIS;
Press Add to Web GIS button on NextGIS Connect control panel and click Upload selected or choose NextGIS Connect –> Upload selected in layer context menu;
If data is uploaded successfully you’ll see in the relevant Resource group a new Raster layer with default Raster style.
9.7.3. Upload basemap
Add basemaps to QGIS via TMS;
In NextGIS Connect panel select Resource group to which you want to add your basemap;
In QGIS Layers panel select a basemap which you want to upload to Web GIS;
Press Add to Web GIS button on NextGIS Connect control panel and click Upload selected or choose NextGIS Connect –> Upload selected in layer context menu;
If a basemap is uploaded successfully you’ll see it the relevant Resource group.
You need to be on Mini or Premium to work with basemaps.
9.7.4. Upload entire QGIS project
Create a QGIS project with raster and vector layers. Tailor their styles, group them, set their hierarchy and visibility settings. Set the map extent;
In NextGIS Connect panel select Resource group to which you want to upload the project;
Press Add to Web GIS button on NextGIS Connect control panel and select Upload all;
In the opened dialog window enter the name of the new Resource group to which the project will be imported;
If the project is uploaded successfully you’ll see in a selected Resource group a newly created group with:
all Raster and Vector layers to which Add to Web GIS operation is applicable, and their Styles;
automatically created Web map with a set extent, to which all the imported layers are added with groups, hierarchy and visibility settings similar to QGIS.
Tip
To view the newly created Web map press Open map in browser button on NextGIS Connect control panel or select Open map in browser in the context menu.
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.
Watch on youtube.
9.7.5. Lookup tables
In Web GIS you can create Lookup tables and link them to vector layers.
When the layer is exported from Web GIS to QGIS the values of the lookup table will be added to the layer using value map widget. After that they will be available in the desktop app in the corresponding field of the table when you enter edit mode.
In QGIS you can use Value relation widget to add another vector layer as a lookup table or upload a CSV file. When the layer is transfered to Web GIS, a Lookup table resource will be created for it.
9.7.6. Create WFS, WMS, OGC API - Features services
NextGIS Connect plugin allows to quickly publish vector data using standard protocols WFS, WMS and OGC.
9.7.6.1. Create WFS service
It’s possible due to the quick creation of WFS service option in NextGIS Connect:
Select in NextGIS Connect Resources panel Vector layer which you want to publish using WFS protocol;
Select Create WFS service in layer context menu;
In the opened dialog window set the number of layer’s features to be published via WFS service by changing the value of the field The number of objects returned by default;
If WFS service is created successfully you’ll see it in the relevant Resource group. The Vector layer is already connected to it.
Note
You can edit the settings of WFS service (including its name, published layers and their settings) in the user interface of your Web GIS.
9.7.6.2. Create OGC API - Features service
NextGIS Connect plugin enables a fast publication of Vector layers from your Web GIS using standard OGC API - Features protocol.
Select in NextGIS Connect Resources panel a Vector layer from your Web GIS resource tree which you want to publish using OGCF protocol;
Select Create OGC API - Features service in layer context menu;
In the opened dialog window set the number of layer’s features to be published via OGCF service by changing the value of the field The number of objects returned by default;
If OGCF service is created successfully you’ll see it in the relevant Resource group. The Vector layer is already connected to it.
9.7.6.3. Create WMS service
The process is similar to creation of WFS service (see above):
In the desktop application (QGIS) in the resource Web GIS tree of module NextGIS Connect select Vector layer that you want to publish via the WMS protocol;
Select Create WMS Service in the context menu of the layer;
In the dialog that opens select a layer style for publishing the WMS Service;
If the WMS Service has been created successfully, then a new WMS Service will appear in the corresponding Resource Group, to which your Vector Layer is already connected.
9.7.7. Creating Web Map from a layer
In NextGIS Connect panel select from the resource tree the Vector layer which you want to display on a Web Map;
In the layer’s context menu select Create Web Map.
A Web Map with the name “layer_name-map” will be created in the same resource group. A QGIS style will be created for the layer and added to Web Map. The map’s initial extent is set by the layer.
9.7.8. From Web GIS to QGIS
NextGIS Connect plugin enables a fast export of vector data from Web GIS to QGIS for further processing, analysis, saving in different formats and other data operations.
It’s possible due to the option of fast creation of GeoJSON vector layers in QGIS using vector data from Web GIS:
Select in NextGIS Connect Resources panel Vector layer which you want to export to QGIS;
Press Add to QGIS button on NextGIS Connect control panel or select Add to QGIS in the layer context menu;
If the layer has multiple QGIS styles, there are several options depending on what you select in the Connect window:
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. Double-click the style to select it. This is the only case in which a dialog pops up.
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, no dialog will be displayed. The style with the same name as the layer or the first in alphabetical order will be chosen.
You can change current style in the layer properties.
If the layer is exported successfully you’ll see in QGIS Layers panel a new GeoJSON vector layer which you can use in your projects or save to your device in a required format.