<div dir="ltr"><p class="" style="margin-bottom:0cm">Ringrazio tutti 
</p><p class="" style="margin-bottom:0cm">ma ancora non ci siamo,
almeno devo capire ancora alcune cose.</p><p class="" style="margin-bottom:0cm"><br>
</p><p class="" style="margin-bottom:0cm">Avevo già provato a
fare sia il soft che l'hard upgrade ma senza risultati.</p><p class="" style="margin-bottom:0cm"><br>
</p><p class="" style="margin-bottom:0cm">Devo segnalare che uso
postgis 2.0.3 su postgres 9.1 e il backup l'ho fatto su un db
postgres 8.4 con postgis 1.5.3.</p><p class="" style="margin-bottom:0cm"><br>
</p><p class="" style="margin-bottom:0cm"> L'utilizzo del comando
perl <a href="http://postgis_restore.pl">postgis_restore.pl</a> con la versione installata di postgis non va.
</p><p class="" style="margin-bottom:0cm">Infatti nella cartella 
postgresql-9.1/utils/ io trovo due file perl:</p><p class="" style="margin-bottom:0cm"><a href="http://postgis_restore.pl">postgis_restore.pl</a></p><p class="" style="margin-bottom:0cm"><a href="http://new_postgis_restore.pl">new_postgis_restore.pl</a></p>
<p class="" style="margin-bottom:0cm">Utilizzando il primo
comando  esce fuori questo:</p><p class="" style="margin-bottom:0cm"><i>Usage:
<a href="http://postgis_restore.pl">postgis_restore.pl</a> <postgis.sql> <db> <dump>
[<createdb_options>]</i></p><p class="" style="margin-bottom:0cm"><br>
</p><p class="" style="margin-bottom:0cm"><i>Restore a custom
dump (pg_dump -Fc) of a postgis enabled database.</i></p><p class="" style="margin-bottom:0cm;font-style:normal"><br>
</p><p class="" style="margin-bottom:0cm;font-style:normal">(anche
se provo a dare questo comando che suggerisce mi fuoriesce la
medesima scritta)</p><p class="" style="margin-bottom:0cm;font-style:normal">mentre
se uso il secondo comando fa quello che dovrebbe. Però le tabelle
geometriche non me le riempie perche c'è un constraint
enforce_srid_the_geom ecc ecc che blocca tutto.</p><p class="" style="margin-bottom:0cm;font-style:normal"><br>
</p><p class="" style="margin-bottom:0cm;font-style:normal">Allora
ho dovuto fare un clone del db postgis 1.5 e eliminare questi
constraint.</p><p class="" style="margin-bottom:0cm;font-style:normal"><br>
</p><p class="" style="margin-bottom:0cm;font-style:normal">Ho
dovuto dare due volte il comando <a href="http://new_postgis_restore.pl">new_postgis_restore.pl</a> perchè le
tabelle geometriche si riempissero.</p><p class="" style="margin-bottom:0cm;font-style:normal"><br>
</p><p class="" style="margin-bottom:0cm;font-style:normal">Il
punto è che per popolare le mie tabelle ho dovuto eliminare questi
constraint, pertanto il procedimento che ho adottato è giusto oppure
il problema non è quello ma risiede in altro luogo e quindi il
processo detto hard upgrade deve funzionare cmq</p><p class="" style="margin-bottom:0cm;font-style:normal"><br>
</p><p class="" style="margin-bottom:0cm;font-style:normal">grazie
mille</p><p class="" style="margin-bottom:0cm;font-style:normal"><br>
</p><p dir="ltr">
        
        
        





























