3
votes
1answer
55 views

Unable to get python-qgis-common on Kubuntu 14.04

just upgraded my Kubuntu from 13.10 to 14.04 LTS and lost all plugins. Found out that "python-qgis-common" is not installed. Tried to install it but was told that it depends on "sip-api-10.1" which ...
0
votes
0answers
19 views

MODIS images set CRS and reproject

I am developing a plugin which reads MODIS images, and I know that MODIS images are in sinusoidal projection and I need to set that CRS and project the image to WGS84 (epsg 4326) in python. I search ...
0
votes
0answers
12 views

QgsGeometryAnalyzer.dissolve problems

I am completely new to the QGIS python api and I am running into an error which I cannot solve when trying to use the dissolve class. I used the basics of the PyQGIS Cookbook. In my understanding ...
0
votes
0answers
17 views

custom toolbar combobox: issues with adding functionality

I've added a combo box to my custom toolbar in QGIS (based on this thread QGIS - Add a combobox to a toolbar), but it doesn't populate unless I reload the plugin. def __init__(self, iface): ... ...
0
votes
0answers
15 views

QgsMarkerSymbolLayerV2 not rendering

For the life of me I cannot get a custom vector layer symbol to render. Following is the code I am using, as fas as I can tell renderPoint is never called. Is there something I am missing here. The ...
0
votes
1answer
36 views

How to copy attribute values of fields in selected features of one layer to another Qgis programmatically?

I am trying to get the values of attributes of the selected features of a layer field by field and copy to another layer that I created in qgis with pyqgis. Is here a example for this. Every example ...
0
votes
0answers
25 views

Help with scripts for processing raster files with the raster calculator in QGIS

I am trying to process some raster files using python scripts in Qgis 2.20, and I have been having trouble finding any documentation on using raster calculator in scripts being run in the processing ...
0
votes
0answers
21 views

Add existing QGIS plugin button to custom toolbar

Is it possible to add an existing plugin's button to a custom toolbar? I've succeeded in adding core actions such as shown below, but am wondering if it would be possible to integrate another plugin ...
0
votes
0answers
30 views

Have I created a valid Spatialite database?

I didn't manage to find the better way to populate the exisiting Spatialite database with new computed data than just creating new columns and filling them in the Python script. You can see that the ...
0
votes
0answers
21 views

Mapnik: GeoTIFF flipped (mirrored vertically)

I generated a GeoTiff using the QGIS HeatMap plugin and want to render it on top of some OSM data. The problem is that the raster gets rendered upside-down in the output. Can someone point me in the ...
0
votes
0answers
27 views

How to add the attributes of selected features to my new layer in pyqgis

I am trying to create a layer from the selected points coordinates. I am drawing a circle to the coordinate of selected points. I also need to add initial attributes of my selected features to my new ...
1
vote
0answers
42 views

How do I smooth edges of polygons in QGIS?

Is there a built in function or plugin I can use to achieve smooth lines for my polygons instead of the blocky ones I have now?
0
votes
0answers
10 views

In QGIS Process Modeller, is it possible to automatically run a function on several layers without listing all combinations?

Trying to develop a Model which includes finding any intersections between layers and then merging them all into a single layer. I have 12 layers in total, it's not really efficient to list all the ...
0
votes
0answers
23 views

How to calculate the area of an ellipse on the earth's surface using Python?

I have a dataset consisting of GPS coordinates. I use a clustering algorithm to generate a two dimensional Gaussian for me. The Gaussian takes the shape of an ellipse if visualized on the map. ...
0
votes
1answer
65 views

QGis: scripting the map rendering (multiple similar maps from one shapefile)

I would like to ask for advice on creating a Python script that will provide the opportunity to render a plenty of similar maps (with the same extent, projection, layout, color scheme and composition, ...
0
votes
0answers
35 views

Problem reducing the width of the attributes fields of a shapefile using python

I have a shapefile with rather long attribute widths (which is resulting in a rather large file). I am trying to trim it in python, here is my code: layer = qgis.utils.iface.activeLayer() ...
1
vote
0answers
20 views

PyScripter crashes at “import processing”

I set up PyScripter latest version, 2.7) to work with QGIS (2.2, OSGeo4W install) following http://chelahmy.blogspot.ca/2011/02/setting-up-pyscripter-for-quantum-gis.html. It generally works well. I'm ...
0
votes
0answers
24 views

Check if Openlayer Layer is empty, caused by nonexistence of internet connection?

