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

8.1. Lesson: Lucrul cu Datele Raster

Datele raster sunt foarte diferite de datele vectoriale. Datele vectoriale au entități discrete construite din vertecși, uneori conectați cu linii și/sau cu zone. Datele raster, în schimb, sunt similare imaginilor. Deși pot prezenta diverse proprietăți despre obiectele din lumea reală, în datele raster nu întâlnim obiecte separate; mai degrabă, acestea sunt reprezentate folosind pixeli de diferite valori, corespunzătoare unor culori diverse.

În timpul acestui modul veți utiliza datele raster pentru a suplimenta analiza GIS existentă.

Scopul acestei lecții: De a afla cum se poate lucra cu datele raster în mediul QGIS.

8.1.1. basic Follow Along: Încărcarea Datelor Raster

  • Open your analysis.qgs map (which you should have created and saved during the previous module).

  • Dezactivați toate straturile, cu excepția straturilor solution și important_roads.

  • Clic pe butonul Încărcare Strat Raster:


The Load Raster Layer dialog will open. The data for this project is in exercise_data/raster.

  • Either load them all in separately, or hold down ctrl and click on all four of them in turn, then open them at the same time.

The first thing you’ll notice is that nothing seems to be happening in your map. Are the rasters not loading? Well, there they are in the Layers list, so obviously they did load. The problem is that they’re not in the same projection. Luckily, we’ve already seen what to do in this situation.

  • Selectați Project –> Project Properties din meniu:

  • Selectați fila CRS, din meniu:

  • Activați reproiectarea “din zbor”.

  • Setați-l la aceeași proiecție ca și restul datelor dvs. (WGS 84 / UTM zone 33S).

  • Clic pe OK

Rasterele ar trebui să se potrivească bine:


Le avem aici - patru fotografii aeriene care acoperă zona întregului nostru studiu.

8.1.2. basic Follow Along: Crearea unui Raster Virtual

Now as you can see from this, your solution layer lies across all four photographs. What this means is that you’re going to have to work with four rasters all the time. That’s not ideal; it would be better to have one file for one (composite) image, right?

Luckily, QGIS allows you to do exactly this, and without needing to actually create a new raster file, which could take up a lot of space. Instead, you can create a Virtual Raster. This is also often called a Catalog, which explains its function. It’s not really a new raster. Rather, it’s a way to organize your existing rasters into one catalog: one file for easy access.

Pentru a face un catalog:

  • Faceți clic pe elementul de meniu Raster ‣ Miscellaneous ‣ Build Virtual Raster (Catalog).

  • In the dialog that appears, check the box next to Use visible raster layers for input.
  • Introduceți exercise_data/residential_development ca locație de ieșire.

  • Introduceți aerial_photos.vrt ca nume de fișier.

  • Bifaţi caseta Încărcare în canevas după finalizare.

Notice the text field below. What this dialog is actually doing is that it’s writing that text for you. It’s a long command that QGIS is going to run.


hard Keep in mind that the command text is editable, so you can customize the command further if preferred. Search online for the initial command (in this case, gdalbuildvrt) for help on the syntax.

  • Clic pe OK, pentru a rula comanda.


Este posibil să dureze un timp pentru a finaliza. Când este gata, acest lucru va fi indicat de o casetă de mesaje.

  • Clic pe OK, pentru a îndepărta mesajul.

  • Click Close on the Build Virtual Raster (Catalog) dialog. (Don’t click OK again, otherwise it’s going to start running that command again.)
  • Acum puteți elimina cele patru straturi originale din Lista straturillor.

  • If necessary, click and drag the new aerial_photos raster catalog layer to the bottom of the Layers list so that the other activated layers become visible.

8.1.3. hard Transformarea Datelot Raster

The above methods allow you to virtually merge datasets using a catalog, and to reproject them “on the fly”. However, if you are setting up data that you’ll be using for quite a while, it may be more efficient to create new rasters that are already merged and reprojected. This improves performance while using the rasters in a map, but it may take some time to set up initially. Reproiectare rasterelor

  • Faceți clic pe elementul de meniu Raster ‣ Projections ‣ Warp (Reproject).

Note that this tool features a handy batch option for reprojecting the contents of whole directories. You can also reproject virtual rasters (catalogs), as well as enabling a multithreaded processing mode.

../../../_images/warp_rasters.png Îmbinarea rastererelor

  • Faceți clic pe elementul de meniu Raster ‣ Miscellaneous ‣ Merge.

You can choose to process entire directories instead of single files, giving you a very useful built-in batch processing capability. You can specify a virtual raster as input file, too, and all of the rasters that it consists of will be processed.

You can also add your own command line options using the Creation Options checkbox and list. This only applies if you have knowledge of the GDAL library’s operation.


8.1.4. In Conclusion

QGIS face mai ușoară includerea datelor raster în proiectele existente.

8.1.5. What’s Next?

Next, we’ll use raster data that isn’t aerial imagery, and see how symbolization is useful in the case of rasters as well.