Questions tagged [qgis-3]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
10 views

PyQGIS - ImportError when reloading Plugin

In QGIS 3.4, I created a plugin through Plugin Builder 3 and always reload it with Plugin Reloader when I make any changes. When I reload my plugin I get the error: File: ".../python/plugins\...
0
votes
0answers
19 views

SVG symbols dissapear in QGIS when changing from milimeter to map units

For my point layer I want to use an .svg image and have it rendered in "map units" or "meter in scale". However, when I try to use either, the symbol is not rendered anymore. Why is that? Is it ...
0
votes
1answer
42 views

Hiding labels with value 0 in QGIS

I have a map with a lot of labels with the value 0. I want to hide or remove them somehow and came up with the following rulebased label: if( floor("area") = 0, " ",floor("area")||'m²') ...
0
votes
1answer
27 views

QGIS 3.10 send incorrect ArcGIS MapServer requests

I am trying to add a web service (ArcGIS MapServer) in QGIS 3.10 here is the url: https://pkk5.rosreestr.ru/arcgis/rest/services/Cadastre/BordersGKN/MapServer/ I see a list of layers, but QGIS gives ...
1
vote
1answer
45 views

Stacking two vectors using QGIS [duplicate]

Although the coordinate systems in QGIS for 2 different vector layers are the same, there are differences between the boundaries. How can I superimpose this data? With the plugin or another way, I ...
1
vote
0answers
29 views

Apply categorized render to Vector Layer

I am new to QGIS and I am cannot find a solution to my problem. I have this piece of code: coord_layer = QgsVectorLayer(coords, "my_layer") single_symbol_renderer = coord_layer.renderer() symbol = ...
-2
votes
0answers
30 views

What is new in QGIS 3.4.14 compared to 3.4.13? [closed]

I just realized that QGIS 3.4.14 is available now, but what are the changes compared to 3.4.13. Is there some sort of website where someone outlined the differences?
0
votes
0answers
45 views

Selecting only visible features from different layers using PyQGIS

