Important

Translation is a community effort you can join. This page is currently translated at 45.60%.

14.6. Lesson: Crearea hărților detaliate folosind instrumentul Atlas

Proiectarea sistematică de eșantionare este gata, iar echipele de teren și-au încărcat coordonatele GPS în dispozitivele de navigare. Există, de asemenea, un formular pentru date, în care se vor colecta informațiile măsurate pentru fiecare schiță. Pentru a găsi mai ușor drumul spre fiecare parcelă, s-au solicitat o serie de hărți detaliate, în cazul în care unele informații din teren pot fi văzute în mod clar, împreună cu un subset mic de schițe și câteva informații despre zonă. Puteți utiliza instrumentul Atlas pentru a genera automat o serie de hărți, având un format comun.

Scopul acestei lecții: Aflați cum să utilizați instrumentul Atlas în QGIS, pentru a genera hărți tipăribile detaliate, în scopul sprijinirii activității de inventariere în teren.

14.6.1. basic Follow Along: Pregătirea Hărților pentru Tipărire

Înainte de a putea automatiza hărțile detaliate ale zonei forestiere și schițele noastre de eșantionare, trebuie să creăm un șablon cu toate elementele pe care le considerăm utile în munca de teren. Desigur, cea mai importantă va fi o stilizare corectă, dar, după cum ați văzut mai înainte, va trebui să adăugați și o mulțime de alte elemente care completează harta tipărită.

  1. Deschideți proiectul QGIS din lecția anterioară forest_inventory.qgs. Ar trebui să aveți cel puțin următoarele straturi:

    • forest_stands_2012 (cu o transparență de 50%, umplere verde și linii de margine de culoare verde mai închis)

    • systematic_plots_clip

    • rautjarvi_aerial

  2. Salvați proiectul sub un nume nou, map_creation.qgs.

To create a printable map, remember that you use the Layout Manager:

  1. Open Project ► layoutManager Layout Manager….

  2. In the Layout manager dialog:

    1. Under New from template, press the Create… button next to the Empty layout entry

    2. Name your print layout forest_map.

    3. Press OK. A new print layout is created and opened, showing a blank paper.

  3. In the print Layout window, ensure properties are set for an A4 paper:

    1. Right-click over the paper and select Page properties. The Page properties panel is open on the right side of the layout.

    2. Asigurați-vă că Dimensiunea este A4.

    3. Asigurați-vă că Orientarea este Peisaj.

  4. Enable the Layout tab next to the Page properties panel and set Export resolution to 300 dpi.

Composing a map is easier if you make use of the canvas grid to position the different elements. Review the settings for the layout grid:

  1. In the Layout tab expand the Guides and Grid region.

  2. Check that Grid spacing is set to 10 mm and that Snap tolerance is set to 5 px.

