Questions tagged [qgis-3]

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

Filter by
Sorted by
Tagged with
3
votes
0answers
27 views

How can i prevent a form from closing unless data is accepted by validation

I try to use a custom-form in QGIS 3 to validate input-data before saving the data in a database. It would be nice to have the form open unless every input is correct. But the dialog/form closes even ...
1
vote
0answers
35 views

python queries distance the nearest object [closed]

I have 2 point layers, I want to calculate the shortest distance between 2 point layers by python code and enclose the conditions of satisfaction. For example, a point a when there is the shortest ...
0
votes
2answers
49 views

No GRASS folder on MacOS

I am trying to get my GRASS plugin working and found that I have to set the path for it, but the path does not exist on my computer. I tried uninstalling QGIS and reinstalling it and the problem was ...
1
vote
0answers
21 views

Fitting .svg on layer with georeferencer using QGIS

I am using QGIS 3.4. I'm trying to fit an image (as an exercise) using the georeferencer, but I don't understand the result. The srs I choose seems to be correct, and my coordinates (on several ...
0
votes
0answers
43 views

QGIS + PostgreSQL - file that works on one PC will not work on another

I have QGIS on 2 different standalone PC and I share/sync files between them. I now need my second PC QGIS to work with a file that includes PostgreSQL queries. PC 1 is original PC and all is well ...
1
vote
0answers
32 views

Overlap of two images is switched

I try to find a way to create DEM model for two overlapping images from different sources. The upper image has transparency of 50% and as you can see they don't quite overlap correctly. The ...
2
votes
2answers
36 views

Loading OpenStreetMap in PyQGIS

I've written a processing script using pyqgis 3.4 which works. The next step I would like to achieve is to load openstreetmaps as the base map from within the processing script. I can do so easily ...
2
votes
1answer
25 views

Loading all raster layers in folder using PyQGIS

I would like to load all raster layers with type .xyz which are in a folder into my QGIS Project using PyQGIS and wrote the following function for lyr in glob.glob(os.path.join(inputDir, "* .xyz")...
1
vote
0answers
15 views

QGIS Attribute overlay?

I'm creating a video with the Time Manager Plugin in QGIS 3.11. How do I draw data from an attribute for a tugboats engine power in a static location on the screen? As it is it currently follows the ...
2
votes
1answer
40 views

R.Series in QGIS 3.14.3 GRASS 7.6.1 returning no data value outputs only

I'm using QGIS 3.14.3 with GRASS 7.6.1 and trying to add together the values for 3 raster layers using r.series as I'm told this handles no data values better than raster calculator. Please see log ...
0
votes
0answers
37 views

How to get attribute of nearest neighbour of polygons from a points layer

I have 2 layers, one of polygons and one with points. Both have some attributes. For each polygon, I would like to take one attribute of points layer from the nearest point and put it in a field of ...
5
votes
1answer
157 views

QGIS Field Calculator Expression - GeoHash32

I am attempting to write a QGIS 3.10 Field Calculator Expression that will use the mz2geohash library to encode the centroid of the current feature as LAT/LON, and then pass this tuple to the ...
2
votes
2answers
28 views

Defining Custom Path for QGIS3 Plugins

Is it possible to add a user-defined path to plugins outside of the standard paths at %UserProfile%\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins or C:\Program Files\QGIS 3.x\apps\qgis\...
4
votes
0answers
37 views

QGIS 3 Display negative values bar diagrams

Suppose I have a dataset with an id (for each geographic entities) and 2 numeric fields NUM1 and NUM2. These numeric fields have positive and negative values. When I use bar diagrams, only theses ...
3
votes
1answer
47 views

QGIS 3 Proportional symbol by expression feature and legend display

When I use the tool's assistant in order to create proportional circles, I have no problem to display its legend. We can see the legend in canvas map and therefore, it's perfect for the print composer....
0
votes
0answers
20 views

Set the Output of a script as Input of another one

What is the correct way to call the output file of a script? Since QGIS can't name it automatically. I have this script that works perfectly, just drop a file identical to the original. from qgis....
2
votes
1answer
47 views

GRASS v.clean gives weird results

I have the following yellow line layer and I would expect the v.clean tool to split my lines at each intersection. Running the tool gives me the red lines. The settings are all on default. Why is that,...
2
votes
0answers
43 views

Speed up reprojecting large raster (38 GB) in QGIS

I'm fairly new to QGIS and Python but nevertheless want to reproject a 38GB-DEM to a custom CRS. (The output file is supposed to be 55GB large - don't know why, but if I don't have >55GB of free disk ...
2
votes
0answers
16 views

Shortest path analysis has unattainable vertices in result from PyQGIS

You can try this code directly in the console. It basically finds the shortest path but I only have unattainable vertices in the result. Do you know how I can correct this? My layer consists of ...
2
votes
0answers
29 views

QGIS 3.x: Show only labels / TilesXYZ TileLayer of labels only

I'm using QGIS 3.6 and the TilesXYZ extension (deprecated for 3.8+) to export tilelayers of my map. I'd like to export a base layer without labels and a label layer to show on top of features. The ...
1
vote
0answers
37 views

WFS from ArcGIS Online download failed or partially failed

I've made a WFS service from a Feature Layer in ArcGIS Online. When connecting to the service in QGIS and adding the data to a project it works as expected. But after panning / inspecting the data I'm ...
1
vote
0answers
49 views

Interpolate values in QGIS attribute table

I've got a point shapefile of river sonar data. It got only two fields: id and depth. I want to interpolate depth of selected 40 points (arranged by id) value from 1.49 to 1. Any idea how can I do it ...
1
vote
0answers
28 views

PyQGIS grass7:v.distance parameter error “The number of columns and the number of upload parameters should be equal!”

I am currently working on a Python script for QGIS in which I would like to obtain the (minimum) distance from each point (polygon centroid) in the points layer centroid_layer to the line layer ...
0
votes
1answer
27 views

Refresh Oracle and Spatialite Layer with PyQgis

I'm working on a Dockwidget with PyQgis. I made an insert into an Oracle DB and a Spatialite DB and I would like to see the new insert (it's a point). The Layer where the new point is add is ...
1
vote
1answer
50 views

Dynamic decoration QGIS3

I try to make «copyright» decoration in QGIS dynamic. I have a surface layer «COMMUNE» with a "NAME" field. I try to write an expression that allows me to display this "NAME" in the decoration, I ...
2
votes
1answer
42 views

Extending QGIS wordwrap function

I've got an idea that I'd like to try in order to extend the QGIS 3 "wordwrap" label engine function. Ultimately, I'd like to enable users to set min and max length for a single line, and then wrap ...
0
votes
1answer
43 views

A loop to select all active layers in a project [duplicate]

I am trying to export all active layers in a QGIS project to a specified folder, below is what I get atm Outputdir='C:/Users/DN/Downloads/Test/' layer = iface.activeLayer() QgsVectorFileWriter....
1
vote
1answer
80 views

Creating a Heatmap of Delivery Probability in QGIS3

Im using QGIS 3.4.2 to create a heatmap to plot the source place where a network message is generated, in a vehicular network. I separated the messages in two groups, one in each layer: delivered and ...
1
vote
1answer
73 views

Calling the correct element of an output via PyQGIS Script

I am trying to apply a style to the output file of a script that I´m running from the toolbox in QGIS 3.4.7. The last step is as described below. def processAlgorithm(self, parameters, ...
3
votes
1answer
76 views

QGIS: create lines to connect points which are within a distance to each other

I have a point layer and I'm Looking for a tool wich connects every point of the layer with each other. Ideally, I can give a distance and the number of Connections for each point. The following ...
2
votes
2answers
61 views

Adding own items into QGIS 3.10 news feed?

Is there a possibility of adding own items into the news feed of QGIS 3.10? As a GIS administrator it would be a great tool to spread GIS/QGIS related news to internal colleagues.
3
votes
0answers
34 views

Find distance between multiple discrete sets of points QGIS3.8

No similar question seems to relate to my issue but I desperately need help with calculating distances. I have a CSV with the residential postcode of 200 000 patients. For each patient, I also have ...
2
votes
0answers
22 views

How to change a widget type of a field by using python

I'm working on a plugin for QGIS 3.x and I'm looking for an example how I can change the widget type by using Python code. The change should be applied on fields of a vector layer. At the end it ...
0
votes
0answers
15 views

Garmin/Navionic charts in QGIS

I'm looking for an option to import nautical maps (mostly for depth data) into QGIS. So far, I managed to import NOAA .KAP files, but coverage and resolution of some areas are not very good. Is there ...
1
vote
1answer
39 views

How to homogenize NA values within a .gpkg from R

I have created an SpatialPointsDataFrame in R with some data. Here is the outputs from R: > class(Fotos) [1] "SpatialPointsDataFrame" attr(,"package") [1] "sp" > class(Fotos$Azimuth) [1] "...
2
votes
0answers
23 views

Change the colors of the pie chart in compouse (plot) in QGIS 3.10

When using the new plot command available in QGIS 3.10 for compouse pie chart generation, I didn't find any option to change colors. Is there any way to choose colors?
1
vote
1answer
30 views

Qgis 3 : QgsEditorWidgetSetup for date

I need to make a date format in QGIS 3 but, in the program I need to use, QgsEditorWidgetSetup('Date',{'yyyymmdd'}), I want to get this: But I don't know how to use QgsEditorWidgetSetup to make the ...
1
vote
0answers
16 views

Which type of slash to use in path - QGIS 3.8 with Python [closed]

I'm a beginner using Python. I had a problem loading a shapefile in QGIS 3.8 using Python, while loading a rasterfile worked perfectly. I found the solution here: Can't load a shapefile with ...
1
vote
0answers
43 views

Balancing multiple supply and demand locations in QGIS

I am looking for a way to balance supply and demand with respect to distance, between two vector layers in QGIS. I have two vector layers 50x50m grid Supply (The red negative values) Demand (The ...
1
vote
0answers
30 views

What is happening with the centroids that are not on the road layer when you use the Shortest path (layer to point) from Network Analysis?

I am using QGIS 3.8.1 and I want to compute the shortest path of the centroids of any commune to Paris using the roman network. The centroids are the yellow points the road net is the green lines. ...
4
votes
1answer
51 views

QGIS: Creating custom CRS without using the GUI

What would be the appropriate way to create a custom CRS without using the GUI of QGIS on Windows? I am trying to create a custom CRS but my GUI seems to be broken. I cannot use the normal way ("...
1
vote
0answers
25 views

QGIS 3.4.5 print composer: doesn't print DIN A0

I want to find a way to print a map with a raster layer in greyscale (GeoTIFF) and two vector layers in shp-format. I created a map layout and went to the page properties (right-click on the canvas) ...
1
vote
0answers
37 views

PYQGIS QgsAction Does Not Work

I am using QGIS3.4 (built-in Python 3) actions.addAction and trying to open a local photo, with the below code I am able to store the photo path in the feature attribute and created an action, I have ...
1
vote
0answers
18 views

Starting QGIS 3.4 with own startup.py faults on Mac OSX Catalina

Created file startup.py: from qgis.core import * QgsApplication.setPrefixPath('/Applications/QGIS3.app/Contents/MacOS', True) qgs = QgsApplication([], False) qgs.initQgis() qgs.exitQgis() and saved ...
0
votes
0answers
23 views

Open QGIS Project in both Linux/Windows

My company has workers that use Windows and Linux to manage a QGIS project. However, when we use the same project created in different operate systems the layers lose file paths. Is there ...
1
vote
1answer
19 views

Write layer style .qml as predefined within a gpkg using R

I have this code to export a layer (Pbm) to a gpkg called "Atlas": writeOGR(Pbm, paste0(normalizePath(OutputFolder),'\\', "Atlas.gpkg"),"Atlas", driver="GPKG", encoding = "UTF-8", ...
1
vote
0answers
9 views

Sorting Relation_Aggregation Expression Results in QGIS3

I am using a relation aggregation expression to grab a list of inflows from other sewersheds. Some sewersheds take on flows from more sewersheds than others so I approached it through a relation so ...
0
votes
0answers
19 views

Why does measurement units return degrees when using PyQgis? [duplicate]

I am using PyQgis to measure some selected line features using distance.measureLength(feature.geometry()) and when I use distance.lengthUnits() I get returned a value of 6 which refers to degrees. My ...
1
vote
1answer
29 views

Clip raster by mask layer change the pixels size

I've a raster that have the pixels of this dimensions: x 0.2282548198093489467 m y 0.3594572165075641257 m I need to clip this raster with a vector because I need a raster with the same extensions ...
2
votes
0answers
17 views

Outputting layer as table at end of process

I am in the process of migrating some QGIS 2.x processing toolbox script to QGIS 3.x. I have a collection of scripts that helps in the seismic 3D planning and geometry processing. One of the scripts ...