Svarbu

Vertimas yra bendruomenės pastangos jūs galite prisijungti. Šis puslapis šiuo metu išverstas 54.51%.

12. Bendri įrankiai

12.1. Kontekstinė pagalba

Kai jums reikia pagalbos konkrečia tema, jūs galite žiūrėti atitinkamą Naudotojo vadovo puslapį per mygtuką Pagalba, kurį rasite daugumoje dialogų — prašome pastebėti, kad trečiųjų šalių priedai gali nukreipti jus į savo svetainių puslapius.

12.2. Skydeliai

Pagal nutylėjimą QGIS darbui teikia daug skydelių. Kai kurie iš jų aprašomi žemiau, o kitus galima rasti kitose dokumentacijos dalyse. Pilną QGIS teikiamų numatytųjų skydelių sąrašą galima rasti meniu Vaizdas ► Skydeliai ► ir rasti juos paminėtus skyriuje Skydeliai.

12.2.1. Sluoksnių skydelis

Skydelyje Sluoksniai (dar žinomame kaip žemėlapio legenda) yra visų projekto sluoksnių sąrašas ir jis padeda jums valdyti jų matomumą bei žemėlapio išvaizdą. Jūs galite įjungti ir išjungti šį skydelį spausdami Ctrl+1.

QGIS provides a variety of ways to add layers to a project:

  • using the Add button from the dedicated data provider tab in the Data source manager dialog

  • from QGIS Browser panel or DB Manager: double-click, drag-and-drop files and layers onto QGIS or use the contextual menu

  • drag-and-drop files from the Operating System files explorer onto QGIS

In all these scenarios, you can open one or many layers at a time. New layers are added to the Layers panel:

  1. if dropped over the Layers panel, at the exact location they are released

  2. in the other cases, at a location that respects the global behavior used when adding new layers setting

  3. and in case of multiple layers, they are sorted in a way that increases the chance of their stacking being logical and features being visible as most as possible, using the following logic (top to bottom):

    • vector point layers

    • vector line layers

    • vector polygon layers

    • point cloud layers

    • mesh layers

    • raster layers

Įrankinė Sluoksnių skydelio viršuje leidžia jums:

  • symbology Atverti sluoksnių stilių skydelį (F7): įjungti ir išjungti Sluoksnių stiliaus skydelį.

  • addGroup Pridėti naują grupę: žr. Sąveika su grupėmis ir sluoksniais

  • showPresets Valdyti žemėlapio temas: valdyti sluoksnių matomumą ir tvarkyti juos skirtingose žemėlapio temose.

  • filterMap filtruoti sluoksnius legendos medyje:

    • Filtruoti legendą pagal žemėlapio turinį: sluoksnių skydelyje rodomi tik sluoksniai, kurie yra nurodyti kaip matomi, ir kurių geoobjektai kerta dabartinę žemėlapio drobę. Priešingu atveju sluoksniui taikomas bendras NULL simbolis. Priklausomai nuo sluoksnio simbologijos tai yra patogus būdas identifikuoti, kurio sluoksnio geoobjektai yra jūsų dominančioje zonoje.

    • Rodyti privačius sluoksnius: patogus būdas rodyti ir sąveikauti su privačiais sluoksniais skydelyje Sluoksniai nekeičiant projekto nustatymų.

  • expressionFilter Filtruoti legendą pagal išraišką: pritaikyti išraišką, kad iš pažymėtų sluoksnių medžio būtų išimti stiliai, kurie neturi geoobjektų, tenkinančių sąlygą. Tai galima naudoti paryškinti geoobjektus, kurie yra kito sluoksnio ploto/geoobjekto viduje. Iškrentančiame sąraše jūs galite keisti ar išvalyti šiuo metu taikomą išraišką.

  • expandTree Išskleisti viską ar collapseTree Sutraukti viską - išskleidžia ar sutraukia sluoksnius ir grupes sluoksnių skydelyje.

  • removeLayer Išimti sluoksnių grupę, kuri šiuo metu pažymėta.

../../../_images/layer_toolbar.png

Fig. 12.1 Sluoksnių skydelio sluoksnių įrankinė

Pastaba

Įrankiai sluoksnių skydelio valdymui taipogi veikia ir žemėlapiui bei legendos elementams spausdinimo išdėstymuose

12.2.1.1. Žemėlapio temų konfigūravimas

Iškrentantis mygtukas showPresets Tvarkyti žemėlapio temas leidžia greitai ir patogiai valdyti sluoksnių matomumą skydelyje Sluoksniai:

  • showAllLayers Rodyti visus sluoksnius

  • hideAllLayers Slėpti visus sluoksnius

  • showSelectedLayers Rodyti pažymėtus sluoksnius

  • hideSelectedLayers Slėpti pažymėtus sluoksnius

  • toggleSelectedLayers Perjungti pažymėtus sluoksnius: keičia pirmo skydelyje pažymėto sluoksnio matomumą ir taiko tą būseną visiems kitiems pažymėtiems sluoksniams. Taipogi pasiekiamas naudojant klavišą Tarpas.

  • Perjungti pažymėtus sluoksnius nepriklausomai: keičia kiekvieno pažymėto sluoksnio matomumo būseną

  • hideDeselectedLayers Slėpti nepažymėtus sluoksnius

Be paprasto sluoksnių matomumo valdymo, meniu Tvarkyti žemėlapio temas leidžia jums konfigūruoti Žemėlapio temas legendoje ir persijungti iš vienos žemėlapio temos į kitą. Žemėlapio tema yra dabartinės žemėlapių legendos nuotrauka, kuri atsimena:

  • sluoksnius, kurie pažymėti kaip matomi skydelyje Sluoksniai

  • ir kiekvienam matomam sluoksniui:

    • nuorodą į stilių, kuris pritaikytas kiekvienam sluoksniui

    • matomos stiliaus klasės, t.y. Sluoksnio skydelyje įjungti elementai. Tai taikoma simbologijoms, kitokioms nei vieno simbolio braižymas

    • sluoksnio elementų ir vidinių grupių suskleidimo/išskleidimo būsena

Norėdami sukurti žemėlapio temą:

  1. Įjunkite sluoksnį, kurį norite rodyti

  2. Įprastai sukonfigūruokite sluoksnio savybes (simbologiją, diagramas, užrašus…)

  3. Išplėskite meniu apačioje Stilius ► ir spauskite Pridėti…, kad įrašytumėte nustatymus kaip naują projekte įdėtą stilių

    Pastaba

    Žemėlapio tema neatsimena dabartinių savybių detalių: įrašoma tik nuoroda į stiliaus pavadinimą, taigi kai keičiate įjungtą sluoksnį (pvz. keičiate simbologijos braižymą), informacija atnaujinama žemėlapio temoje.

  4. Kartokite ankstesnius žingsnius tiek kiek reikia kitiems sluoksniams

  5. Jei reikia, išplėskite ar suskleiskite grupes ar matomų sluoksnių elementus skydelyje Sluoksniai

  6. Spauskite mygtuką showPresets Tvarkyti žemėlapio temas skydelio viršuje ir tada Pridėti temą…

  7. Įveskite žemėlapio temos pavadinimą ir spauskite Gerai

Nauja tema rodoma apatinėje iškrentančio meniu showPresets drop-down dalyje.

Galite kurti tiek žemėlapio temų, kiek reikia: kai tik dabartinė žemėlapio legendos kombinacija (matomi sluoksniai, jų aktyvumo būsena, žemėlapio legendos elementai) neatitinka esamos temos turinio, kaip nurodyta viršuje, spauskite Pridėti temą…, kad sukurtumėte naują žemėlapio temą, arba naudokite Keisti temą ►, kad pakeistumėte esamą žemėlapio temą. Galite pervadinti aktyvią žemėlapio temą naudodami Pervadinti dabartinę temą… arba naudokite mygtuką Išimti dabartinę temą, jei norite ją ištrinti.

Žemėlapio temos padeda greitai persijungti tarp skirtingų iš anksto sukonfigūruotų kombinacijų: parinkite žemėlapio temą sąraše, kad atstatytumėte jos kombinaciją. Visos sukonfigūruotos temos taipogi prieinamos ir spausdinimo išdėstymuose, kur jūs galite sukurti skirtingus žemėlapio elementus pagal konkrečias temas, nepriklausomai nuo to, kas braižoma dabartinėje pagrindinėje drobėje (žr. Žemėlapio elementų sluoksniai).

12.2.1.2. Sluoksnių skydelio kontekstinio meniu apžvalga

Po įrankine yra pagrindinis Sluoksnių skydelio komponentas - sąrašas visų į projektą pridėtų sluoksnių, pasirinktinai sudėliotas į grupes. Sluoksnis su įjungta greta jo esančia varnele rodo savo turinį žemėlapio drobės apimtyje, nebent nustatytas nuo mastelio priklausantis matomumas. Sluoksnį galima pažymėti ir tempti aukštyn ar žemyn legendoje, norint pakeisti jo Z-rikiuotę. Z-rikiuotė reiškia, kad aukščiau išvardinti sluoksniai braižomi virš sluoksnių, išvardintu legendos apačioje. Taipogi sluoksnį ar sluoksnių grupę galima tempti iš vieno QGIS egzemplioriaus į kitą.

Pastaba

Z-rikiuotės elgseną galima keisti skydelyje Sluoksnių rikiuotė.

Priklausomai nuo skydelyje pažymėto elemento, dešinysis paspaudimas rodo žemiau pateiktą parinkčių sąrašą.

Table 12.1 Sluoksnių skydelio kontekstinio meniu elementai

Parinktis

Grupė

Vektorinis sluoksnis

Rastro sluoksnis

Tinklelio sluoksnis

Taškų debesies sluoksnis

3D Layer

zoomToLayer Didinti iki sluoksnio/grupės

checkbox

checkbox

checkbox

checkbox

checkbox