I use Openlayer Google street map as a base-map in my QGIS plugin projects. i want to check programatically if the layer is loaded or is empty and decide if i load my offline base-map instead of ...
1
vote
1answer
48 views

How to create a dock widget correctly in QGIS plugin?

I am building a QGIS plugin and would like to use a dock widget. I have used QT creator to design the UI, with the object type being a QDockWidget. When the plugin is enabled in QGIS the dockwidget ...
1
vote
1answer
32 views

Mac OS X 10.6.8 QGIS not using user-installed Python 2.7

My QGIS does not recognize the recently installed python 2.7 on my mac osx 10.6.8. it still uses the python version 2.6 that is automatically installed by apple. Opening qgis I always receive an ...
0
votes
0answers
16 views

Using iface.showAttributeTable() on QgsVectorLayer retrieved by getObject()

I'm unsure if i'm properly using the processing.getObject() function. I'm creating a python processing script for QGIS 2.0 and 2.2, but can't seem to get an attribute table to open programmatically. ...
0
votes
0answers
45 views

Issue blocking QGIS feature form dialog with Python

I'm not sure where I'm going wrong with this python logic for a custom form in QGIS 2.0.1. There are a few things required by the validation function: that index of combo boxes aren't 0 (first index ...
0
votes
0answers
27 views

QGIS Plugin: Show a symbol at coordinates

I want to code a plugin for QGIS showing a specifig image (e.g. a .png or .ico file in the file system) at given coordinates. The background is, that I'm receiving coordinates and other information ...
0
votes
1answer
37 views

Processing Script: now gives error in QGIS 2.2

