Outdated version of the documentation. Find the latest one here.

.

Noțiuni de bază

Acest capitol oferă o privire de ansamblu rapidă asupra instalării QGIS, a descărcării unor date eșantion din pagina web QGIS și a rulării unei prime și simple sesiuni de vizualizare a straturilor raster și vectoriale.

Instalare

Instalarea QGIS este foarte simplă. Pentru MS Windows și Mac OS X sunt disponibile pachete de instalare standard. Pentru mai multe distribuții de pachete binare GNU/Linux (rpm si deb) există depozite software care pot fi adăugate la managerul de instalare. Cele mai recente informații cu privire la pachetele binare se pot obține de pe site-ul web QGIS la http://download.qgis.org.

Instalarea de la sursă

Dacă doriți să construiți QGIS din sursă, vă rugăm să consultați instrucțiunile de instalare. Acestea sunt distribuite alături decodul sursă QGIS într-un fișier numit:: INSTALL. Le puteți găsi, de asemenea, online la http://htmlpreview.github.io/?https://raw.github.com/qgis/QGIS/master/doc/INSTALL.html

Instalarea pe un suport extern

QGIS allows you to define a --configpath option that overrides the default path for user configuration (e.g., ~/.qgis2 under Linux) and forces QSettings to use this directory, too. This allows you to, for instance, carry a QGIS installation on a flash drive together with all plugins and settings. See section System Menu for additional information.

Date eșantion

Ghidul utilizatorului conține exemple bazate pe setul de date exemplu, al QGIS .

win The Windows installer has an option to download the QGIS sample dataset. If checked, the data will be downloaded to your My Documents folder and placed in a folder called GIS Database. You may use Windows Explorer to move this folder to any convenient location. If you did not select the checkbox to install the sample dataset during the initial QGIS installation, you may do one of the following:

  • Utilizați datele GIS pe care le aveți deja

  • Descărcați datele eșantion de la http://download.osgeo.org/qgis/data/qgis_sample_data.zip

  • Dezinstalați QGIS și reinstalați cu opțiunea de descărcare a datelor bifată (recomandat numai dacă soluțiile de mai sus nu au avut succes)

nix osx For GNU/Linux and Mac OS X, there are not yet dataset installation packages available as rpm, deb or dmg. To use the sample dataset, download the file qgis_sample_data as a ZIP archive from http://download.osgeo.org/qgis/data/qgis_sample_data.zip and unzip the archive on your system.

Setul de date Alaska cuprinde toate datele GIS care sunt utilizate pentru exemple și capturi de ecran în ghidul utilizatorului; include, de asemenea, o mică bază de date GRASS. Proiecția datelor eșantion pentru setul de date QGIS este Alaska Albers cu suprafețe egale cu picioare ca unități. Codul EPSG este 2964.

