Questions tagged [qgis-processing]

Spatial data processing framework that brings advanced analysis capabilities to QGIS.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

QGIS Vector Difference not removing features from Attribute Table

I have a point layer with some 33,000 features, and I remove those features that overlap a polygon using Vector/GeoProcessing tools/Difference. This produces a temporary layer that has some 12,000 ...
  • 403
0 votes
0 answers
10 views

QGIS.3.20.3 not able to load and run GIS F2E QGIS. Details are given below:

QGIS 3.20.3 not loading the python program GIS F2E QGIS . Details are given below: An error has occurred while executing Python code GISF2E_qgis_non-OSM_v1.20.python : UnicodeDecodeError: 'utf-8' ...
0 votes
0 answers
43 views

Calculating area within feature

I have a vector layer containing 12 features, 12 areas. Also, I have a layer containing lots of features, but I'd like to merge their values together, so I made a raster out of it. Maybe there is ...
  • 1
1 vote
0 answers
26 views

How to share QGIS R Processing Toolbox

I have developed a R Processing Toolbox. This has the file name: ToolboxRQGIS.rsx How can I share this toolbox with my colleagues in the easiest way? For a QGIS plugin, I can archive the developed ...
  • 65
2 votes
1 answer
27 views

Can Sort and Number QGIS plugin be performed as a batch process?

I need to add a field into these shapefile rows which are sequentially numbered when ordered by either the X or Y axis. I have had success with this by using the sort and number QGIS plugin, however I ...
1 vote
2 answers
87 views

QGIS label formula

I have the formula below to make my labels: "operator" || '\n' || "well_name" || ' ' || "well_num" || '\n' || "footagens" || ' ' || 'F' || "ns" || ...
1 vote
2 answers
81 views

Clipping raster based on polygonised point marker using QGIS

I would like to clip a big raster down to individual trees (i.e. each tree corresponding to each bounding box). The square box you see here is a vector layer of multiple points, I merely changed the ...
0 votes
2 answers
35 views

Random polygon color with rule based styling

I am using a rule based styling only to show certain polygon which match with below filter: "NAME_2" = 'Probolinggo' OR "NAME_2" = 'Kota Probolinggo' The layer has thousands of ...
0 votes
0 answers
37 views

QGIS Processing Plugin: Setting input and output directory

I would like to connect my input and output directories, as well as my input file 'boundary layer' within my processing plugin. My plugin appears like this: My plugin.py file is depicted below: ...
  • 45
1 vote
0 answers
21 views

Using folder input to pull files into QGIS graphical modeler?

My company has a script we use that pulls relevant terrain information from the web for an area and puts it into a specified folder. The files are .shp and .tiff files. Each time we use it, the file ...
  • 21
0 votes
0 answers
52 views

Crash when running algorithm via PyQGIS plugin

I use a Python plugin which is working great on my computer. But on another one, I get an error at the execution of an algorithm from processing package in PyQGIS: ## Report Details **Python Stack ...
  • 899
2 votes
1 answer
87 views

Model as an algorithm/processing in QGIS

I'd like to know if it is possible to use a model (previously made by the graphical modeler of QGIS) as algorithm/processing in the flow of another model.
  • 769
2 votes
1 answer
41 views

Use QGIS processing parameter in field calculator's formula

I built a python processing tool for QGIS where my goal is to use field calculator and multiply an existing field in a layer by a parameter (number) decided by the user. I defined the parameter for ...
  • 592
0 votes
0 answers
36 views

QGIS Python script to Tool in Processing Toolbox

I have a simple Python script that updates the names of my layouts to include the current date and a project number. I would like to make this available in the processing toolbox or even as a model. I ...
0 votes
0 answers
34 views

How to implement event when addfeature action is triggered in PyQGIS

I have a points shapefile which is input shape file and I have empty line shapefile in which user is going to add the feature. Whenever user trigger the add feature action in the main window I want to ...
  • 1
1 vote
1 answer
38 views

How to choice a specific direction to get the shortest path

I'd like to know how to choice the left or right direction starting from a point and following a network; in the processing shortest path (from starting point to vector points layer) of QGIS. In this ...
  • 769
1 vote
1 answer
53 views

Input layer in Processing Python script doesn't work in Model when input is a processing output

My processing script works fine from the scripts menu and also from a model if the input is on disk or in memory. However, if it's part of a model and uses an Algorithm output, it can't find the data ...
  • 7,766
