Questions tagged [standalone]

able to operate independently of other hardware or software.

Filter by
Sorted by
Tagged with
4
votes
1answer
66 views

Making a Feature Form for a standalone PyQGIS application as in QGIS

In QGIS, there is a method named openFeatureForm defined in QgisInterface class. It opens a form that shows value of attributes for a given feature. layer = iface.activeLayer() feature = layer....
2
votes
1answer
51 views

openFeatureForm in PyQGIS Standalone Application

I am trying to implement a desktop application with PyQGIS 3. When I try to use openFeatureForm to display the data of the selected layer object it shows an error, however when I use this code in the ...
4
votes
1answer
101 views

Adding column with area values in attributes table with standalone PyQGIS

I would like to add an area column to the Attributes table using Python. I prefer not to use QGIS Python console. I would like to do that using cmd. How should I change my code? My code and error ...
2
votes
1answer
56 views

No output in Python console when using PyQGIS

When I run my code in QGIS Python console I get output, but when I run my code from normal console I didn't get any output. Why does it work only in QGIS Python console? import sys, os sys.path....
0
votes
0answers
27 views

WFS layer invalid in standalone python script

I have a project in 3.10.11 (ltr) loading a layer from a Geoscience Australia WFS. https://services.ga.gov.au/site_1/services/Geomorphology_Scale_Guide_WM/MapServer/WFSServer?request=GetCapabilities&...
2
votes
1answer
63 views

Algorithm qgis:joinattributesbylocation not found

