Questions tagged [qgis-3]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
21 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 ...
0
votes
1answer
28 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 ...
1
vote
0answers
21 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 ...
0
votes
2answers
29 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....
4
votes
1answer
124 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
49 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
70 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
43 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
25 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
30 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
40 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
30 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
38 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
32 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
34 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
43 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
27 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
27 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
30 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
33 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
23 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
30 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
66 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
31 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
82 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
27 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 ...
2
votes
1answer
44 views

QGIS 3 Atlas: text box expression for automatically displaying names of all visible features?

I am currently working with the QGIS (3.6) map composer using the atlas tool; it's quite handy, but I've come across a small problem and I'm wondering if there is a solution to this. The coverage ...
1
vote
1answer
30 views

QGIS: Prevent the Primary Key from incrementing when feature won’t be saved

So, I have a PostgreSQL/PostGIS DB attached to my QGIS project (MacOS, 3.10.). I start adding a feature and cancel the process w/o saving the form. When adding another feature my primary key ...
1
vote
0answers
27 views

QGIS Server struggling to load projects

I'm trying to setup QGIS server as a local host for now so that I can test it out and see if it's what after. I'm completely new to server setup, but I've managed to get the server to respond to a Get ...
4
votes
1answer
91 views

QGIS categorized styling: show number of objects for a categroy

When I have a vector layer with several objects and apply a categorized styling to the layer, ArcGIS Shows me the number ob objects that fall into each category. The following image is from QGIS but ...
1
vote
2answers
34 views

Combine columns passed as parameters in QGIS graphical modeller

I would like to combine two fields in QGIS using graphical modeller. If I were to do it using field calculator, I would do it as follows: "field1" + ", " + "field2" Unfortunately, I cannot do it, as ...
1
vote
2answers
58 views

Moving layer across map canvas

I would like to move my created layer across the map canvas. I found some solution here. And next tried to achieve something similar in QGIS 3.10. Unfortunately, this step couldn't be achieved, as I ...
0
votes
1answer
24 views

Custom form with QT for QGIS 3.4, Date edit Widget, Null value

I made a custom form for QGis with QT-designer and I have a problem with the Date-Widget. When I create a form in QGIS with drag and drop or automatically, then it works: Fore a date-field I can ...
0
votes
1answer
25 views

Export multiple Layers at same time to XLSX

How to export multiple/selected layers to one or more Excel-Sheet? I do not found an internal function or a plugin for this.