3

I'm trying to get a list of all points (from a point layer) that can be found in a unique rectangle polygon.

Input layer 1: points (address data)
Input layer 2: rectangle polygon layer (created with research tools, create grid)

I used the grid to create an atlas and now my goal is, to get different lists, that show me what page contains what addresses.

As output I need a list with all addresses and an "extra column" that shows me on what atlas page I can find each address. So that I can take the right page when someone gives me an address to find.

If there is a function to analyse that, I'm unable to find it.

3

In the Print Composer you can add a table. When you select your table, select the tab 'item properties'. There (under feature filtering) check show only features intersecting atlas feature.

enter image description here

For creating a 'connection' between your points, you can choose for a fixed solution or a dynamic solution.

Fixed solution

  • in the processing toolbox (ctrl + alt + t) search for 'join attributes by location'
  • set your points-layer as target vector layer
  • set your rectangle-layer as join vector layer
  • set intersect as geometric predicate
  • run the algorithm

Dynamic solution

  • add a virtual layer (Layer > Add layer > Add/Edit Virtual Layer)
  • import your 2 layers
  • add following SQL:

    select pt.attr1, pt.attr2, pt.attr3, pg.attrA, pg.attrB 
    from point pt
    left join polygon pg on st_intersects(pt.geometry, pg.geometry)
    

Change point and polygon to your appropriate layer names.

6
  • thank you very much! thats just not 100% what i need... i need a sort of connection with the polygon and the point layer... i need a list, with all the adresses and (maybe as an extra field) the id of the polygon in which the adress is. so that i can choose the right atlas page when i get the adress information – darius Oct 18 '18 at 10:03
  • then you have to clarify your question, because what you tell here is not what you asked. – PieterB Oct 18 '18 at 10:12
  • @darius, for what you ask, you need sql. I will change my answer – PieterB Oct 18 '18 at 10:13
  • @darius, does the connection has to be dynamic? – PieterB Oct 18 '18 at 10:17
  • no - i prepare everything for one project and at the end, after i produced my atlas, i want to output the adress/page information – darius Oct 18 '18 at 10:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.