New answers tagged

2

Thank you all for your advice. I found a solution (by accident) there is somehow not very obvious described - but it was necessary to file metadata.txt correct icons=desired_file.png. resource.py for another bit.


1

For a standalone application (without an interface) [Wien 2.8.1] use: canvas.scene().removeItem(vertexMarker) Found in PyQgis Developer Cookbook/ Rubberbands and vertex markers


1

I just found the selectnext Plugin http://plugins.qgis.org/plugins/selenext that does exactly what I want.


2

Create a png file (23 x 24 pixel) Create a resources.qrc file like this: <RCC> <qresource prefix="/plugins/your_plugin_dir" > <file>icon.png</file> </qresource> </RCC> 3.Compile the resource file to python pyrcc4 -o resources_rc.py resources.qrc Import the resources_rc.py file into your main plugin ...


0

@ gcarrillo Nice response and almost works perfectly :) When the lines are clipped some are broken into 2 (or more) segments if they pass in and out of a more complex polygon. When this occurs the correct start co-ordinates are returned but the end co-ordinates are NULL. When exported to csv they are blank. Is there a way of generating two (or more) line ...


1

Solved this. Using MINGW32 on Windows does the trick (not cmd). Seems the shell was missing.


1

There's also the MMQGIS plugin which, when downloaded and installed from the toolbar (Plugins > Manage and Install Plugins...), has the tool: Attributes Export to CSV File


2

Export the layer as a shapefile, find the shapefile on your PC. Copy/Rename the filename of the DBF part of the shapefile exportes to be 8 or under characters if it's not. (OLD MS DOS FILENAME ISSUE). Then, drag-drop the DBF right into Excel. Save as XLS. The copy paste method right form QGIS made text/character returns in a blob reset to the next row and ...


0

I think a decision to use geographic data isn't a question of popularity, but a methodic question. Raster and Vector data are basic gis data structures, they can be stored locally, or web-based. WMS and WFS are something like raster-vector, but WMS is for serving raster maps or raster map layers, they are graphic representations of raster and vector data, ...


2

To complete the Underdark's list I like those : Joel Lawhead, 2015. Qgis python programming cookbook. Packt Publishing, p 340. Erik Westra, 2014. Building Mapping Applications with QGIS. Packt Publishing, p 150. Anita Graser, 2014. Learning Qgis. Packt Publishing, p 150. ;)


2

qgis2leaf is no longer being developed. See the Github repository at https://github.com/Geolicious/qgis2leaf. The last commit was on 20 April 2015. Use qgis2web instead, which is under active development - https://github.com/tomchadwin/qgis2web.


0

You could check their website: Semi-Automatic Classification Plugin for QGIS Or more specifically, the Plugin Installation page which provides a step-by-step guide on how to install the plugin and the several packages required: GDAL/OGR NumPy SciPy Matplotlib


3

You can use the spatial query plugin for this (and many other) query. It will work on either all the features or just the selected ones in both source and target layers. Spatial Query is supplied in the default QGis install but may need to be enabled in your install.


2

To get information on the changed features use signal committedGeometriesChanges. This gives you the feature id and new geometry of any changed feature of the layer you connect a handler to. As an example: def feedback(layerId, changedGeometries): for k, v in changedGeometries.items(): # v contains geometry and it's further usage is up to you ...


2

MXD2QGS was built as an ArcToolbox extension; it is not a QGIS plugin. However, this tool seems that it only works with version 10.0 of ArcGis and Python 2.6. You can see other comments in: Convert .mxd to .qgs, MXD2QGS fix? https://dragons8mycat.wordpress.com/2014/04/17/mxd-to-qgis/ http://www.faqoverflow.com/gis/23717.html In Spanish: ...


1

An exemple to complete snaileaters's anwser : def print_informations(layerTreeNode, checkstate): '''print some informations when a group or a layer is checked''' if checkstate: if layerTreeNode.nodeType() == 0: print "Group " + layerTreeNode.name() else: if layerTreeNode.nodeType() == 1: print ...


1

In case anyone else has the same problem go to your plugin tab>> install and update plugins>>settings and activate view experimental plugin tab. Go back to>> Not installed plugins and search geotag and import photos plugin. You will be able to see it. In short the problem was with my settings.


2

It is still available in the QGIS Python Plugins Repository, I can also see it in plugins list: You can download it manually from the link provided (go to the Versions tab), you should receive a .zip file. Decompress the contents of this to C:/Users/You/.qgis2/python/plugins and restart QGIS (if it is already loaded). The plugin should now be installed, ...


1

Found a simple way to simulate traffic by animating the lines which the represented the traffic path. I am running QGIS 2.8.3 Wien. The first thing is to create and prepare the lines which represents the traffic path. Once this is completed, MMQGIS provides a functionality for animation. The option i choose here is Animate Lines. (Note MMQGIS is a plugin ...


1

Hi since your points are from a GPS track I am guessing that they have a Z-value field or an elevation field. When you configure the ThreeJS plugin in QGIS you should have the following options for the Z coordinate settings area: Relative to DEM Absolute value I did an example with point data and line data that have an attribute called elevation. I ...


4

You could use NetworkX. This has the ability to create a network from a shapefile. Not tried it myself, though. PgRouting is another possibility. In the diagram below, the big red dot is the broken pipe. Pink circles are values we need to switch off. Grey circles are valves we don't need to switch off. Small black circles are where pipes join each ...


2

I have found a suitable solution to the question I asked earlier. To do this I used the Convert Geometry Type function from MMQGIS plugin (the plugin must be installed). MMQGIS → Modify → Convert Geometry Type From the window I chose the layer(line type) and chose New Geometry Type (this has several options) I used Centroid and selected the Output Shapefile. ...


2

This can be configured in the config file (~/.config/QGIS/QGSI2.conf on Ubuntu). I have an entry showTips=false at the beginning of the [Qgis] section (line 171 in my case). You should find a way to edit this file before launching qgis.


0

Perhaps more updated answer from Rob Lodge from qgis.core import QgsRasterTransparency print 'Start' active_layer = l = qgis.utils.iface.mapCanvas().currentLayer() raster_transpareny = active_layer.renderer().rasterTransparency() ltr = QgsRasterTransparency.TransparentSingleValuePixel() tr_list = [] ltr.min = 0 # Or another value ltr.max = 0 # Or ...


2

The example code above should work (coincidently with or without the 'grid.updateFeature(feature)'). The problem was in my actual code I was trying to pass Numpy datatypes and rather than throwing an TypeError, changeAttributeValue() just silently failed. Always remember to check your variable types when debugging!


0

As dmh126 said, you can work with signals and events. Let's say you have a QPushButton called runButton labelled as "OK" or anything. Put the following line at the end of the initGui function: self.dlg.runButton.clicked.connect( self.onStart ) (replacing dlg with whatever applies to you). The declare a onStart function that will call your main ...



Top 50 recent answers are included