Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [qgis-3]

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

0
votes
0answers
11 views

How to get measured angle value using PyQGIS?

We can measure the angle using the GUI tool in QGIS but how to get that measured valued in python console using PyQGIS .I have to rotate text along with angle value in attribute table but can not able ...
0
votes
1answer
17 views

Algorithm addgeometryattributes not found

I am trying to find area and perimeters of Polygon using Pyqgis3. I tried manually first Vector->Geometry Tools->Add Geometry Attributes. By doing so, I get the area and perimeter column in the ...
1
vote
0answers
12 views

QGIS extracted azimuth used for symbol rotation seems not reproduced faithfully

A field of calculated azimuths* (degrees) of digitized two-point lines was created. Field expression to calculate azimuth: degrees( azimuth( point_n( $geometry ,1) , point_n( $geometry ,2 ) ) ) . ...
1
vote
0answers
15 views

QGIS 3, Set Labels from expression in “Legend”-Property

Since version 3 there is a section called "Legend" in the layer properties. The displayed fields indicate a promising further development. Namely, is it possible to transform legend entries resulting ...
0
votes
2answers
47 views

Opening GeoJSON in QGIS: projection problem?

I'm attempting to use QGIS to convert a GeoJSON to DXF. The problem is that the GeoJSON import is distorted, with the latitudes compressed. This isn't just a problem with the screen's aspect ratio: ...
0
votes
0answers
4 views

r.stats output parameter error

The "r.stats" tool gives "ERROR: r.stats: Sorry, is not a valid parameter" error and it creates empty file.
1
vote
1answer
40 views

Problems with QGIS3 Vertex editor

I'm having trouble adding new vertex using the QGIS3 Vertex Editor - I'm using QGIS version 3.4.1-Madeira. I tried following the instructions provided in answer to a previous question 'How does ...
0
votes
0answers
22 views

How to get full attribute list of selected feature in PyQGIS?

Following code gets the feature which is chosen by mouse click.But I want to get list of all of the attribute name and values using script of that selected feature.Can anybody provide the method ...
1
vote
0answers
21 views

Disconnect between raster symbology in Layers Panel and Layer Properties (QGIS 3)

I'm working on a Python plugin for QGIS that applies a customised colorRampItemList to a single band raster. The result displays correctly on the map and in the Layers Panel but incorrectly in the ...
0
votes
0answers
10 views

Unable to save point features to QGIS on MySQL database

I created a table with point geometry in MySQL. Subsequently added a vector layer from MySQL table. The table could be accessed from QGIS. However on pressing the add button the system threw warning ...
1
vote
1answer
34 views

Boolean input in Python 3 Script?

in QGIS 2.18 I had this script ##formula_1=boolean ##formula_2=boolean ##formula_3=boolean ##result=output string if formula_1 == True: result= 1 elif formula_2 == True: result= 2 elif ...
1
vote
0answers
26 views

Modeler with optional inputs or none?

I have a need for a model that all the input may be optional and allow the "Selected features only" option. So, I developed a model that fakes it all as seen in the example below I realize that some ...
2
votes
0answers
57 views

Method in QGIS to do a select by radius but ignore “islands”

I am looking for a process in QGIS to run a selection from a given point based of a radius that ignores "islands". For example you may have a body of water which acts as a natural barrier past which I ...
1
vote
0answers
22 views

processing.runAndLoadResults() does not load the result QGIS 3.4.5

I am trying to execute an algorithm and load it in the layer tree when it is done. After looking online I saw that I could use processing.runAndLoadResults() to load my result when the algorithm is ...
0
votes
0answers
28 views

Using import photos plugin in QGIS?

I have some geotagged photos saved on a network drive which I want to import into QGIS 3.2. I have installed the import photos plugin. I have gone through the import photos process and selected the ...
1
vote
0answers
22 views

Detecting checking/unchecking of rules in a rule-based rendering using PyQgis [closed]

Is it possible to programmatically detect checking/unchecking changes of a rule in a rule-based rendering ? I found no indication of existing signals .. I got lost reading QgsVectorLayerRenderer ...
1
vote
1answer
45 views

Efficiently query two properties QGIS spatialite

