Questions tagged [standalone]

able to operate independently of other hardware or software.

Filter by
Sorted by
Tagged with
1
vote
2answers
63 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
66 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
25 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
61 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. ...
3
votes
1answer
191 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....
2
votes
0answers
39 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 ...
1
vote
1answer
116 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
171 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 ...
3
votes
1answer
165 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
120 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 ...
1
vote
0answers
184 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
313 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 ...
2
votes
1answer
2k 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
512 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
83 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
143 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
811 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
65 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
169 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
114 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
175 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 ...
2
votes
1answer
2k 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
673 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
168 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 * ...
2
votes
0answers
170 views

Creating instances of QGiS in for loop in standalone python script

I have a Python script which processes data with geographic information. At some stage of my script I need to use an instance of QGiS to make some shapefiles and do some intersects and so on. For now, ...
2
votes
1answer
3k views

QT C++ application using QGIS API

I'm trying to develop a QT C++ application that uses QGIS API and I can't manage Qt Creator to compile the code. I've read several topicts at gis.stackexchange and from other sources. The information ...
2
votes
2answers
958 views

Permisson denied when running script or Error 4: no such file or directory(standalone)

I started working with QGIS, because I need to build a forest fire risk map for a university project. I tried to build a little standalone application to calculate the NDVI. I'm following the python ...
1
vote
0answers
436 views

How can I code a 'zoom to layer' applied to a vector layer when I build a QGIS standalone Python application?

I am trying to code a standalone QGIS application that is able to print a composed map that zooms in the same layer every time I call it. The feature that have to be zoomed in change its location when ...
4
votes
1answer
890 views

Select features and zoom to selection on standalone QGis application

I'm trying to select and zoom on selected features on standalone QGis application. Selection seems to work, console shows me list of selected items and they are exactly I expected. ids = [] for f in ...
2
votes
2answers
219 views

Why general.runalg(“qgis:linestopolygons”…) work only over first feature?

I have a standalone script that call general.runalg(qgis:linestopolygons...) all ok, but only convert the first feature, and I do previous "selectAll", why ? Full code: #!/usr/bin/env python ...
2
votes
1answer
66 views

Why when dump a layer to memory, initial record is 1, if in original layer was 0?

I load a layer from a Shapefile (featuresA) and duplicate its contents into a memory layer (featuresB). featuresA[0].id() is 0, but when copy his content to memory over featureB is 1, ...
5
votes
1answer
2k views

Saving vector memory layer to file using PyQGIS gives empty file?

I am learning to write standalone scripts with Pyqgis. I am trying to read a file with a big shapefile of polylines (64MB), create a memory layer, copy the features to, and save into another file ...
2
votes
1answer
1k views

PyQGIS standalone script: how to join attributes by location?

I'm writing a stand-alone script using no GUI. Earlier I posted a question about having some code issues using JoinAttributes function. However, I found out that the function is not appropriate for ...
2
votes
1answer
122 views

Fails to run JoinAttributes in stand-alone PyQGIS script

I'm writing a stand-alone script using no GUI. I cannot use the function Join Attributes by Location. I think that the problem might be with proper passing arguments to the function. There's a piece ...
3
votes
0answers
286 views

Python standalone on linux: No module named qgis.core

I am using the Spyder IDE on my Ubuntu LTS 16.04. It does not find the module qgis.core. Therefore I wanted to manually add it to its search path but I do not now where it is located. What is the ...
0
votes
1answer
579 views

QgsField : Undefined Variable

Im writing a stand alone app in Python using QGIS 2.01 on Ubuntu via Eclipse bindings. I've written code which successfully adds features to a new in memory layer and displays, but now I want to add ...
3
votes
1answer
337 views

Choosing layers to dump in legend for a standalone application

I'm writing a standalone application using QGIS API to export maps automatically as pdf. When I'm building my QgsComposition, I have an issue: I have already built a list with the layers I want to ...
7
votes
1answer
447 views

Problem executing Processing Vector Grid algorithm in a standalone script

I have the following piece of code which I execute within QGIS 2.8.6 import processing import ogr restrLayer = QgsVectorLayer("/home/usr/Desktop/trial/EligibleAreas_polygons_filtered.shp", "...
3
votes
1answer
875 views

Modifying the texture/fill of a vector layer in PyQGIS

Currently I am writing a standalone Python script to modify a few vector layers to have a wine fill pattern inside. The geometry I am working with is a polygon. I am aware of how to change outline ...
2
votes
1answer
532 views

if __name__==“main”: in standalone Python script for QGIS

I am working on a standalone Python script for loading shapefile layers into an application window with my central widget being canvas. The previous code I had written is almost identical to the code ...
1
vote
0answers
30 views

Using QgsVectorLayerProperties and associated classes in my own application

I recently switched from QGIS version 2.6 to 2.14.3. I was using the QgsVectorLayerProperties widget in my own application as it had extensive features implemented already. Somewhere along the line ...
1
vote
1answer
105 views

Python-ArcObjects mxDocument Stand Alone

if I need to work with classes MxDocument with the MapDocument that I have selected to work , for example style gallery, How can I instantiate ? InitStandalone() pMapDoc = CreateObject(esriCarto....
1
vote
0answers
135 views

How to configure GeoServer WMS with no internet connectivity?

I am trying to configure GeoServer so that it works with no internet connectivity. When I try to access the GetSchemaExtension, by default, it goes out to the internet for this url: http://schemas....
2
votes
0answers
433 views

Use QGIS API on standalone python program without install the entire application

I developed a standalone python program that makes use of QGIS API to create .qml files from sld files. This is a small program of about 15 lines of code that imports the following modules and uses ...
4
votes
1answer
1k views

PyQGIS Error: Cannot Create a QPixmap or Qwidget when no GUI is being used

I am trying to create a standalone script using the code below. I was able to add a shapefile with no errors but when I add map = QgsMapCanvas() after qgs.initQgis() and map.setLayerSet([...
2
votes
0answers
156 views

Writing custom GUI map application without installing QGIS [duplicate]

I would like to know if it is possible to develop standalone map applications with QGIS without installing QGIS software or embedding QGIS. Most instructions ask to either install QGIS or embed in to ...
4
votes
1answer
964 views

Working Windows Standalone .EXE From QGIS Python Script Using PyInstaller?

Has anyone been able to create a working standalone Windows .EXE file from a QGIS Python Script Using PyInstaller?
2
votes
1answer
3k views

How to create a valid QgsVectorLayer from delimitedtext?

I am having trouble loading csv files into layers using QgsVectorLayer(). I know this looks like a repeat, but I have carefully read Create a script to add delimited text layer in QGIS and http://...
1
vote
0answers
126 views

How to set QGIS mapCanvas to exact values

My QGIS 2.8.2 standalone app's mapCanvas fills a central widget with a fixed quadratic size x=y=1000 pixels. When I set the mapCanvas extent() to an area defined quadratic as well given by a ...
2
votes
1answer
179 views

Writing test suite for QGIS standalone application?

I have a rather simple QGIS standalone Python app (2.8.2, Windows 7/64), with some published methods to create different types of geometric primitives (rectangles, circles). class MyApp(QMainWindow, ...