0 votes
0 answers
13 views

QGIS Processing: Handle error in file downloader

I have a processing model in QGIS (3.22.7) that downloads data (native:filedownloader) from OSM and processes it further. Unfortunately, the download from the OSM server does timeout about every third ...
  • 11
1 vote
1 answer
33 views

QGIS Processing Algorithm - change field value using `changeAttributeValue` or other protocol doesn't save changes

In a simple processing script I am trying to use Regex to search and then replace any found values with a new value. It seems to run fine but doesn't save the changes. [![enter image description here][...
  • 7,766
6 votes
1 answer
86 views

QGIS Processing Algorithm populate alg.FIELD with attribute / field names

Using the new @alg decorator structure I am trying to populate a drop down with the fields (attributes in a table). Using the code in https://docs.qgis.org/3.22/en/docs/user_manual/processing/scripts....
  • 7,766
1 vote
0 answers
85 views

Problems when trying to setup QGIS on Google Colab

I use the following commands from https://lerryws.xyz/posts/qgis-in-google-colab and get "No module named 'PyQt5.QtCore'" error: !sudo apt-get install gnupg software-properties-common !sudo ...
3 votes
1 answer
91 views

Opening QGIS project says layers not available

I created a QGIS project with four geopackage layers for an uni project. I made sure to include all four geopackage layers in the same folder as the QGIS project and then zipped it to send it to my ...
  • 31
0 votes
1 answer
43 views

QGIS Weighted Overlap

I have one Polygon-Layer with land-parcels and one Polygon-Layer with buildings. With the Overlap-Tool I can easily calculate, what area of each parcel is covered by one or more buildings. But I need ...
0 votes
0 answers
18 views

Form of polygon for OSMCONVERT

I need to get all the buildings and forestareas within a 200 m radius of the german railway system. Since extracting them from a countrywide OSM file results in files too big to handle for QGIS and ...
  • 399
0 votes
0 answers
40 views

Data from gpx file wont change in QGIS

I don't get it. I try to add a new layer several times via python console, but the data from the GPX file stays the same even though i change the underlying Waypoints.gpx file between every script ...
  • 143
2 votes
1 answer
45 views

How to parameterize 'Select By Location' in QGIS processing plugin

Can someone help me understand how to properly parameterize the 'Select by Location' geoprocessing tool when implementing it in a QGIS processing plugin. I have been following the tutorial on building ...
0 votes
1 answer
30 views

How to get the code of a plugin to automate the process in PyQGIS

I need to get the code of a plugin (point sampling tool), to automate the process. I know how to do it in regular tools, using this processing.algorithmHelp('tool'). But how can I use it for plugins?
3 votes
1 answer
85 views

Select feature by expression and run "native:buffer" on selection, works for "id" field but no other field in PyQGIS

I'm trying to select features from a polygon layer where a specific string value ('yes') is found in a field called "result" and buffer them. My script can select features with a specific ...
1 vote
1 answer
69 views

Open the algorithm dialog of a custom QgsProcessingAlgorithm instance

In a custom plugin I'm calling some custom QgsProcessingAlgorithm that are loaded with the plugin itself. If I create an instance of these algorithms I need to prefill the parameters with some custom ...
  • 2,752
0 votes
1 answer
70 views

Strange "TypeError: string indices must be integers" when refactoring fields (processing.run()) in PyQGIS

I wrote a small function to refactor fields (just one field really) in a given Shapefile which I output as a temporary layer. In principle it works just fine. I build a String with all the info the ...
  • 167
0 votes
1 answer
83 views

Saving temporary vector layer after adding into group using PyQGIS

