Re: [Qgis-developer] Error in WCS

2013-10-05 Thread Radim Blazek
On Mon, Sep 30, 2013 at 8:14 AM, Paolo Cavallini cavall...@faunalia.it wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 27/09/2013 12:33, Paolo Cavallini ha scritto: Hi all. Using one layer from http://www.pcn.minambiente.it/PCNDYN/catalogowcs.jsp e.g.

Re: [Qgis-developer] Python: Union selected polygons in a layer

2013-10-05 Thread Daniel
Try the QgsGeometry::combine() method. http://www.qgis.org/api/classQgsGeometry.html#a63244d3435cc99794b82a6cbd0af0eb5 Quoting class doc *Note:*this operation is not called union since its a reserved word in C++. On Sat, Oct 5, 2013 at 8:07 AM, gene martin.lal...@gmail.com wrote: I also do

Re: [Qgis-developer] Python: Union selected polygons in a layer

2013-10-05 Thread gene
Finally, I found the solution: it is *geom.combine(another_geom)* and not union, why ? gLine = QgsGeometry.fromPolyline( [ QgsPoint(1,1), QgsPoint(2,2) ] ) gLine2 = QgsGeometry.fromPolyline( [ QgsPoint(1,2), QgsPoint(2,1) ]) gLine2.combine(gLine).exportToGeoJSON() u'{ type:

Re: [Qgis-developer] Python: Union selected polygons in a layer

2013-10-05 Thread gene
Ok, the reply is this operation is not called union since its a reserved word in C++. Thanks to Daniel-2, we post at the same time. -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Python-Union-selected-polygons-in-a-layer-tp5081862p5081967.html Sent from the

Re: [Qgis-developer] Python: Union selected polygons in a layer

2013-10-05 Thread Andreas Neumann
Hi Daniel, Thanks - this should do the trick! And it explains why I did not find Union. Will try on Monday when I am back in the office. Andreas Am 05.10.2013 11:55, schrieb Daniel: Try the QgsGeometry::combine() method.

Re: [Qgis-developer] Python: Select features that touch other features

2013-10-05 Thread Daniel
Hi Andreas, First create a spatial index over layer features (I got this code from ftools_utils.py) # Convinience function to create a spatial index for input QgsVectorDataProvider def createIndex( provider ): feat = QgsFeature() index = QgsSpatialIndex() fit = provider.getFeatures()

Re: [Qgis-developer] Python: Select features that touch other features

2013-10-05 Thread Nathan Woodrow
On Sun, Oct 6, 2013 at 9:45 AM, Daniel daniel...@gmail.com wrote: def createIndex( provider ): feat = QgsFeature() index = QgsSpatialIndex() fit = provider.getFeatures() while fit.nextFeature( feat ): index.insertFeature( feat ) return index Try something like

Re: [Qgis-developer] Python: Select features that touch other features

2013-10-05 Thread Daniel
Using map() is the pythonic way Maybe ftools need an upgrade :) Thanks for the tip On Sat, Oct 5, 2013 at 8:53 PM, Nathan Woodrow madman...@gmail.com wrote: On Sun, Oct 6, 2013 at 9:45 AM, Daniel daniel...@gmail.com wrote: def createIndex( provider ): feat = QgsFeature() index

Re: [Qgis-developer] Layer combo box

2013-10-05 Thread Daniel
Very Nice +1 -- Daniel Vaz ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer