Questions tagged [qgis-3]

for questions specific to the 3.x series of QGIS.

Filter by
Sorted by
Tagged with
29
votes
2answers
9k views

Using QGIS3 Processing algorithms from standalone PyQGIS scripts (outside of GUI)

I'm writing a script which must work outside of QGIS GUI. I call some API functions from qgis.core but I'd like to use the processing plugin. I'm able to import processing with sys.path.append() but ...
53
votes
13answers
19k views

Seeking QGIS tutorials and web resources?

I wish to familiarize myself with the capabilities of QGIS up to and beyond QGIS version 3.0. Can you recommend some good web resources and tutorials that would show me QGIS' capabilities? I am ...
5
votes
2answers
2k views

Why does QGIS 3.2 “native:extractvertices” algorithm not work properly in standalone script?

I execute standalone python code (almost identical to the code in the accepted answer): The output file does not contain data, and I get this error message: Warning 6: Normalized/laundered field ...
54
votes
6answers
79k views

Will the OpenLayers Plugin be updated for QGIS3?

Upon searching for the OpenLayers plugin, it shows that this plugin is incompatible with version QGIS 3.0. Will this be updated? Is there another way to add Google imagery or any other aerial imagery ...
27
votes
2answers
14k views

Is QgsMapLayerRegistry removed in QGIS3?

Is QgsMapLayerRegistry going to be availabe in pyqgis with QGIS3 When I typed it into the QGIS python console (2.99), python seems to recognize it because it auto-completes qgis.core....
13
votes
1answer
15k views

Enable 'on the fly' CRS transformation in QGIS 3?

In QGIS 2.8 there is a clear button to 'enable on the fly CRS transformation' in the "project properties" for a new project. Seen here: But in QGIS 3.0, I cannot find it to save my life. Can ...
18
votes
1answer
7k views

Writing a python processing script with QGIS 3.0

Following the update to QGIS 3.0, it has become very difficult to find any information concerning the writing of processing scripts in QGIS 3.0. @Underdark (see here ) has provided a basis for the ...
37
votes
1answer
22k views

QGIS 3 Plugin folder location