</p><p class="" style="margin-bottom:0cm">enzo</p>
<p dir="ltr">Il 23/giu/2014 16:09 <<a href="mailto:gfoss-request@lists.gfoss.it" target="_blank">gfoss-request@lists.gfoss.it</a>> ha scritto:<br>
><br>
> Invia le richieste di iscrizione alla lista Gfoss all'indirizzo<br>
>         <a href="mailto:gfoss@lists.gfoss.it" target="_blank">gfoss@lists.gfoss.it</a><br>
><br>
> Per iscriverti o cancellarti attraverso il web, visita<br>
>         <a href="http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss" target="_blank">http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss</a><br>
> oppure, via email, manda un messaggio con oggetto `help' all'indirizzo<br>
>         <a href="mailto:gfoss-request@lists.gfoss.it" target="_blank">gfoss-request@lists.gfoss.it</a><br>
><br>
> Puoi contattare la persona che gestisce la lista all'indirizzo<br>
>         <a href="mailto:gfoss-owner@lists.gfoss.it" target="_blank">gfoss-owner@lists.gfoss.it</a><br>
><br>
> Se rispondi a questo messaggio, per favore edita la linea dell'oggetto<br>
> in modo che sia più utile di un semplice "Re: Contenuti del digest<br>
> della lista Gfoss..."<br>
><br>
><br>
> Argomenti del Giorno:<br>
><br>
>    1. R: R: WFS Edificato PCN: latitudine e longitudine invertite?<br>
>       (enrico.grillo)<br>
>    2. Re: Postgis upgrade (Walter Lorenzetti)<br>
>    3. Re: Postgis upgrade (Luca Delucchi)<br>
>    4. Re: Postgis upgrade (Sandro Santilli)<br>
>    5. Re: Creazione plugin problema (Gino Pirelli)<br>
><br>
><br>
> ----------------------------------------------------------------------<br>
><br>
> Message: 1<br>
> Date: Mon, 23 Jun 2014 15:34:16 +0200<br>
> From: "enrico.grillo" <<a href="mailto:enrico.grillo@arpalazio.it" target="_blank">enrico.grillo@arpalazio.it</a>><br>
> To: "'marco zanieri'" <<a href="mailto:marcozanieri@gmail.com" target="_blank">marcozanieri@gmail.com</a>>, "'Stefano Iacovella'"<br>
>         <<a href="mailto:stefano.iacovella@gmail.com" target="_blank">stefano.iacovella@gmail.com</a>><br>
> Cc: 'aborruso' <<a href="mailto:aborruso@tin.it" target="_blank">aborruso@tin.it</a>>, 'GFOSS' <<a href="mailto:gfoss@lists.gfoss.it" target="_blank">gfoss@lists.gfoss.it</a>><br>
> Subject: [Gfoss] R: R: WFS Edificato PCN: latitudine e longitudine<br>
>         invertite?<br>
> Message-ID: <007e01cf8ee7$d4b2a220$7e17e660$@<a href="mailto:grillo@arpalazio.it" target="_blank">grillo@arpalazio.it</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> Anche io stavo sotto proxy e mi bloccava… inoltre in azienda abbiamo Websense che se si non accede con le proprie credenziali ci blocca.<br>
><br>
><br>
><br>
> Da: <a href="mailto:gfoss-bounces@lists.gfoss.it" target="_blank">gfoss-bounces@lists.gfoss.it</a> [mailto:<a href="mailto:gfoss-bounces@lists.gfoss.it" target="_blank">gfoss-bounces@lists.gfoss.it</a>] Per conto di marco zanieri<br>

> Inviato: lunedì 23 giugno 2014 12.19<br>
> A: Stefano Iacovella<br>
> Cc: aborruso; GFOSS<br>
> Oggetto: Re: [Gfoss] R: WFS Edificato PCN: latitudine e longitudine invertite?<br>
><br>
><br>
><br>
> Ciao Stefano,<br>
><br>
> credo che il problema sia legato proprio a quello che dici tu.....non appena riesco faccio dei test...<br>
><br>
> grazie mille,<br>
><br>
> Marco<br>
><br>
><br>
><br>
> Il giorno 23 giugno 2014 11:57, Stefano Iacovella <<a href="mailto:stefano.iacovella@gmail.com" target="_blank">stefano.iacovella@gmail.com</a>> ha scritto:<br>
><br>
><br>
><br>
> Il giorno 23 giugno 2014 11:54, marco zanieri <<a href="mailto:marcozanieri@gmail.com" target="_blank">marcozanieri@gmail.com</a>> ha scritto:<br>
><br>
><br>
><br>
> Ciao Andrea,<br>
><br>
> purtroppo ho riprovato, ma ottengo questo:<br>
><br>
> D:\Appl\QGIS Valmiera\bin>ogr2ogr output.shp test.txt ED.EDIFICATO.CAPOLUOGHI. -<br>
> spat 13.34248 38.11716 13.35913 38.12881 --config GML_INVERT_AXIS_ORDER_IF_LAT_L<br>
> ONG NO<br>
> ERROR 1: HTTP error code : 403<br>
> ERROR 1: Error returned by server : HTTP error code : 403 (0)<br>
> FAILURE:<br>
> Unable to open datasource `test.txt' with the following drivers.<br>
><br>
><br>
><br>
> Ciao Marco,<br>
><br>
> HTTP 403 è il codice d'errore per forbidden.<br>
><br>
> <a href="http://en.wikipedia.org/wiki/HTTP_403" target="_blank">http://en.wikipedia.org/wiki/HTTP_403</a><br>
><br>
> Se stai facendo al richiesta da una rete interna ad una azienda è probabile che il proxy ti blocchi ;-)<br>
><br>
><br>
><br>
> Stefano<br>
><br>
><br>
><br>
><br>
> ---------------------------------------------------<br>
> 41.95581N 12.52854E<br>
><br>
><br>
> <a href="http://www.linkedin.com/in/stefanoiacovella" target="_blank">http://www.linkedin.com/in/stefanoiacovella</a><br>
><br>
> <a href="http://twitter.com/#!/Iacovellas" target="_blank">http://twitter.com/#!/Iacovellas</a><br>
><br>
><br>
><br>
><br>
> --<br>
><br>
>            dott. Marco Zanieri<br>
>    e-mail: <a href="mailto:marcozanieri@gmail.com" target="_blank">marcozanieri@gmail.com</a><br>
><br>
>            cartografia tematica<br>
>           banche dati territoriali<br>
>      sistemi informativi geografici<br>
>       applicazioni GIS e webGIS<br>
><br>
> -------------- parte successiva --------------<br>
> Un allegato HTML è stato rimosso...<br>
> URL: <<a href="http://lists.gfoss.it/pipermail/gfoss/attachments/20140623/d1f4c977/attachment-0001.html" target="_blank">http://lists.gfoss.it/pipermail/gfoss/attachments/20140623/d1f4c977/attachment-0001.html</a>><br>

