[Qgis-developer] What about a qgis project add function ?

Brent Wood pcreso at pcreso.com
Sun Mar 2 11:04:58 PST 2014


Hi Michael,

That is very close... (but does have a bug- #9687 - I can save a style, then try to load it for the same layer opened a second time & get an error:
 
"error occurred while parsing reference at line 113 column 155")

The line in the QML file is the action, which is appended to"labeling/shapeFillColorB" as well as an action later in the file.
<property key="labeling/shapeFillColorB" value="255"/>eom https://atlas.niwa.co.nz/login/SearchService?SERVICE_REQUEST_TYPE=100&SERVICE_REQUEST_USERID=833&SERVICE_REQUEST_ASSETID=[% "atlas_id" %]&SERVICE_REQUEST_PASSKEY=public"

(Change the Atlas_ID value to 247002 or 247224 & open the URL in a browser to see the result if you are interested - it is for a map layer of echosounder transects to retrieve the echogram from our image management tool via a web service)


Anyway, apart from the bug, as I understand it, that allows me to save a style, which can then be applied to a layer, but does not inlude the layer data source.


I'd like to be able to open a layer  (sort of like a virtual dataset in ogr) by opening the QGIS layer file, & have the layer load & all settings applied automatically. Currently I need to open a layer, open properties, select style, load style, apply style every time I load the layer.


Cheers,

Brent



________________________________
 From: kimaidou <kimaidou at gmail.com>
To: Brent Wood <pcreso at pcreso.com> 
Cc: "qgis-developer at lists.osgeo.org" <qgis-developer at lists.osgeo.org> 
Sent: Monday, March 3, 2014 6:40 AM
Subject: Re: [Qgis-developer] What about a qgis project add function ?
 


Brent,

Perhaps I have misunderstood your question, but I think you can achieve this simply by "save style as default" . Every time you will use the layer in any QGIS project, the default "style" (which mean the default properties of the layer) would be applied.

Michael




2014-03-02 18:27 GMT+01:00 Brent Wood <pcreso at pcreso.com>:

I suggest a slightly different approach (which may not be all that different once the details are  worked out?) 
>
>
>
>A project stores lots of info about more items than just a layer... but I often want to add a layer with the same style, actions, label, etc settings to several projects, or just to the current canvas without changing what is already in the canvas.
>
>
>Does it seem useful to others to be able to store such info in a "layer setup" file rather than a QGIS project file, so layers can be opened with all such info attached & optionally read on opening? 
>
>
>
>Regards,
>
>
>  Brent Wood
>
>
>
>
>________________________________
> From: Paolo Cavallini <cavallini at faunalia.it>
>To: qgis-developer at lists.osgeo.org 
>Sent: Sunday, March 2, 2014 9:27 PM
>Subject: Re: [Qgis-developer] What about a qgis project add function ?
> 
>
>Il 01/03/2014 22:07, Régis Haubourg ha scritto:
>
>> I would love to call it "Add or embed from other project", and just add a
>> checkbox choose embed or hard copy of the layers and groups. Existing dialog
>> is already correct.
>> I just ported Import Project plugin to 2.0 to satisfy that need. Just be
>> aware that you need to give a new id to imported layers, to be able to
>> import some layers n times. Code is quite simple, I would love to see that
>> in core!
>
>+1
>Merci
 Régis.
>-- 
>Paolo Cavallini - www.faunalia.eu
>QGIS & PostGIS courses: http://www.faunalia.eu/training.html
>_______________________________________________
>Qgis-developer mailing list
>Qgis-developer at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>_______________________________________________
>Qgis-developer mailing list
>Qgis-developer at lists.osgeo.org
>http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140302/17da2ae0/attachment.html>


More information about the Qgis-developer mailing list