I am searching for default location for QGIS 3 Plugin folder I checked here but could not find : C:\Program Files\QGIS 3.0\apps\qgis\python\plugins C:\Users\Abhijit.qgis2 (cannot locate .qgis3, ...
8
votes
6answers
9k views

Installing QGIS3 on Ubuntu 16.04 Xenial: dependency problem

I am trying to install QGIS3 on my Ubuntu 16.04 Xenial. Following the instructions on the QGIS Website I added the following lines to my sources.list: deb https://qgis.org/ubuntugis xenial main deb-...
2
votes
3answers
2k views

Calculating percentage of overlap of two layers in QGIS 3

I am trying to compare two different vector layers on QGIS 3. They are species distribution maps. I would like to calculate the percentage of overlap of two vector layers. My goal is to determine how ...
12
votes
7answers
6k views

Map display not filling window in QGIS on Mac?

In this screenshot of QGIS, you can see that the map is not filling the window. I have tried resizing the window in various ways. Am I missing something obvious, or is this a bug? Versions: ...
10
votes
1answer
4k views

Using processing.runalg in QGIS 3

I try to create a common extent for rasters in QGIS 2.99. Here is my script: import processing processing.runalg("script:unifyextentandresolution", "/qgis_data/rasters/Image2.tif; ...
25
votes
2answers
19k views

Using QGIS vertex editor? [closed]

I'm having two main problems: When hovering over a map with multiple layers, even though I only have one layer editable and visible, I am seeing all the nodes of all layers show up as red dots when ...
8
votes
2answers
6k views

How to compile QtDesigner user interface (.ui) and resource (.qrc) files with QGIS 3 on Windows?

I tried to transpose the QGIS 2 process with no success. I first had to edit C:\Program Files\QGIS 2.99\etc\ini\python-core.bat which contains references to Python27 instead of Python36. I run C:\...
17
votes
2answers
12k views

Unable to snap vertices and segment in QGIS 3.0

I'm unable to snap 2 polygons in QGIS 3.0. I tried snapping 2 polygons from the same layer and also 2 polygons from different layers. I ensured that snapping is enabled in the Settings>>Options>>...
10
votes
2answers
14k views

Why “Export as Python script” button is unaccessible in QGIS 3.0/3.1 Modeler by default?

In QGIS 3.0, "Processing Modeler" window has no "Export as Python script" button unlike QGIS 2.x. If you look at the codes (in DlgModeler.ui and ModelerDialog.py files), you see the code lines ...
6
votes
1answer
681 views

Printing only selected features in report QGIS 3?

My layer has more than 2900 elements, and I would like to release a map with 1 or 10 or 50 selected elements but never 2900 in the time. I can't select them other than visually (no column to identify)...
10
votes
2answers
2k views

Will core functions in QGIS exploit multi-threading?

After reading Enabling multithreaded processing in QGIS?, I was wondering if QGIS 2.6 will include this when running various processes. I checked online and I could only find that multi-threaded ...
4
votes
1answer
1k views

Importing QGIS3 processing tools in standalone script

Inspired by this question, but for QGIS 3 (and therefore Python 3), I would like to use the QGIS processing algorithms in a standalone Python script without a GUI, with a standard installation of ...
30
votes
6answers
21k views

Installing QGIS3 on Mac?

Kyngchaos installer is not finding python3. I installed python3 using HomeBrew and is not located at /usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/bin/python3.6 How do I ...
35
votes
2answers
21k views

Setting print layout to portrait using QGIS 3?

I can't get the print layout to appear in portrait. It opens in landscape and Layout/Page Setup... allows for portrait, but the layout canvas remains in landscape. In 2.18 the "Composition" Panel ...
6
votes
2answers
3k views

Using processing.runandload in QGIS 3

I want to create and elevation hillshade but I found the script for QGIS 2.18. What should I use instead of processing.runandload? Here is my script on QGIS 2.99 python console: import processing ...
16
votes
2answers
6k views

Save and load user profiles in QGIS

Is there a way use a configuration file, maybe .ini to load in the relevant settings for QGIS when it is setup, maybe to share with various people? Plugins installed and plugin repositories filled in ...
19
votes
7answers
10k views

QGIS 3.0 can't load plugin processing, no module named 'osgeo', on Manjaro Linux

I have installed QGIS3 from the AUR package, as well as all optional dependencies: https://aur.archlinux.org/packages/qgis/ However, when launching, I receive the following error: Couldn't load ...
11
votes
2answers
3k views

Exporting Processing Modeler as Python script in QGIS 3?

How do I export my model from Processing Modeler as .py so that I can edit its code? This does not seem as intuitive as in previous QGIS versions.
15
votes
3answers
2k views

Controlling rule-based labelling using PyQGIS?

Following on from this question: How to turn on/off all labels of all layers in QGIS, OP mentioned in his comment that he uses rule-based labels. I tried searching online as to how these types of ...
8
votes
2answers
1k views

No custom widgets in Qt Designer for QGIS 3

There are no custom widgets in my "Qt Designer with QGIS 3.0.3 custom widgets". Is it a bug or I should somehow manually enable them?
6
votes
2answers
2k views

Photo Map tip in QGIS 3 on windows

How do you display a photo map tip in QGIS 3 on Windows? As a new user I'm not sure if this is my lack of experience or a bug, so I've tried to simplify it as far as I can: This is the contents of ...
1
vote
1answer
286 views

QGIS 3 startup script is not executed

Following the documentation for QGIS 3 startup script, I have placed a 'startup.py' script in the following path: C:\Users\Me\AppData\Roaming\QGIS\QGIS3\profiles\default\python\startup.py But the ...
5
votes
1answer
814 views

Labeling only one duplicate attribute in QGIS without editing original data

I have several points (e.g. 4 bus stop positions) in one area. They all belong to the same station, so they all have the same name attribute. To avoid a mess of lables showing all the same name I only ...
10
votes
2answers
2k views

Adding coordinate system to layout in QGIS composer?

I would like to know if there is a way to add a dynamic coordinate system field into a QGIS composer layout. I can use an expression to add many items such as document name, file path, etc but I can;...
9
votes
1answer
11k views

Getting the output layer reference returned by Processing tool

After running Processing algorithm ending up with a layer by runalg or runandload in QGIS2, run or runAndLoadResults in QGIS 3, these methods return a result which is mostly a dictionary like {'OUTPUT'...
7
votes
1answer
10k views

Obtaining base maps / base layers in QGIS 3.0

I'm excited to upgrade from QGIS 2.18 to 3.0. However, I rely heavily on the plugin QuickMapServices for base maps. For example, the main project I'm working on currently uses these base layers, all ...
3
votes
1answer
870 views

Running PyQGIS algorithm on selected features in layer

I try to run algorithms on layers but only on selected features with QgsProcessingFeatureSourceDefinition in a loop and then write the result with QgsVectorFileWriter : layer1 = QgsVectorLayer(path1, ...
13
votes
4answers
6k views

Getting QGIS 2.x python code to work in QGIS 3.x? object has no attribute 'legendInterface' problem

The following piece of code works well in QGIS 2.x, however it does not work in QGIS 3.x. myDir = 'd:/work/output_folder/' layers = iface.legendInterface().layers() pipe = QgsRasterPipe() for layer ...
11
votes
1answer
2k views

What is the new alglist and alghelp in QGIS 3.0 Processing?

Accessing the new QGIS 3.0 processing scripts through the Python console is proving to be a challenge for me, especially since the old processing.alglist() and processing.alghelp() commands appear to ...
4
votes
3answers
9k views

OpenLayers plugin in QGIS 3.6

I can't find OpenLayers Plugin to install in QGIS 3.6. I want to open Google Earth in order to add coordinates and open satellite image to start mapping.
11
votes
2answers
5k views

processing.runalg() throws “TypeError: catching classes that do not inherit from BaseException is not allowed”

Hi everyone I'm in some way new with PyQGIS and I've been trying to run a script in QGIS 3.0 without success (it prefectly ran in 2.18) and always get the same error: AttributeError: module '...
7
votes
1answer
999 views

Using QGIS 2.x processing model in QGIS 3.0?

Is it somehow possible to convert a QGIS 2.x processing model (*.model) to a *.model3 so i can run them in QGIS 3.0 without having to redo mine from scratch?
6
votes
1answer
9k views

Getting LayerTree reference in Processing script in QGIS 3

Let's say my algorithm returns many layers and I need to insert those layers into the specific index in layer list, while running algorithm. QgsProject.instance().layerTreeRoot() worked in QGIS 2 and ...
6
votes
2answers
652 views

Dynamic copyright or layer credit in QGIS 3.4?

Is it possible to add a layer credit to the bottom right corner of the map and print composer in QGIS 3.4? This fuctionality existed in 2.8, as seen here. I can't find this option in the layer ...
4
votes
4answers
965 views

Where to track the status of Processing in QGIS 2.99?

I've understood that the processing algs are going to be implemented in the master version of qgis. What is the best way to track the status of which algs that are implemented and the plan for the ...
4
votes
2answers
221 views

Automating vector data entry in QGIS

I have a vector contour data(polyline). I want to add values to each contour lines. Means I want to digitize my contour lines with proper values. Those values are with me in a paper. I'm adding those (...
3
votes
2answers
786 views

Missing R scripts in QGIS 3 after install

After install Processing R Provider plugin (v.1.0.1) in QGIS 3.4 I only got test.rsx. I'm able to create new scritps but I can't acess scripts already installed in my OS (Linux Mint 19.1) trough R ...
3
votes
1answer
1k views

Unable to compile QGIS 3.x (master) on Ubuntu 16.04: PyQt5.pyqtconfig module does not exist

From: http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html there seems to be no more pyqtconfig module in PyQt5: pyqtconfig Module PyQt4’s pyqtconfig module is not supported. The ...
2
votes
1answer
2k views

QgsPrintLayout Setup from PyQGIS 3?

I am interested in making reproducible PDF figures in QGIS3, and therefore want to work from the console/PyQGIS. Using some previous helpful advice from PDF Output with Python the problem is ...
6
votes
4answers
1k views

Fill with @row_number based on group field in QGIS 3

Is there a way to fill the table with a row number so that count will restart as new group (identified by a separate column) starts? As a result, "row number" column will restart the count ...
6
votes
1answer
461 views

Is there a QGIS 3 setting to completely turn off plugins?

I would like to turn off all plugins without uninstalling them. I usually do this while testing to rule out an issue being caused by a plugin. I am looking for the QGIS equivalent to the ArcMap ...
6
votes
2answers
754 views

Is there a maximum number of features that QGIS can save into a shapefile?

I have a very large .gdb that I want to reduce to my study area. Unfortunately, the study area is still quite big. I could select features that intersected my study area but when I tried Export > ...
6
votes
1answer
1k views

Writing PDF Output with PyQGIS?

I am trying to port some code from an older version of QGIS. I have managed to get the map setup fairly to my liking, and can export some content via a command like iface.mapCanvas().saveAsImage("...

1
2 3 4 5
8