Mapflow <> QGIS
Attention
Mapflow can be used via QGIS. You need to autohorise authorization to work with the Mapflow API and get API token to login.
What is QGIS
QGIS (qgis.org) is the leading and most popular Open Source Desktop GIS. Users can visualize, manage, edit, analyse geodata, and compose printable maps. Get a first impression with a more detailed feature list. Know more about QGIS and istall it from official site.
QGIS has an interface for external Python plugins that allows to connect more apps and extend core functionallity. Our “Mapflow - QGIS” app enables connection to Mapflow Mapflow processing API to run AI-mapping and add output as layers to the QGIS workspace.
How to install the plugin
Click Plugins -–> Manage…, go to the Not installed (or All) tab and enter “MapFlow” in the search box. Click Install Plugin. You will be able to see then if the newer version of the app is available (in the Upgradeable tab) and to check the changelog for details.
The plugin icon has appeared in the QGIS Toolbar. If the icon isn’t automatically displayed, right-click on the Toolbar and check if the Mapflow checkbox is activated.
How to login
You need to log in with your credentials to start using the plugin. Go to mapflow.ai, register and obtain API token.
Or you can use the OAuth 2.0 protocol as a more convenient and secure way.
Warning
Logging in with OAuth is a convenient feature, but still experimental for us.
Also keep in mind that at the moment this feature does not support proxies.
OAuth2 setup
Information on how to log in using OAuth can be found in this section.
User interface
Main plugin workspace has two sections: left sidebar with the processing controls and the tabs section.
Processing controls panel allows to start new processing and/or rate finished processings, and includes following:
Processing controls panel
Name of the field / button |
Description |
---|---|
Processing name |
Name of your processing |
Area |
The area to be processed. This layer is automatically displayed in the drop-down list from the list of QGIS vector layers. |
Data source |
Base imagery to be processed. By default Mapbox is selected, in the drop-down list you can also select satellite images of the commercial providers. You can open your image through the additional options button. |
Show preview |
A preview of your data source or, if it is not available, an OpenStreetMap basemap |
Use image extent |
This area becomes active if processing is performed on the .tif file. Allows you not to create an additional vector layer processing area for this image but takes its extent. |
Processing area |
Automatic calculation of the area of the selected processing area. |
AI Model |
Processing type. In the drop-down list, you can select the following processing types (default list of processing scenarios): Building Detection, Roads Detection, Forest Detection, Forest Detection With Heights, Construction Detection, Fields Detection. |
Your balance |
Remaining area available for processing |
Start processing |
New processing start button. You will see a notification about the successful start of processing, or about incorrectly selected parameters after clicking it. It will appear in the block for displaying and working with processing after a successful start of processing. |
Stars for rating |
Rating scores for the finished processing |
Feedback field |
Comments about rating |
Your current balance is dispayed in the Tob bar. It also contains menu to access you personal profile on Mapflow.ai: top up you balance; open billing history; log out of current session.
Tabs section contains 4 tabs:
1. Processing
Explanation of the fields and buttons of this tab:
Name of the field |
Description |
---|---|
Name |
Your processing name. |
Model |
User-selected item from the list of available models. |
Status |
Processing status: IN_PROGRESS, OK, FAILED. |
Progress |
The percentage of completeness of the processing. |
Area |
The processing area (AOI). |
Created |
The date-time of the processing creation. |
Name of the button |
Description |
---|---|
View results |
Shows the results of completed processing in QGIS layers. |
Delete |
Deletes selected processing/processings. |
Options |
A list of options for working with the results of processings. |
Save results |
Saves processing results to GeoJSON file. |
Download AOI |
Adds processing AOI to qgis as a layer, for further work or export. |
See details |
Shows information about processing (Name, Status, Model, Model options, Data provider). |
Rename |
Renames your processing. |
Hint
To download the processing results, you can double-click on the completed processing in the list
2. Imagery search
Name of the field / button |
Description |
---|---|
“Edit” button |
Button for changing the parameters of the source of satellite images. |
Preview |
A button to preview the specified satellite imagery by geospatial provider. |
Image ID |
Image ID from the Imagery catalog of the selected image of specified satellite image source. |
Max zoom |
Zoom number is selected by default to exclude the consumption of paid traffic for preview (Relevant if connected to Maxar SecureWatch). |
Area |
The area for which metadata will be presented. |
Use canvas extent |
The processing area will be taken from the QGIS map canvas. |
Period of time (From…To) |
The images will be provided for the specified time period. |
Search imagery |
Use to collect metadata for the selected area. After clicking it, a list will be shown with all images intersecting your area. |
Additional Filters |
Use to set the minimum intersection rate between the image and the area of interest and the minimum percentage of image cloudiness. |
Hint
You can define your own source of data in XYZ format. Here is the example: https://your_site.xyz/{z}/{x}/{y}
Hint
Learn how to connect to the free imagery sources – e.g. OpenAerialMap
Learn how to connect to Maxar Imagery
3. Settings
Name of the field / button |
Description |
---|---|
Imagery providers |
Drop-down list with additional satellite imagery providers. |
“Add provider” button |
Button for adding a source of images. |
“Delete provider” button |
Button for deleting the custom data provider. |
“Edit provider” button |
Opens dialog to edit custom data provider. |
Select mapflow project |
Drop-down list with mapflow projects on you account. |
“Add project” button |
Button for creating your new map flow project. |
“Delete project” button |
Button for deleting the mapflow project. |
“Edit project” button |
Button for editing the mapflow project. |
Here you can configure how the processing results will be uploaded to QGIS. There are two ways:
view result as a vector layer
- This is streaming vector tiles directly from our server, which allows you to view results of the processings without downloading full results file, so it will be faster for big processings.save local gpkg file to view results
- Saving local gpkg files on your disk for further loading as QGIS layers.
Warning
Vector tiles are an experimental feature for us, so choose the method that is convenient for you.
Hint
This tab contains also Output directory button.
Output directory - set up where the processing results will be loaded on your local disk If the save local gpkg file to view result
option is selected.
4. Help
The tab contains all useful links to the plugin documentation.
How to run the processing
To start the processing you need to add the Polygon Area of Interest (AOI).
The plugin has several built-in options for creating AOI.
Create new AOI from the map canvas extent using the “+” button;
Upload the existing AOI using the “+” button;
Draw AOI at the map;
Use the extent of the uploaded image.
Besides, you can create a new vector layer or add existing AOI into QGIS project. If the vector layer consists of several polygons select one of them.
Use of commercial satellite imagery providers
How to search for specific images in the 🌏 Global mosaic
How to connect to Maxar SecureWatch
Note
SecureWatch is a service that provides global access to high-resolution satellite images and imagery basemaps from the world leader in remote sensing, MAXAR, through the subscription model. The spatial resolution of images varies in the range from 30 cm to 1 m. All images are accompanied by metadata, including information about the acquisition date and time, cloud cover etc. In our application we implemented the special interface to connect to this service and use imagery via Mapflow’s processings pipelines.
Use of embedded Maxar SecureWatch for image processing by Mapflow
In the Data source drop-down list, select the required Maxar product (SecureWatch, Vivid), switch to the Imagery search tab.
Maxar preview
Select your AOI in the Area drop-down list and click on the Search imagery.
Double click on the selected image in the search results (or click Preview button) to add it on the map.
Important
In the free tariff plan the Max zoom is limited up to 12 and the processing cannot be started using SecureWatch. If you want to use this data provider - you have to switch to the Premium tariff plan or write to us to get a quote.
Using your SecureWatch account for image processing by the Mapflow
Click + button and choose Maxar WMTS option in the dropdown list;
Enter Login / Password from your Maxar SecureWatch account;
Enter WMTS URL link for Maxar Secure Watch (SecureWatch - Login - Securewatch - Use with - Web Services - WMTS)
Optional: specify the coordinate system (default epsg:3857);
Optional: Check Save login and password
Hint
How to find Maxar WMTS URL:
Go to SecureWatch and login.
In the upper menu select Use With >> Web Services >> WMTS
Copy the WMTS (or TMS) url.
The Connect ID is different for each product you have in your SecureWatch subscription. Therefore, initially choose the one you want. To do this, open the User Profile menu and in the title bar select the required of the two suggested mosaics (Vivid and SecureWatch).
Click Preview.
Now the Maxar layer is available for preview in your raster layers list and for the AI-mapping processing using Mapflow.
How to find and process the image by Feature ID using Maxar SecureWatch
You can use SW to discover available images for you area of interest.
Go to the Providers tab.
Select Maxar SecureWatch from the dropdown list.
In the Maxar SecureWatch imagery Catalog select the vector layer containing the boundary of your area of interest.
Note
To define the imagery search area you can create the new polygon (Layer -> Create layer -> …, select Polygon as a geometry type, add polygon using the tool Add polygon feature) or upload it from the file with coordinates. If there is more than one polygon in the file, select with the tool Select object(s) the polygon you need. For more information on creating and working with vector layers, see the QGIS User Guide. Alternatively, you can check the option “use canvas extent”.
Search imagery, to view meta-data of all available images intesecting your AOI. You can apply search filters and specify the period for which you would like to receive images. This will help in forming an imagery catalog with the necessary parameters.
Select the prteferable image from the imagery catalog or use the WFS generated vector layer (Maxar SW metadata) to search through more attributes. If you want to process a specific image in advance, insert your image ID in the field on the top of the plugin, this will make it easier to find the image in the imagery catalog.
Note
Imagery metadata is saved in the form of vector layer. You can interact with its Attribute Table by searching through all attributes.
Click Preview to view the selected image in the form of new raster layer (or double-clicking on the row in the table).
Attention
“max zoom 12” checkbox is active to prevent the paid streaming on the side of Maxar SecureWatch.
How to use other imagery services
Go to the plugin, on the Providers tab click on the Add (1) and enter the relevant data in the opened window (2). Click the Preview (3) the image, - you must be at the correct zoom and coordinates to see the image.
To start processing using this data source, go to the Processing tab, fill in all fields of processing parameters, click Start processing.
Name of the field / button |
Description |
---|---|
Name |
Name of other imagery data provider |
URL |
URL of the imagery data provider |
Type |
Data source type. You can enter your custom imagery source URL in one of the following formats: XYZ, TMS, WMS, Quadkey. All formats represent the most widely used protocols to fetch georeferenced imagery via HTTP. |
Hint
Check for more imagery sources connections in the UserGuide How To:
How to connect to Openaerialmap
How to connect to Nearmap
How to upload your image
You can upload your own GeoTIFF. All raster layers currently loaded in your QGIS (1) are visible in the drop-down list (2) and can be selected for upload.
Important
Please, follow the requirements specified on the page with Requirements for using the platform when uploading your own images for processing through the API of the Mapflow platform.
- Check the data type
The Data type must be Byte (8 bit). If the Data type is Int16, or Float32 etc, please follow the instruction Userguides - How To 🙋♂️. Alternative option: use the preprocessing script
- Check the image size
Both sides image dimension must not exceed 30.000x30.000 pixels. If you have larger images you should either cut them in smaller chunks or switch to the Mapflow custom.
- Check the number of channels
Normally, the Mapflow processes 3-channel RGB rendered images. Mapflow platform can also process single-band (panchromatic) imagery, but the NN models are not tuned for such kind of data, so the quality of the result may be worse than expected.
- Check the projection and georeference
Make sure that your imagery is georeferenced in geographic or projected coordinate system.
- Check the resolution
The resolution restrictions vary for different models, see Model requirements
You can send a request for data preprocessing to help@geoalert.io
Work with results
View the results
The processing results that are 100% complete can be downloaded as a vector file to your local directory or streaming as a vector tiles and automatically added as layer to QGIS workspace.
Double click on the processing name in the 1. Processing Table or select it and push the button “View results”. The layer will appear in the Layers panel (QGIS –> View –> Panels –> Layers) in the folder “Mapflow”. You can work with it further as with the usual vector layer in QGIS.
Note
If the default AI model is used, the plugin automatically assigns predefined styles to the vector layer. For all custom models / pipelines the single default style is assigned. You can always change it.
Save results
The processing results, which are 100% complete, can be downloaded in GeoJSON format, to do this, click on the Save results
button, select output directory in the window that appears and name the file to be saved.
Delete the processing
To delete the processing - select it in the list, click the button “Delete” and confirm.
Warning
The processing cannot be restored by user. Before the permanent deletion the data backup is temporarily stored on the Mapflow server in case of emergency. So if you deleted your results by mistake and want us to restore the processing – send your request to the support without delay.
Review the results*
Note
❗️ This option is available for the limited number of Mapflow customers who have signed up for the enterprise support
If activated, every completed processing comes with the status “Review required”. The user can either accept the result or request the review, so the support can reprocess it and get better results, until it meets the requirements. To request the Review of the results:
Select the processing with the Status “Review required” and click the “Review” button
Provide comments in the Review dialogue:
Add your comment on why and what you want us to make a review
Optionally Add the polygon area, highlighting the objects that are not correctly processed, weren’t identified correctly, etc – it will help us to pay attention to the specific issues
The processing Status will change to “In review”
As soon as Review is done on our side the Status will change back to “Review required”. Accept the results or return to the #1
Proxy-settings
If you are behind a firewall, go to QGIS -> Preferences -> Network and will please adjust the proxy settings for plugin connection.