checkbox

zoomToLayer Didinti iki pažymėjimo

checkbox

inOverview Rodyti peržiūroje

checkbox

checkbox

checkbox

checkbox

checkbox

Rodyti objektų skaičių

checkbox

labelingSingle Rodyti užrašą

checkbox

Kopijuoti sluoksnį/grupę

checkbox

checkbox

checkbox

checkbox

checkbox

checkbox

Pervadinti sluoksnį/grupę

checkbox

checkbox

checkbox

checkbox

checkbox

checkbox

zoomActual Didinti iki savos rezoliucijos (100%)

checkbox

Tempti naudojant dabartinį plotą

checkbox

dbManager Atnaujinti SQL sluoksnį…

checkbox

addVirtualLayer Keisti virtualų sluoksnį…

checkbox

addGroup Pridėti grupę

checkbox

duplicateLayer Dubliuoti sluoksnį

checkbox

checkbox

checkbox

checkbox

checkbox

removeLayer Išimti sluoksnį/grupę…

checkbox

checkbox

checkbox

checkbox

checkbox

checkbox

Išimti iš grupės

checkbox

checkbox

checkbox

checkbox

Perkelti į viršų

checkbox

checkbox

checkbox

checkbox

checkbox

Perkelti į apačią

checkbox

checkbox

checkbox

checkbox

checkbox

Įjungti su visais tėvais

checkbox

checkbox

checkbox

checkbox

Grupuoti pažymėtus

checkbox

checkbox

checkbox

checkbox

openTable Atverti atributų lentelę

checkbox

toggleEditing Perjungti redagavimą

checkbox

checkbox

allEdits Dabartiniai keitimai ►

checkbox

checkbox

Filtras…

checkbox

checkbox

checkbox

Keisti duomenų šaltinį…

checkbox

checkbox

checkbox

checkbox

Taisyti duomenų šaltinį…

checkbox

checkbox

checkbox

checkbox

Veiksmai su pažymėjimais ► (redagavimo režime)

checkbox

► Dubliuoti geoobjektą

checkbox

► Dubliuoti geoobjektą ir skaitmeninti

checkbox

Nustatyti sluoksnio mastelio matomumą…

checkbox

checkbox

checkbox

checkbox

checkbox

Didinti iki matomo mastelio

checkbox

checkbox

checkbox

checkbox

Sluoksnio CRS ►

checkbox

checkbox

checkbox

checkbox

checkbox

► Nustatyti projekto CRS iš sluoksnio

checkbox

checkbox

checkbox

checkbox

checkbox

► Nustatyti į.. (paskutiniai CRS)

checkbox

checkbox

checkbox

► Nustatyti sluoksnio CRS…

checkbox

checkbox

checkbox

checkbox

checkbox

Nustatyti grupės CRS…

checkbox

Nustatyti grupės WMS duomenis…

checkbox

unchecked Viena kitą išjungianti grupė

checkbox

Įjungti su visais vaikais (Ctrl-paspaudimas)

checkbox

Išjungti su visais vaikais (Ctrl-paspaudimas)

checkbox

Daryti pastoviu

checkbox

Eksportuoti ►

checkbox

checkbox

checkbox

checkbox

checkbox

checkbox

► Įrašyti kaip…

checkbox

► Įrašyti geoobjektus kaip…

checkbox

► Įrašyti pažymėtus geoobjektus kaip…

checkbox

► Įrašyti kaip sluoksnio apibrėžimo failą…

checkbox

checkbox

checkbox

checkbox

checkbox

checkbox

► Įrašyti kaip QGIS sluoksnio stiliaus failą…

checkbox

checkbox

checkbox

checkbox

checkbox

Stiliai ►

checkbox

checkbox

checkbox

checkbox

checkbox

► Kopijuoti stilių

checkbox

checkbox

checkbox

checkbox

checkbox

► Įkelti stilių

checkbox

checkbox

checkbox

checkbox

checkbox

► Pridėti…

checkbox

checkbox

checkbox

checkbox

checkbox

► Pervadinti dabartinį…

checkbox

checkbox

checkbox

checkbox

checkbox

► Keisti stimbolį…

checkbox

► Kopijuoti simbolį

checkbox

► Įkelti simbolį

checkbox

Pridėti sluoksnio pastabas…

checkbox

checkbox

checkbox

checkbox

checkbox

Keisti sluoksnio pastabas…

checkbox

checkbox

checkbox

checkbox

Išimti sluoksnio pastabas

checkbox

checkbox

checkbox

checkbox

Savybės…

checkbox

checkbox

checkbox

checkbox

checkbox

GRASS vektoriniams sluoksniams negalimas toggleEditing Perjungti redagavimą. Daugiau informacijos apie GRASS vektorinių sluoksnių redagavimą rasite skyriuje Digitizing and editing a GRASS vector layer.

12.2.1.3. Sąveika su grupėmis ir sluoksniais

Sluoksnius legendų lange galima organizuoti į grupes. Yra keli būdai, kaip tai galima padaryti:

  1. Spauskite folder piktogramą, kad pridėtumėte naują grupę. Įrašykite grupės pavadinimą ir spauskite Enter. Dabar spauskite esamą sluoksnį ir įtempkite jį į grupę.

  2. Parinkite daugiau nei vieną sluoksnį, spauskite piktogramą folder. Parinkti sluoksniai automatiškai įterpiami į naują grupę.

  3. Parinkite kelis sluoksnius, spauskite dešinį pelės mygtuką legendos lange ir parinkite Grupuoti pažymėtus. Pažymėti sluoksniai bus automatiškai įdėti į naują grupę.

Jei norite iškelti sluoksnį iš grupės, ištempkite jį arba spauskite ant jo dešinį mygtuką ir pasirinkite Iškelti iš grupės: sluoksnis bus iškeltas iš grupės ir padėtas virš jos. Grupes taipogi galima įdėti į kitas grupes. Jei sluoksnis yra tokioje kelių lygmenų grupėje, Iškelti iš grupės iškels sluoksnį iš visų grupių.

Jei norite perkelti grupę ar sluoksnį į sluoksnių skydelio viršų, arba pertempkite jį į viršų, arba pasirinkite Perkelti aukštyn. Jei šią parinktį naudosite sluoksniui grupėje, sluoksnis bus perkeltas į dabartinės grupės viršų. Parinktis Perkelti žemyn turi tą pačią logiką, tik perkelia sluoksnius ir grupes žemyn.

Grupės varnelė vienu paspaudimu parodys arba paslėps grupėje esančius sluoksnius. Laikant Ctrl varnelė taipogi įjungs ar išjungs visus sluoksnius grupėje ir pogrupiuose.

Ctrl-paspaudimas ant įjungto / išjungto sluoksnio išjungs / įjungs sluoksnį ir visus jo tėvus.

Įjungus parinktį Viena kitą išjungianti grupė, jūs grupėje vienu metu galite įjungti tik vieną sluoksnį. Kai tik tokios grupės sluoksnis įjungiamas, visi kiti sluoksniai yra išjungiami.

Galima tuo pačiu metu parinkti daugiau nei vieną sluoksnį ar grupę laikant mygtuką Ctrl ir spaudžiant ant papildomų sluoksnių. Jūs tada galite perkelti visus pažymėtus sluoksnius į naują grupę vienu metu.

Jūs taipogi galite vienu metu ištrinti daugiau nei vieną sluoksnį ar grupę, pažymint kelis elementus su Ctrl klavišu ir tada spaudžiant Ctrl+D: visi pažymėti sluoksniai ar grupės bus išimti iš sluoksnių sąrašo.

Daugiau informacijos apie sluoksnius ir grupes naudojant indikatoriaus pikogramą

Kai kuriais atvejais, sluoksnių ar grupių formatavimas ar greta skydelyje Sluoksniai greta esančios piktogramos duoda daugiau informacijos apie sluoksnį/grupę. Šie elementai yra:

  • toggleEditing rodo, kad sluoksnis yra redagavimo režime ir jūs galite keisti duomenis

  • editableEdits rodo, kad sluoksnis yra redaguojamas ir yra neįrašytų pakeitimų

  • indicatorFilter rodo, kad sluoksniui taikomas filtras. Užveskite pelę virš piktogramos, kad pamatytumėte filtro išraišką, spauskite du kartus, jei norite pakeisti užklausą

  • indicatorNonRemovable rodo, kad sluoksniai šiame projekte yra privalomi, todėl jų negalima išimti

  • indicatorEmbedded identifikuoja įdėtą grupę ar sluoksnį ir kelią iki jų originalaus projekto failo

  • indicatorBadLayer identifikuoja sluoksnį, kurio duomenų šaltinis buvo neprieinamas projekto atidarymo metu (žr. Neteisingų kelių iki failų tvarkymas). Spauskite piktogramą, kad atnaujintumėte šaltinio kelią arba sluoksnio kontekstiniame meniu parinkite Taisyti duomenų šaltinį….

  • indicatorMemory primena jums, kad sluoksnis yra laikinas juodraštinis sluoksnis ir jo turinys bus išmestas, kai jūs uždarysite šį projektą. Kad išvengtumėte duomenų praradimo, paverskite sluoksnį pastoviu paspausdami piktogramą, kad įrašytumėte sluoksnį į bet kokį GDAL vektorinį formatą, palaikomą QGIS.

  • indicatorOffline identifikuoja sluoksnį, kuris naudojamas esantis redagavimo režimas neprisijungus.

  • indicatorNoCRS identifikuoja sluoksnį, kuris neturi ar turi nežinomą CRS

  • indicatorLowAccuracy sluoksniai su koordinatėmis, laikomomis koordinačių atskaitos sistemoje, kuri iš principo turi žemą tikslumą (reikia, kad būtų įjungta atitinkama nuostata)

  • indicatorTemporal identifikuoja sluoksnį su laiku, valdoma drobės animacijos

  • indicatorNotes identifikuoja sluoksnį, kuris turi susijusias pastabas

  • Pilkas pavadinimas, kai žemėlapio drobės mastelis nepatenka į sluoksnio matomų mastelių diapazoną (nustatoma Braižymo savybėse). Spauskite kontekstinio meniu parinktį Didinti iki matomo mastelio, kad pakeistumėte žemėlapio mastelį iki artimiausio mastelio, kuriame sluoksnis bus matomas.

