Questions tagged [qgis-3]

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

Filter by
Sorted by
Tagged with
53
votes
13answers
18k 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 ...
23
votes
2answers
5k 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 ...
51
votes
6answers
69k 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 ...
4
votes
2answers
1k 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 ...
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: ...
14
votes
1answer
6k 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 ...
8
votes
6answers
8k 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-...
19
votes
2answers
9k 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....
10
votes
1answer
8k 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 ...
29
votes
1answer
14k 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
1answer
3k 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; ...
30
votes
6answers
20k 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 ...
23
votes
2answers
13k 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
4k 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:\...
7
votes
2answers
628 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 ...
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 ...
27
votes
2answers
13k 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 ...
11
votes
2answers
4k 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 ...
5
votes
2answers
2k 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 ...
14
votes
2answers
10k 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>>...
15
votes
3answers
1k 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 ...
6
votes
2answers
1k 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 ...
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;...
14
votes
6answers
8k 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
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 ...
7
votes
2answers
2k views

Exporting processing modeler as Python script in QGIS 3?

How do I export my processing modeler as .py so that I can edit its code? This does not seem as intuitive as previous versions.
12
votes
4answers
4k 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
2answers
3k 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 '...
6
votes
1answer
719 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?
4
votes
4answers
839 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
130 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
1answer
699 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 ...
4
votes
2answers
3k views

Set layer visibility using QgsMapCanvasLayer in QGIS 3?

How should one migrate code using QgsMapCanvasLayer to set layer visibility? The QGIS3 API break page didn't say that QgsMapCanvasLayer is removed or replaced by another class. Yet, it is not listed ...
1
vote
2answers
101 views

Creating custom CRS in QGIS

I am trying to define a custom CRS in QGIS 3.4 to work on some data in Central Asia. I want to use the Albers Equal Area Conic but change the parameters so that the transformation works best for my ...
1
vote
1answer
374 views

Distance Matrix with 2 point shapefiles and one street network

I have two point shapefiles (start/destination) and one sort of street network shapefile. I would like a to create a distance matrix from the start-shapefile to the destination points, using the ...
1
vote
1answer
1k 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
2answers
938 views

Processing framework input variables from QGIS-2 not working in QGIS-3

A simple script created within the QGIS 2.18 processing toolbox: ##example=string print example Upon running would produce and input box in a window with a run button: Once executed would produce ...
5
votes
2answers
296 views

No output in PyQGIS standalone script running Distance Matrix?

I am trying to create a standalone PyQGIS script which runs the Distance Matrix in QGIS 3, see below: ######### INITIALISE QGIS STANDALONE ################ import sys from qgis.core import ( ...
6
votes
1answer
8k 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 ...
4
votes
1answer
880 views

QGIS changing canvas CRS defaults to imported layer

I am having trouble setting the mapCanvas CRS in QGIS 3.0 using Python. I am effectively trying to replicate what happens when you change the CRS by clicking on the bottom-right corner of the Canvas ...
7
votes
2answers
6k views

Installing LAStools in QGIS 3.0?

I don't know how to install LAStools in QGIS 3.0. In QGIS 2.18, you can incorporate it as a provider in Processing -> Options-> Tools for LiDAR data (for example: Installing LAStools in QGIS 2.4?). ...
6
votes
4answers
663 views

Annotation Scaling

I made a map with annotations in QGIS 3.0. This is how it looks like in the layout view: If I print the map as PDF, one would expect to get the PDF to be WYSIWYG, right? However, it looks like this (...
6
votes
2answers
1k views

QGIS 3 Get coordinates from mouse click

I am working on a small QGIS Python plugin and want to get the X/Y coordinates from a user click on the canvas. I have a small UI called from button in a toolbar. After filling the UI with information ...
5
votes
1answer
2k views

Importing paths for QGIS 3 standalone scripts

For QGIS 2.x, I used the batch file provided in the answer for this post in the OSGeo4W Shell to run standalone scripts: Problem with import qgis.core when writing a stand-alone PyQGIS script The ...
5
votes
1answer
482 views

Changing parameter values according to other parameter choice in Processing script using QGIS 3?

I couldn't find anything about this problem. Suppose to have the first parameters in a Processing script defined as an Enum: self.addParameter( QgsProcessingParameterEnum( ...
3
votes
1answer
538 views

Real centroid plugin QGIS3

I am looking to use realcentroid where I'm assuming it puts all points within the polygons rather than the tool in QGIS Vector -> geom -> centroid tool, which in my result some bendier polygons have ...
2
votes
2answers
776 views

Usage of QgsTask and QgsTaskManager

I'm trying to test the new QgsTask and QgsTaskManager, I found some examples in the PullRequest in github. I modified it slightly and added a print(i) in the code bellow: from qgis.core import ...
2
votes
1answer
274 views

Join attributes by value in QGIS 3.4.3 Processing Modeler

I want to add only a few specific columns from the join table but there is no drop down list. When selecting manually I'm able to select only 1 column when trying more than 1 I'm not getting the ...
2
votes
1answer
103 views

QGIS not reading elevations from GeoTIFF created by ACADCIVIL?

I've generated a raster DEM in ACADCIVIL in TIFF format: name.tif & name.tif.aux.xml. ArcGIS reads the data correctly but QGIS sets the whole data to the same value = minimum height Looks that ...
2
votes
1answer
311 views

How to fill fields with layer name in PyQGIS

I have hundreds of shapefiles that I have added to a QGIS project. I am using QGIS 3.0.0. I have created a new text field for each of them named 'Enumertr' in PyQGIS and I need to populate this field ...