><br>
> ------------------------------<br>
><br>
> Message: 2<br>
> Date: Mon, 23 Jun 2014 15:31:33 +0200<br>
> From: Walter Lorenzetti <<a href="mailto:lorenzetti@gis3w.it" target="_blank">lorenzetti@gis3w.it</a>><br>
> To: <a href="mailto:gfoss@lists.gfoss.it" target="_blank">gfoss@lists.gfoss.it</a><br>
> Subject: Re: [Gfoss] Postgis upgrade<br>
> Message-ID: <<a href="mailto:53A82C35.3060706@gis3w.it" target="_blank">53A82C35.3060706@gis3w.it</a>><br>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
><br>
> Ciao Enzo,<br>
><br>
> in una delle ultime migrazioni che hanno avuto essito positivo ho<br>
> adottato la seguente tecnica:<br>
><br>
> eseguo un beckup di ti po custom<br>
><br>
> pg_dump -Fc -b -v -f db.backup<br>
><br>
> al che utilizzo lo script in perl di postgis per il restore:<br>
><br>
> cd /usr/share/postgresql/9.1/contrib/postgis-2.1/<br>
><br>
> perl <a href="http://postgis_restore.pl" target="_blank">postgis_restore.pl</a> /path/to/db.backup | psql -d dev_trackoid<br>
><br>
> spero possa esserti di aiuto.<br>
><br>
> W<br>
><br>
> Il 23/06/2014 15:22, Enzo Cocca ha scritto:<br>
> ><br>
> > Ciao Paolo<br>
> > Grazi mille per il suggerimento. In realtà ho provato già questa<br>
> > strada ma senza risultati attesi.<br>
> > Il problema risiede nelle tab geometriche che hanno un contraint<br>
> > enforce_srid_the_geom ecc che penso mi blocca la scrittura e poi il<br>
> > campo the geom non viene settato come dovrebbe per postgis2. Se ti va<br>
> > ti mando il dump per vedere quale è l'errore<br>
> > Ciao<br>
> > Enzo<br>
> ><br>
> > Il 23/giu/2014 13:55 "Paolo Corti" <<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a><br>
> > <mailto:<a href="mailto:pcorti@gmail.com" target="_blank">pcorti@gmail.com</a>>> ha scritto:<br>
> ><br>
> >     Ciao<br>
> ><br>
> >     2014-06-22 20:19 GMT+02:00 Enzo Cocca <<a href="mailto:enzo.ccc@gmail.com" target="_blank">enzo.ccc@gmail.com</a><br>
> >     <mailto:<a href="mailto:enzo.ccc@gmail.com" target="_blank">enzo.ccc@gmail.com</a>>>:<br>
> >     > grazie mille per i suggerimenti,<br>
> >     ><br>
> >     > ma ancora non riesco a trovare la soluzione o meglio l'ho<br>
> >     trovata ma mi<br>
> >     > piacerebbe sapere se c'è una soluzione standard.<br>
> >     ><br>
> >     > rispetto al suggerimento di francesco non usando opengeo la<br>
> >     soluzione non è<br>
> >     > fattibile mentre rispetto al suggerimento di marco il problema è che<br>
> >     > comunque le tabelle geometriche non vengono riempite ma  solo quelle<br>
> >     > alfanumeriche.<br>
> >     ><br>
> >     > Per riempire le tabelle geometriche mi tocca aprire qgis<br>
> >     importare le<br>
> >     > tabelle geometriche del db postgis 1.5 e 2.0 e fare dei bei<br>
> >     copia incolla.<br>
> >     ><br>
> ><br>
> >     quello che faccio io:<br>
> ><br>
> >     * backup database 1.5 (pg_dump dbname > outfile)<br>
> >     * creazione database su 2.0 (CREATE DATABASE dbname2...)<br>
> >     * creazione estensione PostGIS (CREATE EXTENSION postgis)<br>
> >     * installazione legacy.sql<br>
> >     * restore database (psql dbname2 < outfile )<br>
> ><br>
> >     in genere cosi mi funziona sempre perfettamente<br>
> >     a presto<br>
> >     p<br>
> ><br>
> >     --<br>
> >     Paolo Corti<br>
> >     Geospatial software developer<br>
> >     web: <a href="http://www.paolocorti.net" target="_blank">http://www.paolocorti.net</a><br>
> >     twitter: @capooti<br>
> >     skype: capooti<br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > <a href="mailto:Gfoss@lists.gfoss.it" target="_blank">Gfoss@lists.gfoss.it</a><br>
> > <a href="http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss" target="_blank">http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss</a><br>
> > Questa e' una lista di discussione pubblica aperta a tutti.<br>
> > I messaggi di questa lista non hanno relazione diretta con le posizioni dell'Associazione GFOSS.it.<br>
> > 666+40 iscritti al 5.6.2014<br>
><br>
> --<br>
><br>
> Walter Lorenzetti phD<br>
> email: <a href="mailto:lorenzetti@gis3w.it" target="_blank">lorenzetti@gis3w.it</a><br>
> skype: aiki74<br>
> twitter:w_lorenzetti <<a href="https://twitter.com/w_lorenzetti" target="_blank">https://twitter.com/w_lorenzetti</a>><br>
> g+:aiki74 <<a href="https://plus.google.com/117055903318462447104/" target="_blank">https://plus.google.com/117055903318462447104/</a>><br>
> Tel/Cell: <a href="tel:%28%2B39%29%20347-6597931" value="+393476597931" target="_blank">(+39) 347-6597931</a><br>
> Viale Verdi 24 - 51016 Montecatini Terme (PT)<br>
> Nuovi corsi QGIS e GFOSS<br>
> <<a href="http://gis3w.it/it/calendario-corsi-software-geografici" target="_blank">http://gis3w.it/it/calendario-corsi-software-geografici</a>><br>
><br>
> -------------- parte successiva --------------<br>
> Un allegato HTML è stato rimosso...<br>
> URL: <<a href="http://lists.gfoss.it/pipermail/gfoss/attachments/20140623/090e7be2/attachment-0001.html" target="_blank">http://lists.gfoss.it/pipermail/gfoss/attachments/20140623/090e7be2/attachment-0001.html</a>><br>

