Embed layers and groups in QGIS

The option to “Embed layers and groups” is a nice new feature in QGIS (upcoming version 1.8). I hadn’t spotted it, but it was mentioned on the QGIS forum (always a valuable source of information).

It allows you to open the layers of a QGIS project file in your current project (you can select which layers you want to open). The nice thing is that it will open using the style settings defined in the project file.

Only problem I am having is that after adding a layer from a project file, it does not seem to be possible to edit the properties of that layer. I’ll ask at the forum whether that is a feature or a bug.

 

 

 

About pvanb

I am a tropical forest ecologist with a focus on spatial and temporal patterns and processes at population and ecosystem level. I am furthermore very interested in issues related to conservation and sustainable use of biodiversity and natural resources under current and future climates. I have worked in the Middle East (Syria and Lebanon) and South America (Brazil) and in Eastern Africa (Kenya).
This entry was posted in QGIS and tagged , , . Bookmark the permalink.

3 Responses to Embed layers and groups in QGIS

  1. Pingback: Embed layers and groups in QGIS | CEREGeo - Geomática | Scoop.it

  2. Nathan says:

    Not being able to change the layer properties is by design. In the code:

    if ( !QgsProject::instance()->layerIsEmbedded( ml->id() ).isEmpty() )
    {
    return; //don’t show properties of embedded layers
    }

    checks to see if the layer is embedded if it is does nothing.

    I would suspect it’s easier this way although I can think of a use cases when being able to change embedded layers would be handy.

    The things to think of is:
    1) Do we break the link to the other project file on any property change ( the layers become part of the project rather then embedded)
    2) Or do we keep the link to the embedded project and update it will the new properties.
    3) Or give a warning to let the user pick what the want to do.

    2) is a little tricky because in the QGIS code you can only have one instance of the project class. This might need to be changed first before 2) can be done with ease.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s