[Qgis-developer] before current layer change signal

2016-01-03 Thread francescobocca...@libero.it
Hi all, Is there a event beforeChangeCurrentLayer in qgis api? i'm using qgis 2.8.5 version. I would like to trigger Toggle Editing (if current layer is in editing mode) before change current layer. Another question: How can I "customize" Add Feature QMapTool (subclassing) to add custom

[Qgis-developer] R: Re: Automate snapping after insert of a new feature

2015-04-23 Thread francescobocca...@libero.it
-developerqgis-developer@lists.osgeo.org Ogg: Re: [Qgis-developer] Automate snapping after insert of a new feature Can't you use the the snapped point (QgsSnappingResult.snappedVertex) to replace the original vertex position? giovanni 2015-04-22 11:01 GMT+02:00 francescobocca...@libero.it

[Qgis-developer] Automate snapping after insert of a new feature

2015-04-22 Thread francescobocca...@libero.it
Hi all, i have a question for you. I'd like to have a new function in my plugin that makes an autime snapping if a start point or end point of a new feature inserted is closed to a vertex or segment base on a values setted ina configuration file. From plugin console: l = iface.activeLayer()

[Qgis-developer] Disable snapping options

2015-03-27 Thread francescobocca...@libero.it
Hi all, i would like in some situation switch off / on snapping options programmatically. In try with below steps: 1 - get QgsProject.instance() -- proj 2 - get active layer -- activeLayer 3 - disable snapping options proj.setSnapSettingsForLayer(activeLayer.id(),False,2,1,10,True) Nothing

[Qgis-developer] R: Re: wrapping changeAttributeValue between begin and end EditCommand

2015-03-16 Thread francescobocca...@libero.it
. with a QTimer. Not an elegant solution though... RegardsMartin On Sun, Mar 15, 2015 at 9:04 PM, francescobocca...@libero.it francescobocca...@libero.it wrote: Hi all, i have a problem with beginEditCommand and endEditCommand wrapping. In my plugin i capture the layer.featureAdded signal

[Qgis-developer] R: Re: wrapping changeAttributeValue between begin and end EditCommand

2015-03-16 Thread francescobocca...@libero.it
. with a QTimer. Not an elegant solution though... RegardsMartin On Sun, Mar 15, 2015 at 9:04 PM, francescobocca...@libero.it francescobocca...@libero.it wrote: Hi all, i have a problem with beginEditCommand and endEditCommand wrapping. In my plugin i capture the layer.featureAdded signal

[Qgis-developer] wrapping changeAttributeValue between begin and end EditCommand

2015-03-15 Thread francescobocca...@libero.it
Hi all, i have a problem with beginEditCommand and endEditCommand wrapping. In my plugin i capture the layer.featureAdded signal : self.layer.featureAdded.connect(self.myfunction) The scope of my function is to change attribute of the feature added according with some rules. I wrap

[Qgis-developer] crash dumped error

2015-03-09 Thread francescobocca...@libero.it
Hi all, i'm trying to develop a plugin that change an attribute of the feature added using a custom interface. i'm able to set the value of the attribute according to the value selected from my interface using: self.layer.changeAttributeValue(self.feat_id,index,self.code) but when i

[Qgis-developer] R: Re: crash dumped error

2015-03-09 Thread francescobocca...@libero.it
saved with old versions of QGIS, inside that folder. Regards Roberto 2015-03-09 13:00 GMT+01:00 francescobocca...@libero.it francescobocca...@libero.it: Hi all, i'm trying to develop a plugin that change an attribute of the feature added using a custom interface. i'm able to set the value

[Qgis-developer] R: Re: Get starting point during add feature

2015-03-02 Thread francescobocca...@libero.it
. avoid using editing with dataProvider otherwise no event will be emitted. regards, Luigi Pirelli On 27 February 2015 at 16:20, francescobocca...@libero.it francescobocca...@libero.it wrote: Hi all, I'm writing a plugin and i would like to get the first (starting point) vertex of a line vector

[Qgis-developer] Get starting point during add feature

2015-02-27 Thread francescobocca...@libero.it
Hi all, I'm writing a plugin and i would like to get the first (starting point) vertex of a line vector feature during editing. The steps are: 1) enable a line vector to be editable 2)click on add feature button 3)When i click on mapcanvas to draw my first point, i would like to get the point