This code is not displaying any feature in QGIS , so I want to save the temporary layer so that the features can be visible. extract1 = processing.run("native:extractbylocation", { 'INPUT': ...
1 vote
0 answers
22 views

Disable option "open output file after running algorithm"

Whenever I run a model in QGIS there is a dialog box asking for the set parameters. There the option "open output file after running algorithm" is always checked. is there a setting to have ...
0 votes
1 answer
50 views

Not able to create memory layer while running processing algorithms

I am trying to run processing algorithms in Python code editor inside QGIS. Here is my code: zones = QgsVectorLayer('C:/Users/pamidiashoka/Downloads/OP_Pen/boundaries.shp', 'zone boundaries', 'ogr') ...
3 votes
1 answer
64 views

What is the difference between a feature source and vector layer?

I'm trying to use PyQGIS to make a tool script in QGIS 3. I'm using the default script template as a starter. The template uses QgsProcessingParameterFeatureSource() to define the input. A quick ...
1 vote
1 answer
27 views

QgsVectorLayer Line layer in memory, layer source could not be found PyQGIS 3

I'm at a loss for what I could be missing here self.curve_layer = QgsVectorLayer("line?crs=epsg:4326", "curves", "memory") feats = [] xform = ...
  • 402
0 votes
0 answers
42 views

Get lat long from the CoordinateReferenceSystem of shapefile

This is the GCS from the shapefile GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["World_Geodetic_System_of_1984_GEM_10C", 6378137.0, 298.257223563]], ...
0 votes
0 answers
22 views

How to use 1km2 or 10km2 vector grid to classify urban areas in a population grid raster data?

I have: A population density grid raster file converted to point shapefile. And a vector grid and used zonal statistics to estimate the total population in each grid cell. I want to mask out or ...
2 votes
2 answers
61 views

How to aggregate street lines using value filter

I have a shapefile of a service done on a street. This service has a sequence of execution and whether or not I should run on that street (blue and red). At each corner of the street I'm working on, I ...
0 votes
0 answers
30 views

error message pops up when trying to open qgis 3.22

I seem to be having trouble with opening/running this version of qgis. i have tried downloading it several times but when and everything goes smoothly up until i have to want to open the program in ...
  • 1
0 votes
0 answers
35 views

Creating a DTM from a LiDAR map in QGIS 3.22.7

I'd like to create a DTM from a LiDAR map in QGIS 3.22.7 I looked at a tutorial that explains how to do it, but it seems as if the instructions there refer to a different version of QGIS because I can'...
0 votes
1 answer
36 views

How to delete a line up to a certain snapping point (QGIS) [closed]

Is there a way/tool to delete lines up to a certain snapping point, so that once I've drawn a line I don't have to manually delete each vertex until I reach the desired point or completely delete the ...
0 votes
0 answers
42 views

Problem Importing KML QGIS

I'm pretty new at QGis. Whenever I try to import KML into QGIS, I do not see any of the points I imported. Somedays ago I could. I don't understand what's happening and the reason about this.
  • 13
1 vote
1 answer
71 views

Loading multiple layers into QGIS Batch processing

I'm trying to process multiple layers with QGIS batch processing, but I'm unable to get all the layers loaded into the batch processing input layer(s) without clicking every layer by hand. How do I do ...
  • 11
2 votes
0 answers
69 views

Running Python script file exported from QGIS Graphical Modeller in external terminal

For instance, I have created a simple graphical modeler which gives NDVI as an output when the NIR band and Red Band are provided: I exported the Python script using 'Export as script algorithm' in ...
3 votes
2 answers
154 views

Getting Python code that QGIS analysis tools are running in background

I know I can open the Python Console to type in code, and before I know I've been able to open something in QGIS to see the code running when I do something like intersection vector analysis, though I'...
  • 43
0 votes
1 answer
44 views

Create reference number based on direction of line

I'm looking to label a series of lines based on a direction of the trail rather than any cardinal direction (east to west, north to south, etc.) in QGIS 3.4 for Windows 11. For example, let's say I ...
0 votes
0 answers
51 views

Using QGIS processing algorithms in C++

There are no instructions for using QGIS processing algorithms in the C ++ programming language but it exists in the Python language. Is it possible to use QGIS processing algorithms in C ++?
3 votes
2 answers
71 views

Deleting all fields from attribute table in QGIS processing script

I'm writing a script in the processing script editor of QGIS and at one point i want to delete all columns of my vector layer's attribute table. I tried to do it like this: lst = list(range(0,-1)) ...
  • 87
1 vote
2 answers
193 views

QGIS clip tool error non-point (MULTIPOINT) geometry to point shapefile

I'm using QGIS 3.22.4 then tried 3.22.7. I am using the clip tool. The input layer is a point(point) shapefile (verified in layer properties under information-geometry section). I have tried this ...
  • 11
1 vote
0 answers
56 views

Polygonize tool error "Process gdal_polygonize.bat failed to start"

I am trying to use the Polygonize (Raster to Vector) tool on QGIS-LTR on Windows 11. When I launch the tool on a layer I get the following error. Input parameters: { 'BAND' : 1, 'EIGHT_CONNECTEDNESS' :...
  • 11

1
2 3 4 5
30