Sluoksnių braižymo kontrolė naudojant grupavimą

Grupės - tai būdas struktūrizuoti sluoksnius projekto medyje, bet jos taipogi gali įtakoti kaip braižomas jų turinys - kaip vienas objektas braižymo metu.

Tokio braižymo parinktis galima skydelyje Sluoksnio stilius, kai parinkta grupė. Kortelėje symbology Simbologija įjunkite checkbox Braižyti sluoksnius kaip grupę, kad įjungtumėte keletą parinkčių, kurios valdo bendrą vaikinių sluoksnių išvaizdą, vietoj atskirų sluoksnių:

  • Nepermatomumas: Vaikinių sluoksnių geoobjektai, kuriuos dengia kitas vaikinis sluoksnis liks uždengti, nepermatomumas taikomas tik „visai grupei“.

    ../../../_images/group_opacity.png

    Fig. 12.2 Nepermatomumas nurodytas sluoksniams ir grupei

    Piešinukas kairėje rodo du sluoksnius, kurie braižomi su 50% nepermatomumu (matomi ir žemiau esantys geoobjektai, bet pusiau uždengti 50% raudono geoobjekto viršuje). Antrame paveiksliuke matomas rezultatas, kai nepermatomumas nurodytas grupei (žemiau esančio mėlyno geoobjekto dalys yra pilnai uždengtos virš jo esančio raudono sluoksnio, o gautas rezultatas braižomas su 50% nepermatomumu).

  • Suliejimo režimai: Kaip ir nepermatomumas, suliejimo režimo nustatymas (pvz. daugybos, perdengimo, …) visai grupei reiškia, kad iš pradžių paruošiami vaikiniai sluoksniai, kur aukščiau esantys uždengia žemesniuosius. Braižymas tada gaunamas suliejant plokščią grupę su sluoksniais, esančiais žemiau grupės.

    • Kai vaikiniams sluoksniams priskirti suliejimo režimai, jis taikomas prieš išplokštinimą, bet apimtis ribojama tik tos grupės vaikiniams sluoksniams, o ne kitiems sluoksniams, esantiems žemiau visos grupės.

    • Grupių vaikiniams sluoksniams pateikiama daugiau suliejimo režimų jų kortelėje Simbologija, kurie atlieka stiliaus „apkarpymo“ veiksmus kitiems vaikiniams sluoksniams braižymo metu. Pavyzdžiui jūs galite apkarpyti vieno sluoksnio turinio braižymą turiniu iš kito „uždengiančio“ sluoksnio.

  • Sluoksnio efektai: efektai taikomi tik suplokštintam vaikinių sluoksnių vaizdui, taigi pavyzdžiui metamo šešėlio efektas bus taikomas uždengtiems vaikiniams sluoksniams.

Kai grupei nurodoma Braižyti sluoksnius kaip grupę, tada tik grupė bus rodoma skydelyje Sluoksnių rikiuotė. Grupių vaikai nebus matomi šiame rikiuotės sąraše, nes jų rikiuotę nustato grupės sluoksnio vieta.

12.2.1.4. Sluoksnio stiliaus keitimas

Skydelyje Sluoksniai jūs turite kelis variantus, kaip greitai ir paprastai pakeisti sluoksnio braižymą.

Spauskite ant sluoksnio dešinį pelės mygtuką ir parinkite Stiliai ►, kad:

  • pamatytumėte šiuo metu sluoksniui galimus stilius. Jei apibrėžėte daug stilių, galite perjungti iš vieno į kitą ir jūsų sluoksnio braižymas bus automatiškai atnaujintas žemėlapio drobėje.

  • kopijuotumėte dalį ar visą dabartinį stilių, o, kai galima, įkeltumėte nukopijuotą stilių iš kito sluoksnio

  • Pervadinti dabartinį… stilių

  • Pridėti naują stilių (kuris yra dabartinio sluoksnio kopija)

  • arba Pašalinti dabartinį stilių (tik kai jau yra keli stiliai).

    Patarimas

    Greitai dalinkitės sluoksnio stiliumi

    Kontekstiniame meniu nukopijuokite sluoksnio stilių ir įkelkite jį į grupę ar sluoksnių pažymėjimą: stilius taikomas visiems to paties tipo (vektoriniams, rastro, tinklelio, taškų debesies, …) sluoksniams, kaip pradinis sluoksnis ir, vektoriniams sluoksniams, turi tą patį geometrijos tipą (taškas, linija ar poligonas).

Kai naudojama simbologija, kuri remiasi geoobjekto klasifikacija (pvz. kategorizuota, graduota ar pagal taisykles vektoriniams sluoksniams ar klasifikuota taškų debesims), paspaudus dešinį pelės mygtuką ant klasės įrašo skydelyje Sluoksniai galima pakeisti klasių (ir jų geoobjektų) matomumą ir išvengti jų (ne)pažymėjimo po vieną:

  • toggleAllLayers Perjungti elementus

  • showAllLayers Rodyti visus elementus

  • hideAllLayers Slėpti visus elementus

Vektoriniams sluoksniams, klasės šakos įrašo kontekstinis meniu taipogi leidžia:

  • selectAll Pažymėti geoobjektus: pažymi visus klasę atitinkančius sluoksnio geoobjektus

  • openTable Rodyti atributų lentelėje: atidaro atributų lentelę, kurioje filtruoti tik atitinkančios klasės geoobjektai

  • keisti simbolio spalvą naudojant Spalvos ratą. Patogumui, spalvų rato apačioje taipogi galima pasirinkti ir iš paskutinių naudotų spalvų.

  • Keisti simbolį…: atveria dialogą Simbolio parinkimas, leidžiantį keisti geoobjekto simbolį (simbolį, dydį, spalvą…).

  • Kopijuoti simbolį

  • Įkelti simbolį

Patarimas

Du kartus paspaudus klasės lapo įrašą taipogi atveriamas dialogas Simbolio parinkimas.

12.2.2. Sluoksnio stiliaus skydelis

Skydelis Sluoksnio stilius (dar įjungiamas su Ctrl+3) yra greitas kelias iki to paties funkcionalumo, kaip ir randamam dialoge Sluoksnio savybės. Jei teikia greitą ir paprastą būdą apibrėžti sluoksnio braižymą ir elgseną bei vizualizuoti rezultatus neatidarant sluoksnio savybių dialogo.

Be to, kad vengia sluoksnio savybių dialogo blokavimo (arba „modalizavimo“), sluoksnio stiliaus skydelis taip pat išvengia ekrano užgriozdinimo dialogais ir turi tik daugumą stiliaus funkcijų (spalvų parinkiklį, efektų savybes, taisyklių keitimą, užrašų pakeitimą…): pvz., paspaudus spalvų mygtukus sluoksnio stiliaus skydelių viduje, spalvos parinkimo dialogas atidaromas sluoksnio stiliaus skydelio viduje, o ne kaip atskiras dialogas.

Sluoksnio skydelyje esančiame iškrentančiame dabartinių sluoksnių sąraše parinkite elementą ir:

  • Priklausomai nuo aktyvaus elemento nustatykite:

  • Enable and configure global map shading properties

  • Tvarkykite susijusius stilius stylePreset Stilių tvarkyklėje (daugiau informacijos Managing Custom Styles).

  • Žiūrėkite jūsų padarytų dabartinio projekto sluoksnio pakeitimų history Istoriją, kur galite ir atšaukti ar atstatyti bet kokią būseną parinkdami ją ir spausdami Taikyti.

Kita galinga šio skydelio savybė yra varnelė checkbox Gyvas atnaujinimas. Įjunkite ją, jei norite, kad jūsų pakeitimai nedelsiant būtų atspindėti žemėlapio drobėje: jums daugiau nebereikės spaudyti mygtuko Taikyti.

../../../_images/layer_styling.png

Fig. 12.3 Sluoksnio simbologijos nustatymas stilių skydelyje

12.2.3. Sluoksnių rikiuotės skydelis

Pagal nutylėjimą QGIS žemėlapio drobėje sluoksniai rodomi pagal skydelyje Sluoksniai matomą seką: kuo aukščiau šiame skydelyje yra sluoksnis, tuo aukščiau (taigi matomiau) sluoksnis bus ir žemėlapio vaizde.

Galite nustatyti sluoksnių braižymo tvarką, kuri nepriklausytų nuo sluoksnių skydelio, naudodami skydelį Sluoksnių eiliškumas, kurį galite įjungti Vaizdas ► Skydeliai ► meniu arba kombinacija Ctrl+9. Įjunkite varnelę checkbox Valdyti braižymo eiliškumą, esančia sąrašo apačioje, kad surikiuotumėte sluoksnius taip, kaip jums reikia. Ši rikiuotė taikoma žemėlapio drobei. Pavyzdžiui Fig. 12.4, jūs matote, kaip geoobjektai oro uostai yra rodomi virš alaska poligono, nepriklausomai nuo to, kaip tie sluoksniai išdėstyti sluoksnių skydelyje.

Išjungus varnelę checkbox Valdyti braižymo eiliškumą bus atstatyta numatytoji elgsena.

../../../_images/layer_order.png

Fig. 12.4 Nuo legendos nepriklausančio sluoksnių eiliškumo nustatymas

12.2.4. Apžvalgos skydelis