PROJCS["Albers Equal Area",
GEOGCS["NAD27",
DATUM["North_American_Datum_1927",
SPHEROID["Clarke 1866",6378206.4,294.978698213898,
AUTHORITY["EPSG","7008"]],
TOWGS84[-3,142,183,0,0,0,0],
AUTHORITY["EPSG","6267"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9108"]],
AUTHORITY["EPSG","4267"]],
PROJECTION["Albers_Conic_Equal_Area"],
PARAMETER["standard_parallel_1",55],
PARAMETER["standard_parallel_2",65],
PARAMETER["latitude_of_center",50],
PARAMETER["longitude_of_center",-154],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["us_survey_feet",0.3048006096012192]]

If you intend to use QGIS as a graphical front end for GRASS, you can find a selection of sample locations (e.g., Spearfish or South Dakota) at the official GRASS GIS website, http://grass.osgeo.org/download/sample-data/.

Sesiune de Probă

Now that you have QGIS installed and a sample dataset available, we would like to demonstrate a short and simple QGIS sample session. We will visualize a raster and a vector layer. We will use the landcover raster layer, qgis_sample_data/raster/landcover.img, and the lakes vector layer, qgis_sample_data/gml/lakes.gml.

Start QGIS

  • nix Start QGIS by typing “QGIS” at a command prompt, or if using a precompiled binary, by using the Applications menu.
  • win Lansați QGIS folosind meniul Start sau o scurtătură de pe ecran, sau printr-un dublu clic pe fișierul unui proiect QGIS.

  • osx Doblu clic pe pictograma din folderul Applications.

Încărcare straturi raster și vectoriale din setul de date eșantion

  1. Click on the mActionAddRasterLayer Load Raster icon.
  2. Browse to the folder qgis_sample_data/raster/, select the ERDAS IMG file landcover.img and click [Open].
  3. If the file is not listed, check if the Files of type selectstring combo box at the bottom of the dialog is set on the right type, in this case “Erdas Imagine Images (*.img, *.IMG)”.
  4. Now click on the mActionAddOgrLayer Load Vector icon.
  5. radiobuttonon File should be selected as Source Type in the new Add vector layer dialog. Now click [Browse] to select the vector layer.
  6. Browse to the folder qgis_sample_data/gml/, select ‘Geography Markup Language [GML] [OGR] (.gml,.GML)’ from the Files of type selectstring combo box, then select the GML file lakes.gml and click [Open]. In the Add vector layer dialog, click [OK]. The Coordinate Reference System Selector dialog opens with NAD27 / Alaska Alberts selected, click [OK].
  7. Măriți un pic zona cu lacuri pe care o preferați.

  8. Dublu clic pe stratul lakes din legenda hărții pentru a deschide fereastra de dialog Properties.

  9. Click on the Style tab and select a blue as fill color.
  10. Click on the Labels tab and check the checkbox Label this layer with checkbox to enable labeling. Choose the “NAMES” field as the field containing labels.
  11. To improve readability of labels, you can add a white buffer around them by clicking “Buffer” in the list on the left, checking checkbox Draw text buffer and choosing 3 as buffer size.
  12. Click [Apply]. Check if the result looks good, and finally click [OK].

You can see how easy it is to visualize raster and vector layers in QGIS. Let’s move on to the sections that follow to learn more about the available functionality, features and settings, and how to use them.

Pornirea and oprirea QGIS

In section Sesiune de Probă you already learned how to start QGIS. We will repeat this here, and you will see that QGIS also provides further command line options.

  • nix Assuming that QGIS is installed in the PATH, you can start QGIS by typing qgis at a command prompt or by double clicking on the QGIS application link (or shortcut) on the desktop or in the Applications menu.
  • win Lansați QGIS folosind meniul Start sau o scurtătură de pe ecran, sau printr-un dublu clic pe fișierul unui proiect QGIS.

  • osx Double click the icon in your Applications folder. If you need to start QGIS in a shell, run /path-to-installation-executable/Contents/MacOS/Qgis.

To stop QGIS, click the menu option nix win File osx QGIS ‣ Quit, or use the shortcut Ctrl+Q.

Opțiunile liniei de comandă

nix QGIS supports a number of options when started from the command line. To get a list of the options, enter qgis --help on the command line. The usage statement for QGIS is:

qgis --help
QGIS - 2.6.0-Brighton 'Brighton' (exported)
QGIS is a user friendly Open Source Geographic Information System.
Usage: /usr/bin/qgis.bin [OPTION] [FILE]
OPTION:
      [--snapshot filename]   emit snapshot of loaded datasets to given file
      [--width width] width of snapshot to emit
      [--height height]       height of snapshot to emit
      [--lang language]       use language for interface text
      [--project projectfile] load the given QGIS project
      [--extent xmin,ymin,xmax,ymax]  set initial map extent
      [--nologo]      hide splash screen
      [--noplugins]   don't restore plugins on startup
      [--nocustomization]     don't apply GUI customization
      [--customizationfile]   use the given ini file as GUI customization
      [--optionspath path]    use the given QSettings path
      [--configpath path]     use the given path for all user configuration
      [--code path]   run the given python file on load
      [--defaultui]   start by resetting user ui settings to default
      [--help]                this text

FILE:
  Files specified on the command line can include rasters,
  vectors, and QGIS project files (.qgs):
   1. Rasters - supported formats include GeoTiff, DEM
      and others supported by GDAL
   2. Vectors - supported formats include ESRI Shapefiles
      and others supported by OGR and PostgreSQL layers using
      the PostGIS extension

Tip

Exemplu de folosire a argumentelor în linia de comandă

You can start QGIS by specifying one or more data files on the command line. For example, assuming you are in the qgis_sample_data directory, you could start QGIS with a vector layer and a raster file set to load on startup using the following command: qgis ./raster/landcover.img ./gml/lakes.gml

Opțiunea liniei de comandă --snapshot

Această opțiune vă permite să creați o captură, în format PNG, a vizualizării curente. Acest lucru este foarte util atunci când aveți o mulțime de proiecte și doriți să generați capturi din datele proprii.

Currently, it generates a PNG file with 800x600 pixels. This can be adjusted using the --width and --height command line arguments. A filename can be added after --snapshot.

Opțiunea liniei de comandă --lang

Based on your locale, QGIS selects the correct localization. If you would like to change your language, you can specify a language code. For example, --lang=it starts QGIS in italian localization. A list of currently supported languages with language code and status is provided at http://hub.qgis.org/wiki/quantum-gis/GUI_Translation_Progress.

Opțiunea liniei de comandă --project

Starting QGIS with an existing project file is also possible. Just add the command line option --project followed by your project name and QGIS will open with all layers in the given file loaded.

Opțiunea liniei de comandă --extent

To start with a specific map extent use this option. You need to add the bounding box of your extent in the following order separated by a comma:

--extent xmin,ymin,xmax,ymax

Opțiunea liniei de comandă --nologo

This command line argument hides the splash screen when you start QGIS.

Opțiunea liniei de comandă --noplugins

If you have trouble at start-up with plugins, you can avoid loading them at start-up with this option. They will still be available from the Plugins Manager afterwards.

Opțiunea liniei de comandă --customizationfile

Using this command line argument, you can define a GUI customization file, that will be used at startup.

Opțiunea liniei de comandă --nocustomization

Using this command line argument, existing GUI customization will not be applied at startup.

Opțiunea liniei de comandă --optionspath

You can have multiple configurations and decide which one to use when starting QGIS with this option. See Options to confirm where the operating system saves the settings files. Presently, there is no way to specify a file to write settings to; therefore, you can create a copy of the original settings file and rename it. The option specifies path to directory with settings. For example, to use /path/to/config/QGIS/QGIS2.ini settings file, use option:

--optionspath /path/to/config/

Opțiunea liniei de comandă --configpath

This option is similar to the one above, but furthermore overrides the default path for user configuration (~/.qgis2) and forces QSettings to use this directory, too. This allows users to, for instance, carry a QGIS installation on a flash drive together with all plugins and settings.

Command line option --code

This option can be used to run a given python file directly after QGIS has started.

For example, when you have a python file named load_alaska.py with following content:

from qgis.utils import iface
raster_file = "/home/gisadmin/Documents/qgis_sample_data/raster/landcover.img"
layer_name = "Alaska"
iface.addRasterLayer(raster_file, layer_name)

Assuming you are in the directory where the file load_alaska.py is located, you can start QGIS, load the raster file landcover.img and give the layer the name ‘Alaska’ using the following command: qgis --code load_alaska.py

Proiecte

The state of your QGIS session is considered a project. QGIS works on one project at a time. Settings are considered as being either per-project or as a default for new projects (see section Options). QGIS can save the state of your workspace into a project file using the menu options Project ‣ mActionFileSave Save or Project ‣ mActionFileSaveAs Save As....

Load saved projects into a QGIS session using Project ‣ mActionFileOpen Open..., Project ‣ New from template or Project ‣ Open Recent ‣.

Dacă doriți să anulați sesiunea și să începeți de la zero, alegeți Project ‣ mActionFileNew New. Oricare dintre aceste opțiuni de meniu vă va solicita să salvați proiectul existent, în cazul în care au fost efectuate modificări de la momentul deschiderii lui sau de la momentul ultimei salvări.

Tipurile de informații salvate într-un fișier proiect includ:

  • Straturile adăugate

  • Layer properties, including symbolization
  • Proiecția pentru vizualizarea hărții

  • Ultima extindere vizualizată

The project file is saved in XML format, so it is possible to edit the file outside QGIS if you know what you are doing. The file format has been updated several times compared with earlier QGIS versions. Project files from older QGIS versions may not work properly anymore. To be made aware of this, in the General tab under Settings ‣ Options you can select:

  • checkbox :guilabel:`Se solicită salvarea modifcărilor din proiect și din sursa de date, atunci când este necesar

  • checkbox Avertizare la deschiderea unui fișier de proiect salvat cu o versiune de QGIS mai veche

Whenever you save a project in QGIS 2.2 now a backup of the project file is made.

Rezultat

There are several ways to generate output from your QGIS session. We have discussed one already in section Proiecte, saving as a project file. Here is a sampling of other ways to produce output files:

  • Menu option Project ‣ mActionSaveMapAsImage Save as Image opens a file dialog where you select the name, path and type of image (PNG or JPG format). A world file with extension PNGW or JPGW saved in the same folder georeferences the image.
  • Menu option Project ‣ DXF Export ... opens a dialog where you can define the ‘Symbology mode’, the ‘Symbology scale’ and vector layers you want to export to DXF.
  • Menu option Project ‣ mActionNewComposer New Print Composer opens a dialog where you can lay out and print the current map canvas (see section Print Composer).