I recently updated to QGIS version 2.2, and am now getting an error when running Processing scripts that worked previously (in version 2.0.1). Uncaught error while executing algorithm Traceback (most ...
1
vote
1answer
55 views

Adding attribute list to combobox in a python plugin

I am developing a simple plugin at the moment which contains 3 combo boxes: comboBox_1 comboBox_2 comboBox_3 Combobox 1 & 2 lists the vector layers available, however I would like the 3rd ...
0
votes
0answers
32 views

PyQGIS loading layer style with PostGIS

I'm loading layer styles from .qml files in a Python plugin. I'm about to switch to loading them from a non-local postgreSQL db. I've been looking at the (from QgsVectorLayer (v2.2)) ...
1
vote
1answer
56 views

Python.dll could not be loaded with PyScripter

I'm trying to configure PyScripter with QGIS. I've installed it using OSGeo4W and I'm following instructions to setup a pyscripter.bat file by copying content of qgis.bat file. I have the following ...
1
vote
0answers
35 views

QGIS Custom Form: “Other” category in combo box replaced by line edit

I am trying to create a custom form for QGIS with comboboxes containing an "other" category. I wonder how to provide a line edit to enter info replacing the "other" choice if chosen. Not sure if I can ...
3
votes
0answers
28 views

Why does the QgsVectorFileWriter have probelms creating vector files?

I am using QGis 2.0.1 and have tried to create a new GIS feature file (SQLite, Spatialite, and Shapefile) of a subset of the data. I am then saving a copy of the style of this layer and applying it to ...
0
votes
1answer
32 views

Retrieve path of running plugin in QGIS

In my plugin's directory I've got some XML settings files that I'd like to parse at a particular point during execution of the plugin. Is there a way to get the absolute path where the plugin's .pyc ...
1
vote
1answer
32 views

QGIS Map tools and Map canvas--QString errors

I'm trying to learn more about using QGIS Map Canvas widgets and creating custom map tools, so the information from the PyQGIS cookbook is very helpful. After trying to experiment with mywnd.py from ...
0
votes
0answers
16 views

How to select Qgis features through Python Plugin

Hi I am very new to Python so this may be a bit basic. I am trying to find a way to select and zoom to the features in a QGIS layer. I have created a plug in and built a custom form. I have 3 ...
0
votes
1answer
25 views

Changing band for greyscale in plugin

I am trying to make a qgis plugin to change which band in a multiband data set (netCDF where the band represents time steps) is used for a grey scale rendering. The file works fine with manual ...
1
vote
1answer
42 views

QGIS 2.2.0.1 Valmiera, Windows 7 64 bit - copying out of GDALInfo-Window in QGIS not possible

When trying to copy information given out by GDALInfo with different kinds of raster data (DEM, normal georeferenced images etc.) through the interface of QGIS 2.2 by right-clicking and choosing copy ...
1
vote
2answers
94 views

How to extract X Y coordinates and RGB from pixels using python in QGIS?

I'm trying to white a Python plugin in QGIS (2.2) to get, for each pixel of a raster image, its X Y coordinates, as well as, its RGB (3 bands) values. At first I opened the raster file using: rlayer ...
0
votes
1answer
56 views

Layer relations via Python

Is it possible to, through Python, to create the relations that it's possible to create in Layers/Properties/Fields/Relations, and if so how? I first thought these were saved in the styles, but that ...
0
votes
1answer
44 views

How to disable “Simplify geometry” via Python?

After I've loaded a layer from a table in my db I'd like to disable the 'Simplify geometry' (found in Layers/Properties/Rendering) programatically using Python. I've tried several versions of ...
1
vote
0answers
52 views

Editing QGIS point layer: retrieve attributes of intersecting line layer

I'm creating a custom editing form using QGIS 2.0 and would like to modify the mouse event when creating a point. I've gotten a start by reading this thread: How to programatically check for a mouse ...
0
votes
1answer
62 views

Importing otb into Python

I have Python 2.7 (installed together with ArcGIS 10.1). Via OSGeo4W a have installed qGIS and otb application.I was able to connect qGIS and otb and it's working fine. Through OSGeo installer I ...
0
votes
2answers
47 views

Can't compile python plugin in QGIS (Windows)

I'm just installed QGIS 2.2 and created a new plugin from Plugin Builder. When I try to compile the plugin using: C:\Program Files\QGIS Valmiera\bin>pyuic4 -o C:\Program Files\QGIS Valmiera\bin\ ...
1
vote
0answers
22 views

Delayed moving average

I want to develop a plot of delayed moving average. The code for this in MATLAB is: nr_pontos = 36; coefs_filtro = ones(1, nr_pontos)/nr_pontos; data_dma = filter(coefs_filtro, 1, data); ...
1
vote
1answer
89 views

What do “count”, “mean”, and “sum” in QgsZonalStatistics mean?

I am working with Qgis and making some analytics of lightdata. I've used these commands: rasterfile = qgis.utils.iface.mapCanvas().currentLayer().source() vectorlayer = ...
2
votes
2answers
66 views

Suggest an algorithm to measure how a node is connected to road network

I try to measure how well a node is connected to the rest of the network. If a city has a distant suburb connected with one sole road, it's connectedness is, say 1. If it's connected by 2 roads, it's ...
1
vote
0answers
77 views

Mac QGIS 2.2 error executing Python code

Newbie Using QGIS version 2.2 with Python 2.7.5 on OSx 10.9.2 Getting the following error. Any idea on how to resolve? I'm not sure if it has ramifications on the display of the Google data. An ...
0
votes
1answer
91 views

import qgis.core problem with QgsFeature and QgsGeometry

I've tried several previous answers to similar questions - no luck. I run Win7. I installed QGIS 2.2.0 using the OSGeo4W 32-bit installer. Problem 1) from qgis.core import * failed. Solution 1) ...
2
votes
1answer
75 views

Is there a way to run a python script on opening a QGIS project?

I have a .csv file containing financial data which is generated on a regular basis outside QGIS. Then I want to create a PyQGIS script that will add the .csv file as a layer in my project. (The idea ...
0
votes
1answer
49 views

Purpose of “myPlugin_dialog.py” file created by QGIS Plugin Builder

I usually use QGIS Plugin Builder to create working templates for QGIS plugins. While a generic Python plugin needs the files below; __init__.py metadata.txt resources.py (translated from ...
0
votes
0answers
41 views

using postgis function in pyqgis

I'd use Postgis function in Pyqgis script. This code: qsql="(select gid, id, St_Buffer(the_geom,200) as geom from archi)" uri = QgsDataSourceURI() uri.setConnection("ip", "port", "x", "x", "x") ...
1
vote
0answers
34 views

PyQGIS Dialog Plugin not resetting

I have written a PostGIS search plugin that works pretty well, except two things that I just cannot figure out a solution 1) When the dialog closes and then is reopened the previous query is still in ...
0
votes
1answer
39 views

visualize bounding box to a polygon

I try to make plugin in QGIS that compare 2 bounding box data, ex: (-32.61442167739459, -32.017601026186576, 13.015663782506067, 13.428145228091406) and (-38.6102467739459, -38.017601026186576, ...