Skydelis Peržiūra (Ctrl+8) rodo žemėlapį su kai kurių sluoksnių pilna apimtimi. Peržiūros žemėlapis užpildomas sluoksniais naudojant meniu Sluoksniai ar sluoksnių kontekstiniame meniu esančią parinktį Rodyti peržiūroje. Šiame vaizde raudonas stačiakampis rodo dabartinės žemėlapio drobės apimtį, taip padedant jums greitai susiorientuoti, kurią žemėlapio vietą šiuo metu žiūrite. Jei paspausite ir tempsite raudoną stačiakampį peržiūros ribose, atitinkamai keisis ir pagrindinio žemėlapio vaizdo apimtis.

Pastebėtina, kad peržiūros žemėlapyje nebraižomi užrašai, net jei žemėlapyje sluoksniams yra sukonfigūruotas užrašų rodymas.

12.2.5. Pranešimų žurnalo skydelis

Įkeliant ar vykdant kai kuriuos apdorojimo veiksmus jūs galite sekti pranešimus, kurie pasirodo skirtingose messageLog Pranešimų žurnalo skydelio kortelėse. Jį galima įjungti naudojant patį dešiniausia būsenos juostos mygtuką.

12.2.6. Atšaukimo/pakartojimo skydelis

Kiekvienam keičiamam sluoksniui skydelis Atšaukimas/pakartojimas (Ctrl+5) rodo visų įvykdytų veiksmų sąrašą, leidžia jums greitai atšaukti kelis veiksmus parenkant aukščiau esantį veiksmą. Daugiau informacijos rasite skyriuje apie pakeitimų atšaukimą ir pakartojimą.

12.2.7. Statistinės suvestinės skydelis

Skydelis Statistika (Ctrl+6) teikia apibendrintą bet kokio vektorinio sluoksnio informaciją. Šiame skydelyje jūs galite parinkti:

  • vektorinį sluoksnį, kuriam reikia skaičiuoti statistiką: jį galima parinkti iš viršutinio iškrentančio meniu arba susieta su aktyviu sluoksniu skydelyje Sluoksniai, naudojant varnelę Sekti pažymėtą sluoksnį, statistikos apačioje esančiame iškrentančiame meniu

  • lauką ar expression išraišką, kurią reikia naudoti kiekvienam sluoksniui, paskutinis parinkimas atsimenamas ir automatiškai skaičiuojamas vėl pažymėjus sluoksnį.

  • grąžinamą statistiką naudojant iškrentantį mygtuką dialogo apatiniame dešiniame kampe. Priklausomai nuo laukų (ar išraiškos reikšmių) tipo, galimos statistikos yra:

Table 12.2 Kiekvienam lauko tipui galimos statistikos

Statistika

Tekstas

Sveikas skaičius

Realus skaičius

Data

Skaičius

checkbox

checkbox

checkbox

checkbox

Unikalių reikšmių skaičius

checkbox

checkbox

Trūkstamų reikšmių skaičius

checkbox

checkbox

checkbox

checkbox

Suma

checkbox

checkbox

Vidurkis

checkbox

checkbox

checkbox

Standartinė deviacija

checkbox

checkbox

Standartinė deviacija pagal mėginį

checkbox

checkbox

Minimali reikšmė

checkbox

checkbox

checkbox

checkbox

Maksimali reikšmė

checkbox

checkbox

checkbox

checkbox

Diapazonas

checkbox

checkbox

checkbox

Mažuma

checkbox

checkbox

checkbox

Dauguma

checkbox

checkbox

checkbox

Variacija

checkbox

checkbox

Pirmas kvartilis

checkbox

checkbox

Trečias kvartilis

checkbox

checkbox

Tarpkvartilinis diapazonas

checkbox

checkbox

Minimalus ilgis

checkbox

Maksimalus ilgis

checkbox

Vidutinis ilgis

checkbox

Statistikos sumos gali būti:

  • grąžinamos visam sluoksniui arba checkbox Tik pažymėtiems geoobjektams

  • editCopy nukopijuotos į iškarpinę ir įkeltos į lentelę kitoje aplikacijoje

  • perskaičiuotos naudojant mygtuką refresh kai pasikeičia duomenys (pvz. sukurti nauji ar pašalinti esami geoobjektai, pakeisti atributai)

../../../_images/statistical_summary.png

Fig. 12.5 Rodyti lauko statistiką

12.2.8. Tinkinimo/kūrimo įrankių skydelis

Skydelis Tinkinimo/kūrimo įrankiai (F12) vienoje vietoje suteikia galimybę valdyti QGIS tinkinimo veiksmus. Teikiami įrankiai organizuojami tokiose kortelėse:

  • networkAndProxy Tinklo žurnalizavimas

  • dbManager Užklausų žurnalas

  • stopwatch Profiler - under this tab you can choose one out of these categories:

    • Startup helps you diagnose (and fix) occasional long startup times of QGIS.

    • Project Load allows you to get a breakdown of the various stages of project load, in order to identify the causes of slow project load times.

    • Map Render tool allows you to identify pain points in your map rendering and track down exactly which layers are causing long map redraws.

Pastaba

Priedų autoriai gali praplėsti šį skydelį savo kortelėmis, skirtomis jų pačių priedų tinkinimui ar kūrimui. Tai daroma naudojant metodą registerDevToolWidgetFactory.

12.2.8.1. Network Logger

The networkAndProxy Network Logger tab helps you record and display network requests, along with a whole load of useful details like request and reply status, header, errors, SSL configuration errors, timeouts, cache status, etc.

From its top toolbar, you can:

  • record Record Log: which will start or stop the logging.

  • deleteSelected Clear Log: will clear the log history.

  • fileSave Save Log…: will first show a big warning that the log is sensitive and should be treated as confidential and then allow you to save the log.

  • Press the options Settings drop-down menu to select whether to Show Successful Requests, Show Timeouts and Show Replies Served from Cache.

  • unchecked Disable cache: will disable the cache so that every request has to be performed.

  • search Filter requests based on URL string subsets or request status

By right clicking on a request you can:

  • Open URL which will open the URL in your default browser.

  • Copy URL

  • Copy As cURL to use it in the terminal.

  • Copy as JSON: copies the tree values as a json string to the clipboard, for easy pasting in bug reports or for remote assistance.

../../../_images/network_logger.png

Fig. 12.6 Network Logger output for GET Request

12.2.8.2. Query Logger

The dbManager Query Logger is the place to log the SQL commands sent by the data provider and the connections API to the backend database, together with their execution time as measured by QGIS (i.e. in the client that sent the commands). This can be useful when investigating performances of a particular layer during debugging or development of a QGIS algorithm or plugin.

From its top toolbar, you can:

  • record Record Log: which will start or stop the logging.

  • deleteSelected Clear Log: will clear the log history.

  • fileSave Save Log…: will first show a big warning that the log is sensitive and should be treated as confidential and then allow you to save the log.

  • search Filter queries based on the query string subsets or details such as provider type, start time, initiator, …

Right-click on a reported query, and you can:

  • Copy SQL command called by QGIS on the database

  • Copy as JSON: copies the tree values as a json string to the clipboard, for easy pasting in bug reports or for remote assistance.

../../../_images/query_logger.png

Fig. 12.7 Query Logger output

12.2.8.3. Profiler

The stopwatch Profiler tab allows to get load times for every single operation involved in actions requested by the user. Depending on the context, these operations can be settings reading, menu, map canvas or 3D views creation, resolving map layers reference, bookmark or layout loading, … This helps identify causes of slow load times.

Default supported actions can be selected from the Categories drop-down menu:

  • QGIS Startup

  • Project Load

../../../_images/profiler.png

Fig. 12.8 Profiler for QGIS Startup

12.3. Embedding layers from external projects

Sometimes, you’d like to keep some layers in different projects, but with the same style. You can either create a default style for these layers or embed them from another project to save time and effort.

Embed layers and groups from an existing project has some advantages over styling:

  • All types of layers (vector or raster, local or online…) can be added

  • Fetching groups and layers, you can keep the same tree structure of the „background“ layers in your different projects

  • While the embedded layers are editable, you can’t change their properties such as symbology, labels, forms, default values and actions, ensuring consistency across projects

  • Modify the items in the original project and changes are propagated to all the other projects

If you want to embed content from other project files into your project, select Layer ► Embed Layers and Groups:

  1. Click the button to look for a project: you can see the content of the project (see Fig. 12.9)

  2. Hold down Ctrl ( or osx Cmd) and click on the layers and groups you wish to retrieve

  3. Sauskite Gerai

The selected layers and groups are embedded in the Layers panel and displayed on the map canvas. An indicatorEmbedded icon is added next to their name for recognition and hovering over displays a tooltip with the original project file path.

../../../_images/embed_dialog.png

Fig. 12.9 Select layers and groups to embed

Like any other layer, an embedded layer can be removed from the project by right-clicking on the layer and clicking removeLayer Remove.

Patarimas

Change rendering of an embedded layer

It’s not possible to change the rendering of an embedded layer, unless you make the changes in the original project file. However, right-clicking on a layer and selecting Duplicate creates a layer which is fully-featured and not dependent on the original project. You can then safely remove the linked layer.

12.4. Interacting with features

12.4.1. Selecting features

QGIS provides several tools to select features on the map canvas. Selection tools are available in the Edit ► Select menu or in the Selection Toolbar.

Pastaba

Selection tools work with the currently active layer.

12.4.1.1. Selecting manually on the map canvas

To select one or more features with the mouse, you can use one of the following tools:

  • selectRectangle Select Features by area or single click

  • selectPolygon Select Features by Polygon

  • selectFreehand Select Features by Freehand

  • selectRadius Select Features by Radius

Pastaba

Other than selectPolygon Select Features by Polygon, these manual selection tools allow you to select feature(s) on the map canvas with a single click.

Pastaba

Use the selectPolygon Select Features by Polygon tool to use an existing polygon feature (from any layer) to select overlapping features in the active layer. Right-click in the polygon and choose it from the context menu that shows a list of all the polygons that contain the clicked point. All the overlapping features from the active layer are selected.