Trebuie să activați folosirea grilei:

  1. Deschideți meniul :menuselection:`Vizualizare

  2. Bifați Afișarea grilei.

  3. Bifați Acroșare la grilă.

  4. Notice that options for using Guides are checked by default, which allows you to see guiding lines when you are moving elements in the layout.

  5. Now you can start to add elements to your layout. Add first a map element so you can review how the map canvas looks as you will be making changes in the layers symbology:

    1. Click on the addMap Add Map button.

    2. Țineți apăsat butonul stâng al mouse-ului și trasați un dreptunghi în care să încadrați cea mai mare parte a hărții.

    ../../../_images/composer_1.png

Observați modul în care cursorul mouse-ului se acroșează la grila canevasului. Utilizați această funcție atunci când adăugați alte elemente. Dacă doriți să aveți mai multă acuratețe, schimbați setările de Spațiere ale grilei. Dacă dintr-un motiv oarecare nu mai doriți acroșarea la grilă la un moment dat, puteți întotdeauna bifa sau debifa meniul Vizualizare.

14.6.2. basic Follow Along: Adăugarea Fundalului Hărții

Leave the layout open but go back to the map. Let’s add some background data and create some styling so that the map content is as clear as possible.

  1. Add the background raster basic_map.tif that you can find in the exercise_data\forestry\ folder.

  2. If prompted select the ETRS89 / ETRS-TM35FIN CRS for the raster.

    După cum puteți vedea, harta de fundal este deja stilizată. Acest tip de raster cartografic gata de utilizare este foarte frecvent. El este creat din date vectoriale, stilizate într-un format standard și stocate ca un raster, așa că nu trebuie să vă îngrijoreze obținerea unui rezultat bun.

  3. Acum măriți schițele dvs., astfel încât să puteți vedea doar aproximativ patru sau cinci linii de parcele.

The current styling of the sample plots is not the best:

../../../_images/plots_zoom1-2.png

While during the last exercises, the white buffer was OK on top of the aerial image, now that the background image is mostly white you barely can see the labels. But how does it look in the print layout? Let’s check it:

  1. Go to the print layout window.

  2. Use the select Select/Move item button to select the map element in the layout.

  3. Mergeți la fila Proprietățile itemului tab.

  4. Click on setToCanvasExtent Set map extent to match main canvas extent.

  5. If you need to refresh the element, click on refresh Update map preview.

Obviously this is not good enough; you want to make the plot numbers as clearly visible as possible for the field teams.

14.6.3. basic Try Yourself Schimbarea Simbologiei Straturilor

Ați exersat simbologia cu Module: Crearea și Explorarea unei Hărți de Bază, și etichetarea cu Module: Clasificarea Datelor Vectoriale. Reveniți la aceste module dacă trebuie să vă reamintiți unele dintre opțiunile și instrumentele disponibile. Scopul dvs. este de a afișa locațiile loturilor și numele lor cât mai clar, dar întotdeauna să fie posibilă vizualizarea elementelor din fundalul hărții. Vă puteți orienta după această imagine:

../../../_images/plots_zoom2_symbology.png

You will use later the the green styling of the forest_stands_2012 layer. In order to keep it, and have a visualization of it that shows only the stand borders:

  1. Right click on forest_stands_2012 and select Duplicate

  2. Obțineți un nou strat numit forest_stands_2012 copy pe care îl puteți utiliza pentru a defini un stil diferit, de ex.: fără umplere și cu margini roșii.

    Acum aveți două vizualizări diferite ale parcelelor împădurite și puteți decide pe care să o afișați pentru harta dvs. detaliată.

  3. Go back to the print layout window often to see what the map would look like. For the purposes of creating detailed maps, you are looking for a symbology that looks good not at the scale of the whole forest area (left image below) but at a closer scale (right image below). Remember to use refresh Update map preview and setToCanvasExtent Set map extent to match main canvas extent whenever you change the zoom in your map or the layout.

    ../../../_images/composer_2-3.png

14.6.4. basic Try Yourself Crearea unui șabblon pentru Harta de Bază

  1. Once you have a symbology you are happy with, you are ready to add some more information to your printed map. Add at least the following elements:

    • Titlu.

    • O scară grafică.

    • Cadrul grilei pentru harta dvs.

    • Coordonate situate pe părțile laterale ale grilei.

  2. You have created a similar layout already in Module: Așezarea în pagină a Hărților. Go back to that module as you need. You can look at this example image for reference:

    ../../../_images/map_template1.png
  3. Exportați harta dvs. ca o imagine și priviți-o.

    1. Layout ► Export as Image….

    2. Use for example the JPG format.

Iată cum va arăta atunci la tipărire.

14.6.5. basic Follow Along: Adding More Elements to the Print Layout

Așa cum probabil ați observat în imaginea hărții șablon propusă, există o mulțime de loc în partea dreaptă a canevasului. Haideți să vedem ce altceva ar putea merge acolo. Pentru scopul hărții noastre, o legendă nu este cu adevărat necesară, dar o imagine de ansamblu a hărții și niște casete de text ar putea adăuga valoare hărții.

Harta de ansamblu va ajuta echipele de teren să plaseze harta detaliată în interiorul suprafeței generală a pădurii:

  1. Adăugați un alt element de hartă pe canevas, chiar sub textul din titlu.

  2. În fila Proprietăților elementului, deschideți caseta cu derulare verticală Overview.

  3. Puneți Overview frame pe Map 0. Acest lucru creează un dreptunghi umbrit deasupra hărții mici, care reprezintă extinderea vizibilă în harta mai mare.

  4. Check also the Frame option with a black color and a Thickness of 0.30.

../../../_images/more_elements1.png

Notice that your overview map is not really giving an overview of the forest area which is what you want. You want this map to represent the whole forest area and you want it to show only the background map and the forest_stands_2012 layer, and not display the sample plots. And also you want to lock its view so it does not change anymore whenever you change the visibility or order of the layers.

  1. Go back to the map, but don’t close the Print Layout.

  2. Right click the forest_stands_2012 layer and click on Zoom to Layer Extent.

  3. Dezactivați toate straturile, cu excepția basic_map și forest_stands_2012.

  4. Expand the Manage map themes tool on the Layers panel and select Add theme.

  5. Name it basic_overview.

  6. Go back to the print layout.

  7. With the small map selected, click the Set map extent to match main canvas extent to set its extents to what you can see in the map window.

  8. Lock the view for the overview map by checking Follow map theme and selecting basic_overview under Main properties.

Now your overview map is more what you expected and its view will not change anymore. But, of course, now your detail map is not showing anymore the stand borders nor the sample plots. Let’s fix that:

  1. Mergeți din nou la fereastra hărții și selectați straturile pe care le doriți să fie vizibile (systematic_plots_clip, forest_stands_2012 copy și Basic_map).

  2. Transfocați iarăși, pentru a avea vizibile doar câteva linii ale parcelelor.

  3. Go back to the Print Layout window.

  4. Select the bigger map in your layout.

  5. In Item properties click on Update preview and Set map extent to match main canvas extent.

Observați că numai harta mai mare afișează vizualizarea curentă a hărții, iar harta mai mică de ansamblu păstrează aceeași vedere pe care ați blocat-o.

Rețineți, de asemenea, că o vedere de ansamblu afișează un cadru umbrit pentru extinderea prezentată în harta detaliată.

../../../_images/more_elements2.png

Șablonul hărții dvs. este aproape gata. Adăugați în hartă cele două casete de text de mai jos, una conținând textul «Zona detaliată a hărții:», iar cealaltă «Observații:». Plasați-le așa cum se vede în imaginea de mai sus.

Puteți adăuga, de asemenea, o săgeată a Nordului la harta generală:

  1. Select the northArrow Add North Arrow tool.

  2. Click and drag a rectangle at the upper right corner of the overview map.

  3. In Item properties Check SVG image

  4. Browse SVG Browser ► SVG Groups for an arrow image.

  5. Under Image rotation, check the Sync with map and select Map 1 (the overview map).

  6. Redimensionați imaginea săgeții la o dimensiune care arată bine pe hărțile mici.

The basic map layout is ready, now you want to make use of the Atlas tool to generate as many detail maps in this format as you consider necessary.

14.6.6. basic Follow Along: Crearea unei Acoperiri de Atlas

Acoperirea Atlasului reprezintă doar un strat vectorial care va fi folosit pentru a genera hărțile detaliate, o hartă pentru fiecare entitate din aria de acoperire. Pentru a vă face o idee despre aceasta, iată un set complet de hărți detaliate pentru zona de pădure:

../../../_images/preview_atlas_results.png

Acoperirea poate fi orice strat existent, dar, de obicei, are mai mult sens crearea unuia în acest scop specific. Haideți să creăm o rețea de poligoane care acoperă zona de pădure:

  1. In the QGIS map view, open Vector ► Research Tools ► vectorGrid Create grid.

  2. Setați instrumentul așa cum se arată în această imagine:

    ../../../_images/coverage_polygons.png
  3. Salvați rezultatul ca atlas_coverage.shp.

  4. Style the new atlas_coverage layer so that the polygons have no filling.

Noile poligoane acoperă întreaga zonă de pădure și vă conferă o idee despre ceea ce va conține fiecare hartă (creată din fiecare poligon).

../../../_images/atlas_coverage.png

14.6.7. basic Follow Along: Configurarea Instrumentului Atlas

Ultimul pas este de a crea instrumentul Atlas:

  1. Go back to the print layout.

  2. În panoul din dreapta, mergeți la fila Atlas generation.

  3. Setați opțiunile după cum urmează:

    ../../../_images/atlas_settings.png

    That tells the Atlas tool to use the features (polygons) inside atlas_coverage as the focus for every detail map. It will output one map for every feature in the layer. The Hidden coverage layer tells the Atlas to not show the polygons in the output maps.

Mai trebuie să fie făcut un lucru. Trebuie să indicați Atlasului care element va fi actualizat pentru fiecare hartă de ieșire. Până acum, probabil că ați ghicit că harta care urmează a fi schimbată pentru fiecare entitate, este cea pe care ați pregătit-o să conțină vederile detaliate ale parcelelor eșantion, ea reprezentând elementul cel mai mare de pe canevas:

  1. Select the bigger map element (Map 0).

  2. Mergeți la fila Proprietățile itemului tab.

  3. În listă, bifați Controlat de atlas.

  4. And set the Marging around feature to 10%. The view extent will be 10% bigger than the polygons, which means that your detail maps will have a 10% overlap.

    ../../../_images/controlled_by_atlas.png

Acum puteți utiliza instrumentul de vizualizare pentru Atlas, pentru a revizui ceea ce vor arăta hărțile:

  1. Activați previzualizarea Atlasului folosind butonul atlas sau, în cazul în care bara de instrumente nu este vizibilă, via Atlas ► Previzualizare Atlas.

  2. Puteți folosi săgețile din bara de instrumente a Atlasului, sau din meniul Atlas, pentru a vă deplasa printre hărțile care vor fi create.

Note that some of them cover areas that are not interesting. Let’s do something about it and save some trees by not printing those useless maps.

14.6.8. basic Follow Along: Editarea Stratului de Acoperire

Pe lângă eliminarea poligoanelor pentru acele zone care nu sunt interesante, puteți personaliza, de asemenea, etichetele din harta dvs., prin generarea conținutului acestora din Tabela de atribute a stratului de acoperire.

  1. Mergeți înapoi la vizualizarea hărții.

  2. Enable editing for the atlas_coverage layer.

  3. Selectați poligoanele care sunt evidențiate (în galben) în imaginea de mai jos.

  4. Eliminați poligoanele selectate.

  5. Dezactivați editarea și salvați modificările.

../../../_images/remove_polygons.png

You can go back to the print layout and check that the previews of the Atlas use only the polygons you left in the layer.

Stratul de acoperire pe care îl utilizați, încă nu conține informații utile, pe care să le puteți folosi la personalizarea conținutului etichetelor din hartă. Primul pas este de a le crea; în acest scop puteți adăuga, de exemplu, un cod de zonă pentru zonele poligonale, și un câmp cu câteva observații pe care să le aibă în vedere echipele din teren:

  1. Open the Attribute table for the atlas_coverage layer.

  2. Activează editarea.

  3. Folosiți calculatorul calculateField pentru a crea și popula următoarele două câmpuri.

  4. Create a field named Zone of type Whole number (integer).

  5. In the Expression box write/copy/construct $rownum.

  6. Create another field named Remarks, of type Text (string) and a width of 255.

  7. In the Expression box write 'No remarks.'. This will set all the default value for all the polygons.

The forest manager will have some information about the area that might be useful when visiting the area. For example, the existence of a bridge, a swamp or the location of a protected species. The atlas_coverage layer is probably in edit mode still, add the following text in the Remarks field to the corresponding polygons (double click the cell to edit it):

  • For the Zone 2: Bridge to the North of plot 19. Siberian squirrel between p_13 and p_14.

  • For the Zone 6: Difficult to transit in swamp to the North of the lake.`

  • For the Zone 7: Siberian squirrel to the South East of p_94.

  • Dezactivează editarea și salvează modificările.

