-1
votes
0answers
12 views

QGIS 2.4: plugin changes map tool canvas click behavior from 2.0

I had created a plugin for QGIS 2.0 to add new features more easily. It involves changing extents and updating snapping options along with triggering the default actionAddFeature(). However, I've ...
0
votes
0answers
16 views

Python support with QGIS 2.4 on Unbuntu 14.04

I recently updated my Ubuntu system to version 14.04. I added the sources and installed QGIS as per the directions on the QGIS website. Everything looks good, except for I do not have all the ...
0
votes
0answers
8 views

How to read Oracle data with PyQGIS? (“identifier is not long” error)

Do you have any idea how load Oracle spatial data to QGIS with using the PyQGIS? Is it possible? I try: uri = QgsDataSourceURI() uri.setConnection("*host*", "1521", "*database*", "*username*", ...
0
votes
1answer
19 views

How to determine bounding box of current qgis 'map canvas extent' from the python console

I've asked a similar question here: How to quickly calculate bounding box coordinates of a selected polygon with qgis ...regarding a quick way to determine the bounding box of a given layer. Is ...
0
votes
1answer
28 views

Issue using Matplotlib in QGIS

I am developing a QGIS-plugin and for graphing I want to use matplotlib, like many other QGIS -plugins. This worked fine under linux, but under windows with QGIS2.4 I am experiencing problems. I ...
0
votes
0answers
10 views

QGIS + python, Attribute index 0 out of bounds [0;0] when adding a feature to a PostGIS layer (view)

I have a plugin which adds features to a particular PostGIS vector layer using the code below feat = QgsFeature() feat.setGeometry(qgsgeometry) layer.dataProvider().addFeatures([feat]) For one user ...
1
vote
2answers
138 views

How to bulk print maps using ArcGIS or QGIS?

I have a polygon layer that I would like to print images or PDFs from in bulk as there are a large number of them. Rather than having to manually scroll and print each individual'site' in the print ...
0
votes
1answer
30 views

Error using 'Join attributes by location' via Python

Trying to run a simple script using qgis:joinbylocation but getting either errors or it's not processing correctly. I don't want to take a summary of the attributes, just the attributes of the first ...
0
votes
0answers
14 views

QGIS Init script: How to get active layer and GID of edited object?

I would like to ask, how to get the GID (from Postgresql+Postgis) and active layer of edited object in QGIS Init script (Python)? Code Layer=qgis.utils.iface.activeLayer() works in QGIS console, but ...
0
votes
0answers
14 views

Error when providing “Python init function” from Python script in QGis

Problem I am using QGis and Python scripting to programmatically set a layer's edit form and "Python init function". It appears that the Python init function is called correctly in one situation ...
0
votes
0answers
21 views

pyQGIS (Spatial Join): Sum features of attribute from point layer and join with vector layer

I am new to Python and QGIS. I have avoided asking questions up to now. But by now I have developed a reasonable idea of where i want to go so and where I am stuck. So, I have decided to ask but sorry ...
1
vote
0answers
21 views

Automating polygon mergers with python

This is the first real world python program am trying to write. I am trying to create a scrip that takes a shapefile that has n polygons with an integer formatted date (e.g. yyyymmdd or 6/24/2014 is ...
1
vote
0answers
18 views

Python error message after download (QGIS 1.8.0/ Windows 7)

Hello to all members of the forum, I downloaded from the OSM website a small area in the neighborhood of Strasbourg, France: X (longitude): 7.6808 7.8216 Y (latitude): 48.5075 48.52 I got the two ...
0
votes
0answers
10 views

maptool doesn't receive key pressed events after QMenu.popup() function

I am developing a qgis python plugin which uses a maptool receiving key pressed events by keyPressEvent(self, event) function, mouse movements events by canvasMoveEvent(self, event) function and mouse ...
0
votes
0answers
15 views

QgsMapRenderer to export current extent using PyQGIS

I am trying to accomplish PyQGIS simple map rendering via the QGIS 2.0 Python console, but end up with only a blank image. I've followed instructions of this link. My objective is to export a simple ...
0
votes
0answers
40 views

gdal_translate from within pyqgis [duplicate]

I want to use gdal_translate from within a python script in my plugin qgis2leaf. I've tried with ...
1
vote
1answer
20 views

Resampling with Python console (QGIS): number of parameters

I am trying to resample two raster layers with Python console in QGIS with this code: outputs_0=Processing.runAlgorithm("saga:resampling", ...
1
vote
1answer
41 views

How to use the MMQGIS plugin through the Python console?

I know how to make Hub Lines using the GUI, I want to know how to do the same using the Python Console, a tutorial would be great. Thank you
0
votes
1answer
46 views

Using Union on multiple shapefiles to output single result

Using QGIS 2.2 and Python, I would like to use the Union algorithm on multiple shapefiles (contained in a folder TEST) which would then produce single shapefile containing all the data. Currently ...
1
vote
2answers
31 views

How to switch to edit mode vector layers, in pyqt application based on qgis?

I do QGIS based application, I need to implement the ability to modify the geometry of vector layers in manual mode (editing nodes), how to do it?
0
votes
0answers
20 views

QGIS - Calling interpolation extension from python console

I would like to call the QGIS interpolation extension function (TIN method) (Raster->Interpolate) from python console. I can't find the corresponding function within QGIS API or within the ...
0
votes
0answers
17 views

PyQt QTableWidget for QGIS python plugin: infinite loop issue

I'm using PyQt4 and Python 2.7 to develop a plugin for QGIS 2. I have QTableWidgets used to display/compare existing information in the database with newly entered information pertaining to the same ...
0
votes
1answer
51 views

Possible to run “Merge shapefiles to one” algorithm from Python script?

Developing a python script in QGIS 2.2, I can run algorithms from the Processing plugin fine such as those from QGIS geoalgorithms and SAGA. Can you do the same for the algorithm "Merge shapefiles to ...
3
votes
0answers
50 views

How to find the minimum number of inspection points?

I am working on a pipeline inspection project and there is a high liklihood that some inspection tool deployment/retrival station will need to be installed on the pipe network. the problem is ...
0
votes
2answers
64 views

Any clue how to read a .style (ArcGIS) file in Python, for converting into another platform-specific format? [duplicate]

The problem I am face with is that I have all my data as shapefiles but my organization works with only 1 ArcGIS license. Migrating to QGIS to prominent amount of work, I need to convert my ArcGIS ...
0
votes
0answers
55 views

How to keep all the unique columns of the shapefiles after merge?

Writing a script where the user is asked to select a directory which contains Folder_1 and Folder_2, both containing shapefiles and run various algorithms. The basic logical process of the script is: ...
0
votes
0answers
22 views

Save map canvas as image with drawings

Is there any way to save the map canvas as an image, with the drawings on map? I draw a line on map, and saved it as image, but only the map saved(without line). I used the following code.. ...
0
votes
2answers
44 views

How to show attribute table in the form

Is there any way to show the attribute table of a layer in a QtextBrowser or a QtableView on form? I did this but,(shows attribute table in a separate dialog) I have no idea, how to show it in my ...
2
votes
1answer
52 views

How to find the id of the last added feature using pyQGIS?

Is it possible to programmatically (in python) access the attribute info of the last added feature in QGIS 2.0 before edits are saved? I'm failing to find a way to get the ID and subsequently other ...
0
votes
0answers
32 views

Copy queried attributes of a shapefile to a new shapefile [duplicate]

I have a polyline-shapefile, which I have successfully read into python using pyshp module. My problem is to save the 2nd node of every line feature into a separate, single point file. I have ...
0
votes
0answers
9 views

QGIS custom action and button toggle

I've added a custom toolbar with some buttons to my QGIS 2 plugin. I'm wondering how to get the button toggled (pushed in-looking effect) using Python. I've gotten this to work for existing buttons ...
0
votes
1answer
33 views

How to turn WKBtype integer into text for memory layer creation in QGIS

I'm creating a memory layer in QGis python and I need to match the geometry of the memory layer that I am building to the geometry of another layer. After some investigation it seems to me that, as ...
1
vote
1answer
75 views

Plugin of Multiple buffers in QGIS

I hope to create a plugin to do multiple buffers in QGIS. This is my script: """/*************************************************************************** izisse_test ...
1
vote
0answers
51 views

Using qgis modules in standalone application with PySide?

I want to make small standalone application using PySide and QGIS python modules to display satellite images and do standard GIS operations, like creating new shape file and placing polygons or points ...
0
votes
0answers
39 views

How to write a signal for 'QgsMapCanvas::xyCoordinates (const QgsPoint & p)'

I am very new to QGIS and python. I am writing some python codes and I want to capture the x,y coordinates when the cursor moves on the map layer. (same as the coordinates show in the QGIS status bar) ...
0
votes
0answers
17 views

Plugin Ui interation with user and Qgis

A downsized hydrogeology plugin ( GraphicGroundwater = GGW ), instilled the need of a reduced combination of Carson's 'fTools doVectorGrid' and Pryet's 'Qgridder' plugin(s). The GGW Ui is displayed ...
1
vote
1answer
36 views

Python geoJSON module create a FeatureCollection with CRS, QGIS doesn't recognize CRS

I am curious if my geoJSON created with the geoJSON python module has a valid CRS. The manual on github specifies a feature collection like so: from geojson import Feature, Point, FeatureCollection ...
0
votes
1answer
45 views

How to access the map coordinates show in QGIS status bar?

Is there a way to access the map coordinates show in qgis status bar? I found only this, iface.mainWindow().statusBar().currentMessage() But I know it's not the way. Or is there any way to capture ...
1
vote
0answers
25 views

How to export the legend (Layers Panel) as an image in QGIS using the Python console?

I want to export the Legend (the Layers Panel) as an image using the python console.
3
votes
2answers
111 views

How to select all files in a directory for merging in Processing?

I'm writing a generic script which involves writing shapefiles to a directory which are then merged together. After writing the files out to the Output folder, I'm trying to get the ...
4
votes
1answer
90 views

Can I use a QGIS geometry in a Python PostGIS query?

I have a "Python Init function" for the attribute form in QGIS, which is called when I add a new geometry. I can access the geometry of the newly created feature like this geom = feature.geometry() ...
-1
votes
1answer
48 views

Convert Road layer shapefile into a graph

I'm going to use Astar algorithm to find a path between two selected points.And I used the following code for that.Is there any way I could convert my Road Layer shapefile into a graph, which can be ...
1
vote
0answers
83 views

QGIS 2.2.0 GRASS not worked

I use QGIS 2.2.0 on Windows 8 64 bit. I try to install use Standalone installer and OSGeo4W and still get the error And then i start GRASS C:\Program Files (x86)\GRASS 6.4.2>grass64 ╬╪╚┴╩└: ...
1
vote
1answer
34 views

How to add an interpolation raster from the python console in QGIS?

I'm trying to add an interpolation layer based on an existing vector layer by using the Python Console (initially in the menu Raster/Interpolation), but can't find anything related in the ...
0
votes
1answer
51 views

How to open QGIS using VBA?

Using VBA, I want to open QGIS (the actual GUI) and execute a simple script through the Python console or the editor.
0
votes
2answers
103 views

How to make a routable graph from a Point and a Line shapefile, using Networkx?

I have one shapefile which consists of all the streets in the study area, and another shapefile which has points representing origins and destinations. I would like to know if it's possible to find ...
1
vote
1answer
88 views

How to make a Python script that does a task in QGIS?

When I run this code in QGIS Python console it works fine, but I want want to run it from an external Python script. What I want the script to do is: 1- Open QGIS 2- Run this code 3- Close QGIS from ...
0
votes
1answer
31 views

QGIS Python - Executing functions for multiple directories

I would like the user to select 2 directories, each directory having their own defined algorithms. For example: First_Directory will add a column to all shapefiles in the chosen directory; ...
1
vote
1answer
61 views

Is there a way to access the GeoProcessing tools in QGIS, in code

Is there a way to access the GeoProcessing tools in QGIS, in code? I want to find the Difference between two layers and make a new shapefile with the result.It can be manually done by selecting ...
2
votes
2answers
71 views

convert a shapefile into graph with nodes and edges

Is there a way to convert a shapefile into graph with nodes and edges(except networkx). I'm using qgis and I want to convert a road vector layer into a graph, so that I can use it to apply shortest ...