[Qgis-developer] getLayerID() new API

2013-02-18 Thread francescobocca...@libero.it
Hi all, anyone con suggest me how use getLayerID() method in new QGIS API? Thanks Francesco ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Extract epgs code from input layer

2013-02-16 Thread francescobocca...@libero.it
Hi all, i would like to extract epsg code from inputvector layer. My code is: vlayerA = QGisLayers.getObjectFromUri(self.getParameterValue(href.INPUT)) self.epsg = vlayerA.crs().srsid() Is it corrects? If i print the values it show strange value. Thanks Francesco

[Qgis-developer] R: Re: Extract epgs code from input layer

2013-02-16 Thread francescobocca...@libero.it
francescobocca...@libero.it francescobocca...@libero.it Hi all, i would like to extract epsg code from inputvector layer. My code is: vlayerA = QGisLayers.getObjectFromUri(self.getParameterValue(href.INPUT)) self.epsg = vlayerA.crs().srsid() Is it corrects? If i print the values it show

[Qgis-developer] I: Re: Re: R: Re: attributeMap()

2013-02-04 Thread francescobocca...@libero.it
Messaggio originale Da: francescobocca...@libero.it Data: 04/02/2013 9.20 A: wonder...@gmail.com Ogg: R: Re: Re: [Qgis-developer] R: Re: attributeMap() Hi Martin, this is my code: vproviderA = vlayerA.dataProvider() allAttrsA

[Qgis-developer] R: Re: Re: Re: R: Re: attributeMap()

2013-02-04 Thread francescobocca...@libero.it
originale Da: wonder...@gmail.com Data: 04/02/2013 10.06 A: francescobocca...@libero.itfrancescobocca...@libero.it, qgis-dev qgis-developer@lists.osgeo.org Ogg: Re: Re: Re: [Qgis-developer] R: Re: attributeMap() On Mon, Feb 4, 2013 at 9:20 AM, francescobocca...@libero.it francescobocca

[Qgis-developer] attributeMap()

2013-02-02 Thread francescobocca...@libero.it
Hi all,i have some problem to adapt my old code to new API.i have below piece of code: index = vproviderA.fieldNameIndex(field) atMap = inFeat.attributeMap()idVar = atMap[ index ] to get a value of a this features in a field.Now is it no possbile because QgsFeature hasn't attributeMap().Ca you

[Qgis-developer] R: Re: attributeMap()

2013-02-02 Thread francescobocca...@libero.it
Data: 02/02/2013 17.33 A: francescobocca...@libero.itfrancescobocca...@libero.it Cc: qgis-developer@lists.osgeo.orgqgis-developer@lists.osgeo.org Ogg: Re: [Qgis-developer] attributeMap() Hi Francesco On Sat, Feb 2, 2013 at 4:24 PM, francescobocca...@libero.it francescobocca...@libero.it wrote: i

[Qgis-developer] QgsFields problem