Patarimas

Use the Edit ► Select ► Reselect Features tool to redo your latest selection. Very useful when you have painstakingly made a selection, and then click somewhere else accidentally and clear your selection.

While using the selectRectangle Select Feature(s) tool, holding Shift or Ctrl toggles whether a feature is selected (ie either adds to the current selection or remove from it).

For the other tools, different behaviors can be performed by holding down:

  • Shift: add features to the current selection

  • Ctrl: substract features from the current selection

  • Ctrl+Shift: intersect with current selection, ie only keep overlapping features from the current selection

  • Alt: select features that are totally within the selection shape. Combined with Shift or Ctrl keys, you can add or substract features to/from the current selection.

12.4.1.2. Automatic selection

The other selection tools, most of them available from the Attribute table, perform a selection based on a feature’s attribute or its selection state (note that attribute table and map canvas show the same information, so if you select one feature in the attribute table, it will be selected on the map canvas too):

  • expressionSelect Select By Expression… select features using expression dialog

  • formSelect Select Features By Value… or press F3

  • deselectAll Deselect Features from All Layers or press Ctrl+Alt+A to deselect all selected features in all layers

  • deselectActiveLayer Deselect Features from the Current Active Layer or press Ctrl+Shift+A

  • selectAll Select All Features or press Ctrl+A to select all features in the current layer

  • invertSelection Invert Feature Selection to invert the selection in the current layer

  • selectLocation Select by Location to select the features based on their spatial relationship with other features (in the same or another layer - see Select by location)

  • selectDistance Select within distance to select features wherever they are within the specified maximum distance from referenced features - see Select within distance)

For example, if you want to find regions that are boroughs from regions.shp of the QGIS sample data, you can:

  1. Use the expressionSelect Select features using an Expression icon

  2. Expand the Fields and Values group

  3. Double-click the field that you want to query („TYPE_2“)

  4. Click All Unique in the panel that shows up on the right

  5. From the list, double-click ‚Borough‘. In the Expression editor field, write the following query:

    "TYPE_2"  =  'Borough'
    
  6. Click Select Features

From the expression builder dialog, you can also use Function list ► Recent (Selection) to make a selection that you have used before. The dialog remembers the last 20 expressions used. See Expressions for more information and examples.

Patarimas

Save your selection into a new file

Users can save selected features into a New Temporary Scratch Layer or a New Vector Layer using Edit ► Copy Features and Edit ► Paste Features as in the desired format.

12.4.1.3. Select Features By Value

This selection tool opens the layer’s feature form allowing the user to choose which value to look for for each field, whether the search should be case-sensitive, and the operation that should be used. The tool has also autocompletes, automatically filling the search box with existing values.

../../../_images/select_by_value.png

Fig. 12.10 Filter/Select features using form dialog

Alongside each field, there is a drop-down list with options to control the search behaviour:

Table 12.3 Query operators per data type

Field search option

Tekstas

Numeric

Data

Exclude Field from the search

checkbox

checkbox

checkbox

Equal to (=)

checkbox

checkbox

checkbox

Not equal to (≠)

checkbox

checkbox

checkbox

Greater than (>)

checkbox

checkbox

Less than (<)

checkbox

checkbox

Greater than or equal to (≥)

checkbox

checkbox

Less than or equal to (≤)

checkbox

checkbox

Between (inclusive)

checkbox

checkbox

Not between (inclusive)

checkbox

checkbox

Contains

checkbox

Does not contain

checkbox

Is missing (null)

checkbox

checkbox

checkbox

Is not missing (not null)

checkbox

checkbox

checkbox

Starts with

checkbox

Ends with

checkbox

For string comparisons, it is also possible to use the checkbox Case sensitive option.

After setting all search options, click Select features to select the matching features. The drop-down options are:

  • Select features

  • Add to current selection

  • Remove from current selection

  • Filter current selection

You can also clear all search options using the Reset form button.

Once the conditions are set, you can also either:

  • Zoom to features on the map canvas without the need of a preselection

  • Flash features, highlighting the matching features. This is a handy way to identify a feature without selection or using the Identify tool. Note that the flash does not alter the map canvas extent and would be visible only if the feature is within the bounds of the current map canvas.

12.4.2. Identifying Features

The identify Identify Features tool allows you to interact with the map canvas and get information on features or pixels in a pop-up window. It can be used to query most of the layer types supported by QGIS (vector, raster, mesh, point cloud, wms, wfs, …). To identify an element, use either:

  • View ► Identify Features

  • Ctrl+Shift+I (or osx Cmd+Shift+I),

  • identify Identify Features button on the Attributes toolbar

Then click on a feature or pixel of the active layer. The identified item gets highlighted in the map canvas while the Identify Results dialog opens with detailed information on it. The dialog also shows a set of buttons for advanced configuration.

12.4.2.1. The Identify Results dialog

../../../_images/identify_features.png

Fig. 12.11 Identify Results dialog

From bottom to top:

  • The View controls the general aspect of the dialog and the formatting of the results; it can be set as:

    • Tree: this is the default view, and returns the results in a tree-structure

    • Table: available only for raster-based layers, it allows to display the results as a table whose columns are Layer, FID, Attribute and Value

    • or Graph: available only for raster-based layers

  • The Mode helps you select the layers from which results could be returned. These layers should be set visible, displaying data in the map canvas, and set identifiable from the Project properties ► Data Sources ► Layers capabilities. Available modes are:

    • Current layer: only the layer(s) selected in the Layers panel return results. If a group is selected, then results are picked from its leaf layers.

    • Top down, stop at first: results are from the layer of the top most feature or pixel under the mouse.

    • Top down: results are from the layers with feature or pixel under the mouse.

    • Layer selection: opens a contextual menu where the user selects the layer to identify features from. If only a single feature is under the mouse, then the results are automatically displayed.

  • In the upper part of the Identify Results dialog, a frame shows the information returned by features as a table, a graph or a tree, depending on the selected view. When in a tree view, you have a handful of tools above the results:

    • formView Open Form of the current feature

    • expandTree Expand tree

    • collapseTree Collapse tree

    • expandNewTree Expand New Results by Default to define whether the next identified feature’s information should be collapsed or expanded

    • deselectAll Clear Results

    • editCopy Copy the identified feature to clipboard, suitable for pasting in a spreadsheet.

    • filePrint Print selected HTML response: a text-based formatting of the results to print on paper or save as a .PDF file

    • the interactive identifying tools: a drop-down menu with tools for selecting on the map canvas features or pixels to identify

    • Under options Identify Settings, you can activate whether to:

      • checkbox Auto open form for single feature results: If checked, each time a single feature is identified, a form opens showing its attributes. This is a handy way to quickly edit a feature’s attributes.

      • unchecked Hide derived attributes from results to only show fields actually defined in the layer

      • unchecked Hide NULL values from results

    • helpContentsHelp to access the current documentation

12.4.2.2. Using the Identify Features tool

In its default display (View: Tree), the Identify Results panel offers several tools to interact with the layers to query. A smart combination of these tools with the target layers selector may greatly improve identification operations:

  • identifyByRectangle Identify Feature(s) by single click or click-and-drag

    • single click or click-and-drag: overlaying features in the target layers are returned

    • right-click: overlaying features from target layers are listed in the contextual menu, grouped by layers. You can then choose to:

      • display the result for a specific feature,

      • display the result for all the features of a specific layer,

      • for vector layers, it is also possible to open its attribute table filtered to the returned features

      • or show all of the returned features.

  • identifyByMouseOver Identify Features on Mouse over: move over the map canvas and hovered items in the target layers get highlighted and returned in the results panel.

  • identifyByPolygon Identify Features by Polygon: returns items overlapping a drawn or selected polygon.

    • Draw a polygon (left click to add point, right click to close the polygon) and all the overlaying features from target layers are highlighted and returned in the results panel.

    • Right-click and you get the list of all visible polygon features in the project under the click. Pick an entry and QGIS will return all the features from the target layers that overlap the selected polygon.

  • identifyByFreehand Identify Features by Freehand: returns items overlapping a polygon drawn by freehand. Draw a polygon (left-click to start, move the pointer to shape the area and right-click to close the polygon). All the overlaying features from target layers are highlighted and returned in the results panel.

  • identifyByRadius Identify Features by Radius returns items overlapping a drawn circle. Draw a cercle (left-click to indicate the center point, move the pointer to shape the area or enter the radius in the pop-up text box and left-click or press Enter to validate the circle). All the overlaying features from target layers are highlighted and returned in the results panel.

Patarimas

Filter the layers to query with the Identify Features tool

Under Project ► Properties… ► Data Sources ► Layer Capabilities, uncheck the Identifiable column next to a layer to avoid it being queried when using the identify Identify Features tool. This is a handy way to return features from only layers that are of interest to you.

12.4.2.3. Feature information

When you identify a data in the map canvas, the Identify Results dialog will list information about the items clicked (or hovered over, depending on the tool in use). The default view is a tree view in which the first item is the name of the layer and its children are its identified feature(s). Each feature is described by the name of a field along with its value. This field is the one set in Layer Properties ► Display. All the other information about the feature follows.