Almost ready, now you have to tell the Atlas tool that you want some of the text labels to use the information from the atlas_coverage layer’s attribute table.

  1. Go back to the Print Layout.

  2. Select the text label containing Detailed map....

  3. Setați dimensiunea Fontului la 12.

  4. Duceți cursorul la sfârșitul textului din etichetă.

  5. In the Item properties tab, inside the Main properties click on Insert or Edit an Expression….

  6. In the Function list double-click on the field Zone under Field and Values.

  7. Clic pe OK

  8. The text inside the box in the Item properties should show Detail map inventory zone: [% "Zone" %]. Note that the [% "Zone" %] will be substituted by the value of the field Zone for the corresponding feature from the layer atlas_coverage.

  9. Testați conținutul etichetei, prin vizualizarea unor diferite hărți din Atlas.

  10. Do the same for the labels with the text Remarks: using the field with the zone information. You can leave a break line before you enter the expression. You can see the result for the preview of zone 2 in the image below:

    ../../../_images/preview_zone2.png
  11. Utilizați previzualizarea din Atlas pentru a naviga prin toate hărțile care vor fi create în curând!

14.6.9. basic Follow Along: Tipărirea Hărților

Nu în ultimul rând, imprimați sau exportați hărțile în fișiere imagine sau PDF. Aveți posibilitatea să utilizați Atlas ► Export Atlas as Images… sau Atlas ► Export Atlas as PDF…. În prezent, formatul de export SVG nu funcționează în mod corespunzător și va da un rezultat slab.