I want to control whether features from different layers are visible. These features are in a list. I found a script in qgis api but I can not use it: if not renderer.capabilities().testFlag(...
2
votes
1answer
58 views

No Output When Using Python Console In QGIS

I am fairly new to using the python console in QGIS so I am not entirely sure if there is an issue with a line of code I am using or human error. I am using this code to cycle through a point layer ...
1
vote
1answer
36 views

Using Python Code from QGIS modeler with if and else

I am using QGIS 3. The following script code is generated from a model. At the end the code has to create a field Fl_m2, if the blnFl is true. if ['blnFl'] is True: If it is not true the ...
2
votes
1answer
37 views

QGIS custom script to run one process or another depending on input

[QGIS 3.10] I have two processes I have created using the graphic modeler. I'm trying to create a script that would run one process or another depending on the inputs. But I'm getting an error in line ...
2
votes
3answers
46 views

Calculating elipsoidal length of line in PyQGIS

I am using PyQGIS with QGIS 3. This code below is what I developed already, what I am doing wrong? layer = iface.activeLayer() feature=layer.getFeatures() for feat in feature: feature....
5
votes
1answer
149 views

Turning on/off ALL selected layers in QGIS?

When I select few layers in the QGIS 3 Layers Panel and press Space - only one of the selected layers is turned off/on. I want to turn them all. How to do that?
1
vote
1answer
61 views

Converting selected polygons to lines using PyQGIS

In PyQGIS 3, how can I convert selected polygons with n sides, into another layer with n lines? import processing mapcanvas = iface.mapCanvas() layer = mapcanvas.currentLayer() features = layer....
2
votes
1answer
73 views

QGIS 3-->Python-Code from graphic modeler doesn't work

I run a model with an if-condition with sucess. After exporting the code the scirpt gives me an error: "Unable to execute algorithm Field name is not set. Please enter a field name". the code-snippt ...
2
votes
1answer
45 views

QGIS Processing Model with IF script

I have a QGIS model that I want to modify with an IF personalised script. Basically one of the inputs is optional, but if it's empty then the model is throwing some errors down the line. Hence the ...
2
votes
1answer
26 views

TypeError: QgsGeometry.fromMultiPolygonXY(): argument 1 has unexpected type 'list'

When I modify the code (which works) from: vertices = fProject.geometry().asMultiPolygon() for v in vertices: points.append(v) fet.setGeometry(QgsGeometry.fromMultiPolygonXY(points)) to: pt = ...
3
votes
1answer
31 views

QGIS Attribute dependent visibility

I have a contour map which I have applied a symbology to add arrows pointing 'downslope' (defined by the average of adjacent line segment directions) by editing a linetype and adding markers. I am ...
-2
votes
0answers
42 views

Seeking complete guides on How To Extract data from Attribute Table using Python [closed]

I am not a Python user but if I can learn how to extract data using python then maybe that will make my work faster and easier. The guide must be on QGIS 3.4 or later. Can you link me some guides?
2
votes
1answer
31 views

If I selected (highlight) a feature or points would I be able to color that feature as as it is being highlighted?

The points on purple and lightgreen area I want to maintain them reds. The points outside that I want to color them yellow not just the highlighted ones. How can I do that?
1
vote
1answer
39 views

Getting QgsMapCanvas viewport's four corners' coordinates

I have a PyQgis application that uses the QgsMapCanvas as map display. I am trying to retrieve its four corners' coordinates, but couldn't find any public function to do that. All I have is its width()...
2
votes
1answer
33 views

Setting QGIS simple line color depending on fields value in python plugin in QGIS

I am new to QGIS and using QGIS 3.6. I am trying to add a geojson file to QGIS and then export it to a png. I have a color filed in geojson, and can apply it with GUI. Now I want to do it using ...
1
vote
1answer
29 views

QGIS topology checker: must not overlap

I use the topology checker in QGIS 3 with the rule "must not overlap" for a single PostGIS multipolygon layer. Can somebody explain the meaning of errors (colored in red) when the plugin colors a ...
-5
votes
0answers
55 views

continuation of shapefiles rewritten to 100 bytes [duplicate]

This is a continuation of "shapefiles rewitten to 100 bytes" which somebody has closed before I could update it. Update Normally the situation would be that you have changed to a new version qgis, ...
1
vote
1answer
19 views

Default UI Theme is still set to Dark Mode (QGIS 3.8)

I've noticed that the default for version 3.8 appears to be dark mode. I've set it Night Mapping and back to Default and it's still dark mode (I restarted both times). Any suggestions for setting ui ...
1
vote
1answer
43 views

Create Rubber Band with rotation using PyQGIS

To start I am going to be upfront, I am trying to add a feature to a QGIS Plugin Called instantprint. I am trying to add rotation to the tool so that you can align features to the print box and have ...
2
votes
1answer
40 views

Graphic modeler with if Statement

Is it possible to use a boolean as an input and if it is true then the field will be created?
1
vote
1answer
37 views

Using iface in standalone pyqgis script

I am practicing QGIS python API and I made standalone script to create .qgs file and import some layers from postgis database. Now I need to zoom to imported layer but I saw that it is not possible ...
1
vote
0answers
44 views

OSM Map quality deteriorates when changing CRS - QGIS

I have a problem with basemaps for my drawings in QGIS. By basemaps I mean OpenStreetView, Google Maps etc. I'm aware that most of them (if not all) are natively set in EPSG:3857, and they look just ...
2
votes
1answer
27 views

Extracting some bands of multiband satellite image as layers using QGIS 3

I have a multiband(8 bands) satellite image. Now what I want, is to extract 5 bands from that image. By extraction I mean saving those 5 bands into a different layer or Geotiff. I am using QGIS 3 (...
1
vote
0answers
18 views

Change connection details in QGIS 3 (Polygon to MultiPolygon)

I've got a qgis project with a lot of layers. In the past they were established as postgis-polygon-layers/-tables. I updated my postgres/postgis-database recently. Now the updated database stores ...
0
votes
0answers
29 views

Getting layer reference using a feature

Using an existing feature, is there a way/method to get the layer which contains that feature? Example: # new empty feature which doesn't belong to any layer new_feat = QgsFeature() #---------------...
2
votes
1answer
43 views

Interpolation (TIN) from Python Console in QGIS

I am referring to the most voted answer by root676 in Calling interpolation plugin from Python console of QGIS. root676 ends his/her answer with: Keep in mind that the QGIS-API is currently ...
1
vote
0answers
30 views

QGIS API (PyQGIS) doesn't properly read layers

I have a problem with reading qgs file by PyQGIS lib. I'm creating python standalone stript which externally use PyQGIS from installed QGIS desktop application. The problem is that PyQGIS sometimes ...
1
vote
0answers
43 views

Using area or $area function in QGIS, when the data (polygons) is stored in UTM32N (25832)?

I have a question regarding the area and $area function in QGIS and St_Area in Postgis. I am trying to calculate the exact area of Polygons stored in a Shapefile in UTM 25832 and do not know which ...
2
votes
0answers
28 views

Dropdown option in QGIS 3 processing modeler input?

I have an Excel spreadsheet with multiple sheets of different XY database. I made a processing model in QGIS 3.10, in which I have used 'make points from table' tool to create a point shapefile. But ...
1
vote
0answers
31 views

Using Input Layer as part of Global Expression in PyQGIS

In Advanced Python Field Calculator tool, I can get a feature's geometry using $geom or its id using $id in Formula section. Is there a way to get reference of layer selected as Input Layer to use in ...
0
votes
0answers
35 views

QGIS cannot see PostGIS empty tables

QGIS didn't load empty tables with geometry columns from Postgresql, showing this error message: "invalid PostgreSQL layer", but when these tables have data it shows it without any problem. Is it ...
-1
votes
0answers
24 views

QField visibility - some offline layers are not visible [duplicate]

Does anyone know a solution for the following (old) issue? QGIS Qfield visiblity of offline layers on Android 6.0 Samsung tablet Galaxy tab S2 I assume that the problem is part of the QGIS 3.X ...
2
votes
1answer
54 views

QGIS 3.4, plugin builder, refresh layers

I created a very simple plugin with the plugin builder for GIS 3.4. Wihtout any GUI-Widget - by clicking the plugin button I just want to save the edits from several layers at one time and start the ...
-5
votes
0answers
43 views

.shp files reduced to 100 bytes [duplicate]

Lubuntu-19.10 I installed the new version of qgis-3.4.10 from Ubuntu repository. When you run qgis and open a project file (.qgs), the new version of qgis will read the .shp files and update them ...
0
votes
0answers
24 views

Buffering in QGIS3 is returning giant circles [duplicate]

I'm trying to buffer some lines in QGIS. However, the result I'm returning are giant circles. I've tried several different CRS and made sure the project and layer had the same CRS but the result is ...
0
votes
2answers
31 views

Getting field names in PyQGIS [closed]

How do I get field names in PyQGIS 3.x?
1
vote
0answers
20 views

Vectors in layer not displaying but can select all and are shown in Attribute Table

I am working in 3.4.13 and having issues with vectors in a layer doesn't display. I can select all and are shown in the Attribute Table but are not visible I am very new to GIS.
2
votes
0answers
30 views

Select extent on canvas - QGIS Plugin

I'm designing a QGIS plugin where I'd like to offer the user the functionality to select the extent of a bounding box from the canvas like in some tools like Create grid. I've explored QT Designer ...
-1
votes
1answer
68 views

Error in QGIS with Raster Tool in plugin [closed]

When I open QGIS I get the following error: Couldn't load plugin 'rastertool' due to an error when calling its classFactory() method and the following command: ModuleNotFoundError: No module named '...
0
votes
1answer
33 views

Time-series data in QGIS point layer

I work in a project in QGIS where I have some layers with points. All these points are stations. For each station I have a table in database with time-series measurements. I want to find a way to ...
8
votes
0answers
87 views

Is there a way to create quadrilaterals buffers around polygons in QGIS?

For a little map project of mine, I need to create quadrilaterals around a polygon feature based on the bisected angles of the vertices of that feature. Here is an example: Is it possible to automate ...
2
votes
0answers
28 views

Evenly spaced labels for polyline layers

I'm using QGIS 3.8 and am attempting to label roadway segments (OSM) of varying length. By checking the "Merge connected lines" box and hiding features below a certain size, I can generally limit the ...
0
votes
1answer
23 views

QGIS: Add geotagged photos to already existing photos.gpkg file

I'm working with QGIS Desktop 3.4.12 Madeira, standalone. Operating System: Windows 10. Is it possible to add new geotagged images to an already existing „photos.gpkg“ file? If yes, how? The ...