The feature information displayed by the identify tool will depend on the type of layer you have selected, whether it is a vector layer (including vector tiles or point cloud data) or raster layer. If your layer is raster, clicking on a location on the map canvas with identify tool will highlight the identified raster pixel. The Identify Results dialog can be customized to display custom fields, but by default it will display the following information:

  • The feature display name;

  • Actions: Actions can be added to the identify feature windows. The action is run by clicking on the action label. By default, only one action is added, namely View feature form for editing. You can define more actions in the layer’s properties dialog (see Actions Properties).

  • Derived: This information is calculated or derived from other information. It includes:

    • general information about the feature’s geometry:

      • depending on the geometry type, the cartesian measurements of length, perimeter or area in the layer’s CRS units. For 3D line vectors the cartesian line length is available.

      • depending on the geometry type and if an ellipsoid is set in the project properties dialog for Measurements, the ellipsoidal values of length, perimeter or area using the specified units

      • the count of geometry parts in the feature and the number of the part clicked

      • the count of vertices in the feature

    • coordinate information, using the project properties Coordinates display settings:

      • X and Y coordinate values of the point clicked

      • the number of the closest vertex to the point clicked

      • X and Y coordinate values of the closest vertex (and Z/M if applicable)

      • if you click on a curved segment, the radius of that section is also displayed.

  • Data attributes: This is the list of attribute fields and values for the feature that has been clicked.

  • information about the related child feature if you defined a relation:

    • the name of the relation

    • the entry in reference field, e.g. the name of the related child feature

    • Actions: lists actions defined in the layer’s properties dialog (see Actions Properties) and the default action is View feature form.

    • Data attributes: This is the list of attributes fields and values of the related child feature.

Pastaba

Links in the feature’s attributes are clickable from the Identify Results panel and will open in your default web browser.

12.4.2.4. Results contextual menu

Other functions can be found in the context menu of the identified item. For example, from the context menu you can:

  • View the feature form

  • Zoom to feature

  • Copy feature: Copy all feature geometry and attributes

  • Toggle feature selection: Add identified feature to selection

  • Copy attribute value: Copy only the value of the attribute that you click on

  • Copy feature attributes: Copy the attributes of the feature

  • Select features by attribute value: Select all features in the layer that match the selected attribute

  • Clear result: Remove results in the window

  • Clear highlights: Remove features highlighted on the map

  • Highlight all

  • Highlight layer

  • Activate layer: Choose a layer to be activated

  • Layer properties: Open layer properties window

  • Expand all

  • Collapse all

12.5. Save and Share Layer Properties

12.5.1. Managing Custom Styles

When a vector layer is added to the map canvas, QGIS by default uses a random symbol/color to render its features. However, you can set a default symbol in Project ► Properties… ► Default styles that will be applied to each newly added layer according to its geometry type.

Most of the time, though, you’d rather have a custom and more complex style that can be applied automatically or manually to the layers (with less effort). You can achieve this by using the Style menu at the bottom of the Layer Properties dialog. This menu provides you with functions to create, load and manage styles.

A style stores any information set in the layer properties dialog to render or interact with the layer (including symbology, labeling, fields and form definitions, actions, diagrams…) for vector layers, or the pixels (band or color rendering, transparency, pyramids, histogram …) for raster.

../../../_images/style_combobox.png

Fig. 12.12 Vector layer style combo box options

By default, the style applied to a loaded layer is named default. Once you have got the ideal and appropriate rendering for your layer, you can save it by clicking the selectString Style combo box and choosing:

  • Rename Current: The active style is renamed and updated with the current options

  • Add: A new style is created using the current options. By default, it will be saved in the QGIS project file. See below to save the style in another file or a database

  • Remove: Delete unwanted style, in case you have more than one style defined for the layer.

At the bottom of the Style drop-down list, you can see the styles set for the layer with the active one checked.

Note that each time you validate the layer properties dialog, the active style is updated with the changes you’ve made.

You can create as many styles as you wish for a layer but only one can be active at a time. In combination with Map Themes, this offers a quick and powerful way to manage complex projects without the need to duplicate any layer in the map legend.

Pastaba

Given that whenever you apply modifications to the layer properties, changes are stored in the active style, always ensure you are editing the right style to avoid mistakenly altering a style used in a map theme.

Patarimas

Manage styles from layer context menu

Right-click on the layer in the Layers panel to copy, paste, add or rename layer styles.

12.5.2. Storing Styles in a File or a Database

While styles created from the Style combo box are by default saved inside the project and can be copied and pasted from layer to layer in the project, it’s also possible to save them outside the project so that they can be loaded in another project.

12.5.2.1. Save as text file

Clicking the selectString Style ► Save Style, you can save the style as a:

  • QGIS layer style file (.qml)

  • SLD file (.sld), only available for vector layers

Used on file-based format layers (.shp, .tab…), Save as Default generates a .qml file for the layer (with the same name). SLDs can be exported from any type of renderer – single symbol, categorized, graduated or rule-based – but when importing an SLD, either a single symbol or rule-based renderer is created. This means that categorized or graduated styles are converted to rule-based. If you want to preserve those renderers, you have to use the QML format. On the other hand, it can be very handy sometimes to have this easy way of converting styles to rule-based.

12.5.2.2. Save in database

Vector layer styles can also be stored in a database if the layer datasource is a database provider. Supported formats are PostGIS, GeoPackage, SpatiaLite, MS SQL Server and Oracle. The layer style is saved inside a table (named layer_styles) in the database. Click on Save Style… ► Save in database then fill in the dialog to define a style name, add a description, a .ui file if applicable and to check if the style should be the default style.

You can save several styles for a single table in the database. However, each table can have only one default style. Default styles can be saved in the layer database or in qgis.db, a local SQLite database in the active user profile directory.

../../../_images/save_style_database.png

Fig. 12.13 Save Style in database Dialog

Patarimas

Sharing style files between databases

You can only save your style in a database if the layer comes from such a database. You can’t mix databases (layer in Oracle and style in MS SQL Server for instance). Use instead a plain text file if you want the style to be shared among databases.

Pastaba

You may encounter issues restoring the layer_styles table from a PostgreSQL database backup. Follow QGIS layer_style table and database backup to fix that.

12.5.2.3. Load style

When loading a layer in QGIS, if a default style already exists for this layer, QGIS loads the layer with this style. Also Style ► Restore Default looks for and loads that file, replacing the layer’s current style.

Style ► Load Style helps you apply any saved style to a layer. While text-file styles (.sld or .qml) can be applied to any layer whatever its format, loading styles stored in a database is only possible if the layer is from the same database or the style is stored in the QGIS local database.

The Database Styles Manager dialog displays a list of styles related to the layer found in the database and all the other styles saved in it, with name and description.

Patarimas

Quickly share a layer style within the project

You can also share layer styles within a project without importing a file or database style: right-click on the layer in the Layers Panel and, from the Styles combo box , copy the style of a layer and paste it to a group or a selection of layers: the style is applied to all the layers that are of the same type (vector vs raster) as the original layer and, in the case of vector layers, have the same geometry type (point, line or polygon).

12.5.3. Layer definition file

Layer definitions can be saved as a Layer Definition File (.qlr) using Export ► Save As Layer Definition File… in the active layers‘ context menu. A layer definition file (.qlr) includes references to the data source of the layers and their styles. .qlr files are shown in the Browser Panel and can be used to add the layers (with the saved style) to the Layers Panel. You can also drag and drop .qlr files from the system file manager into the map canvas.

12.6. Documenting your data

In addition to displaying and symbolizing the data in the layers, QGIS allows you to fill:

  • metadata: information to help people find and understand the dataset, how they can access and use it… these are properties of the datasource and can live out of the QGIS project.

  • notes: instructions and comments regarding the layer in the current project

12.6.1. Metadata

In the layer properties dialog, the editMetadata Metadata tab provides you with options to create and edit a metadata report on your layer.

Information to fill concern:

  • the data Identification: basic attribution of the dataset (parent, identifier, title, abstract, language…);

  • the Categories the data belongs to. Alongside the ISO categories, you can add custom ones;

  • the Keywords to retrieve the data and associated concepts following a standard based vocabulary;

  • the Access to the dataset (licenses, rights, fees, and constraints);

  • the Extent of the dataset, either spatial one (CRS, map extent, altitudes) or temporal;

  • the Contact of the owner(s) of the dataset;

  • the Links to ancillary resources and related information;

  • the History of the dataset.

A summary of the filled information is provided in the Validation tab and helps you identify potential issues related to the form. You can then either fix them or ignore them.

Metadata are saved in the project file by default, the Metadata drop-down offers options for loading/saving metadata from .qmd file and for loading/saving metadata in the „Default“ location.

../../../_images/metadata_save_options.png

Fig. 12.14 Metadata load/save options

The „Default“ location used by Save to Default Location and Restore from Default Location changes depending on the underlying data source and on its configuration:

  • For PostgreSQL data sources if the configuration option Allow saving/loading QGIS layer metadata in the database is checked the metadata are stored inside a dedicated table in the database.

  • For GeoPackage data sources Save to Default Location always saves the metadata in the internal metadata tables of the GeoPackage.

    When metadata are saved into the internal tables of PostgreSQL or GeoPackage they become available for search and filtering in the browser and in the layer metadata search panel.

  • For all other file based data sources Save to Default Location saves the metadata in a .qmd file alongside the file.

  • In all other cases Save to Default Location saves the metadata in a local .sqlite database.

12.6.2. Sluoksnio pastabos

Layer notes allow you to document the layer within the current project. They can be place to store important messages for users of the project like to do lists, instructions, warnings, …

From the layer’s contextual menu in Layers panel, select Add layer notes… and fill the open dialog with necessary texts.

../../../_images/layer_notes.png

Fig. 12.15 Adding notes to a layer

The Add layer notes dialog provides a html-based multiline text box with a complete set of tools for:

  • text manipulation: cut, copy, paste, undo, redo

  • characters formatting, applied to all or parts of the contents: font size and color, bold, italic, underline, strikethrough, background color, URL highlighting

  • paragraph structuring: bullet and numbered lists, indentation, predefined headings

  • file insertion, even with drag-and-drop

  • editing with HTML coding

From the drop-down at the far right of the toolbar, you can:

  • Remove all formatting

  • Remove character formatting

  • Clear all content

In the Layers panel, a layer with a note is assigned the indicatorNotes icon which, upon hover, displays the note. Click the icon to edit the note. You can as well right-click the layer and Edit layer note… or Remove layer note.

