Questions tagged [qgis-3]

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

Filter by
Sorted by
Tagged with
13
votes
3answers
2k views

How to edit the GDAL/OGR console call in QGIS 3.0?

In QGIS 2.XX, the drop-down menu bar tools had an editable call box at the bottom, where commands not available in the gui could be manually entered (by clicking a pencil button). In 3.0, the menu bar ...
1
vote
0answers
542 views

Checking geometry validity

I'm using QGIS 3.0 and I have a problem with checking validity of the geometries of a shapefile. I imported a DXF, converted the polylines into polygons, manually corrected the wrong or intersecting ...
2
votes
1answer
169 views

How to specify data defined rounded background corners for labels in QGIS 3?

In QGIS 2 I could specify data defined rounded corners for labels background, using a string, for example '5, 5' : In QGIS 3, this same syntax is correctly recognised by the expression generator, but ...
6
votes
2answers
943 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 ...
6
votes
1answer
75 views

QGIS 3.0 (from OSGeo4W Installer) unusable on HiRes Displays?

Just installed QGIS 3.0 from OSGeo4W Network installer on a 13'' convertible notebook with 3200x1800 resolution (Win10) and it looks like this (toolbars and menu bar cover nearly half the display ...
1
vote
2answers
844 views

How to refresh graduated symbology legend in layers panel using python in QGIS 3?

In QGIS 2.x, I used the following code to refresh a graduated symbology legend in the layers panel: self.iface.legendInterface().refreshLayerSymbology(self.myLayer) The new QGIS 3 API advises to use ...
10
votes
1answer
888 views

Missing “New 3D Map View” in QGIS3

I was really curious about the new 3D-Map-View function of QGIS3. Now, finally, QGIS3 just released but I'm missing the 3D Map View! It should be at View -> New 3D Map View but it isn't.(https://...
7
votes
4answers
2k views

Adding TauDEM provider to QGIS 3?

Is there a way to add TauDEM to the latest QGIS 3.0? I can't see it in the providers tab as it was in my previous 2.18.14 version so I am unable to activate it. I use it pretty regularly so I would ...
2
votes
1answer
733 views

QGIS 3.00 crashes while QGIS 2.99 worked well

Using the standalone-installers 64bit on a windows 10 64bit pro machine: various 2.99 version including the latest 2.99 build #8 worked well with the project global_connections from the book QGIS Map ...
51
votes
6answers
70k 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

Using QGIS 3.0 API for layout?

I am trying to generate an atlas with python in qgis 3.0. I have : projectInstance= QgsProject.instance() projectLayoutManager = projectInstance.layoutManager() for comp in projectLayoutManager....
3
votes
1answer
258 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 ...
1
vote
0answers
162 views

Is there a setting or settings in QGIS 3 that allows users to modify application tool-tip behavior?

I can't read the longer tool-tip text in QGIS because the tooltop text is longer than the width and it doesn't wrap past 2 lines: Is there a setting or configuration change to either widen or ...
10
votes
5answers
1k views

Is there a way in QGIS 3 to get a selected feature WKT?

In QGIS 2.x, I used the getWkt plugin: https://github.com/hugoledoux/QGIS-getWKT to get a WKT of a selected feature. But that plugin isn't present in QGIS 3.x. Was that capability built into core ...
2
votes
2answers
780 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 ...
7
votes
2answers
1k views

GdalTools core plugin “missing metadata file”

I installed QGIS 3 with GRASS 7 this morning via OSGeo4W64, and the application opens up without any issues, however the GdalTools plugin is coming up as "Invalid", showing the error "This plugin is ...
10
votes
4answers
5k views

Installing QGIS 3 on Ubuntu?

QGIS 3.0 is released. However, in the download page, there does not seem to be an entry (for Ubuntu (16.04) at least): Latest Release 2.18.x Las Palmas (new LTR) https://qgis.org/...
3
votes
2answers
852 views

Installing qgis2web in qgis3 (2.99) on ubuntu 16.04

When installing the plugin qgis2web through the plugin manager on the qgis 2.99 nightly release I get the following error message. Does anyone know what I need to do to get it working. I've not seen ...
1
vote
1answer
132 views

How to give GPKG layer as output in processing algorithm?

I try to use qgis:creategrid processing tool. I want to give as output source gpkg layer which I have already create by defining it shape type, crs. However it does not work for me now. Here is my ...
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 ...
4
votes
1answer
132 views

Why $area gave me a wrong value QGIS 2.99?

I want to calculate the area with $area function in QGIS 2.99 but the operation gave me a wrong value. Here is a picture comparing the results between QGIS 2.99 and QGIS 2.18. The right side is QGIS ...
-1
votes
1answer
51 views

Creating raster layer from line with PyQGIS? [closed]

I try to create a raster layer from a line shape on canvas. This raster layer band values should be equal and different from other cells. For instance the cells which consists line should be 0 other ...
2
votes
1answer
168 views

Certain errors running ScriptRunner3 on QGIS 2.99 (classFactory() method)

I have been trying to learn QGIS and I've been tasked to start with QGIS 3 so I have been going through Gary Sherman's PyQGIS Programmer's Guide. I am currently using QGIS 2.99.0-Master, running ...
7
votes
1answer
3k views

Add layer to map in qgis3 via a python script

I'm trying convert my old plugin to QGIS3 and one part is to create a shapefile, and afterwards load it to the Layer menu like this: from qgis.core import QgsVectorLayer, QgsProject layer = ...
1
vote
0answers
216 views

Create grid creates wrong grid using PyQGIS?

The yellow polygon is my working area that I draw. I have a small plugin. The user enter the row and column number than create a grid. This row and column number is used to find the Horizontal Spacing ...
10
votes
2answers
21k views

How to add openstreetmap WMS layer to QGIS 3?

I'm trying to add Openstreet Map (OSM) to QGIS3 (Ubuntu 16.04) as a background WMS layer. I found a list of OSM WMS Servers, and a WMS tab in the new Data Source Manager (Ctrl+L). But after clicking ...
0
votes
1answer
85 views

How to write on same *.shp file after running QGIS 3.0 algorithm?

I run the qgis:creategrid processing tool. When I write output path as OUTPUT parameter, it creates the shapefile in given directory. However when I run parameter again after changing some parameters ...
3
votes
1answer
912 views

Load 3D shapefiles in QGIS 3.0 where Ground Wall Roof Solid are separated

The brussels region distribute 3D shapefiles in opendata. http://urbisdownload.gis.irisnet.be/fr/download/ The spatial objects are separated in many files : Ground Wall Roof Solid There is no ...
1
vote
1answer
345 views

Adding Google Maps with PyQGIS?

In QGIS 2.18.16 I'm using the following code (and it works). import requests service_url = "https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}" service_uri = "type=xyz&zmin=0&zmax=...
0
votes
1answer
378 views

How to get feature id by using QgsExpression?

I want to get feature id of the attributes by using QgsExpression. I use this code: layer = iface.activeLayer() expr = QgsExpression('$id') it = layer.getFeatures(QgsFeatureRequest(expr)) values = [...
3
votes
2answers
855 views

How to join attributes by location for more than one located feature in QGIS?

In the standard join attributes by locationfeature in QGIS 2.0/2.18, there are two options: Take attributes first located feature Take summary of intersecting features Is there a function in QGIS ...
2
votes
1answer
645 views

Purge function to remove layers from a qgs file which are not present in the Layers pane using QGIS 3?

My QGIS3 projects tend to keep older versions of layers in the registry even after removing from the legend. This is the same question as the one in: Is there a purge function to remove layers from ...
3
votes
1answer
335 views

Handling multiple outputs in QGIS 3.0 Processing plugin?

I'm porting my QGIS processing plugin algorithm from 2x - 3x. The algorithm generates and outputs one to many rasters and adds them to the QGIS map canvas. The number of output rasters is unknown ...
1
vote
1answer
650 views

Adding feature id column that autoincrements using PyQGIS?

Is there anyway to add the feature id column which increases automatically in attribute table programmatically? Here is a code to add a column: fields = [] fields.append(QgsField('SOIL_ID', QVariant....
1
vote
1answer
170 views

Problem executing algorithm

When I run the script below, I got this error: rps=10000 #RasterPixelSize layer = iface.activeLayer() extent = layer.extent() xmin = extent.xMinimum() xmax = extent.xMaximum() ymin = extent.yMinimum(...
9
votes
2answers
472 views

Create an arc of lines from a line and a value

I'm trying to recreate an Origin-Destination plot like this: I have managed to munge the data into a MSOA to LAD table and can draw a map like this for one of the origin MSOA. Which once you allow ...
2
votes
0answers
2k views

Why Count points in Polygon QGIS2.99 don't work properly?

I'm using QGIS 2.99 and try to count point in polygon with the function in vector analysis count points in polygon but don't have a correct result. It must generate a polygon layer with the field ...
2
votes
1answer
339 views

How to show label according to attribute name?

I try to show label name according to predefined in QGIS 3.0 by using pyqgis. I used that code in QGIS 3.0 but last update broke it down. Here is my code: settings = QgsPalLayerSettings() ...
2
votes
1answer
408 views

Viewing polyhedrals through the new 3D viewer QGIS 2.99 (3.0)

I've installed QGIS 2.99 to test its new features, particularly the 3D viewer, when I try the following I only see a square, not a 3D cube. In PostGIS I make a square and extrude it -- make a square ...
4
votes
2answers
1k views

Export Layout as PDF in QGIS3

I am trying to export a specific layout with python in QGIS3. But I am struggling with the QgsLayoutExport class. How do you use it? How can specify which layout should be exported? This is the code I ...
1
vote
1answer
2k views

AttributeError: 'QgsVectorLayer' object has no attribute 'pendingFields'

I have been using the following python code on QGIS3 (2.99) to look up fields, for several months id = feature.attributes()[layer.pendingFields().lookupField('ID')] And it gives me an error today: ...
3
votes
2answers
989 views

How do I get the scale of the map item in my Layout(composer) in Qgis3?

I want to get the scale of my Layout that I created. For this I thought of using the QgsLayoutItemMap class. The problem is that the scale method in QgsLayoutItemMap always returns 0.0. I know I am ...
3
votes
1answer
842 views

Getting a list of all Layouts in QGIS3

I have created 3 print layouts in QGIS3. Now I am trying to get a list of all layouts in the LayoutManager with python. This is how I am trying to do it(this code is executed in the python console of ...
2
votes
1answer
419 views

ModuleNotFoundError: No module named 'QgsComposerMap'

I am trying to import QgsComposerMap in my QGIS3 plugin but I always get this error:ModuleNotFoundError: No module named 'QgsComposerMap'. My import looks like this: from qgis.core import QgsRectangle,...
1
vote
0answers
204 views

qgis 3.0 and postgresql notify command [closed]

following [this improvement][1], [1]: http://oslandia.com/en/2017/10/07/refresh-your-maps-from-postgresql/ and the video inside the link, I am trying to refresh automatically a layer. I select the ...
1
vote
0answers
307 views

QGIS 3 (2.99) without Grass [closed]

I wanted to play around with QGIS 3 release candidate (2.99) and after installing on Windows, it looks like there is no version of QGIS that doesn't include GRASS. Is this correct?
7
votes
1answer
434 views

Preventing the “Coordinate Reference System Selector” query/window after processing.run()

I want to convert a DXF with python/ogr2ogr. Unfortunately QGIS 2.99 always asks for the CRS. QSettings().value('/Projections/defaultBehavior') 'useGlobal' QSettings().value('/Projections/...
1
vote
0answers
146 views

How to synchronize layer orders in QGIS “layers()” and in the Layers Panels GUI

I'm trying to change the order of layers in qgis3 (python). But the code I can come up with only changes the order of layers in the list iface.mapCanvas().layers(), and not the displayed layer order ...
1
vote
1answer
615 views

How to duplicate a map layer at most once as the bottom layer in qgis3 (python)

I wanted to duplicate a layer in qgis3 using python (display the same vector data as different layers) per this question (How can I duplicate a layer in QGIS?). In addition, I need to: make sure that ...
1
vote
1answer
749 views

How to import for QgsVectorLayerJoinInfo in QGIS3 (python)?

I am trying to join layers programmatically following the answers in the GIS.SE question - Join table field with shapefile programatically (via PyQgis)? : # Get input (csv) and target (Shapefile) ...