Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Using ArcMap, it is possible to add a dataset (eg a shapefile) to the map, and configure the layer's properties (such as the symbology, table joins, switching some attributes off in the Identify results, etc).

This layer can then be saved as a Layer file:

enter image description here

The resulting *.lyr file references the data source (the shapefile) and all of the properties which have been configured for that layer. This makes it easy to add this same layer to multiple map documents, inheriting all of the properties which have been set.

Is there an equivalent in QGIS?

share|improve this question
1  
We (QGIS) are currently toying with a similar idea. Not hard to do I don't think. –  Nathan W Mar 6 at 23:40
    
If someone was happening to be implementing said feature what would you want the file extrusion to be? ;) –  Nathan W Mar 8 at 11:06
add comment

2 Answers 2

up vote 21 down vote accepted

It does now :)

Only in the dev version but something like this could be added in an older release using a plugin. If I get some time I might just do that.

enter image description here

enter image description here

A QGIS Layer Definition file will have the *.qlr extension and is a XML dump of the maplayer node for the project.

The start of the file will look like this:

<!DOCTYPE qgis-layer-definition>
<maplayer minimumScale="-4.65661e-10" maximumScale="1e+08" simplifyDrawingHints="1" minLabelScale="0" maxLabelScale="1e+08" simplifyDrawingTol="1" geometry="Polygon" simplifyMaxScale="1" type="vector" hasScaleBasedVisibilityFlag="0" simplifyLocal="1" scaleBasedLabelVisibilityFlag="0">
  <datasource>F:/gis_data/cadastre.shp</datasource>
  <title></title>
  <abstract></abstract>
  <keywordList>
    <value></value>
  </keywordList>
  <layername>cadastre</layername>
  ... {style, etc}
</maplayer
share|improve this answer
5  
now that's what I call customer service –  Stephen Lead Mar 10 at 3:07
    
This will work for vector and raster, including WMS, etc. It doesn't work with a OpenLayers layer for example. –  Nathan W Mar 10 at 3:28
    
Will it work for database stored data? PostGIS, Spatialite, etc? –  HeyOverThere Mar 10 at 14:57
1  
Customer service or insider trading... ; / –  DavidF Mar 21 at 18:55
1  
Customer service –  Nathan W Mar 21 at 22:06
show 3 more comments

Not exactly. You can save your symbology to SLD file or qgis layer style file (.qml). Like .lyr file these files save your symbology options, however, they do not point to the data itself. You have to re-add the layers then apply the style or SLD file. The SLD file only stores symbology, .qml files store symbology, labeling options, even edit widgets for your fields.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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