Pastaba

Notes are part of the layer style and can be saved in the .qml or .qlr file. They can also be transferred from one layer to another while copy-pasting the layer style.

12.7. Storing values in Variables

In QGIS, you can use variables to store useful recurrent values (e.g. the project’s title, or the user’s full name) that can be used in expressions. Variables can be defined at the application’s global level, project level, layer level, processing modeler level, layout level, and layout item’s level. Just like CSS cascading rules, variables can be overwritten - e.g., a project level variable will overwrite any application global level variables set with the same name. You can use these variables to build text strings or other custom expressions using the @ character before the variable name. For example in print layout creating a label with this content:

This map was made using QGIS [% @qgis_version %]. The project file for this
map is: [% @project_path %]

Will render the label like this:

This map was made using QGIS 3.4.4-Madeira. The project file for this map is:
/gis/qgis-user-conference-2019.qgs

Besides the preset read-only variables, you can define your own custom variables for any of the levels mentioned above. You can manage:

To differentiate from editable variables, read-only variable names and values are displayed in italic. On the other hand, higher level variables overwritten by lower level ones are strike through.

../../../_images/project_variables.png

Fig. 12.16 Variables editor at the project level

Pastaba

You can read more about variables and find some examples in Nyall Dawson’s Exploring variables in QGIS 2.12, part 1, part 2 and part 3 blog posts.

12.8. Authentication

QGIS has the facility to store/retrieve authentication credentials in a secure manner. Users can securely save credentials into authentication configurations, which are stored in a portable database, can be applied to server or database connections, and are safely referenced by their ID tokens in project or settings files. For more information see Autentifikacijos sistema.

A master password needs to be set up when initializing the authentication system and its portable database.

12.9. Common widgets

In QGIS, there are some options you’ll often have to work with. For convenience, QGIS provides you with special widgets that are presented below.

12.9.1. Color Selector

12.9.1.1. The color dialog

The Select Color dialog will appear whenever you click the selectColor icon to choose a color. The features of this dialog depend on the state of the Use native color chooser dialogs parameter checkbox in Settings ► Options… ► General. When checked, the color dialog used is the native one of the OS on which QGIS is running. Otherwise, the QGIS custom color chooser is used.

The custom color chooser dialog has four different tabs which allow you to select colors by colorBox Color ramp, colorWheel Color wheel, colorSwatches Color swatches or colorPicker Color picker. With the first two tabs, you can browse to all possible color combinations and apply your choice to the item.

../../../_images/color_selector_ramp.png

Fig. 12.17 Color selector ramp tab

In the colorSwatches Color swatches tab, you can choose from a list of color palettes (see Spalvų nustatymai for details). All but the Recent colors palette can be modified with the symbologyAdd Add current color and symbologyRemove Remove selected color buttons at the bottom of the frame.

The button next to the palette combo box also offers several options to:

  • copy, paste, import or export colors

  • create, import or remove color palettes

  • add the custom palette to the color selector widget with the Show in Color Buttons item (see Fig. 12.19)

../../../_images/color_selector_recent_colors.png

Fig. 12.18 Color selector swatches tab

Another option is to use the colorPicker Color picker which allows you to sample a color from under your mouse cursor at any part of the QGIS UI or even from another application: press the space bar while the tab is active, move the mouse over the desired color and click on it or press the space bar again. You can also click the Sample Color button to activate the picker.

Whatever method you use, the selected color is always described through color sliders for HSV (Hue, Saturation, Value) and RGB (Red, Green, Blue) values. The color is also identifiable in HTML notation.

Modifying a color is as simple as clicking on the color wheel or ramp or on any of the color parameters sliders. You can adjust such parameters with the spinbox beside or by scrolling the mouse wheel over the corresponding slider. You can also type the color in HTML notation. Finally, there is an Opacity slider to set transparency level.

The dialog also provides a visual comparison between the Old color (applied to object) and the Current one (being selected). Using drag-and-drop or pressing the atlasNext Add color to swatch button, any of these colors can be saved in a slot for easy access.

Patarimas

Quick color modification

Drag-and-drop a color selector widget onto another one to apply its color.

12.9.1.2. The color drop-down shortcut

Click the drop-down arrow to the right of the selectColor color button to display a widget for quick color selection. This shortcut provides access to:

  • a color wheel to pick a color from

  • an alpha slider to change color opacity

  • the color palettes previously set to Show in Color Buttons

  • copy the current color and paste it into another widget

  • pick a color from anywhere on your computer display

  • choose a color from the color selector dialog

  • drag-and-drop the color from one widget to another for quick modification

Patarimas

Scroll the mouse wheel over a color selector widget to quickly modify the opacity of the associated color.

Pastaba

When the color widget is set to a project color through the data-defined override properties, the above functions for changing the color are unavailable. You’d first need to Unlink color or Clear the definition.

../../../_images/quick_color_selector.png

Fig. 12.19 Quick color selector menu

12.9.1.3. The color ramp drop-down shortcut

Color ramps are a practical way to apply a set of colors to one or many features. Their creation is described in the Setting a Color Ramp section. As for the colors, pressing the selectColorRamp color ramp button opens the corresponding color ramp type dialog allowing you to change its properties.

../../../_images/color_ramp_brewer.png

Fig. 12.20 Customizing a colorbrewer ramp

The drop-down menu to the right of the button gives quick access to a wider set of color ramps and options:

  • Invert Color Ramp

  • Clear Current Ramp to unset any assigned color ramp to the widget (available only in some contexts)

  • unchecked Random Colors: available only in some contexts (e.g., when a color ramp is being used for a layer symbology), checking this entry creates and applies a color ramp with random colors. It also enables a Shuffle random colors entry to regenerate a new random color ramp if the current one is not satisfactory.

  • a preview of the gradient or catalog: cpt-city color ramps flagged as Favorites in the Style Manager dialog

  • All Color Ramps to access the compatible color ramps database

  • Create New Color Ramp… of any supported type that could be used in the current widget (note that this color ramp will not be available elsewhere unless you save it in the library)

  • Edit Color Ramp…, the same as clicking the whole color ramp button

  • Save Color Ramp…, to save the current color ramp with its customizations in the style library

../../../_images/quick_colorramp_selector.png

Fig. 12.21 Quick color ramp selection widget

12.9.2. Symbol Widget

The Symbol selector widget is a convenient shortcut when you want to set symbol properties of a feature. Clicking the drop-down arrow shows the following symbol options, together with the features of the color drop-down widget:

  • Configure Symbol…: the same as pressing the symbol selector widget. It opens a dialog to set the symbol parameters.

  • Copy Symbol from the current item

  • Paste Symbol to the current item, speeding configuration

  • Clear Current Symbol to unset any assigned symbol to the widget (available only in some contexts)

Patarimas

Scroll the mouse wheel over a marker or line symbol widget to quickly modify the size of the associated symbol.

12.9.3. Remote or embedded file selector

Along with the file selector widget, the button will sometimes show a drop-down arrow. This is usually available when using:

  • an SVG file in a symbol or a label

  • a raster image to customize symbols, labels, textures or decorations

Pressing the arrow will provide you with a menu to:

  • Select File…, to load the file from the file system. The file is identified through the file path and QGIS needs to resolve the path in order to display the corresponding image

  • From URL…, to load the file from a remote URL. As above, the image will only be loaded on successful retrieval of the remote resource

  • Embed File…, to embed the file inside the current project, style database, or print layout template. The file is then always rendered as part of the item. This is a convenient way to create self-contained projects with custom symbols which can be easily shared amongst different users and installations of QGIS.

  • Extract Embedded File…, to extract the embedded file from the widget and save it on disk.

12.9.4. Visibility Scale Selector

The visibility scale selector provides options to control the scales at which an element will be made visible in the map canvas. Out of the specified range of scales, the elements are not displayed. It can be applied e.g. to layers, labels or diagrams, from their Rendering properties tab.

  1. Tick the checkbox Scale dependent visibility box

  2. Fill the Minimum (exclusive) box with the most zoomed out desired scale, typing the value or selecting it from the predefined scales

  3. and/or fill the Maximum (inclusive) box with the most zoomed in desired scale

    The mapIdentification Set to current canvas scale button next to the scale boxes sets the current map canvas scale as boundary of the range visibility. Press the arrow next to the button to access scales from layouts‘ maps and reuse them to fill the box.

../../../_images/visibilityscale_selector.png

Fig. 12.22 Visibility scale selector widget

12.9.5. Spatial Extent Selector

The Extent selector widget is a convenient shortcut when you want to select a spatial extent to assign to a layer or to limit the actions to run on. Depending on the context, it offers selection between:

  • Current Layer Extent: e.g. when exporting a layer

  • Calculate from Layer ►: uses extent of a layer loaded in the current project

  • Use current Map Canvas Extent

  • Draw on Canvas: a rectangle whose coordinates are then used

  • Calculate from Bookmark: uses extent of a saved bookmark

  • Calculate from Layout Map: uses extent of a layout map

  • Enter or edit the coordinates as xmin, xmax, ymin, ymax

../../../_images/extent_selector.png

Fig. 12.23 Extent selector widget

12.9.6. Font Selector

The Font selector widget is a convenient shortcut when you want to set font properties for textual information (feature labels, decoration labels, map legend text, …). Clicking the drop-down arrow shows some or all of the following options:

../../../_images/fontselector_widget.png

Fig. 12.24 Font selector drop-down menu

  • Clear Current Text Format to unset any assigned text format to the widget (available only in some contexts)

  • Font Size in the associated unit

  • Recent Fonts ► menu with the active font checked (at the top)

  • Configure Format…: same as pressing the font selector widget. It opens the Text format dialog, providing advanced formatting options such as color, opacity, orientation, HTML notation, buffer, background, shadow, …

  • Copy Format of the text

  • Paste Format to the text, speeding configuration

  • the color widget for quick color setting