Haideți să exportăm hărțile într-un singur PDF pe care îl puteți trimite la biroul teritorial pentru imprimare:

  1. Mergeți la fila Atlas generation, în panoul din dreapta.

  2. Sub Output bifați Single file export when possible. Acest lucru va pune toate hărțile împreună într-un fișier PDF; în cazul în care această opțiune nu este bifată, veți obtine câte un fișier pentru fiecare hartă.

  3. Open Layout ► Export as PDF….

  4. Save the PDF file as inventory_2012_maps.pdf in your exercise_data\forestry\samplig\map_creation\ folder.

  5. Deschideți fișierul PDF pentru a verifica dacă totul a mers cum era de așteptat.

  6. Puteți crea la fel de ușor imagini separate pentru fiecare hartă (amintiți-vă să debifați crearea unui singur fișier), unde puteți vedea miniaturile imaginilor care vor fi create:

    ../../../_images/maps_as_images.png
  7. In the Print Layout, press fileSave Save in order to save your print layout changes in the project. This also saves the project file. You can reopen the project at any time and run or edit the atlas.

    It is also possible to save your map as a layout template as forestry_atlas.qpt in your exercise_data\forestry\map_creation\ folder. Use Layout ► Save as Template. You will be able to use this template again and again in other projects.

  8. Close the Print Layout and the project.

14.6.10. In Conclusion

Ați reușit să creați o hartă șablon, care poate fi folosită pentru a genera automat hărți detaliate, în scopul ușurării utilizării în teren. După cum ați observat, acest lucru nu a fost o sarcină ușoară, dar beneficiul va veni atunci când va trebui să creați hărți similare pentru alte regiuni, unde puteți utiliza șablonul pe care tocmai l-ați salvat.

14.6.11. What’s Next?

In the next lesson, you will see how you can use LiDAR data to create a DEM and then use it to enhance your data and maps visibility.