QGIS User 0021 - Dynamic Layout Calculations

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • How to calculate statistics from the visible part of a map layout and dynamically update it in single map layouts or atlases.
    Using QGIS 3.10 from qgis.org

Комментарии • 24

  • @Victorggm
    @Victorggm Год назад

    THANK YOU! THANK YOU! THANK YOU! THANK YOU! THANK YOU! This explanation is not anywhere else online.

  • @Lemonjjuice
    @Lemonjjuice 4 года назад +3

    Nice data driven layout!

  • @exshenanigan2333
    @exshenanigan2333 4 года назад +1

    Your videos have been very useful for me Klas, thank you so much.

  • @user-ey2cu1vj7w
    @user-ey2cu1vj7w 4 года назад +1

    Thank you Klas !!! Your video is amazing and your work is very helpful

  • @fahimhossain1379
    @fahimhossain1379 4 года назад +2

    Thanks for the upload Klas!

  • @lucabellani3442
    @lucabellani3442 4 года назад +2

    Amazing!

  • @abdurrahimsafi9425
    @abdurrahimsafi9425 4 года назад

    Thank you. A nice tutorial

  • @caiocouto3168
    @caiocouto3168 4 года назад +1

    thanks you!

  • @user-oe2ep9ey8o
    @user-oe2ep9ey8o 4 года назад

    It’s really smart and amazing!🥰

  • @germanvargas1
    @germanvargas1 4 года назад +1

    Thank you very much Klaus, your videos are really clear and enlighting! I'm having trouble with something and I wanted to know if I could as for your help.
    The first thing is that I want to make summary statistics based on layers different from the one I'm using as a filter variable in my Atlas (or my Report). For instance, I want the Atlas to cycle through all the States within a country, and to count the number of schools within each district (with schools being a point shapefile different from the State polygon shapefile). My first attempt looks a bit like this:
    format_number(aggregate(
    'Schools_in_South_Sudan_031520fd_7038_4377_8c53_6d07c3c27dad',
    'count',
    'name', // This is the unique identifier for each school within the 'Schools in South Sudan' point shapefile.
    "ADM1_EN" = @atlas_pagename // "ADM1_EN" is the name of each State in South Sudan, this being also the variable used on the Atlas.
    ), 0)
    I know this doesn't work because the expression is looking for the variable "ADM1_EN" within the 'Schools in South Sudan' shapefile, which is not there. My guess is that it might have something to do with the refFunctions plugin, particularly with the geomwithin('targetLayer','targetField'), but I wouldn't know how to code it. Perhaps there's another way around it.
    My second issue, closely related, is that I don't know if an equivalent for Reports exists for @atlas_pagename. How could I go around doing this same thing with reports? I want to work mostly with Reports, since I find them much more powerful, but they're a bit more tricky. Do you have any tips or reference material with examples that I could use to orient myself in how to use Dynamically updated expressions within QGIS reports?
    Forever grateful!

  • @diogomrozinski
    @diogomrozinski 4 года назад

    Good afternoon,
    Congratulations and thank you for the excellent work!
    I really liked this video. I would like to suggest / request some video along the same lines, but with dynamic symbology on the canvas.
    It could be a dynamic heat map (kernel).
    Thank you!
    Hug!

  • @katefield4390
    @katefield4390 Год назад

    Thank you very much for your video! How do you calculate the area of your base map in a static QGIS map layout? (i.e., the area of the layout map). Thanks!

  • @HermanBooysen101
    @HermanBooysen101 4 года назад

    Thanks for the video. Do you have a video using an atlas as extend?

  • @raunokalda5402
    @raunokalda5402 10 месяцев назад

    Excellent tutorial, it has helped me a lot. But I have run into a problem this time. I'm creating an atlas and calculating certain land cover areas within an atlas item. But since some atlas items are quite close by, the function calculates areas of both items. How can I limit the calculation to a single atlas cover layer item, per atlas page? Thanks if someone can suggest a solution.

  • @lucabellani230
    @lucabellani230 4 года назад

    Súper thanks

  • @locvutrung
    @locvutrung 3 года назад

    Thank Sir very much. I would like to ask you how to show the label of layer A within the polygon/condition range of layer B? Thanks Sir!

    • @KlasKarlsson
      @KlasKarlsson  3 года назад +1

      You need to create a geometry generator to place the labels. You combine the layers in the generator with the "aggregate" function. Not really easy, but possible.

    • @locvutrung
      @locvutrung 3 года назад

      @@KlasKarlsson Thank you very much, I will try and report to you soon. Best regards, Trung from Vietnam

  • @Gungisir
    @Gungisir 4 года назад

    Hi, great tutorial! But I run into a problem. Apparently 'map_extent' doesn't work for me. I can calculate the sum for the entire shapefile but the intersects filter option doesn't work. If I use map_scale for map_get as a key I get a value but 'map_extent' does not give out anything. Is there a way to work around?
    Another thing I noticed is with the attribute table at the end of your video. I used basically the same data but when I sort the lakes in descending order based on the area, the largest lakes sometimes won't be listed. If you zoom in and there is only one large lake and some minor ones everything is alright but as soon as I zoom out the larger lakes won't show up in the table.

    • @KlasKarlsson
      @KlasKarlsson  4 года назад +1

      If you get a value when using 'map_scale' the function should work also with 'map_extent'.
      Try only:
      map_get( item_variables( 'your_map_name'),'map_extent')
      in an expression builder. It should return a in the preview area in the dialogue.
      If you use 'map_scale' you will get the scale at the same preview location.

  • @Refreshment01
    @Refreshment01 4 года назад

    If you please point me in the right direction: Imagine one wants to create an Atlas with a given fixed scale (1:5000 for example), so that for each page Qgis picks & auto changes to the correct paper size to exactly fit the map Atlas index layer in the space. What expressions could one use to achieve this?

    • @juliopeleitay
      @juliopeleitay Год назад

      If you want to FIX the scale of a map, you have to go to map/item properties/scale then EDIT it, you can input your self or pick the number from an attribute table.

  • @user-qy6di2fr1v
    @user-qy6di2fr1v 4 года назад

    Please help me..I am from Iraq and I want to draw a map of Iraq in the Qgis program, and the latitude and longitude coordinates were not real, how can they be set to become the same as the coordinates of Iraq?

    • @hurmizyar
      @hurmizyar 4 года назад +2

      use the UTM 38N as your projection that will help