GPS, the Global Positioning System, is a satellite-based system that allows anyone with a GPS receiver to find their exact position anywhere in the world. It is used as an aid in navigation, for example in airplanes, in boats and by hikers. The GPS receiver uses the signals from the satellites to calculate its latitude, longitude and (sometimes) elevation. Most receivers also have the capability to store locations (known as waypoints), sequences of locations that make up a planned route and a tracklog or track of the receivers movement over time. Waypoints, routes and tracks are the three basic feature types in GPS data. QGIS displays waypoints in point layers while routes and tracks are displayed in linestring layers.
There are dozens of different file formats for storing GPS data. The format that QGIS uses is called GPX (GPS eXchange format), which is a standard interchange format that can contain any number of waypoints, routes and tracks in the same file.
Per caricare un file GPX è necessario installare il plugin Plugins ‣ Gestione Plugin... aprendo la finestra di dialogo Gestione Plugin. Spuntare la casella
Strumenti GPS. Quando il plugin è installato verranno visualizzati nella barra degli strumenti due pulsanti che rappresentano dei piccoli palamari GPS. Un esempio di file GPX è disponibile nel dataset campione
qgis_sample_data/gps/national_monuments.gpx
vedi sezione Dati campione per maggiori informazioni sul dataset campione:
For working with GPS data we provide an example GPX file available in the QGIS
sample dataset: qgis_sample_data/gps/national_monuments.gpx
. See Section
Dati campione for more information about the sample data.
Navigare all’interno della cartella qgis_sample_data/gps/
, selezionare il file GPX national_monuments.gpx
e cliccare [Apri].
Figure GPS 1:
Utilizzare [Browse...] il pulsante per selezionare il file GPX, e poi utilizzare le caselle per selezionare il tipo di dati che si desidera caricare dal file GPX. Ogni tipo di dato sarà caricato in layer separati quando viene premuto il pulsante [OK]. Il file national_monuments.gpx
include solamente le posizioni dei punti.
Nota
GPS units allow to store data in different coordinate systems. When downloading a GPX file (from your GPS unit or a web site) and then loading it in QGIS, be sure that the data stored in the GPX file uses WGS84 (latitude/longitude). QGIS expects this and it is the official GPX specification. See http://www.topografix.com/GPX/1/1/
Since QGIS uses GPX files you need a way to convert other GPS file formats to GPX. This can be done for many formats using the free program GPSBabel, which is available at http://www.gpsbabel.org. This program can also transfer GPS data between your computer and a GPS device. QGIS uses GPSBabel to do these things, so it is recommended that you install it. However, if you just want to load GPS data from GPX files you will not need it. Version 1.2.3 of GPSBabel is known to work with QGIS, but you should be able to use later versions without any problems.
Per importare dati GPS da un file che non ha l’estensione GPX, si utilizza lo strumento Importa altri file nella finestra Strumenti GPS. Qui è possibile selezionare il file (e il tipo di file), le caratteristiche che si desiderano importare dal file stesso., dove si desidera salvare il file GPX convertito e rinominare il nuovo layer che verrà generato. Da notare che alcuni formati di dati GPS non supportano tutte e tre le tipologie di dati, così per alcuni formati sarà opportuno scegliere tra uno o due tipologie di dati.
QGIS can use GPSBabel to download data from a GPS device directly as new vector layers. For this we use the Download from GPS tab of the GPS Tools dialog (see Figure_GPS_2). Here, we select the type of GPS device, the port that it is connected to (or usb if your GPS supports this), the feature type that you want to download, the GPX file where the data should be stored, and the name of the new layer.
Figure GPS 2:
GPSBabel comunica con il GPS in base al tipo di dispositivo che viene selezionato nel menu. Se nessuna delle opzioni disponibili è compatibile con il proprio dispositivo GPS è possibile creare un nuovo tipo (vedi sezione definisci-nuovo-dispositivo).
La porta potrebbe essere sia il nome del file o qualche altro nome che il sistema operativo del proprio computer riconosce come porta fisica alla quale è connesso il dispositivo GPS. Questo potrebbe essere semplicemente il nome di una porta usb, nel caso di dispositivi abilitati per l’usb.
When you click [OK] the data will be downloaded from the device and appear as a layer in QGIS.
You can also upload data directly from a vector layer in QGIS to a GPS device using the Upload to GPS tab of the GPS Tools dialog. To do this you simply select the layer that you want to upload (which must be a GPX layer), your GPS device type, and the port (or usb) that it is connected to. Just as with the download tool you can specify new device types if your device isn’t in the list.
This tool is very useful in combination with the vector editing capabilities of QGIS. It allows you to load a map, create waypoints and routes, and then upload them and use them on your GPS device.
There are lots of different types of GPS devices. The QGIS developers can’t test all of them, so if you have one that does not work with any of the device types listed in the Download from GPS and Upload to GPS tools you can define your own device type for it. You do this by using the GPS device editor, which you start by clicking the [Edit devices] button in the download or the upload tabs.
To define a new device you simply click the [New device] button,
enter a name, a download command and an upload command for your device, and
click the [Update device] button. The name will be listed in the
device menus in the upload and download windows, and can be any string. The
download command is the command that is used to download data from the device
to a GPX file. This will probably be a GPSBabel command, but you can use any
other command line program that can create a GPX file. QGIS will replace the
keywords %type
, %in
, and %out
when it runs the command.
%type
sarà interpretato come -w
se si stanno scaricando dei waypoints, -r
se si stanno scaricando delle routes e -t
se si stanno scaricando dei trcks. Questi sono dei comandi opzionali con i quali è possibile dire a GPSBabel quali tipologie di file GPS si deisdera scaricare.
%in
will be replaced by the port name that you choose in the download window
and %out
will be replaced by the name you choose for the GPX file that the
downloaded data should be stored in. So if you create a device type with the
download command gpsbabel %type -i garmin -o gpx %in %out
(this is actually
the download command for the predefined device type ‘Garmin serial’) and then
use it to download waypoints from port /dev/ttyS0
to the file output.gpx
,
QGIS will replace the keywords and run the command
gpsbabel -w -i garmin -o gpx /dev/ttyS0 output.gpx
.
Il comando di upload è il comando che viene utilizzato per caricare dati sul dispositivo. Vengono utilizzati i stessi tasti, ma %in
è utilizzato per indicare il nome del file GPX che contiene il layer in caricamento, e %out
viene sostituito dal nome della porta.
E’ possibile avere più informazioni su GPSBabel e sulle opzioni di comando disponibili al sito http://www.gpsbabel.org.
Una volta che è stato creato un nuovo dispositivo apparirà nel menù lista dei dispositivi sia nello strumento di downloads che nello strumento di upload.