[Qgis-user] Map Composer and Attributes from a layer

Randal Hale rjhale at northrivergeographic.com
Sun Dec 7 14:08:51 PST 2014


Ahhhhhhhh....

I'm moving a project from ArcGIS Data Driven Pages into QGIS. I'm not 
sure if Data Driven Pages was the best way to do it originally....and 
that's why I was shying away from Atlas when Alexandre brought it up

Now I've got two choices when I had none.

Good People - Thank you.

Nyall - Thanks for all the stuff you're doing in Composer.

  Randy


On 12/07/2014 04:50 PM, Nyall Dawson wrote:
> On 8 December 2014 at 07:08, Randal Hale
> <rjhale at northrivergeographic.com> wrote:
>> That does give me a workaround of sorts....
>>
>> Is there any way to pull from a table and place the information in composer
>> - a table that isn't being used by Atlas?
>>
>> .....But Alexandre's idea might give me a work around in the meantime.
>>
> Atlas IS the correct way - it's not a workaround ;). However, if
> you're after an expression, then use a combination of getFeature and
> attribute. This is how it works:
>
> First, use getFeature to find a matching feature from a layer:
> getFeature( 'my_layer', 'id_field', 5)
> This will return the feature from "my_layer" with the attribute
> "id_field" equal to 5.
>
> Next, chain this into attribute:
> attribute( getFeature( 'my_layer', 'id_field', 5) , 'feature_name')
>
> This will return the value stored in the attribute "feature_name" from
> the matching feature from "my_layer".
>
> Hope that helps!
>
> Nyall

-- 
-----------------
Randal Hale
North River Geographic Systems, Inc
http://www.northrivergeographic.com
423.653.3611 rjhale at northrivergeographic.com
twitter:rjhale     http://about.me/rjhale
http://www.northrivergeographic.com/spatial-connect




More information about the Qgis-user mailing list