0

So I have two layers. First one is line layer (columns: id, length, address_id) and atlas is connected to it so when I change objects, map is zooming to next line. Secound is point layer (columns: address_id, city, street, house_number). Both of these layers are related by address_id value and also line layer is intersecting wtih point layer.

I want to display below map, tables in which there will be placed attribbutes from point layer(city, street and house_number) and every time I change atlas object new attributed will be shown in these tables. I was trying to make expressing using attribute function but no success.

Is there any easy way to make it happen. I could insert all information from point to line but i would like to avoid this solution.

0

Assuming that you have a one-to-one intersecting relationship between the two layers (i.e. 1 line only intersects 1 point), then you could look at using the aggregate function.

Check the answer by eurojam to this question on stack as it seems a similar type of scenario.

You essentially can create an aggregate function stating: Where my atlas feature (line), intersects a point, provide me the attribute I want from the point layer.

As pointed out in the comments there, you can also define a buffer around the point within the aggregate function in case the intersect itself doesn't work (just go for a tiny buffer).

This would basically be doing a spatial comparison, rather than a tabular comparison to achieve the same result.

Note, you can add an attribute table in the composer that will contain this information, along with your line attributes in a neat and tidy fashion.

0

You can obtain your request task using a filter in the Layout->Item Properties of you Attribute Table.

Using the expression address_id= @atlas_featureid

you should see your table be populated only by the points having a common address_id with your line used as atlas coverage.

enter image description here

2
  • Thanks a lot that helps.
    – asham
    Nov 13 '20 at 9:03
  • You're welcome. If the answers suite you please consider to vote and accept it to help other people to consider the solution valide.
    – Val P
    Nov 13 '20 at 10:20

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.