2013-02-01 Thread francescobocca...@libero.it
Hi all, i have a problem with new class QgsFields: in my code i wrote: fields = { 0 : QgsFields(ID, QVariant.Int), 1 : QgsFields(Area, QVariant.Double), 2 : QgsFields(Perim, QVariant.Double), 3 : QgsFields(field,

[Qgis-developer] I: Re: Commit delete features

2013-01-13 Thread francescobocca...@libero.it
Messaggio originale Da: francescobocca...@libero.it Data: 13/01/2013 18.03 A: gioha...@gmail.com Ogg: R: Re: [Qgis-developer] Commit delete features Hi Giovanni,this is my piece of code: provider = layer.dataProvider() feat = QgsFeature() allAttrs

[Qgis-developer] R: I: Re: Commit delete features

2013-01-13 Thread francescobocca...@libero.it
originale Da: francescobocca...@libero.it Data: 13/01/2013 18.03 A: qgis-developer@lists.osgeo.org Ogg: [Qgis-developer] I: Re: Commit delete features Messaggio originale Da: francescobocca...@libero.it Data: 13/01/2013 18.03 A: gioha...@gmail.com Ogg: R: Re: [Qgis-developer

[Qgis-developer] Happy new year

2012-12-31 Thread francescobocca...@libero.it
Hi all, i would like to say best wishes for a happy 2013 to all! Francesco ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] Create a test enviroment inside a plugin

2012-12-29 Thread francescobocca...@libero.it
Hi all, i would like to create an enviroment test into my plugin useful to the user to test quickly the functionallity of the plugin. I'm thinking an enviroment with a small sample dataset.Do you have any suggestions? How can I do that? Is there any documentation about that? Thanks Francesco

[Qgis-developer] How can delimeter percentage values?

2012-12-17 Thread francescobocca...@libero.it
Hi all, i'm using sextante plugin to develop a new algorithm. I would like to create a field as percentage value (between 5 to 100). I'm using this line of code: self.addParameter(ParameterNumber(MCP.PERCENT, Percent of fixes, 5, 100, 95)) but i'm not able to force to limit from 5 to 100 the

R: Re: [Qgis-developer] from qgis.core impor * Windows problems

2012-05-24 Thread francescobocca...@libero.it
/5/24 francescobocca...@libero.it francescobocca...@libero.it Hi all, i have a problem in my Windows PC. I try to use a python script that call qgis modules. I tried to do : from qgis.core import * i receive ImportError: DLL load failed How i have to configure my environment

R: Re: Re: [Qgis-developer] from qgis.core impor * Windows problems

2012-05-24 Thread francescobocca...@libero.it
, etc.) In general you have to add the various Qt and Qgis DLLs to the PATH, and configure the python paths to be able to peak the qgis modules. giovanni 2012/5/24 francescobocca...@libero.it francescobocca...@libero.it Hi all, i have a problem in my Windows PC. I try to use a python script

[Qgis-developer] Shape to shapeZ

2012-05-23 Thread francescobocca...@libero.it
Hi all, a question about convert function. I'd like to convert a simple shapefile with z field. I'd like to convert that shapefile into shapefileZ. Is there a way to do that? Thanks Francesco ___ Qgis-developer mailing list

R: Re: [Qgis-developer] Shape to shapeZ

2012-05-23 Thread francescobocca...@libero.it
because Qgis doesn't support Z vaues. You could consider ogr2ogr, setting -nlt to POINT25D (or POLYGON25D, etc.) and -zfield to the field from which to peak the Z value. You can also do it from Qgis vector tools. giovanni 2012/5/23 francescobocca...@libero.it francescobocca...@libero.it: Hi all

[Qgis-developer] Trasform QgsVectorLayer proj4 to another

2011-12-14 Thread francescobocca...@libero.it
Hi to all, i have a question for you. I have 2 vector layer that have two different spatial references. I'd like to tranform(convert) one of these in the same coordinate system. Like that: crsStart = QgsCoordinateReferenceSystem() crsStart.createFromProj4(layerA.crs().toProj4()) crsDest =

R: Re: [Qgis-developer] Trasform QgsVectorLayer proj4 to another

2011-12-14 Thread francescobocca...@libero.it
: qgis-developer@lists.osgeo.org Ogg: Re: [Qgis-developer] Trasform QgsVectorLayer proj4 to another On 2011-12-14 12:59, francescobocca...@libero.it wrote: Hi to all, i have a question for you. I have 2 vector layer that have two different spatial references. I'd like to tranform(convert) one

R: Re: R: Re: [Qgis-developer] Trasform QgsVectorLayer proj4 to another

2011-12-14 Thread francescobocca...@libero.it
QgsVectorLayer proj4 to another On 2011-12-14 13:55, francescobocca...@libero.it wrote: Hi, i tried it but it works only with point tranformation. I would llike to tranform the entire vector layer. Do you have any suggestions? Mmm, you are right, I only used it for one feature at the time. Then I

[Qgis-developer] Problemi plug in seleziona shape

2010-07-31 Thread francescobocca...@libero.it
Ciao a tutti, sto incontrando problemi con il plug-in find by attribute su windows 7. La scelta dei layer e dei campi (field) su cui fare ricerca e selezione funziona ma incontro problemi cioè non accade niente quando schiaccio il tasto search. Con windows xp tutto funziona bene. Come mai?