I would like to join attributes by location using standalone PyQGIS but im getting error. I have QGIS 3.16 installed on my machine. from qgis.core import * QgsApplication.setPrefixPath("C:/...
0
votes
0answers
24 views

Scale bar for standalone PyQGIS layout clumped together

I'm trying to implement a scalebar for my layout in a standalone application. This is my current code: def createLayout(Main): layers = Main.canvas.layers() project = QgsProject.instance() ...
1
vote
0answers
29 views

Importing processing from QGIS into IDLE

I have been trying to make a program that creates a virtual raster based on the files that are input. Whenever I run my code it says. Traceback (most recent call last): File "C:/Users/Zach/...
0
votes
0answers
38 views

DLL load failed when loading PyQGIS in PyCharm with script (Windows)

I am trying to setup PyCharm to work with PyQGIS. I followed this tutorial: https://silverspringenergy.com/using-pycharm-as-an-ide-for-qgis-3-plugin-development-2/. Some files were located elsewhere ...
0
votes
0answers
36 views

Using QGIS Processing-Toolbox in stand alone Python scipt (Microsoft Visual Studio)

I'm using QGIS 3.14, Python 3.7, Processing-Version 2.12.99 and Microsoft Visual Studio 2019 (IDE). Everything works fine, the only problem I have is the import of the processing-algorithms. Related ...
1
vote
0answers
41 views

PyQGIS Standalone QVectorLayer works and QRasterLayer not work without QgsApplication / initQgis()

I'm trying to make a standalone python app and I want to use in some parts of app functions of PyQGIS. I'm testing things to understand how it works. Doing tests I have found a situation that I do ...
1
vote
1answer
90 views

QGIS standalone application in python can't access 3d:tessellate processing tool

I'm developing a standalone QGIS application and I want to run the tessellate (3d:tessellate) processing tool using the following code:  import processing from qgis.analysis import ...
0
votes
1answer
109 views

Extract by location works improperly in PyQGIS standalone script

I have been trying to extract polygons from one layer that intersect a polygon in another layer, and another extract that is disjointed, and looping this over several files organized by date. When ...
1
vote
1answer
54 views

pyqgis: Get the Click on canvas standalone app

I added a subwindow in a MDI area containing a QgsMapCanvas. Defined the clic tool QgsMapToolEmitPoint. But when I click on the canvas there's no response, al least it should print 'clicked'. ¿¿May ...
2
votes
1answer
194 views

Errors while importing QGIS 3.10 from standalone Python, but not from QGIS's Python Console

I try to load a QGIS project in standalone Python on Windows 10. This is the code that I use: from qgis.core import * qgs = QgsApplication([], False) QgsApplication.setPrefixPath("C:\Program ...
0
votes
1answer
82 views

QGIS C++ API doesn't work with ECW files

I'm new with QGIS. After lots of trying I finally executed a successful compile on QGIS libs and used them in my program. In my simple program I just read some layers (vector and raster) and showed ...
2
votes
1answer
169 views

Calling a plugin (quickosm) from a python standalone application?

I am trying to call the QGIS-plugin quickosm from a standalone Python application and I´m not quite sure how to or if this is even possible. My QGIS version is 3.10 (using OSGeo4W64) with the ...
3
votes
1answer
178 views

Standalone QGIS App keeps crashing. Issue with Context or Threads?

I'm trying to setup an application for my company, that generates a PDF file for specific user generated coordinates: The user enters an address into the frontend (Flask generated), which is ...
4
votes
1answer
80 views

Referenced table not found in standalone Python script

I'm trying to run a Python script from OSGeo4W Shell. Im doing this by typing "python-qgis C:\path\test.py" Everything seems to go fine until the script launches the processing module. After that ...
0
votes
1answer
164 views

QGIS Application in C++ [closed]

I'm new to QGIS 2.8 Library to develop standalone map application in qt4, C++ language. I was wondering if there is any way that I can use QGIS plugins such as Advanced viewshed analysis, Contour ...
2
votes
2answers
169 views

Does ArcPy (Standalone) have option like Spatial filter?

I want to get the polyline features intersecting with a polygon geometry and having a particular field values in ArcPy standalone script. There is another link for similar subject but it is not for ...
4
votes
1answer
81 views

Getting list of layers when opening a QGIS project on a standalone app?

I am trying to make a standalone QGIS app to read a .qgs file for rendering an image based on the vectors using LayoutManager. The problem is that when I try to print project.mapLayers() I get an ...
4
votes
2answers
135 views

QgsRasterCalculator fails in standalone Python application

I am trying to write a simple Python program which shall be a wrapper for QgsRasterCalculator() function, to use it in some batch processes. In both QGIS 2.14 (on Linux) and QGIS 3.10 (on Windows 10) ...
4
votes
1answer
249 views

Creating standalone application with same directories and qgis-auth.db

I try to have a standalone QgsApplication (api documentation), but, instead of a lot of code samples found like this one below (I'm on Ubuntu): from qgis.core import QgsApplication QgsApplication....
1
vote
1answer
64 views

Layer failed to load using PyQGIS on macOS Mojave

The following is the code that I wrote with the help of PyQGIS Developer Cookbook from qgis.core import * from qgis.gui import * import os #Reference to QgsApplication qgs = QgsApplication([], False)...
4
votes
2answers
496 views

Running standalone QGIS model script in Python

I am trying run an exported QGIS model as Python script from Anaconda. I followed Executing a standalone QGIS python script on Windows 10, and I get no error of modules, when running this I get no ...
1
vote
1answer
665 views

Algorithm not found by PyQGIS?

I have troubles using PyQgis processing module with QGIS 3.8. For example, I can reproject a layer with QGIS graphic interface, but when using PyQgis processing module through the following script : ...
1
vote
1answer
140 views

Running QGIS script in external Python code gives TypeError?

I have one piece of Python code that I wrote in QGIS 3.6 (I'll call this code1) and I have a second piece of Python code that is a bigger project, which I wrote just in a normal text programme and ...
1
vote
0answers
88 views

Iterating over layers and exporting them as images with PyQGIS

In QGIS I have the layer tree with the following layers: Roads Transition Differences Study_area I would like to iterate over the layers and export two different images where Roads and Differences ...
0
votes
0answers
140 views

Loading .qgs and .qpt files in standalone PyQGIS script?

I have a .qgs and .qpt files. And I would like to know if it is possible to use them in a standalone PyQGIS script? I am using QGIS 2.18 and Python 2.7 This is the template that I would like to use. ...
5
votes
1answer
1k views

Error: Could not load source layer for INPUT

Very simple piece of code. I'm trying to run this as a stand alone Python script, not in the console. Keeps giving the error "Could not load source layer for INPUT", shape not found. But the os.path....
2
votes
0answers
56 views

Do I need the standalone GRASS app if I have the GRASS Plugin and Processing toolbox enabled in QGIS? [closed]

What processing abilities does the standalone GRASS GIS application have that aren't available in the QGIS GRASS plugin/toolbox? I'm trying to understand whether you would need/want the standalone ...
3
votes
1answer
375 views

Get progression bar into PyQGIS 3 standalone script

When I run a treatment inside QGIS with Processing toolbox (native algorithms) I get a progression bar : Is there a way to use this percentage inside a standalone PyQGIS script? I searched in the ...
2
votes
1answer
563 views

QGIS3 Creating spatial index in a standalone script as a part of output vector layer

I am making a buffer analisys in a standalone script. Is it possible to automatically during the analisys add index to the output vector layer (".qix" file)? I tried to add after the analisys like in ...
4
votes
1answer
288 views

mapCanvas.saveAsImage() doesn't work properly within loop in standalone script (only .PGW)

I have a problem with the export of QGIS 3 interface screenshots. I run stand-alone scripts and one of them launches QGIS and runs script.py with the following code : mapCanvas = iface.mapCanvas() ...
2
votes
0answers
186 views

How to use QGIS plugins functionality in standalone application

I'm new to QGIS 3 Library to develop standalone map application in qt4, C++ language. I was wondering if there is any way that I can use QGIS plugins such as Advanced viewshed analysis, Contour plugin ...
3
votes
0answers
437 views

GeoPandas causing issues with PyQGIS standalone

I have a code where I would like to be able to use both GeoPandas and PyQGIS. However, it seems that including GeoPandas is causing issues in the output of PyQGIS. Here is a small illustration using ...
2
votes
1answer
464 views

Processing step is ignored in QGIS3 standalone python script

In my python script based on Qgis 3.0.3-Girona, the processing.run() is completely ignored. There are similar questions that are marked as duplicate - but those do not address or solve the issue that ...
3
votes
1answer
5k views

ERROR 4: Unable to open EPSG support file gcs.csv

I am writing a standalone QGIS python application to run some unittests. I am getting an error when I try to use the QgsCoordinateReferenceSystem library. ERROR 4: Unable to open EPSG support file ...
4
votes
2answers
996 views

pyQGIS 3.0 script not running with processing import

I have problems using version 3 of QGIS with Python 3. I followed different tutorials like this one : how to use pyqgis processing runalg clipvectorsbypolygon But it seems to be working only with ...
1
vote
0answers
97 views

QGIS 3, iterate shapefiles to export mulitple pdfs from a standalone python script

I would like to load my qgis project, and a template I made into my stand alone script (in pycharm). I have a folder with shapefiles and I would like to iterate over them, plot each one with the ...
1
vote
0answers
206 views

QGIS 2.18 C++ API: How do I match the scale of vector and raster layers with different crs?

I'm loading two layers to QGIS maps canvas: the first is a shapefile, with EPSG:4326 crs. The second is an xml for Goolge TileServer, with EPSG:3857 crs. Google TileServer - Hybrid.xml <...
2
votes
2answers
1k views

Using Windows Batch File (.bat) for executing QGIS Python program without opening QGIS Software

I have a Python Program for doing some geoprocessing in QGIS. The starting of the Python program is given below. import sys from qgis.core import * import qgis.utils from qgis.gui import * from ...
2
votes
1answer
86 views

Spread attribute and recursively join in standalone pyqgis app

TL;DR Is there a pyqgis equivalent to R's tidyr::spread or reshape2::cast ? If not, how do we recursively join by attribute n layers to another without erasing previous join ? The problem I have a ...
1
vote
1answer
207 views

Cannot mix incompatible Qt library

I run my exe on cmd by passing argument and get this error: Cannot mix incompatible Qt library (version 0x50902) with this library (version 0x50901) How can I fix the problem? It is an standalone ...
0
votes
1answer
142 views

How to add path parameter to exe file?

I made an exe file from standalone application. However I want to enter the path variable on cmd when running the exe. My standalone application running *.shp files. But I want to enter path of the *....
1
vote
0answers
255 views

PyQGIS Use of external script

I have downloaded script "Save features filtered by expression" in Processing toolbox -> Scripts (It is saved in /home/user/.QGIS/processing) and I would like to call this script in standalone PyQGIS ...
3
votes
1answer
3k views

from qgis._core import * ImportError: DLL load failed: [duplicate]

I have looked every pages, links, forums etc. It is a standalone application. I add all paths that I can find to the PATHS and PYTHONPATH is here: C:\OSGeo4W64\apps\qgis-dev\python C:\OSGeo4W64\apps\...
3
votes
1answer
810 views

Which python version for standalone script with Qgis module

I'm writing a standalone python script, and I need to use Qgis module. For information i'm working on a Mac and I already have Qgis 2.18 installed. So in list of module importation, I wrote this : ...
1
vote
1answer
213 views

Standalone app does not show the content

I am trying to show the shapefile in canvas using standalone application. However it does not show the content. Here is my code and I am using PyQt5, Qgis 2.99, PyCharm 3.6 from qgis.core import * ...