><br>
> ------------------------------<br>
><br>
> Message: 3<br>
> Date: Mon, 23 Jun 2014 15:41:06 +0200<br>
> From: Luca Delucchi <<a href="mailto:lucadeluge@gmail.com" target="_blank">lucadeluge@gmail.com</a>><br>
> To: Walter Lorenzetti <<a href="mailto:lorenzetti@gis3w.it" target="_blank">lorenzetti@gis3w.it</a>><br>
> Cc: "GFOSS.it" <<a href="mailto:gfoss@lists.gfoss.it" target="_blank">gfoss@lists.gfoss.it</a>><br>
> Subject: Re: [Gfoss] Postgis upgrade<br>
> Message-ID:<br>
>         <<a href="mailto:CAK4m-3wRsvz-ejuG0epQG_Bgzwbrgo_OEWJZDyyUzc9b9uMJdA@mail.gmail.com" target="_blank">CAK4m-3wRsvz-ejuG0epQG_Bgzwbrgo_OEWJZDyyUzc9b9uMJdA@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset=UTF-8<br>
><br>
> 2014-06-23 15:31 GMT+02:00 Walter Lorenzetti <<a href="mailto:lorenzetti@gis3w.it" target="_blank">lorenzetti@gis3w.it</a>>:<br>
> > Ciao Enzo,<br>
> ><br>
><br>
> ciao,<br>
><br>
> > in una delle ultime migrazioni che hanno avuto essito positivo ho adottato<br>
> > la seguente tecnica:<br>
> ><br>
> > eseguo un beckup di ti po custom<br>
> ><br>
> > pg_dump -Fc -b -v -f db.backup<br>
> ><br>
> > al che utilizzo lo script in perl di postgis per il restore:<br>
> ><br>
> > cd /usr/share/postgresql/9.1/contrib/postgis-2.1/<br>
> ><br>
> > perl <a href="http://postgis_restore.pl" target="_blank">postgis_restore.pl</a> /path/to/db.backup | psql -d dev_trackoid<br>
> ><br>
> > spero possa esserti di aiuto.<br>
> ><br>
><br>
> anch'io uso questo metodo da diverso tempo...<br>
><br>
> > W<br>
> ><br>
><br>
><br>
> --<br>
> ciao<br>
> Luca<br>
><br>
> <a href="http://gis.cri.fmach.it/delucchi/" target="_blank">http://gis.cri.fmach.it/delucchi/</a><br>
> <a href="http://www.lucadelu.org" target="_blank">www.lucadelu.org</a><br>
><br>
><br>
> ------------------------------<br>
><br>
> Message: 4<br>
> Date: Mon, 23 Jun 2014 15:53:18 +0200<br>
> From: Sandro Santilli <<a href="mailto:strk@keybit.net" target="_blank">strk@keybit.net</a>><br>
> To: Luca Delucchi <<a href="mailto:lucadeluge@gmail.com" target="_blank">lucadeluge@gmail.com</a>><br>
> Cc: "GFOSS.it" <<a href="mailto:gfoss@lists.gfoss.it" target="_blank">gfoss@lists.gfoss.it</a>><br>
> Subject: Re: [Gfoss] Postgis upgrade<br>
> Message-ID: <20140623135318.GB1527@localhost><br>
> Content-Type: text/plain; charset=iso-8859-1<br>
><br>
> On Mon, Jun 23, 2014 at 03:41:06PM +0200, Luca Delucchi wrote:<br>
> > 2014-06-23 15:31 GMT+02:00 Walter Lorenzetti <<a href="mailto:lorenzetti@gis3w.it" target="_blank">lorenzetti@gis3w.it</a>>:<br>
><br>
> > > in una delle ultime migrazioni che hanno avuto essito positivo ho adottato<br>
> > > la seguente tecnica:<br>
> > ><br>
> > > eseguo un beckup di ti po custom<br>
> > ><br>
> > > pg_dump -Fc -b -v -f db.backup<br>
> > ><br>
> > > al che utilizzo lo script in perl di postgis per il restore:<br>
> > ><br>
> > > cd /usr/share/postgresql/9.1/contrib/postgis-2.1/<br>
> > ><br>
> > > perl <a href="http://postgis_restore.pl" target="_blank">postgis_restore.pl</a> /path/to/db.backup | psql -d dev_trackoid<br>
> > ><br>
> > > spero possa esserti di aiuto.<br>
> > ><br>
> ><br>
> > anch'io uso questo metodo da diverso tempo...<br>
><br>
> Ed e' questo il metodo corretto. Chiamato "Hard Upgrade" nel manuale.<br>
><br>
> --strk;<br>
><br>
>  ()  ASCII ribbon campaign  --  Keep it simple !<br>
>  /\  <a href="http://strk.keybit.net/rants/ascii_mails.txt" target="_blank">http://strk.keybit.net/rants/ascii_mails.txt</a><br>
><br>
><br>
> ------------------------------<br>
><br>
> Message: 5<br>
> Date: Mon, 23 Jun 2014 16:08:27 +0200<br>
> From: Gino Pirelli <<a href="mailto:luipir@gmail.com" target="_blank">luipir@gmail.com</a>><br>
> To: NicoPez <<a href="mailto:nico.pezzotta@gmail.com" target="_blank">nico.pezzotta@gmail.com</a>><br>
> Cc: "GFOSS.it" <<a href="mailto:gfoss@lists.gfoss.it" target="_blank">gfoss@lists.gfoss.it</a>><br>
> Subject: Re: [Gfoss] Creazione plugin problema<br>
> Message-ID:<br>
>         <CAFO80_rwsfNSLPzJ2AV7YAMc=<a href="mailto:sc9GqQYMNWbVpE_hogLut0Q4A@mail.gmail.com" target="_blank">sc9GqQYMNWbVpE_hogLut0Q4A@mail.gmail.com</a>><br>
> Content-Type: text/plain; charset="utf-8"<br>
><br>
> per esempio c'e'<br>
><br>
> <a href="https://github.com/sourcepole/qgis-remote-debug" target="_blank">https://github.com/sourcepole/qgis-remote-debug</a><br>
><br>
> non lo trovi nel repo dei plugin e non saprei dire perche'... morale<br>
> clonati il repo nella directory dei plugin e segui le istruzioni del readme<br>
><br>
> ciao Luigi Pirelli<br>
><br>
><br>
> On 23 June 2014 14:51, NicoPez <<a href="mailto:nico.pezzotta@gmail.com" target="_blank">nico.pezzotta@gmail.com</a>> wrote:<br>
><br>
> > Buon pomeriggio a tutti. Mi sto cimentando per la prima volta con la<br>
> > creazione di plugin e finora sono riuscito sempre a risolvere i problemi<br>
> > "grazie" agli errori segnalati da QGIS al momento dell'avvio o quando vado<br>
> > a<br>
> > far girare il plugin. Ora invece non mi da nessun errore, ma non il plugin<br>
> > non elabora. Se vi incollo il codice, potreste aiutarmi e capire dove è il<br>
> > problema? Fino alla "def search()" sembrava andare tutto come doveva. P.S.:<br>
> > c'è un modo per fare il debug del codice fino ad un certo punto, oppure<br>
> > eseguire il codice passo passo (come in VBA)? Grazie in anticipo!<br>
> ><br>
> > from PyQt4 import QtCore, QtGui<br>
> > from qgis.core import *<br>
> > from PyQt4.QtCore import *<br>
> > from PyQt4.QtGui import *<br>
> > from qgis.core import *<br>
> > from qgis.gui import *<br>
> ><br>
> > from ui_searchparcels2 import Ui_SearchParcels2<br>
> > # create the dialog for zoom to point<br>
> ><br>
> ><br>
> > class SearchParcels2Dialog(QtGui.QDialog, Ui_SearchParcels2):<br>
> >     def __init__(self):<br>
> >         QtGui.QDialog.__init__(self)<br>
> >         self.setupUi(self)<br>
> ><br>
> >         QObject.connect(self.uptadeButton, SIGNAL("clicked()"),<br>
> > self.chooseLayer)<br>
> >         QObject.connect(self.comboBox,<br>
> > SIGNAL("currentIndexChanged(QString)"), self.chooseField)<br>
> >         QObject.connect(self.comboBox,<br>
> > SIGNAL("currentIndexChanged(QString)"), self.chooseField2)<br>
> >         QObject.connect(self.selectBox, SIGNAL("stateChanged(int)"),<br>
> > self.OnSelectBoxClicked)<br>
> >         QObject.connect(self.cancelButton, SIGNAL("clicked()"),<br>
> > self.cancelSearch)<br>
> >         QObject.connect(self.goButton, SIGNAL("clicked()"), self.search)<br>
> ><br>
> >         self.chooseLayer()<br>
> ><br>
> >     # in first comboBox show the list of layers (list of names)<br>
> >     def chooseLayer(self):<br>
> >         layerList = []     # crea una lista vuota<br>
> >         self.comboBox.clear()     # svuota la lista del combo box<br>
> >         layerList = self.getLayerNames()     # a layerList assegna il<br>
> > risultato della procedura getLayerNames()<br>
> >         self.comboBox.addItems(layerList)<br>
> >         self.FoglioLine.clear()<br>
> >         self.ParticelLine.clear()<br>
> >         self.OnSelectBoxClicked()<br>
> >         return<br>
> ><br>
> >     # Get the list of layers (list of names) in QgsMapLayerRegistry<br>
> >     def getLayerNames(self):<br>
> >         layermap = QgsMapLayerRegistry.instance().mapLayers()   # assegna a<br>
> > layermap l'insieme dei layers caricati<br>
> >         layerLst = []<br>
> >         for i, layer in layermap.iteritems():<br>
> >             if layer.type() == QgsMapLayer.VectorLayer:    # considera solo<br>
> > i layers vettoriali<br>
> >                 layerLst.append( unicode( <a href="http://layer.name" target="_blank">layer.name</a>() ) )   # prende il<br>
> > nome di ogni layer a lo aggiunge alla lista layerLst<br>
> >         return layerLst<br>
> ><br>
> >     # in second comboBox show the list fields (list of names)<br>
> >     def chooseField(self):<br>
> >         fieldList = []<br>
> >         self.campo1.clear()<br>
> >         fieldList = self.getFieldNames()<br>
> >         self.campo1.addItems( fieldList )<br>
> >         return<br>
> ><br>
> >     # Get the list fields (list of names) for the selected layer<br>
> >     def getFieldNames(self):<br>
> >         layermap = QgsMapLayerRegistry.instance().mapLayers()<br>
> >         fieldLst = []<br>
> >         for i, layer in layermap.iteritems():<br>
> >             if layer.type() == QgsMapLayer.VectorLayer and <a href="http://layer.name" target="_blank">layer.name</a>() ==<br>
> > self.comboBox.currentText():<br>
> >                 if layer.isValid():<br>
> >                     fields = layer.dataProvider().fields()<br>
> >                     for i in range(fields.count()):<br>
> >                         field = fields[i]<br>
> >                         fieldLst.append(<a href="http://field.name" target="_blank">field.name</a>())<br>
> >         return fieldLst<br>
> ><br>
> >     # in third comboBox show the list fields (list of names)<br>
> >     def chooseField2(self):<br>
> >         fieldList = []<br>
> >         self.campo2.clear()<br>
> >         fieldList = self.getFieldNames()<br>
> >         self.campo2.addItems( fieldList )<br>
> >         return<br>
> ><br>
> >     def OnSelectBoxClicked(self):<br>
> >         layermap = QgsMapLayerRegistry.instance().mapLayers()<br>
> >         for i, layer in layermap.iteritems():<br>
> >             if layer.type() == QgsMapLayer.VectorLayer and <a href="http://layer.name" target="_blank">layer.name</a>() ==<br>
> > self.comboBox.currentText():<br>
> >                 if layer.isValid():<br>
> >                     if not self.selectBox.isChecked():<br>
> >                         self.panBox.setEnabled(False)<br>
> >                         self.scaleBox.setEnabled(False)<br>
> >                     else:<br>
> >                         self.panBox.setEnabled(layer.hasGeometryType())<br>
> >                         self.scaleBox.setEnabled(layer.hasGeometryType())<br>
> >         return<br>
> ><br>
> >     def cancelSearch(self):<br>
> >         self.continueSearch = False<br>
> >         return<br>
> ><br>
> >     def search(self):<br>
> >         i = self.comboBox.currentIndex()<br>
> >         if i < 0:<br>
> >             return None<br>
> >         layerId = self.comboBox.itemData(i)<br>
> >         layer = QgsMapLayerRegistry.instance().mapLayer(layerId)<br>
> >         if layer is None:<br>
> >             return<br>
> >         toFind = self.FoglioLine.text()<br>
> >         toFind2 = self.ParticelLine.text()<br>
> >         f = QgsFeature()<br>
> >         results = []<br>
> >         fieldIndex = self.campo1.currentIndex()<br>
> >         fieldName = self.campo1.itemData(fieldIndex)<br>
> >         fieldIndex2 = self.campo2.currentIndex()<br>
> >         fieldName2 = self.campo2.itemData(fieldIndex2)<br>
> >         if fieldName == "" or fieldName2 == "":<br>
> >             QMessageBox<br>
> >             msgBox.setText("Search Parcels 2: Seleziona un campo.")<br>
> >             msgBox.exec_()<br>
> >             return<br>
> >         try:<br>
> >             float(toFind)<br>
> >         except ValueError:<br>
> >             QMessageBox<br>
> >             msgBox.setText("Search Parcels 2: Inserisci un valore<br>
> > numerico.")<br>
> >             msgBox.exec_()<br>
> >             return<br>
> >         try:<br>
> >             float(toFind2)<br>
> >         except ValueError:<br>
> >             QMessageBox<br>
> >             msgBox.setText("Search Parcels 2: Inserisci un valore<br>
> > numerico.")<br>
> >             msgBox.exec_()<br>
> >             return<br>
> >          show progress bar<br>
> >         self.progressBar.setMinimum(0)<br>
> >         self.progressBar.setMaximum(layer.featureCount())<br>
> >         self.progressBar.setValue(0)<br>
> >         self.widget_2.show()<br>
> >         # disable rest of UI<br>
> >         self.layerWidgetGroup.setEnabled(False)<br>
> >         self.SearchWidgetGroup.setEnabled(False)<br>
> >         self.CheckWidgetGroup.setEnabled(False)<br>
> >         # create feature request<br>
> >         featReq = QgsFeatureRequest()<br>
> >         featReq.setFlags(QgsFeatureRequest.NoGeometry)<br>
> >         Req = featReq.setSubsetOfAttributes([fieldIndex])<br>
> >         Re2 = featReq.setSubsetOfAttributes([fieldIndex2])<br>
> >         iter = layer.getFeatures(featReq)<br>
> >         # process<br>
> >         k = 0<br>
> >         n = 0<br>
> >         self.continueSearch = True<br>
> >         while iter.nextFeature(f) and self.continueSearch:<br>
> >             k += 1<br>
> >             if self.evaluate(f[fieldName], toFind):<br>
> >                 results.append(<a href="http://f.id" target="_blank">f.id</a>())<br>
> >         f2 = QgisFeature(<a href="http://f.id" target="_blank">f.id</a>())<br>
> >         while iter.nextFeature(f2) and self.continueSearh:<br>
> >             n += 1<br>
> >             if self.evaluate(f[fieldName2], toFind2):<br>
> >                 results2.append(<a href="http://f2.id" target="_blank">f2.id</a>())<br>
> >             self.progressBar.setValue(n)<br>
> >             QCoreApplication.processEvents()<br>
> >         # reset UI<br>
> >         self.widget_2.hide()<br>
> >         self.layerWidgetGroup.setEnabled(True)<br>
> >         self.SearchWidgetGroup.setEnabled(True)<br>
> >         self.CheckWidgetGroup.setEnabled(True)<br>
> >         # process results<br>
> >         if self.continueSearch:<br>
> >             QMessageBox<br>
> >             msgBox.setText("Search Parcels 2: %u particelle trovate.")<br>
> >             msgBox.exec_()<br>
> >             self.processResults(results2)<br>
> >         return<br>
> ><br>
> >     def evaluate(self, v1, v2):<br>
> >         return float(v1) == float(v2)<br>
> ><br>
> >     def processResults(self, results2):<br>
> >         if layer is None:<br>
> >             return<br>
> >         if self.selectBox.isChecked():<br>
> >             layer.setSelectedFeatures(results2)<br>
> >             if len(results2) == 0:<br>
> >                 return<br>
> ><br>
> >             if self.panBox.isEnabled() and self.panBox.isChecked():<br>
> >                 canvas = self.iface.mapCanvas()<br>
> >                 rect =<br>
> > canvas.mapRenderer().layerExtentToOutputExtent(layer,<br>
> > layer.boundingBoxOfSelected())<br>
> >                 if rect is not None:<br>
> >                     if self.scaleBox.isEnabled() and<br>
> > self.scaleBox.isChecked():<br>
> >                         rect.scale(1.5)<br>
> >                         canvas.setExtent(rect)<br>
> >                     else:<br>
> >                         canvas.setExtent(QgsRectangle(rect.center(),<br>
> > rect.center()))<br>
> >                 canvas.refresh()<br>
> >         if self.formBox.isChecked():<br>
> >             f = QgsFeature()<br>
> >             for id in results2:<br>
> >                 if<br>
> > layer.getFeatures(QgsFeatureRequest().setFilterFid(id)).nextFeature(f):<br>
> >                     self.IdentifyResult(layer, f)<br>
> >         return<br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > View this message in context:<br>
> > <a href="http://gfoss-geographic-free-and-open-source-software-italian-mailing.3056002.n2.nabble.com/Creazione-plugin-problema-tp7588499.html" target="_blank">http://gfoss-geographic-free-and-open-source-software-italian-mailing.3056002.n2.nabble.com/Creazione-plugin-problema-tp7588499.html</a><br>


> > Sent from the Gfoss -- Geographic Free and Open Source Software - Italian<br>
> > mailing list mailing list archive at Nabble.com.<br>
> > _______________________________________________<br>
> > <a href="mailto:Gfoss@lists.gfoss.it" target="_blank">Gfoss@lists.gfoss.it</a><br>
> > <a href="http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss" target="_blank">http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss</a><br>
> > Questa e' una lista di discussione pubblica aperta a tutti.<br>
> > I messaggi di questa lista non hanno relazione diretta con le posizioni<br>
> > dell'Associazione GFOSS.it.<br>
> > 666+40 iscritti al 5.6.2014<br>
> -------------- parte successiva --------------<br>
> Un allegato HTML è stato rimosso...<br>
> URL: <<a href="http://lists.gfoss.it/pipermail/gfoss/attachments/20140623/075d31ce/attachment.html" target="_blank">http://lists.gfoss.it/pipermail/gfoss/attachments/20140623/075d31ce/attachment.html</a>><br>
><br>
> ------------------------------<br>
><br>
> _______________________________________________<br>
> Gfoss mailing list<br>
> <a href="mailto:Gfoss@lists.gfoss.it" target="_blank">Gfoss@lists.gfoss.it</a><br>
> <a href="http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss" target="_blank">http://lists.gfoss.it/cgi-bin/mailman/listinfo/gfoss</a><br>
> Questa e' una lista di discussione pubblica aperta a tutti.<br>
> I messaggi di questa lista non rispecchiano necessariamente<br>
> le posizioni dell'Associazione GFOSS.it.<br>
><br>
><br>
> Fine di Digest di Gfoss, Volume 108, Numero 45<br>
> **********************************************<br>
</p>
</div>