Patarimas

Scroll the mouse wheel over a font selector widget to quickly modify the font size of the associated text.

12.9.7. Unit Selector

Size properties of the items (labels, symbols, layout elements, …) in QGIS are not necessarily bound to either the project units or the units of a particular layer. For a large set of properties, the Unit selector drop-down menu allows you to tweak their values according to the rendering you want (based on screen resolution, paper size, or the terrain). Available units are:

  • Millimeters

  • Points

  • Pixels

  • Inches

  • Percentage: allows you to set some properties as a percent of another one. For example, this is useful for creation of text formats where the components (buffer size, shadow radius…) nicely scale as the text size is changed, instead of having constant buffer/shadow sizes. So you don’t need to adjust those sizes, when the text size changes.

  • Meters at Scale: This allows you to always set the size in meters, regardless of what the underlying map units are (e.g. they can be in inches, feet, geographic degrees, …). The size in meters is calculated based on the current project ellipsoid setting and a projection of the distances in meters at the center of the current map extent. For maps in a projected coordinate system this is calculated using projected units. For maps in a geographic (latitude/longitude) based system the size is approximated by calculating meter sizes using ellipsoidal calculations for the vertical scale of the map.

  • and Map Units: The size is scaled according to the map view scale. Because this can lead to too big or too small values, use the options button next to the entry to constrain the size to a range of values based on:

    • The Minimum scale and the Maximum scale: The value is scaled based on the map view scale until you reach any of these scale limits. Out of the range of scale, the value at the nearest scale limit is kept.

    • and/or The Minimum size and the Maximum size in mm: The value is scaled based on the map view scale until it reaches any of these limits; Then the limit size is kept.

    ../../../_images/adjust_scaling.png

    Fig. 12.25 Adjust scaling range dialog

12.9.8. Number Formatting

Numeric formatters allow formatting of numeric values for display, using a variety of different formatting techniques (for instance scientific notation, currency values, percentage values, etc). One use of this is to set text in a layout scale bar or fixed table.

../../../_images/number_formatting.png

Fig. 12.26 Formatting numeric value

Different categories of formats are supported. For most of them, you can set part or all of the following numeric options:

  • checkbox Show thousands separator

  • unchecked Show plus sign

  • unchecked Rodyti nulius pabaigoje

But they can also have their custom settings. Provided categories are:

  • General, the default category: has no setting and displays values as set in the parent widget properties or using the global settings.

  • Number

    • The value can be Round to a self defined number of Decimal places or their Significant figures

    • customize the Thousands separator and Decimal separator

  • Bearing for a text representation of a direction/bearing using:

    • Format: possible ranges of values are 0 to 180°, with E/W suffix, -180 to +180° and 0 to 360°

    • number of Decimal places

  • Currency for a text representation of a currency value.

    • Prefix

    • Suffix

    • number of Decimal places

  • Fraction for a vulgar fractional representation of a decimal value (e.g. 1/2 instead of 0.5)

    • unchecked Use unicode super/subscript to show. For example 1/2 instead of 1/2

    • unchecked Use dedicated Unicode characters

    • customize the Thousands separator

  • Percentage - appends % to the values, with setting of:

    • number of Decimal places

    • Scaling to indicate whether the actual values already represent percentages (then they will be kept as is) or fractions (then they are converted)

  • Scientific notation in the form 2.56e+03. The number of Decimal places can be set.

A live preview of the settings is displayed under the Sample section.

12.9.9. Blending Modes

QGIS offers different options for special rendering effects with these tools that you may previously only know from graphics programs. Blending modes can be applied on layers and features, and also on print layout items:

  • Normal: This is the standard blend mode, which uses the alpha channel of the top pixel to blend with the pixel beneath it. The colors aren’t mixed.

  • Lighten: This selects the maximum of each component from the foreground and background pixels. Be aware that the results tend to be jagged and harsh.

  • Screen: Light pixels from the source are painted over the destination, while dark pixels are not. This mode is most useful for mixing the texture of one item with another item (such as using a hillshade to texture another layer).

  • Dodge: Brighten and saturate underlying pixels based on the lightness of the top pixel. Brighter top pixels cause the saturation and brightness of the underlying pixels to increase. This works best if the top pixels aren’t too bright. Otherwise the effect is too extreme.

  • Addition: Adds pixel values of one item to the other. In case of values above the maximum value (in the case of RGB), white is displayed. This mode is suitable for highlighting features.

  • Darken: Retains the lowest values of each component of the foreground and background pixels. Like lighten, the results tend to be jagged and harsh.

  • Multiply: Pixel values of the top item are multiplied with the corresponding values for the bottom item. The results are darker.

  • Burn: Darker colors in the top item cause the underlying items to darken. Burn can be used to tweak and colorize underlying layers.

  • Overlay: Combines multiply and screen blending modes. Light parts become lighter and dark parts become darker.

  • Soft light: Very similar to overlay, but instead of using multiply/screen it uses color burn/dodge. This is supposed to emulate shining a soft light onto an image.

  • Hard light: Hard light is also very similar to the overlay mode. It’s supposed to emulate projecting a very intense light onto an image.

  • Difference: Subtracts the top pixel from the bottom pixel, or the other way around, in order always to get a positive value. Blending with black produces no change, as the difference with all colors is zero.

  • Subtract: Subtracts pixel values of one item from the other. In the case of negative values, black is displayed.

../../../_images/blending_modes.png

Fig. 12.27 Examples of blend modes applied to a green feature over an orange

From top to bottom, left to right: Normal – Lighten, Screen, Dodge, Addition – Difference, Subtract – Darken, Multiply, Burn – Overlay, Soft light, Hard light

When a layer is part of a group that renders layers as a group, additional blending modes are available for the rendering. They provide methods to clip the render of one layer’s content by the content in a second „mask“ layer.

  • Masked By Below: The output is the top pixel, where the opacity is reduced by that of the bottom pixel.

  • Mask Below: The output is the bottom pixel, where the opacity is reduced by that of the top pixel.

  • Inverse Masked By Below: The output is the top pixel, where the opacity is reduced by the inverse of the bottom pixel.

  • Inverse Mask Below: The output is the bottom pixel, where the opacity is reduced by the inverse of the top pixel.

  • Paint Inside Below: The top pixel is blended on top of the bottom pixel, with the opacity of the top pixel reduced by the opacity of the bottom pixel.

  • Paint Below Inside: The bottom pixel is blended on top of the top pixel, with the opacity of the bottom pixel reduced by the opacity of the top pixel.

../../../_images/blending_clipping.png

Fig. 12.28 Examples of blend clipping mode applied to top green layer in a group

A: Mask Below B: Masked By Below C: Paint Below Inside D: Inverse Mask Below E: Inverse Masked By Below F: Paint Inside Below

12.9.10. Data defined override setup

Next to many options in the vector layer properties dialog or settings in the print layout, you will find a dataDefine Data defined override icon. Using expressions based on layer attributes or item settings, prebuilt or custom functions and variables, this tool allows you to set dynamic values for parameters. When enabled, the value returned by this widget is applied to the parameter regardless of its normal value (checkbox, textbox, slider…).

12.9.10.1. The data defined override widget

Clicking the dataDefine Data defined override icon shows the following entries:

  • Description… that indicates if the option is enabled, which input is expected, the valid input type and the current definition. Hovering over the widget also pops up this information.

  • Store data in the project: a button allowing the property to be stored using the Auxiliary Storage Properties mechanism.

  • Field type: an entry to select from the layer’s fields that match the valid input type.

  • Color: when the widget is linked to a color property, this menu gives access to the colors defined as part of the current project’s colors scheme.

  • Variable: a menu to access the available user-defined variables

  • Edit… button to create or edit the expression to apply, using the Expression String Builder dialog. To help you correctly fill in the expression, a reminder of the expected output’s format is provided in the dialog.

  • Paste and Copy buttons.

  • Clear button to remove the setup.

  • For numeric and color properties, Assistant… to rescale how the feature data is applied to the property (more details below)

Patarimas

Use right-click to (de)activate the data override

When the data-defined override option is set up correctly the icon is yellow dataDefineOn or dataDefineExpressionOn. If it is broken, the icon is red dataDefineError or dataDefineExpressionError.

You can enable or disable a configured dataDefine Data-defined override button by simply clicking the widget with the right mouse button.

12.9.10.2. Using the data-defined assistant interface

When the dataDefine Data-defined override button is associated with a size, a rotation, an opacity or a color property, it has an Assistant… option that helps you change how the data is applied to the parameter for each feature. The assistant allows you to:

  • Define the Input data, ie:

    • Source: the attribute to represent, using a field or an expression expression

    • the range of values to represent: you can manually enter the values or use the refresh Fetch value range from layer button to fill these fields automatically with the minimum and maximum values returned by the Source expression applied to your data

  • unchecked Apply transform curve: by default, output values (see below for setting) are applied to input features following a linear scale. You can override this logic: enable the transform option, click on the graphic to add break point(s) and drag the point(s) to apply a custom distribution.

  • Define the Output values: the options vary according to the parameter to define. You can globally set:

    • for a color setting, the color ramp to apply to values and the single color to use for NULL values

    • for the others, the minimum and maximum values to apply to the selected property as well as the size/angle/opacity value for ignored or NULL source features

    • for size properties, the Scale method of representation which can be Flannery, Exponential, Surface, Radius or Linear

    • the Exponent to use for data scaling when the Scale method is of exponential type or when tweaking the opacity

When compatible with the property, a live-update preview is displayed in the right-hand side of the dialog to help you control the value scaling.

../../../_images/varying_size_assistant.png

Fig. 12.29 Scaling feature size based on passengers field’s value

The values presented in the varying size assistant above will set the size ‚Data-defined override‘ with:

coalesce(scale_exp("passengers", 9, 2000, 1, 10, 0.57), 0)