28.05.2013 Views

QGIS User Guide - OSGeo Download Server

QGIS User Guide - OSGeo Download Server

QGIS User Guide - OSGeo Download Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5 LAVORARE CON I DATI VETTORIALI<br />

5.6. Generatore di query (query builder)<br />

Il generatore di query consente di definire (tramite il linguaggio Structured Query Language, SQL)<br />

un sottoinsieme di una tabella e mostrarlo come layer in <strong>QGIS</strong>. Può essere usato pper tutti i formati<br />

OGR, i file di GRASS ed i layer di PostGIS. Per esemio, se si ha il file towns che contiene un campo<br />

population nella tabella attributi indicante il numero di residenti è possibile selezionare solo le città<br />

più grandi inserendo l’espressione population > 100000 nella casella SQL del costruttore di query.<br />

La Figura 22 mostra un esempio per il costruttore di query popolato con dati provenienti da layer<br />

PostGIS immagazzinati nel database PostgreSQL.<br />

Figura 22: La finestra del costruttore di query<br />

La finestra del costruttore di query elenca i campi del database nella casella sulla sinistra. Un campione<br />

dei dati selezionabili con l’espressione impostata è visibile cliccando sul pulsante Campione<br />

. In questo modo vengono richiamati i primi 25 valori distinti dai campi del database. Per avere una<br />

lista completa di tutti i valori di un campo, cliccare sul pulsante All . Per aggiungere un campo o<br />

un valore selezionato alla query, fare doppio-click su di esso. È possibile usare i vari pulsanti per<br />

costruire le interrogazioni oppure digitare direttamente il testo dell’interrogazione nella casella SQL.<br />

<strong>QGIS</strong> 1.4.0 <strong>User</strong> <strong>Guide</strong> 76

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!