I have a simple query that involves two steps: non-spatial criteria (should be super-fast) spatial criteria (which is really slow) I would like to run the spatial query only on the filtered layer (...
1
vote
1answer
27 views

Getting QGIS Model Processing Raster Calculator Error?

I am using "raster calculator" tool of the saga in my model. The tool correctly executes raster operation like "a * 2" in value formula option but the same expression is not executed pre-calculated ...
1
vote
1answer
38 views

Can we call a single attribute entry (=one row) “a feature” of the Layer? [on hold]

For the single layer(for example Airport layer) there are many entries in the attribute table. Can we call single attribute row entry a feature of the Airport Layer? Can somebody give clear view ...
4
votes
1answer
74 views

Deleting features in PyQGIS?

I am comparing geometries of input layer and output layer features. I want to delete features in output layers which has equal geometry to input feature. I am using following code to do that. for ...
3
votes
1answer
28 views

Specifying snap raster in QGIS?

I am deploying QGIS 3.6 on Windows 10. Using the Raster > Projections > Warp (Reproject) tool, I need to reproject a single-band, float32, GeoTIFF DEM from EPSG:3413 to EPSG:3857. The output ...
1
vote
1answer
42 views

Points Layer to Distance Matrix QGIS 3.6 - Noosa

I'm trying to calculate a sample distance matrix from four points in the BNG CRS: Using Vector-> Analysis Tools -> Distance Matrix, I get: Input point layer is a MultiPoint layer - first convert to ...
2
votes
0answers
42 views

Adding new field and calculating in PyQGIS

I'm trying to write a script using QGIS 3.4. What I want to achieve is an Excel-style calculation where I can create a new field "field2" and calculate the difference between a current and previous ...
0
votes
0answers
15 views

3D Visualization Error

I am having an issue utilizing 3D Visualization. When I access New 3D Map View, the map that shows up is a 2D representation. Seeing this, I navigate to the 3D configuration tab (represented by a ...
2
votes
0answers
37 views

Mouse pointer always “in work”

I used QGIS 3.2 Bonn and suddenly, and I don´t know why, the mouse pointer never stops rotating as the project is in work. It is still possible to click and select things like it is possible with the ...
-2
votes
0answers
49 views

Migration flow maps with QGIS 3.6 [closed]

I want to make flow maps with QGIS 3.6 but without using the FlowMapper (because it doesn't work)
2
votes
0answers
28 views

Create filter expression by selected elements?

Is it possible to automatically create a filter expression for the Query Builder by selected elements?
1
vote
0answers
27 views

Remove and reload raster layer from previously created QgsRasterLayer object

I have created a QgsRasterLayer object using: lyr=QgsRasterLayer(url,'lyr_name') and the layer is displayed by: QgsProject.instance().addMapLayer(lyr) Now when this layer is removed through: ...
1
vote
1answer
44 views

Showing only one feature per Report page in QGIS 3

The gift of Reports in QGIS is a massive step in the right direction. I have set up a department template for my team to use and it looks great! Right now, I am attempting to setup a report that will ...
4
votes
0answers
39 views

Using Layer Parameter variables in Field Calculator within QGIS Model?

If I define a Vector Layer as an input parameter to a QGIS model, then the parameter name is exposed as a variable in a Field Calculator within the model, however I am unable to use this variable as I ...
1
vote
1answer
47 views

How to integrate QGIS 3.4 with the DE theme

I just got the upgrade to QGIS 3.4 from the ubuntugis-unstable PPA. One thing that immediately stands in this version is that it ignore the DE theme, instead yielding an unhealthy white-based theme. ...
-4
votes
0answers
32 views

Difference between definitions “feature” vs. “layer” [duplicate]

What is the difference between the two definitions "feature" vs "layer" by means of GIS? Especially in QGIS (PyQGIS) is there any difference to say "feature" or "layer"? For example, I have the ...
2
votes
0answers
37 views

How to get raster layer metadata in python for QGIS 3.6? [closed]

I am loading imagery as raster layer through a URL. I need to store its metadata as JSON string in db for future reference. I tried getting the metadata via layer.metadata() and then tried to get ...
1
vote
1answer
13 views

Rule for labeling ways not being part of OSM relation in QGIS

A brief overview of what I want to achieve: Create a map showing all cross-country ski trails in a specific region with some customizations/styling on them. The data come from OpenStreetMap ...
1
vote
2answers
39 views

QGIS 3.4 / QgsVectorLayer()

I tried to use QgsProject.instance().addMapLayer(layer) on QGIS 3.4 but I didn't succeed. Example: layer = QgsVectorLayer(r'C:\CURSO_PYQGIS\CAPAS\urbano.shp','urbano','ogr ') QgsProject.instance()....
3
votes
0answers
41 views

Finding path between points on limited road network

I am struggling to find a path between health facilities in Madagascar. I think that because the road network (from OpenStreetMap) is limited, the functions in QGIS, such as v.net.distance and ...
3
votes
1answer
33 views

Issue converting CSV files to point shapefiles using pyqgis - QGIS 3

I have hit a snag using pyqgis in QGIS 3. I want to convert a set of CSVs (20 total) into point shapefiles but I am struggling with just the single CSV case. My code is based on this blogpost (https://...
3
votes
2answers
61 views

QGIS SAGA functions failing “… following layers not correctly generated. …” [on hold]

I've been having an issue with the SAGA functions for a while now, I believe since upgrading to one of the early 3.x versions. No matter which function I use they all fail with the same error (...
0
votes
1answer
30 views

How do I make a map's background transparent in a layout?

I am trying to add an overview map to my layout. The main map is projected while the overview map is a 'globe' (image below). I want to make the white part of the overview map transparent. I have ...
2
votes
3answers
68 views

Adding tile layer via PyQGIS

Any idea how to add a tile layer (XYZ-Layer) using PyQGIS 101 to a map? Something like osmLayer = QgsXYZLayer(uri.uri(), "OpenStreetMap", "XYZ") "XYZ" is a raw guess. Running QGIS 3.6.0
0
votes
0answers
19 views

QGIS Heat Map output not correct

Fairly new to QGIS here. I'm having trouble creating a heat map in QGIS3 from a set of points. I've followed what others have done online (e.g.: https://www.youtube.com/watch?v=o9Gqrr5cYrY) but in my ...
1
vote
0answers
19 views

pyqgis 3:how to identify partial intersections between a buffer (polygon) layer and pipe (line) layer?

I have a drains layer (polygon) around which I have created buffers of varying distances. I want to find the intersection between the different buffer layers and pipes (line) layer and accordingly ...
-2
votes
0answers
25 views

Listing all layers of legends using PyQGIS? [duplicate]

I want to list all of the available layers of layer panel in console using PyQGIS.Can you please suggest class and methods to do so.
1
vote
1answer
56 views

QGIS 3 Processing Script refer to input layer

I'm new to Python and trying to figure out how to write my first Processing Script using QGIS 3.6 on Windows 10. I'm using the default template provided in QGIS 3 (Toolbox > New script from template)....
1
vote
1answer
45 views

Resolving blanks when calculating attributes for almost 2 million polygons in QGIS?

I am starting with this Hazard Parcel Exposure dataset from the Metropolitan Transportation Commission which I downloaded as a shapefile. http://opendata.mtc.ca.gov/datasets/parcel-hazard-exposure ...
1
vote
1answer
64 views

Generating map tiles with QGIS 3.6?

Similar to this rather dated question, is there a way to generate map tiles on QGIS 3.6? The plugins linked from that question only support QGIS 2.x. I wonder if things have changed in QGIS 3.x ...
3
votes
0answers
46 views

Automatisation of isochrone map creation in QGIS 3

I need to measure the area of isochrones for a big number of points, for different time thresholds and for different means of transport. I've been using the plugin isochrones in OSM tools with QGIS 3....
0
votes
1answer
26 views

PyQGIS3 retrieving points from a shortestpath graph

I'm upgrading some code which worked with QGIS 2.18 to now work with QGIS 3.4.5 and had the following snippet working to retrieve a set of points from a graph created by the QgsGraphBuilder function: ...
2
votes
0answers
36 views

Extract derived data fields from Shapefiles

I've uploaded shapefiles with professionally supplied survey data into QGIS and it all plots fine, then when I export the attributes table into Excel I see that the XYZ values are all zeros. I know ...
2
votes
0answers
21 views

What is stored in Options|Advanced|PostgreSQL|connections|dbname|keys group in QGIS 3?

Since QGIS 3 in the Options|Advanced|PostgreSQL path referred to in the title there is a new group 'keys' as can be seen in this screenshot: In old QGIS 2.X: What kind of information is stored in ...